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

Amazon associate tools for HEAD

When Drupal 4.6 is released I'll be pretty much abandoning the Amazon search module for a significantly enhanced Amazon associate tools module. You will be happy to know it works with every existing Amazon store.

A Suggestion For Time Zone Handling In Drupal

I'm writing a module that will move calendar events from another on-line calendar application into the Drupal Event module. Now that I've figured out how to create nodes from inside of a program, it's going fairly well. But I've run into a very annoying problem caused by the way that Drupal handles user time zones and time stamps. While I will be able to hack around it, this really ought to be fixed in the framework itself, since from reading the forums, it's clearly causing problems for users.

Here's a quick description of the problem. The Event module stores the start time as a Unix time number, which represents the number of seconds that have passed since January 1, 1970 GMT. The GMT (actually, UTC to be exact) is an important piece of this: if two computers running Unix are in different time zones, but are syncing to an external clock, they should be have the same number for the current time. The servers, though, have a notion of their own time zone, and use libraries to convert from the UTC time number into the current local time when they format a date for an application.

So how does Drupal (circa 4.5) deal with this?

Sub-site module

I am trying to figure out how to write a module that will allow administrators to create sub-sites. These sub-sites will be part of the main site, but still have their own mini community. In other words, what I want is to have mainsite.com/subsite_name go to a sub-site page with maybe a news page, about page, forums link, etc. The news page will show blog posts from owners of the sub-site. The other pages will have somewhat static content that should be editable by the sub-site owners. It seems like Drupal is certainly capable of doing this already, so I am not entirely sure if a module is necessary, but it seems as though some of the relationships with the other modules will at least need an additional database table (i.e. associating a forum with a sub-site), not to mention how this should be integrated from the administrative side (i.e. automatically creating a forum when a sub-site is added).

Currently, I keep going around in circles with how to handle the news page. It seems like sub-site owners should be given a pulldown menu in their blog creation page that allows them to choose which of the sub-sites that they own (if any) that they want to publish the content on. Then, on the news page, I suppose I could just display the nodes that the owners of the site-site marked as wanting to be displayed on the sub-site. However, then I have to deal with all of the logic of listing the nodes (i.e. handling overflow, comments system, RSS, etc). Maybe there is just a simple node API of displaying desired nodes and allowing Drupal to handle the rest of the logic (i.e. so comments still work, and so I could go to mainsite.com/sitesite_name/rss and get a feed of the news feeds for that sub-site).

Storing info from hook_auth

If I discover some information during the authentication process that I want to associate with a user for the duration of their session, is there any means of doing this? From the hook_auth funtion, I don't have any idea which user it is that was authenticated, but the remote authentication server sends session data that I want to keep with the $user for later use. I could place this data in $_SESSION, but at what point would it be appropriate to assign it back to the authenticated $user? hook_user('login'...)?

Updates is an Apache keyword

Just a friendly warning, do not use updates (and I am told manager) as a module names.
These are special names in Apache and the module will not work if you have clean url's turned on (you get a Page forbiden message).

I found this out after developing a module called updates on a win server and then installing on the real site.
Three cheers for search and replace :).

RSVP bandwidth drain

I have the RSVP module installed.

For some reason, whether its needed or not, the rsvp.css file is always included at the head of every page.

Its a small file, but the bandwidth can add up, and its unnecessarily being called when rsvp's arent being used.

Am I mistaken somehow?

If i'm right, is there an easy way to fix it?

Pages

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