Login | Sign up | Toll-Free: 1-800-752-0455
 
 

Forum

 

4 posts by 2 authors in: Forums > Off Topic / Other
Last Post: February 6, 2004

Hi;

I hope this was posted in the correct section!

We use multiple installs of Article Manager, and love it, (keep up the good work!) plus we use Gossamer Forum, just as you do.

You have a very nicely formatted list of the last 10 forum postings on http://www.interactivetools.com/products/articlemanager/.

Is it possible that you could post the global or include and template that you are using?

Also, what rewrite rules are you using to make your board search engine friendly?

Much appreciated and thanks,

Mike

Re: [edesign] Format Question

Hi Mike,

For the top 10 articles we actually just wrote a perl script that queries the mySQL database directly. The code is kinda messy, and would require some tweaking to get working, but I can send it to you if you like.

To make the forum search engine friendly we actually didn't use rewrite rules, we have a script in the root folder of our website called "iforum" that does nothing but include "forum/gforum.cgi". It doesn't have a .cgi or .pl file extension, so to make Apache run it as a script we have the following directives in an .htaccess file which is also in the root.

<Files "iforum">
SetHandler cgi-script
</Files>

RedirectMatch ^/iforum$ /iforum/

And finally, we added some code to the top of gforum.cgi just after Gforum::init that makes it parse the PATH_INFO data. PATH_INFO is data that is passed after the script name (script.cgi/LIKE/THIS/). I found this somewhere on the gt forums, I think Alex wrote it, but I could be wrong. It works for us so we're happy. :)

my $path = $ENV{PATH_INFO};
if ($path) {
my $t = $IN->param('t') || 'search_engine';
$IN->param('t', [$t]);
if ($path =~ m,P(\d+)/?$,) {
$IN->param('post', [$1]);
}
elsif ($path =~ m,P(\d+)-(\d+)/?$,) {
$IN->param('post', [$1]);
$IN->param('page', [$2]);
}
elsif ($path =~ m,C(\d+)/?$,) {
$IN->param('category', [$1]);
}
elsif ($path =~ m,F(\d+)/?$,) {
$IN->param('forum', [$1]);
}
elsif ($path =~ m,F(\d+)-(\d+)/?$,) {
$IN->param('forum', [$1]);
$IN->param('page', [$2]);
}
else {
$ENV{PATH_INFO} = '';
}
}

Hope that helps. It tooks some tweaking to get it all working but it's great for search engines.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Format Question

Dave!

I love you guys, thank you very much!

Very cool solution you have figured. I've tried some of the other solutions, after searching the support forums at Gossamer, but nothing so far had worked well. Rewrite rules seem to be a voodoo science. What works on one server, will not work on another always...

Please do send me the Perl script, I do hack it a bit, and we're using MySQL as well.

And as I'm running multiple copies of Article Manager and Gossamer Forum together, it will help greatly!