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

Schedule front page

I'm working on a new module for scheduling the home page. I manage a small newsletter that updates every week and I hate having to remember to go into "settings" and change the front page node. So... using 4.7 beta4 I started work on a module for scheduling the home page. One thing that I really like about the 4.7 code base is the use of form generation.

checkboxes default value ( new form api)

am i correct in thinking that to give non-standard default values to a set of checkboxes, i just need to pass into the #default option an array of checkbox_key => default_value_desired?

multiple ecommerce sites with different autoreturn addresses

Guckie has written some great code and explanations of how to use paypal IPN with multiples sites. here it is.

Adding an HTML img src in the forward.module

Okay, this is going to sound dumb, but I have a site that uses the forward.module. As you probably know, it's made so a link appears at the bottom of a blog post that says "email this page."

Anyway, the client wants a little envelope graphic to appear after the "email this page" text. (Gag.) So, me, being new to Drupal, looks at the forward.module and pretty much panic because I don't want to explode the site if I screw up the PHP code.

It looks like I'd need to add a HTML img src blurb in the function forward_link, but like I said, I'm a newbie and don't want to kill the site.


// This var is set in the settings section under the admin/modules/forward section
// It shows 'email this $nodetype' or 'email this page'
$forward_link_type = variable_get('forward_link_type', 0);
if ($forward_link_type) {
if ($type == 'comment') {
$forward_link_type = 'comment';
$links[] = l(t('email this %type', array('%type' => $forward_link_type)), "forward/$node->nid&cid=$node->cid", array('title' => FORWARD_TITLE), NULL);
return $links;
}
$forward_link_type = $node->type;
}
else $forward_link_type = 'page';

if ($main) { // not on an index page
if (variable_get('forward_show_on_main', 0)) {
$links[] = l(t('email this %type', array('%type' => $forward_link_type)), "forward/$node->nid", array('title' => FORWARD_TITLE), NULL);

Need a Parametric Search Module

Hello All,

First of all, I am very new to Drupal, but I really like what I have seen so far. So, what I want may already exist and I just haven't found out about it yet. I want to be able to search the content on my site based on a set of parameters, like for example, looking for all posts with a certain number greater than/less than number N. The "certain number" would have to be previously defined in some way to pick it out from the other content, and there could be multiple parameters to be matched.

I'm guessing that there are two ways to go about this. One is that I would have to make my own custom "add content" system with some way to specify which content is which parameter, and then store the data in custom tables in the database. Then the search feature would be able to find the data because it knows which tables hold which content. This seems like a lot of work, and that it would require more maintenance as drupal grows and changes.

The other method would be to use XML tags in the content around the specific data, so then I could parse it and pull out the data from each posting during the search, then list the matching posts. This seems like a lot less work because I don't have to make my own "add content" system, as the one in drupal works for that now. I also wouldn't have to tinker with the database. The downsides are that as the amount of content grows, it might not scale as well as the database storage method above. Also, I don't know if Drupal will change the content entering system at some point and break the ability to embed XML tags, but I would think not.

Can hook_menu menu tabs be used on the modules settings page?

I am probably not usnderstanding this correctly but I thought that menu tabs and hook_menu were available by the path given. But when I used

admin/settings/mymodule

Pages

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