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

Image module for 4.4 update anyone ?

I was just curious if whoever was behind the development of the image module was planning on updating it to 4.4 anytime soon as it is a great module. Hopefully it's in the works already but I was just curious. I'm still learning PHP and might try hacking at a module when I run into the requirements.

Adding fields to existings form

I'm developing a module to attach files to a story. It means putting a link that run a set of function by clicking on it from the story form.
The problem is.. I'm trying to do simil as the node_image does (adding a button), using the _nodeapi function, but the output returned from that function does not appear in the form. Do I have to implement other functions to get what i want, and in general, how can I add more fields to an existing form whith a new module without modifing the one existing?

Meta Tags

Is there a module that lets you set meta tags for all pages or one that sets pages for specific ones? If there isn't, where is a good place to start looking in how to do that? I need to put a pics label on all the web pages for my site and would love to be able to put a Creative Commons header for those nodes that have one.

ECommerce: Setting Inventory

I've set up the ECommerce module and it seems to be working but I can't figure out to add "inventory." My "products" (which are actually subscriptions) show "sold out" and I can't find the way to establish "inventory." Has my installation failed, is the tool hidden somewhere I can't find it or do I have to change the database by hand?

Bug in Subscriptions Module

There is a bug in subscriptions.module at line 72 (4.3.0 version). That line is part of concatenating an SQL query:

$queryn .= "WHERE n.status = 1 AND s.uid = $account->uid AND s.stype = \"node\" ";

The problem is that whenever the PHPSESSID cookie is empty or not yet set, $account->uid is null. This happens anytime the visitor comes to the page for the first time, since the page that sets the cookie does not yet have access to the cookie. See PHP.net documentation:

Cookies will not become visible until the next loading of a page that the cookie should be visible for. To test if a cookie was successfully set, check for the cookie on a next loading page before the cookie expires. Expire time is set via the expire parameter. A nice way to debug the existence of cookies is by simply calling print_r($_COOKIE);.

I fixed this by editing the conditional for which the script begins putting together the SQL query. Currently, this line (line 67) reads:

if (is_null($subscriptions[$account->uid])) {

I changed this to:

if ((is_null($subscriptions[$account->uid]))&&(!is_null($account->uid))) {

The result is that if there is no valid user ID for line 72, the query is skipped entirely. I haven't poked around the module enough to really be sure how subscriptions.module works in its entirety, so I'm not sure, but I would assume that $subscriptions[$account->uid] is a separate variable from $account->uid. I hope this fix doesn't entirely break the module, but perhaps the module authors can address this in future versions and/or patches. In the meantime, I will post the original error messages below, so that anyone else who encounters this problem might be able to turn this thread up in a search.

Per Node Access Content Hack?

I've read a bit in the forums about the effort to enhance user access levels, such as per node, and based on taxonomy. I just read that groups.module for 4.4 isn't working yet. I am trying to figure out how to hack the blog module to make it accessible to everyone - annonymous users - and then any other defined roles, while keeping the rest of the "content" non-accessible to annonymous users.

Pages

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