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

editing autocomplete field with reference

Wasn't sure how to name the topic.

I have a node that assigned to specific user with field name 'agents_name' with reference to $user (through CCK).
The field is setup with autocomplete, so it displays $user->name in the field, but saves $user->uid in the table.

I created additional form right on the page (through Contemplates) to be able to assign the node to specific user without actually going into Edit page. The value autocomplete field appears to be $user->name, in order to save the uid into the table, I wrote this submission function:

how to reload modules?

I am trying to make some hacks to the image_gallery.module . But when I change the code of the image_gallery.module file, I cannot see any of changes I did, until I restart the machine. I tried running cron.php, update.php, or restarting the server after I make the changes so the module gets "reloaded". What can I do, besides restarting my machine, to see the changes taking effect?

Is Pathauto really overkill for path needs?

Hello people,

I'm new to Drupal and I apologize if similar question has been asked but I'm really interested in using Drupal due to its Pathauto module features.

While Pathauto is very good and configurable I think it could be a bit an overkill of a large site.

Here is why:

Pathauto stores associations of old node name => new node name into databases. If you select a certain format and it is being used on a forum or similar it could very quickly fill the database with junk data that is not really needed.

I do not see big difference between URL in form of:

www.site.com/node/4/this-is-my-subject

or simply
www.site.com/this-is-my-subject

However - the first subject could be formed using simple .htaccess redirect (last part is always a title) while first part (node/4) would be used normally - to parse the path to data. Also, the first form of URL would NOT require a database storage for aliases. This could make a significant difference.

I've seen various paths in forms like:

www.site.com/this-is-my-subject-n4 (n4 would be interpreted as "node/4")
www.site.com/n4-this-is-my-subject

or any other way you like it.

fckeditor and roles

We're using fckeditor on our Drupal install. I think we're a version or so behing on both, but here's something we added in case anyone is interested.

Limit file upload / delete in certain directories based on roles

The delete function is added per:
http://www.bram.us/2006/10/18/my-tinymce-file-management-part-2-tinyfck-...

drupalRoles.php, shown at the end of this post, creates an array where directory paths are mapped 1 to 1 to roles. In this example, all roles whose names start with 'edit_' are selected and mapped to subfolders under each file type in the fckeditor files directory where the folder name matches the role name after 'edit_', so role: edit_District would have access to add/delete files and create folders in directories: File/District, Image/District, Media/District, etc.

Any user who can use fckeditor can browse these folders so as to link to files, but they cannot perform actions noted above without being in the role for that directory.

For our site, the role names correspond to taxonomy categories, so we have a District category whose nodes can be edited by those in the edit_District role.

---- Edit commands.php as follows:

include 'drupalRoles.php';

function hasFolderAccess($folder) {
global $userRoles,$folderRoles,$uid;

$access=false;
$ar=0;
foreach ($userRoles as $rid) {

Would like to know what filters are in line after my filter

Is there any way for a filter to know what filters will be run after it? In particular, if one filter outputs markup that should be consumed by another filter, is there any way to check that that filter is indeed going to be run as part of the current content type?

Question is related to Biblio module depending on Footnotes module: http://drupal.org/node/122535

Trying to create a page using db_query

I'm trying to programtically create error pages in my installation profile. If you don't know profiles, don't worry, just pretend I'm doing this in a module. (It's really a PHP question.)

Here's my PHP

Pages

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