Home : Products : Gossamer Links : Development, Plugins and Globals :

Products: Gossamer Links: Development, Plugins and Globals: Re: [Andy] Ace_News questions: Edit Log

Here is the list of edits for this post
Re: [Andy] Ace_News questions
Hi Andy,

Good to chat with you on the phone yesterday, got a couple of questions for you to do with setting up SE firendly pages using Ace_News.

As mentioned above im using the <%Plugins::Ace_News::Show_Articles('category','Some Category','3')%> to display the 3 latest articles on my sites home page and site map.

Looking through the Show_Articles sub in Ace_News.pm I see the maximum articles I can display is 5, so i've updated this to 15:

my $limit = $_[2] || 15; #Line number 1477

What im hoping to do is call 15 articles per (pagebuilder) page using the plugin call (you dont need to know pagebuilder to understand how this works ;-):

<%Plugins::Ace_News::Show_Articles('category','Some Category','1,15')%> #to display latest articles 1>15

<%Plugins::Ace_News::Show_Articles('category','Some Category','16,15')%> <#to display latest articles 16>30

Should the Show_Articles call above to this code from Ace_News.pm:

$table->select_options('ORDER BY TimeStmp DESC',"LIMIT $limit"); #Line number 1527 in Ace_News.pm

The error im getting is the when i call 'category','Some Category','16,15' this displays article 1 only - any idea why this is happening as the MySQL code is correct or should accept page sets using this limit (16,15) ie. start at record 16 and display the next 15?


Also , I've come up with a hack to make this plugin search engine friendly using mod_rewrite for the article pages, example:

.htaccess:
Code:
RewriteEngine on
Options All
RewriteBase /
RewriteRule ^NonExistentArticlesFolder/([0-9]+)/?$ cgi-bin/news.cgi?a=article&ID=$1

Which results in url's looking like this:

someserver.com/NonExistentArticlesFolder/1077197299/

instead of:

someserver.com/cgi-bin/news.cgi?a=article&ID=1077197299

Where you able to find the time to change the referance to a standard table ID in the uneditable news.cgi file? (managed to add auto_increment primary key called NewsID to my sites lsql_News_Articles table).

As im hoping to referance the articles using:

someserver.com/NonExistentArticlesFolder/1/

someserver.com/NonExistentArticlesFolder/2/ etc.

or if you could detail a way I can edit the news.cgi file im happy to change the code myself :)


Thanks for your help with this Andy - I feel making this plugin more SE friendly should result in more sales :-D



Comedy Quotes - Glinks 3.3.0, PageBuilder, StaticURLtr, CAPTCHA, User_Edit_Profile

Last edited by:

Chas-a: Feb 19, 2004, 7:52 AM

Edit Log: