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

Problem: Filestore Temp Path Not Found!

I am trying to get the filestore module working. It seems everything is up and running correctly, yet I cannot figure out why none of the temp pathnames entered in the filestore configuration screen are found. This manifests itself in a "Filestore Error. Temporary Upload Path -- does not exist." I feel like a dork because it seems this should be a no-brainer. I can't find any forum topics that address this problem. Oh, and to guess your advice.. I am putting /tmp/, or /drupal/tmp, or any combination I can think of.

Theme function doesn't return content

I am trying to return a string through the theme function, the module is activated and when I goto myurl/wpiupd it returns the theme, but it doesn't contain my test string. If I replace the theme call with for instance "echo 'teststring';" it prints teststring on a white background. I am using Drupal 4.3.1, how can I make the theme function return my string?

here is the sample module:

function wpiupd_settings() {
// only administrators can access this module
if (!user_access("admin wpiupd")) {
return message_access();
}
}

first attempt at displaying a test string using a module

Hello there!

I am attempting to write a module for drupal for the first time. I am working on putting together a basic skeleton of a module together. I have created the file, inserted it into the module directory, named it properly, and inserted the following code, and activated the module in an attempt to have the module return a test string when I goto http://www.mywebpage.com/wpiupdates - all it does is return an error along the lines of index.php has failed to open stream. Bad file descriptor.

my web site has been working fine - and still works fine after the module is activated via the admin - I believe the problem lays with my code. can someone help me to figure out what i am doing wrong?

Here is the code:

function wpiupdates_settings() {
// only administrators can access this module
if (!user_access("admin wpiupdates")) {
return message_access();
}
}

function wpiupdates_node($field) {
$info["name"] = t("wpi updates");
$info["description"] = t("WPI Update Module.");

return $info[$field];
}

function wpiupdates_link($type, $node=0) {
if (($type == "system")) {
// URL, page title, func called for page content, arg, 1 = don't disp menu
menu("wpiupdates", t("WPI Updates"), "wpiupdates_all", 1, 1);
}
}

function wpiupdates_form(&$node, &$help, &$error) {

$help = ("Enter the latest WPI update inside this form.");

The skinny on xtemplate: Need more info

I need to know more about xtemplate and how it adds information and parses it. I'm developing a page shell module and I need to modify xtemplate so that it renders the shells correctly.

Ideally I would like to create a new function(s) within xtemplate that parses my information. Then within the xtemplate.xtmpl file I could add a new subsitution tag for page shells, {shell}.

Can anyone point me in the right direction?

I wasn't able to figure this out so I modified the _page function so that the $content variable was wrapped in an "if" statement. The "if" statement checked the type of the node and if it was a shell then it rendered my shell content instead of the node content. This almost worked, however the _page function doesn't get the $node information passed to it. So I had to call the node information using node_load. This method prints my content, but it also generates a permissions error.

In addition to modifying the _page function. I also tried putting an if statement within the _node function which checked the type and then tried to add the shell information to the node. For example taxonomy is added to the node variable, and so is avatar. I tired to add shell to the node variable using assign() and parse() but I was unsuccessful. Does anyone know how to do this?

Thanks, - Strayhand

How do I submit varibles that the settings file of of my module created to the database?

Does any one know how to make it so that I can set settings in my module settings bit, and then have the setting commited to database?#

thanks

Mr Maggoo

Pages

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