Home | Products | Consulting | Hosting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: General: General:
Format Question

 

 


edesign
User

Feb 5, 2004, 4:46 PM

Post #1 of 4 (2563 views)
Shortcut
Format Question Can't Post

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


Dave
Staff / Moderator


Feb 6, 2004, 10:57 AM

Post #2 of 4 (2549 views)
Shortcut
Re: [edesign] Format Question [In reply to] Can't Post

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


edesign
User

Feb 6, 2004, 11:12 AM

Post #3 of 4 (2545 views)
Shortcut
Re: [Dave] Format Question [In reply to] Can't Post

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!


Dave
Staff / Moderator


Feb 6, 2004, 11:51 AM

Post #4 of 4 (2541 views)
Shortcut
Re: [edesign] Format Question [In reply to] Can't Post

Sure, I'll send the files as a private message or email. Stay tuned.

Dave Edis - Senior Developer
interactivetools.com

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Hosting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4