I've created a number of "back-end" web pages that are redirected to after a user goes through a Paypal transactin (eg "success" and "cancel" pages). However, these static pages show up in the "View recent posts" option (eg the tracker.module).

Does anyone know of an easy way off hand to tell tracker to ignore certain pages? I don't want these showing up in the tracker summary - as users clicking on the "success" and "cancel" pages causes watchdog entries and email notices to be submitted, etc...

I know I can set a node to "unpublished" - which should do it - but then the page is not useable as a redirect to - because it's "not published".

Any thoughts? I'm guessing I have to HACK the tracker.module to filter out unwanted nodes manually. TIA.

Comments

shane’s picture

I produced a very nasty hack to the tracker.module (based on the 4.2.0 tracker.module code). Ths patch will allow you to set content to be hidden by the tracker.module (eg the "recent content"). You can hide based on author, type of node, or title.

To hide content, modify the title_array(), type_array(), or author_array() arrays in the tracker_hide() function. If using a title, the title must match exactly. The code could be rewritten to use regex matching.

If I was enteprising enough (I'm not) I'd create an admin option that would allow input of hide content via the Administration section - which would store the content to be hidden in a DB table.

47a48,56
> // SYG hack
> // add the tracker_hide() function - it takes the type, title, and author as built
> // from above - then the function decides if the node should be hidden or not.
> // if yes, then the tracker_hide() returns 0, else 1 for no hiding.
> $check_type = $type;
> $check_title = $node->title;
> $check_author = $node->name;
>     if(tracker_hide($check_type, $check_title, $check_author)) {
60a70
>     } // SYG hack to add a hiding end of if(tracker_hide())
73a84,114
> // SYG hack
> // called by tracker_posts()
> // simply hides posts that tracker shouldn't show - this should
> // be *much* improved to pull hidden criteria from the DB - with an
> // admin option to set tracker hide via an admin page - but this
> // is the low tech method for now
> //
> // to hide - return a 0
> // to not hide - return a 1
> 
> function tracker_hide($type, $title, $author) {
> // this is stuff that gets hidden
>  $title_array = array(
>  );
>  $author_array = array(
>  );
>  $type_array = array(
>  );
> // end of stuff that gets hidden
> 
> 	if (in_array($title, $title_array)) {
> 		return 0;
> 	} elseif (in_array($author, $author_array)) {
> 		return 0;
> 	} elseif (in_array($type, $type_array)) {
> 		return 0;
> 	} else {
> 		return 1;
> 	}
> }
> 

Examples of hidding content by title:

$title_array = array(
    'Stories from the far side',
    'My first drupal module',
    'To Drupal or Not?'
);

Examples of hiding content by author (*all* content will be hidden that is created by the listed authors):

$author_array = array(
    'fred',
    'george'
);

Examples of hiding by type of node:

$type_array = array(
    'static page'
);
boris mann’s picture

I think I had added this as a feature request at one point -- the ability to configure which types of nodes would display in the tracker. I just hacked my local copy of tracker to filter the node types I don't want.

As well, adding an RSS feed to be generated from tracker (that would include comments as well) is on my to do list.