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

custom forum, upload images help?

I'm writing an encyclopedia module, and am having a little difficulty... I'm trying to upload an image from the node/x/edit but seem to not be able to. I'm using Konqueror, so I can see the "Are you sure you want to upload these files" dialog come up-- verify it's working you see. But I can't seem to figure out the file_ hooks... can anyone help please?

e-commerce in 4.6, which download?

I'm running 4.6RC, which e-commerce should I use: CVS, the one in the sandbox, or 4.5? I tried to wait for the release but I need to get some stuff set up now.

Patching 4.5 module with "db_query" to 4.6

I'm trying to update a module (my first time trying something on the code level of PHP). I think I have almost everything working (after searching other posts, etc.). The exception is found in the following lines of the site_map module:

$result = db_query('SELECT DISTINCT t.tid, n.nid FROM {term_node} t '. _node_access_join_sql() .'INNER JOIN {node} n ON t.nid = n.nid WHERE n.status = 1 AND '. _node_access_where_sql());

$result = db_query("SELECT DISTINCT t.tid, n.nid FROM {term_node} t, {node} n ". _node_access_join_sql() ." WHERE t.nid = n.nid AND n.status = 1 AND n.type = '%s' AND ". _node_access_where_sql(), $type);

I have replaced the "node" with the "_node" and tried adding in a "db_rewrite_sql()" statement to each of these lines according to the patch discussion I found at http://drupal.org/node/17666. My knowledge of PHP syntax (or anything PHP, for that matter) has prevented me from success. My attempted patch is:

$result = db_query(db_rewrite_sql('SELECT DISTINCT(n.nid), t.tid FROM {term_node} t '. _node_access_join_sql() .'INNER JOIN {node} n ON t.nid = n.nid WHERE n.status = 1 AND '. _node_access_where_sql()));

$result = db_query(db_rewrite_sql('SELECT DISTINCT(n.nid), t.tid FROM {term_node} t, {node} n ". _node_access_join_sql() ." WHERE t.nid = n.nid AND n.status = 1 AND n.type = '%s' AND ". _node_access_where_sql(), $type));

Where to start for exporting an RSS feed from my site

I'm working on a module (discusspoll) which I'm testing at OurOpinion.com

My question is, where should I look, in terms of documentation, to get started for implementing/setting things up so that I can feed "discussion polls" to other sites via RSS? I'm assuming that my module output has to be XHTML compliant for this to work.

what does "$user->uid" signify?

i mean, specifically, the "->"?

i don't see that in PHP documentation, nor anyplace in the drupal documentation i can find.

it's not exactly easy to search the forums on that string ;)

thanks,
--derek

Make database tidy

Well...

I am sure that everyone knows that during the life of the web-site the database becomes somewhat distorted. Created and deleted nodes, modules make indexes in the tables going in a funny sequence like 2, 3, 5, 15, 17, 18, 24... indead of 1, 2, 3, 4, 5, 6...
We can just forget about this issue, but probably there are another fans of accuracy like me and probably someone have some script or module to bring the database to the ideal order. To compress the numbering sequences, changing all refered foreign keys as well and auto_increment values.

Pages

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