I can't sort upcoming stories by popularity

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 05-19-2009, 12:20 AM
New Pligger
Pligg Version: 1.0.0
Pligg Template: wistie
 
Join Date: Sep 2008
Posts: 12
I have two installations of pligg. My 9.9.5 beta has been running since Sept 08. No problems

I just installed 1.0.0 RC4 and I'm using the wistie (default template). When I look at upcoming stories, the sidebar gives me the same "recently popular, top today, this week, month, year" options that go with the published page.

For the upcoming page, I want "sort by: newest, oldest, most popular, least popular". This is what 9.9.5 gave me. I also know that 1.0.0 RC4 supports this -- somewhere(!) -- because if I type in the URL

Leadership | Upcoming | Social Bookmarking @ Leadership Networks
or
Leadership | Upcoming | Social Bookmarking @ Leadership Networks

then I get just the results I want. How do I get wistie to give me the links to do this?

FYI, I am not using groups at all. I mention that because templates/wistie/sidebar2.tpl has some logic right at the top that checks for page="upcoming" along with some group-based logic. That is my best guess where the problem is. There does not seem to be any logic to handle an ordinary "upcoming" page in the wistie template...

Suggestions?
Reply With Quote
  #2 (permalink)  
Old 05-29-2009, 03:32 PM
New Pligger
Pligg Version: 1.0.0
Pligg Template: wistie
 
Join Date: Sep 2008
Posts: 12
I debugged the wistie upcoming links page so that it sorts by newest, oldest, most popular, least popular. (The existing wistie upcoming page sorts by recently popular, today, this week, month, year; I do not understand why it was designed this way; the old yget options make more sense to me.)

Anyway, I took pligg 1.0.0 RC4 templates/wistie/sidebar2.tpl and changed the first few lines of the file to the following. Key changes are that the "START SORT" section no longer does anything when page = upcoming and instead I have added an entirely new section that produces the desired sorting options when page = upcoming.

FYI I owe a big debt to the pliggedblue template which provided me the raw materials I needed to hack this change into wistie

---------------------------------------------------------------------------
templates/wistie/sidebar2.tpl
---------------------------------------------------------------------------


{checkActionsTpl location="tpl_pligg_sidebar_start"}

{if $pagename eq "published" || $pagename eq "index"}
<!-- START SORT -->
<div class="headline">
<div class="sectiontitle">{#PLIGG_Visual_Pligg_Queued_S ort#} {#PLIGG_Visual_TopUsers_TH_News#}</div>
</div>

<div id="navcontainer">
<ul id="navlist">
{if $setmeka eq "" || $setmeka eq "recent"}<li id="active"><a id="current" href="{$index_url_recent}"><span class="active">{#PLIGG_Visual_Recently_Pop#}</span></a>{else}<li><a href="{$index_url_recent}">{#PLIGG_Visual_Recently _Pop#}</a>{/if}</li>
{if $setmeka eq "today"}<li id="active" href="{$index_url_today}"><a href="{$index_url_today}" id="current"><span class="active">{#PLIGG_Visual_Top_Today#}</span></a>{else}<li><a href="{$index_url_today}">{#PLIGG_Visual_Top_Today #}</a>{/if}</li>
{if $setmeka eq "yesterday"}<li id="active"><a id="current" href="{$index_url_yesterday}"><span class="active">{#PLIGG_Visual_Yesterday#}</span></a>{else}<li><a href="{$index_url_yesterday}">{#PLIGG_Visual_Yeste rday#}</a>{/if}</li>
{if $setmeka eq "week"}<li id="active"><a id="current" href="{$index_url_week}"><span class="active">{#PLIGG_Visual_This_Week#}</span></a>{else}<li><a href="{$index_url_week}">{#PLIGG_Visual_This_Week# }</a>{/if}</li>
{if $setmeka eq "month"}<li id="active"><a id="current" href="{$index_url_month}"><span class="active">{#PLIGG_Visual_This_Month#}</span></a>{else}<li><a href="{$index_url_month}">{#PLIGG_Visual_This_Mont h#}</a>{/if}</li>
{if $setmeka eq "year"}<li id="active"><a id="current" href="{$index_url_year}"><span class="active">{#PLIGG_Visual_This_Year#}</span></a>{else}<li><a href="{$index_url_year}">{#PLIGG_Visual_This_Year# }</a>{/if}</li>
</ul>
</div>
<!-- END SORT -->
{/if}


<!-- START UPCOMING -->

{if $pagename eq "upcoming"}
<div class="headline">
<div class="sectiontitle">
{if !isset($templatelite.get.category)}
{#PLIGG_Visual_Pligg_Sort_News_By#}:
{else}
{#PLIGG_Visual_Pligg_Queued_Sort#} {$category} {#PLIGG_Visual_Pligg_Queued_Sort_By#}:
{/if}
</div>
</div>

<div id="navcontainer">
<ul id="navlist">
{if $paorder eq "" || $paorder eq "newest"}<li id="active"><a id="current" href="{$upcoming_url_newest}"><span class="active">{#PLIGG_Visual_Pligg_Newest_St#}</span></a>{else}<li><a href="{$upcoming_url_newest}">{#PLIGG_Visual_Pligg _Newest_St#}</a>{/if}</li>
{if $paorder eq "mostpopular"}<li id="active"><a id="current" href="{$upcoming_url_mostpopular}"><span class="active">{#PLIGG_Visual_Pligg_Most_Pop#}</span></a>{else}<li><a href="{$upcoming_url_mostpopular}">{#PLIGG_Visual_ Pligg_Most_Pop#}</a>{/if}</li>
{if $paorder eq "oldest"}<li id="active"><a id="current" href="{$upcoming_url_oldest}"><span class="active">{#PLIGG_Visual_Pligg_Oldest_St#}</span></a>{else}<li><a href="{$upcoming_url_oldest}">{#PLIGG_Visual_Pligg _Oldest_St#}</a>{/if}</li>
{if $paorder eq "leastpopular"}<li id="active"><a id="current" href="{$upcoming_url_leastpopular}"><span class="active">{#PLIGG_Visual_Pligg_Least_Pop#}</span></a>{else}<li><a href="{$upcoming_url_leastpopular}">{#PLIGG_Visual _Pligg_Least_Pop#}</a>{/if}</li>
</ul>
</div>

{/if}

<!-- END UPCOMING -->

...

REST OF FILE OMITTED...
Reply With Quote
Reply

Tags
sorting upcoming wistie

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete All Upcoming Stories Except The Last 50 rossoonline Questions and Comments 2 08-06-2008 05:27 AM
Sort top stories by number of days ditto Questions and Comments 0 03-09-2008 07:38 PM
Discard upcoming stories that are not published after a certain amount of time ablaye Questions and Comments 4 01-21-2008 03:10 AM
Special message if no stories on upcoming page? tangmonkey Questions and Comments 1 11-15-2007 01:59 PM
[MOD] Showing # of Upcoming Stories in v9.6 abcdefgary Questions and Comments 9 08-01-2007 06:13 AM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development