Go Back   Pligg CMS Forum > Pligg Help > Customization Assistance

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-14-2008, 05:59 PM
Pligg Donor
 
Join Date: Mar 2007
Posts: 54
Thanks: 7
Thanked 1 Time in 1 Post
Smile Counting submissions

We are holding a contest and want to be able to find out which registered user submitted the X link (as in you submitted the 1,000th link. Congrats!), etc.

I've checked in mysql, etc. but I just can't find a way to do it. Is there something I am missing?

Also, we want to be able to show the amount of published links on the front page. Try to modify the "logged in user" code but that didnot turn out so well.

Any help?

Thanks!
Reply With Quote
  #2 (permalink)  
Old 07-14-2008, 06:31 PM
Pligg Donor
 
Join Date: Mar 2007
Posts: 54
Thanks: 7
Thanked 1 Time in 1 Post
Red face

Quote:
Originally Posted by lumpen5 View Post
We are holding a contest and want to be able to find out which registered user submitted the X link (as in you submitted the 1,000th link. Congrats!), etc.

I've checked in mysql, etc. but I just can't find a way to do it. Is there something I am missing?

Also, we want to be able to show the amount of published links on the front page. Try to modify the "logged in user" code but that didnot turn out so well.

Any help?

Thanks!
Ok figured it out...Duhhh.

Go into mysql admin
click on yourtable_links
then browse
scroll down to the 1,000 entry (insert duh here!)
look in the "link_author" field for the author number
go to yourtable_users and find the "author number" in "user_id
Presto you have found your 1,000 submitor.

Still need help with getting the amount of published stories on the front page though
Reply With Quote
  #3 (permalink)  
Old 07-14-2008, 07:20 PM
chuckroast's Avatar
Coder/Designer
Pligg Version: 1.0
Pligg Template: ExpertVision
 
Join Date: Jun 2006
Location: PA
Posts: 2,399
Thanks: 171
Thanked 440 Times in 279 Posts
Have you looked at admin_main_center.tpl?
There are already smarty variables created such as:

{$members} = total number of members
{$total} = total number of stories submitted
{$published} = number of stories published
{$queued} = number of stories in the queue
{$votes} = total combined votes of all stories
{$comments} = total number of comments made on the site

So for example lets say you want to show the total number of published stories on the home page.

Open index.php and add
Code:
$published = $db->get_var('SELECT count(*) from ' . table_links . ' where link_status = "published";');
$main_smarty->assign('published', $published);
Then open index_center.tpl and add something like
Code:
{$published} total published stories
__________________
Visit PliggPro the official Pligg Mods & Template Shop!

Reply With Quote
The Following User Says Thank You to chuckroast For This Useful Post:
  #4 (permalink)  
Old 07-15-2008, 11:55 AM
Pligg Donor
 
Join Date: Mar 2007
Posts: 54
Thanks: 7
Thanked 1 Time in 1 Post
Excellent. Thanks!
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
Stopping duplicate submissions web20guy General Help 0 12-16-2007 06:32 PM
anon submissions for moogld.com lumpen5 Installation and Upgrade Help 1 05-31-2007 08:37 PM
[Request] Expandable submissions on front page Xenos Modification Tutorials 0 02-01-2007 09:27 PM
Parent shows children submissions? kaustic Modification Tutorials 1 01-24-2007 04:04 PM


Search Engine Friendly URLs by vBSEO 3.2.0