Anyone know the best way I could implement an image fight module something like the site http://kittenwars.com I would like to see two random images people have uploaded and they can select the best one!
~Simon
I have created a module which defines two new node types. For this discussion call the node types A and B.
For each of A and B I have implemented the hooks required to allow creation, editing and deleting of the node.
The relationship between these node types is that each node of type B is associated with a node of type A. There can be many Bs associated with an A. One way to think about this situation is that the various node As are the possible types of B nodes.
somewhere in my code I try to find out if there is a similar node (used as downloads for this nodes using the disknode-module).
for this I used this function:
$doc_link = eregi_replace("^node.","",db_result(db_query("SELECT src FROM {url_alias} WHERE dst = '%s_doc'", substr($node_url,1))));
now if an anonymous user is connected the function substr($node_url,1) is an empty string, what else can I use in
place of $node_url or do I have to initialize something first?
hi,
Want to create a new node type, with several fields.
To began with, i know i have to implement the function mynode_form to create the new items in the form. Like the code fragment in the end of this message, taken from node_example.module.
But there are some fields that are automatically displayed, even if my function doesn't write then: Authoring information,Options,User comments,Title,Path alias
I want to suppress some of these fields for my node type, because they will have fixed values.
I'm trying to hack a module to get it to work the way I want it to (the excerpt module).
Right now the way it works is that someone has to redundantly put the information in the new teaser input space (which is created by the excerpt module), and then put the same exact text in the 'main body' input space. Otherwise the teaser is only shown on the front page, but not in the full page view.