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

Image Module not working with safe mode

File uploads (core module) are working fine. Uploading images with the image module only gives me the following error and a post without image: "Invalid argument supplied for foreach() in /export/www/students/projects/gamedevclub/modules/image/image.module on line 316."

Drupal 4.6
PHP Version 4.3.3
Apache
pgsql

I don't really understand what's going wrong. If only I had a more useful error to work with I might find out something more. I'm not good at php though.

If you need more info to answer my question, just let me know.

menu_set_location an tabs

Hi.
I've created a module which displays a node instead of term-listing. If i call it without menu-modification all is ok. The "view" and "edit" tabs are displayed and teh breadcrumb is set correct.
But if i use "menu_set_location" to activate the corresponding menu-item the tabs aren't displayed anymore.
How can I set the active menu-item and display the tabs?
I tried to add

$items[] = array(
                 'path' => 'node/'. $nd->nid, 
			   'title' => t('view'), 
			   'callback' => 'node_page', 
			   'access' => node_access('view', $nd), 
			   'type' => MENU_CALLBACK
			   );
$items[] = array(
                 'path' => 'node/'. $nd->nid .'/view', 
			   'title' => t('view'), 
			   'access' => node_access('view', $nd), 
			   'type' => MENU_DEFAULT_LOCAL_TASK, 
			   'weight' => -10
			   );
$items[] = array(
                 'path' => 'node/'. $nd->nid .'/edit', 
		           'title' => t('edit'), 
			   'callback' => 'node_page', 
			   'access' => node_access('update', $nd), 
			   'weight' => 1, 
			   'type' => MENU_LOCAL_TASK
			   );

but it do not work ("access denied", even if "'access' => 1"). Changing "MENU_DEFAULT_LOCAL_TASK" to "MENU_LOCAL_TASK" displays the node but without tabs :-{

Any suggestions?

best regards,

Stefan

Node Background

I want to make a module that allows the user to selcct the background image of a node.

This will by done by selecting the image from one in image.module (maybe using image assist - or something like that) and then write it out to a style tag when the node is viewed.

I have never written a module before (apart from the getting started thing in the handbook) so can anyone give me some ideas of how to go about it? I was looking at nodewords to see if I could hack it about a bit, but it's a bit too complex for my needs.

Change aggregator style

Hello

I want to change the

style for all the aggregator blocks. It's using "list-item" now, and i would like to change it to something different.
Can i do this ?

Thanks

dice roller?

Not that I've been able to find anything like this for any other site or message board software, but I'd really be interested in someday applying a dice roller to one of my sites, for the purpose of play-by-post roleplaying and such. If I'm missing something notable, could someone point it out to me? (..not limited to drupal.. I haven't been able to find a dice roller for anything!.. even something as common as phpbb..) If I knew how to go about it, I'd build it myself.. but I still have my hands slightly full getting used to customizing themes. For someone that is fully capable of envisioning and for that matter executing such a task, at very least (if you don't want to just go ahead and make it for me.. :D ) could you give me an idea of a difficulty level?

Some features I had imagined it could have..
~simple XdY format.. probably a string of text in brackets .. [roll=2d4]
~multiple dice in one roll .. [roll=1d4,2d6,8d100]
~have some sort a history table in the database or something? the rolls would be numbered in sequence.. perhaps a page could display the numbers, each of these numbers could then be linked to the article or post in which they were rolled.

My followup question basically being, would the history feature be the downfall of an attempt at such a project? I MIGHT have a person or two to beg to do this for me, but I have to be able to convince them that it's not a waste of time first. ;)

modules and which hooks are essential

Hi guys

I been using drupal for a while now but have put off the whole process of looking at module development but my time has some

I going to start with something easy mh easy famous last words, What I was thinking of was coding a module that give the user the ability of displaying the <

Pages

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