Lunes, 01 Septiembre 2014 14:04
beggarly

Skipping articles

Filters news by the current section and category

Skipping articles

Postby bowman9991 » Mon Mar 23, 2009 10:42 pm

This is probably a dumb question, but...

Is there an easy way to NOT display the first article using Filter News? In other words, start the static content display from the second article.

I want to highlight the current/latest article in another module on the front page with a larger image and more text, so don't need it to display the first article in the filtered news list.

Any help appreciated!

Thanks

John
bowman9991
Fresh Boarder
Fresh Boarder
 
Posts: 4
Joined: Sun Mar 22, 2009 7:12 am

Re: Stupid question!

Postby chus » Tue Mar 24, 2009 10:27 pm

Hi!

Yes, you can open modules/mod_filterednews/helper.php and edit line 210:
Code: Select all
      $db->setQuery($query, 0, $count);

to
Code: Select all
      $db->setQuery($query, 1, $count);
User avatar
chus
Administrator
Administrator
 
Posts: 455
Joined: Thu Sep 13, 2007 2:21 am
Location: Costa Rica

Re: Stupid question!

Postby bowman9991 » Wed Mar 25, 2009 5:22 am

Thanks for your help chus!

I'm using a combination of Filtered News and Global News modules throughout the site though, so if I make that change, then when I use Filtered News for related content (using meta data) on the article pages, the first item will be missing. Can you think of any way around this?

John

PS - I love these modules (Global and Filtered news). The best addition to Joomla yet. Just made a donation to show my appreciation of your efforts.
bowman9991
Fresh Boarder
Fresh Boarder
 
Posts: 4
Joined: Sun Mar 22, 2009 7:12 am

Re: Skiping articles

Postby chus » Wed Mar 25, 2009 5:36 pm

Thank you for your comment and your donation!

You can open mod_filterednews.xml and add the following line anywhere inside the <params>:
Code: Select all
      <param name="skip" type="text" default="0" label="Skip Articles" description="How many articles to skip" />

and then edit the other line to
Code: Select all
      $db->setQuery($query, $params->get('skip'), $count);

Then you can properly configure each copy of the module ;)
User avatar
chus
Administrator
Administrator
 
Posts: 455
Joined: Thu Sep 13, 2007 2:21 am
Location: Costa Rica

Re: Skipping articles

Postby bowman9991 » Wed Mar 25, 2009 10:36 pm

Fantastic. Thank you! The new article skipping code works flawlessly.

John

PS - If I make another donation, could you add a "FN_author" and "GN_author" option to Filtered and Global News? ;)
bowman9991
Fresh Boarder
Fresh Boarder
 
Posts: 4
Joined: Sun Mar 22, 2009 7:12 am

Re: Skipping articles

Postby chus » Thu Mar 26, 2009 2:09 pm

Sure, this is an old request we had on hold.

You can download now the updated versions supporting FN_ and GN_author.

Thank you!
User avatar
chus
Administrator
Administrator
 
Posts: 455
Joined: Thu Sep 13, 2007 2:21 am
Location: Costa Rica

Re: Skipping articles

Postby bowman9991 » Fri Mar 27, 2009 6:10 am

Thank you again. Excellent! Saved me heaps of time trying to work it out myself (and I probably would have got it wrong anyway).

I have one last request for one more donation, if it's possible(and then I promise not to bother you again!). :D This one could be a bit tricker than the last ones though...

When in static content mode, and you have a number of articles listed, is it possible to add an option to Global and Filtered News that will include article navigation like this at the end of all the articles (just like the default joomla actions for sections).

« Start Prev 1 2 3 4 5 Next End »
Page 1 of 5

The idea is that I want to use your modules to display a whole section of articles with extra navigation at the end.

Thanks
John
bowman9991
Fresh Boarder
Fresh Boarder
 
Posts: 4
Joined: Sun Mar 22, 2009 7:12 am


Return to Filtered News



Who is online

Users browsing this forum: No registered users and 2 guests