I can't sort upcoming stories by popularity
-
New Pligger
I can't sort upcoming stories by popularity
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?
-
New Pligger
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...
Similar Threads
-
By smartcanuck in forum Questions & Comments
Replies: 2
Last Post: 09-13-2010, 07:21 PM
-
By pacifica in forum Questions & Comments
Replies: 3
Last Post: 07-12-2010, 09:26 PM
-
By Niko in forum Questions & Comments
Replies: 6
Last Post: 12-24-2007, 07:35 PM
-
By aaronpais in forum Questions & Comments
Replies: 2
Last Post: 05-19-2007, 07:31 AM
-
By oldpipe in forum Questions & Comments
Replies: 2
Last Post: 04-26-2007, 02:32 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules