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

general module question

I'm getting ready to install Flexinode.module and I see there have been several patches to this module.

At the top and in actual file there is this line:
"// $Id: flexinode.module,v 1.36.2.4 2005/02/06 18:20:26 killes Exp $'

does this mean that the file has been updated to include all patches up to 2005/02/06 by killes -- even though on the Flexinode Download page it says this:

"Download latest release (4.5.0, 24/09/2004 - 15:20)"

If wrong guess, please share what it means

Pay to sign up for site?

I am wondering if there is a way to make it so that when people sign up for my site, they have to pay a sign-up fee. I have played with the ecommerce package, and haven't found a way to do it with existing functionalities of Drupal. Should I just make it so that sign-ups require admin approval and send an e-mail out with a payment link? It would be much easier if I could just integrate this functionality into the sign-up page. Would I need to simply extend the current user module, or how would I go about writing a module that plugs into the current user module?

Adding search to aggregator.module

Hello,
I would like to contribute some code to be included in the next release of Drupal. It adds search to aggregator.module

You can see it at work here: http://www.phillyfuture.org/search?keys=wifi

I believe this is a very important feature that should be part of Drupal's default aggregator.module. If you take a look at my example, it shows you just how poweful such a search can be - since it is limited by RSS feeds that are flowing thru my aggregator - it provides high quality results that are relevent to the mission of my site.

The feature was simple to add. I just added an implementation of hook_search():


/**
* Implementation of hook_search().
*/
function aggregator_search($keys) {
$find = array();

// Replace wildcards with MySQL/PostgreSQL wildcards.
$keys = str_replace('*', '%', $keys);

$words = explode(",", $keys);
foreach ($words as $word) {
$word = trim($word);
$title_filter[] = "lower(i.title) LIKE '%" . $word . "%'";
$feed_filter[] = "lower(f.title) LIKE '%" . $word . "%'";
$content_filter[] = "lower(i.description) LIKE '%" . $word . "%'";
}
$filter_query = implode(" OR ", $feed_filter) . ' OR ' .implode(" OR ", $title_filter) . ' OR ' . implode(" OR ", $content_filter);

$result = db_query_range("
SELECT i.*, f.link AS feed_link, f.title AS feed_title, f.url AS feed_rss
FROM {aggregator_item} i

Advertising at the top of node pages

I want my module to add advertising to all node and taxonomy pages.
I need not Drupal block, I need to place some HTML at the top of main area of the page.

Can I do it without modifying node and taxonomy modules or themes ?

Article.mod -- Depth question

In the Taxonomy.mod if you change the param "Depth", you can change the depth result. Form what I'm seeing the Article.mod, it has the same feature and I have made a paste of the code in question below. I'm not a programer, so really I don't have clue what it actually does. But from the little I do understand it looks like it should work, but it hasn't been. could somone comment please. i;ve been chagng the $depth on line 14.

* @param $tids
* An array of term IDs to match.
* @param $operator
* How to interpret multiple IDs in the array. Can be "or" or "and".
* @param $depth
* How many levels deep to traverse the taxonomy tree. Can be a nonnegative
* integer or "all".
* @param $pager
* Whether the nodes are to be used with a pager (the case on most Drupal
* pages) or not (in an XML feed, for example).
* @return
* A resource identifier pointing to the query results.
*/
function article_select_nodes($tids = array(), $operator = 'and', $depth = 1, $pager = TRUE, $count = 0) {
if (count($tids) > 0) {
// For each term ID, generate an array of descendant term IDs to the right depth.
$descendant_tids = array();
if ($depth === 'all') {
$depth = NULL;
}
foreach ($tids as $index => $tid) {
$term = taxonomy_get_term($tid);
$tree = taxonomy_get_tree($term->vid, $tid, 1, $depth);
$descendant_tids[] = array_merge(array($tid), array_map('_taxonomy_get_tid_from_term', $tree));

Code Snippets module

Snippets offer functionality similar to standard PHP-execution filter, but I hope in more flexible manner. Site admin or power users may create named snippets of PHP-code (with access to Drupal API), then categorize and store them to the site code repository. Particular users can't view PHP-code - only snippet name and help. From user point of view - snippets are macros, which may be used in postings - nodes and comments. Macros may accept parameters which transferred to snippet code. Example: [macro], [macro|param1|param2], [link|9165].

Pages

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