Go Back   Pligg CMS Forum > Pligg Help > General Help

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-02-2007, 02:54 PM
New Pligger
Pligg Version: 0.98
Pligg Template: none
 
Join Date: Nov 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
How to change order type on home?

I want to change the ordering in home, now is newest first, but i want most voted.

How i can achieve this¿?

Thanks!
Reply With Quote
  #2 (permalink)  
Old 11-02-2007, 06:01 PM
chuckroast's Avatar
Coder/Designer
Pligg Version: 1.0
Pligg Template: ExpertVision
 
Join Date: Jun 2006
Location: PA
Posts: 2,367
Thanks: 169
Thanked 437 Times in 276 Posts
Top what?
Top today? Top this week? Top this month?

Regardless there are several ways to do it.

If you are using URL method 2 you can change the following in your .htaccess

Code:
RewriteRule ^published/?$ index.php
To
Code:
RewriteRule ^published/?$ index.php?part=today
The other way using URL method 1 would be to change all links to published, in the header from
Code:
{$my_base_url}{$my_pligg_base}
To
Code:
{$my_base_url}{$my_pligg_base}index.php?part=today
In either case you'll still need to set index.php?part=today as the index file for the domain though .htaccess so when someone visits yoursite.com they are instantly directed to yoursite.com/index.php?part=today

Hope that helps.
__________________
Visit PliggPro the official Pligg Mods & Template Shop!

Reply With Quote
  #3 (permalink)  
Old 11-02-2007, 06:03 PM
nzbullet's Avatar
Coder
 
Join Date: Jun 2007
Location: New Zealand
Posts: 133
Thanks: 17
Thanked 19 Times in 14 Posts
How to:

I have changed mine so that when someone votes or comments on a story (in fact anytime a story is changed in anyway) it gets pushed to the top. This is great for busy sites as the top stories are always changing an old stories can be pushed to the top if someone votes or comments on them.
It doesn't just move it up the table by one it moves it directly to the top.
Sometimes it's not so good as you don't want a story that is year old on the front page, however, if someone is talking about it then why not?

To do it follow these simple steps:
Open index.php

Go to (around line 35):

Code:
if(!isset($_REQUEST['search'])){$search->orderBy = "link_published_date DESC";}
and change to:

Code:
if(!isset($_REQUEST['search'])){$search->orderBy = "link_modified DESC";}
Done!

If you want to change by vote use this code instead:

Code:
if(!isset($_REQUEST['search'])){$search->orderBy = "link_votes DESC";}
__________________
Cheers

Dan
Reply With Quote
  #4 (permalink)  
Old 11-02-2007, 06:03 PM
New Pligger
Pligg Version: 0.98
Pligg Template: none
 
Join Date: Nov 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Sorry for not being more specific.

Thanks for the reply, i give it a try it right now!!
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
How Change at header Pligg beta 9 Home newsinventory General Help 2 03-15-2008 01:21 PM
How to change default sort order of the stories on frontpage? Andtony General Help 8 03-11-2008 07:23 PM
[SOLVED] How to change 'Pligg beta 9 Home' to 'mysite home' neilgroom General Help 2 02-29-2008 11:55 AM
Where do I change the pligg before home..? conjuror General Help 3 12-26-2006 02:43 AM
change order by drumndbass Modification Tutorials 0 08-18-2006 07:05 AM


Search Engine Friendly URLs by vBSEO 3.2.0