[MOD] Showing # of Upcoming Stories in v9.6

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-16-2007, 06:27 PM
Casual Pligger
 
Join Date: Feb 2007
Posts: 46
edited text

Last edited by abcdefgary; 01-02-2010 at 07:15 PM.
Reply With Quote
  #2 (permalink)  
Old 06-16-2007, 10:01 PM
Banned
Pligg Version: 9.8.
Pligg Template: Custom
 
Join Date: Feb 2007
Location: Canada
Posts: 796
Perfect.

Thanks a lot.

Geoserv.
Reply With Quote
  #3 (permalink)  
Old 06-16-2007, 10:26 PM
Constant Pligger
 
Join Date: Jun 2006
Posts: 108
We've been 'serv by Geoserv....

thanks will try this.


noyP
Reply With Quote
  #4 (permalink)  
Old 06-16-2007, 10:26 PM
P1mpPanther's Avatar
Constant Pligger
 
Join Date: Feb 2007
Posts: 277
very easy to install - works out the box.

nice job, thanks!
Reply With Quote
  #5 (permalink)  
Old 06-17-2007, 01:07 AM
Casual Pligger
 
Join Date: Mar 2007
Posts: 47
Great Mod, thanks
Reply With Quote
  #6 (permalink)  
Old 06-17-2007, 06:22 AM
pligger2's Avatar
Casual Pligger
 
Join Date: Dec 2006
Posts: 44
Great, however for some reason it's not working in sidebar
(counter is drawed in paint), i want to put this count here, by editing sidebar_stories.php.

Code:
	elseif ($the_template == "yget") {
	
	echo "<div class=tlb><span><a onclick=\"new Effect.toggle('ssstories','blind', {queue: 'end'}); \"> <img src=\"".my_base_url.my_pligg_base."/templates/".The_Template."/images/expand.png\" /></a></span><a href=\"".$ss->link."\">".$ss->header." {$queued}</a></div><div id=ssstories style=padding-bottom:2px>";
	$ss->template = $the_template . '/sidebar_stories.tpl';
	$ss->show();
	echo "</div>";
but it's not working.
What i'm doeing wrong ?
Reply With Quote
  #7 (permalink)  
Old 06-17-2007, 08:56 AM
not2serious's Avatar
Pligg Donor
Pligg Version: v0.96 w/modifications
Pligg Template: Yget w/modifications
 
Join Date: Apr 2007
Location: East Coast, USA
Posts: 205
Looks like I got it installed corectly.

Thanks, for the great instructions.
Reply With Quote
  #8 (permalink)  
Old 07-30-2007, 07:01 AM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
I´ve tried to get all the published and upcoming stories of certain categories. It works but I guess it could be optimized. Help is appreciated.

$queued = $db->get_var('SELECT count(*) from ' . table_links . ' where link_status != "discard" and (link_category = 1 or link_category = 8 or link_category = 9 or link_category = 10 or link_category = 3);');

Last edited by tbones; 08-05-2007 at 02:47 AM. Reason: Implemented first optimization
Reply With Quote
  #9 (permalink)  
Old 07-31-2007, 05:20 PM
not2serious's Avatar
Pligg Donor
Pligg Version: v0.96 w/modifications
Pligg Template: Yget w/modifications
 
Join Date: Apr 2007
Location: East Coast, USA
Posts: 205
Hi tbones,

I would like to have a story count after every category. Not just specific ones, I have 14 categories. Would you be able to provide specific instructions (code, file names and location in the code) on how to accomplish this mod. I am not a coder, but have been able to accomplish some of the mods I need.

I would greatly appreciate your help.
Reply With Quote
  #10 (permalink)  
Old 08-01-2007, 05:13 AM
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,042
I´m not a coder at all but you can see from the above code that the db table is table_links aka pligg_links (if you took the default prefix). So the query should be

SELECT count(*) from ' . table_links . ' where (link_status = "queued" or link_status = "published") and link_category = x

I guess you have to define a smarty variable for every category but I can´t tell you were to put this information in sidebar_categories.tpl or somewhere else.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
I can't sort upcoming stories by popularity behoppe Questions and Comments 1 05-29-2009 02:32 PM
Delete All Upcoming Stories Except The Last 50 rossoonline Questions and Comments 2 08-06-2008 04:27 AM
Main Category Stories Not Showing normznormz Questions and Comments 3 07-24-2008 05:00 AM
Discard upcoming stories that are not published after a certain amount of time ablaye Questions and Comments 4 01-21-2008 02:10 AM
Special message if no stories on upcoming page? tangmonkey Questions and Comments 1 11-15-2007 12:59 PM


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