vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v1.x (Archive - Closed for Posting) > Add-On Modules & Modifications

 
 
Thread Tools Display Modes
  #1  
Old 08-13-2004, 11:31 AM
Kesomir's Avatar
Kesomir Kesomir is offline
Member
 
Join Date: Apr 2004
Location: London, UK
Posts: 70
Default Display ACTIVE polls only

ok after my mistake yesterday I actually used the search function first this time and this hack isn't around as far as I could find.

What it does is to only pull polls to the portal if they are active, ie: not closed

OPEN forum/modules/currentpoll.php


FIND line 33

PHP Code:
WHERE open <> 10 AND thread.pollid != AND visible 1 $notdeleted  $query[pollquery
REPLACE WITH

PHP Code:
WHERE open <> 10 AND thread.pollid != AND visible AND active 1 $notdeleted $query[pollquery
SAVE and UPLOAD.


This will work for any poll setting, but is particuarly useful on the RAND setting or the random poll hack to stop loads of old closed polls being dredged up.

Brian did say that he reckons adding more to this query may show a performance hit on larger websites. Shouldn't be an issue for smaller ones though even if this is the case.
__________________
Kesomir
"It's an undocumented feature, not a bug"

| Dynamic Staffpage :: vB3.07 :: vB3.6.1 |




  #2  
Old 09-03-2004, 11:27 AM
Mellow's Avatar
Mellow Mellow is offline
Junior Member
 
Join Date: Feb 2004
Posts: 18
Default Re: Display ACTIVE polls only

Thanks man, I like.
  #3  
Old 01-02-2005, 06:10 PM
1996 328ti's Avatar
1996 328ti 1996 328ti is offline
Senior Member
 
Join Date: Aug 2004
Posts: 233
Default Re: Display ACTIVE polls only

Just what I needed.
Search is such a wonderful tool.

Edit: Maybe I spoke too soon.
Does this work with vB 3.0.4?
__________________
...steven

www.318ti.org
forum.nccbmwcca.org

Last edited by 1996 328ti; 01-02-2005 at 06:27 PM.
  #4  
Old 01-17-2005, 02:03 AM
SoloX SoloX is offline
Member
 
Join Date: Dec 2004
Posts: 47
Default Re: Display ACTIVE polls only

I am doing the exact thing but its still pulling the closed polls :-( .. please help.
  #5  
Old 01-24-2005, 11:52 PM
SoloX SoloX is offline
Member
 
Join Date: Dec 2004
Posts: 47
Default Re: Display ACTIVE polls only

anyone?
  #6  
Old 02-11-2005, 03:58 PM
trulylowcarb trulylowcarb is offline
Member
 
Join Date: Feb 2005
Posts: 44
Default Re: Display ACTIVE polls only

Working perfectly with vb3.06 and cmps1.01 and is a must-add modification IMO.

THANKS!!
  #7  
Old 02-27-2005, 07:18 PM
FD929's Avatar
FD929 FD929 is offline
Member
 
Join Date: Feb 2005
Location: Vacaville, Ca
Posts: 54
Default Re: Display ACTIVE polls only

I'm going to do some looking around, but it appears that even if polls time out, they still have to be physically closed through editting the poll. That is my guess at your problem. Go though and physically close all the closed polls that are still showing on your cmps and keep up on closing them and you should have any further problems.

If I find a fix I'll post again.
  #8  
Old 05-16-2005, 11:59 AM
zachlee zachlee is offline
Junior Member
 
Join Date: Feb 2005
Posts: 8
Default Re: Display ACTIVE polls only

I changed my code per the first post to

Code:
 WHERE open <> 10 AND thread.pollid != 0 AND visible = 1 AND active = 1 
$notdeleted $query[pollquery]
I too, like previous posts still had 'closed' polls appearing, so I changed

Code:
AND active = 1
to

Code:
AND open = 1
And that seemed to do the trick.

-Zach
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:32 AM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.