This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Calling a function of another module/filter

Is it possible to call a function of another module that actually is a filter to apply the filtering on the content of my module? How?

ex:

$text = externalfilterfunction($text);

image-imgAssist-Filemanager

i noticed that, when installing one of those 3 modules (i dunno which) the 'files' folder is created in the root directory, right?

Seems like when created, the ownership of that folder is assigned to a number xxx.

then, a group is created, a group of the same name as the user of the Cpanel, the user that logs in as root (which is me).

That means that, and i've experienced it, even if i give to the group 'me' the same permissions as the owner-number, i'm not permitted to delete or move any files within that folder.

Is that supposed to be?

what is a %-modifier?

i am in the midst of developing my very first module. when performing a database query (with hook_insert, hook_update, hook_ delete, hook_load, etc.) via db_query i have noticed several funny values like %d and %s. after a little digging, i learned these are called %-modifiers. that said, i have no idea what they stand for or do.

can anyone shed some light on this for me and let me know how to use them? thanks a bunch!

shipcalc flat rate & beginner php programming

Hi,

I'm trying to modify the ecommerce/shipcalc .inc "module"
to avoid javascript, and have a hardcoded list of various countries
that would not be contigous in the javascript pulldown.

I've excerpted (below) the file that I save as weight.inc, and have just a few questions.
At line 18 I define
function weight_get_rates($txn)
which is getting called.
However, I can't get the country check to work properly

if (in_array($ctry, $usa))	{ $flat_rate = 12.3;    $per_pound_cost = 1.4732; }  

despite a variety of syntax experiments:

		$usa   = array( "United  States");
		$usa1    =  array(  'US' => t('United States'));
		$usa2    =  array(t('United States'));

If someone could
1) show me a simple example of how to check which country is being set by the customer
and/or
2) show me how to display/debug variables on screen (the php equivalent to printf . )

I'd be a good bit closer,

Thank you,

==============================

<?php
// custom weight module for 4 region flat rate
function weight_shipping_methods($type = 'domestic') {
// TODO: Add descriptions of various shipping methods.
$methods = array();
$methods['weight'] = array( '#title' => t('weight'), '#description' => t('Weight Based Shipping.'), );
switch ($type) {
case 'domestic':
default:
$methods['weight']['Flat Rate & Weight Based'] = array( '#title' => t('Flat Rate & Weight Based'), );

Should I write a new module for Drupal 5.x or for 4.7

I'm a newbie when it comes to module writing, but I was wondering if it would make more sense for me to write a new custom module using the 5.x or 4.7.x API for a site I'm currently developing? I don't intend to launch the site for a few months, and I'm wondering if using the newer API will help me avoid a lot of future updating of my module when I upgrade to 5.x.

How to make multiple book outlines when # of nodes is too high to be readable

I have been creating books to represent issues/volumes of a magazine. I now have 4 issues online and over 100 book node pages. The outline function of the book module is a bit overloaded. It might be nice to be able to have a meta outline feature or to hide the subnodes when using the outline tab. Any such feature out there?

This would make a more scalable navigaition system. Likewise the menu system is hard to use after about 20-25 items. Any one working on an elegant solution?

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions