vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Closed Poll thread title (https://vborg.vbsupport.ru/showthread.php?t=52610)

noppid 05-04-2003 10:00 PM

Closed Poll thread title
 
A user requested that if a poll is closed the thread be preceeded by Closed Poll: instead of just Poll:.

Here's a few lines of code that did it for us. (see attachment )

All you have to do is insert a few lines of code to forumdisplay.php.

Good luck, hope it helps.

History:
  • 1.4
    Added closed poll functionality to search.php in showresult function.
  • 1.3
    Added field to poll table lookup.
    Added condition to show poll closed when timeout has occured.
    Elimiated HTML tags for bold since the default vB prefixes are not bold.
  • 1.2
    Removed HTML tag for font color.
  • 1.1
    Added condition to show poll closed if thread or poll is closed.
  • 1.0
    Initial release.

noppid 05-05-2003 01:49 PM

Here's a preview.

flup 05-05-2003 02:04 PM

Nice

Dean C 05-05-2003 03:04 PM

Good idea - i'm going to use this :)

- miSt

hayl 05-05-2003 07:29 PM

nice idea

all-the-vb 05-05-2003 08:24 PM

Nice :D

colicab-d 05-05-2003 10:42 PM

good idea

WEForums 05-05-2003 11:15 PM

...doesn't seem to do anything....strange.....

EDIT: Nevermind. It doesn't work when locking a poll (locking the entire thread, that is).

Boofo 05-06-2003 03:47 AM

Does this add a query for every poll in the forum? Or just the closed ones?

noppid 05-06-2003 04:21 AM

Quote:

Today at 12:47 AM Boofo said this in Post #9
Does this add a query for every poll in the forum? Or just the closed ones?
A query occurs for each thread with a poll attached that is going to be displayed to see if it is open or closed.

The guys that wrote vB are sharp, we're not dealing with "ALL" the posts in the forum when we do a display. We get the number of threads that is set in the admin panel displayed. So, if I'm reading this code correctly, a forum display of 15 threads occuring would yield - worst case senario if all 15 threads have polls - 15 additional queries per forumdisplay. This is usually about 3 or 4 from what I've seen. Boards with more polls may want to be aware of the over head though.


Thanks. That help?

Regards


All times are GMT. The time now is 11:17 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00973 seconds
  • Memory Usage 1,729KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete