vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Miscellaneous Hacks - Show Checked Icon if User voted on Poll (https://vborg.vbsupport.ru/showthread.php?t=91634)

Andreas 07-04-2005 10:00 PM

Show Checked Icon if User voted on Poll
 
1 Attachment(s)
Show Checked Icon if User voted on Poll
Description
This Hack show a checked Icon and a Voted Poll:-Thread-Prefix if the User
has already voted on a Poll.

Details
1 Plugin XML
2 Phrases
1 Image

Please note
  1. 1 Query is added for each Forum Display where Threads contain Polls.
    If there are no Polls on the Page being displayed, it does not add a Query
  2. The check only works for Registered Users.
    So if you allow guests to vote on Polls they won't see the checked Icon, even if they have voted. This might change in future Versions.

History
1.0.0 Initial Version
1.0.1 Updated for vBulletin 3.5 RC 1
Also supports Search, User CP and Subscriptions now.
Attention: This Hack is only compatible with vBulletin 3.5 RC1 and up!

Compatibility
This Add-on is compatible with vBulletin 3.5.X, 3.6.X, 3.7.X and 3.8.X

Please only click Install if you actually have installed/are using this Hack, and click Uninstall when you don't use it any longer!

Chris M 07-05-2005 12:11 AM

Nice idea :)

Satan

Andreas 07-05-2005 12:13 AM

Been using this since almost 1 1/2 years on my Boad, now converted to a Plugin :)
But I am not that happy with the Code yet ... another Hook would make it easier

Chris M 07-05-2005 12:15 AM

You should request it on .com ;)

I can confirm this works though :)

Satan

Andreas 07-05-2005 12:16 AM

I already requested it several days ago ;)

Andreas 07-27-2005 02:49 PM

Updated for RC1.
Does also support Search, User CP and Subscriptions now.

If you are updating, please delete the old Pluin first

Boofo 07-27-2005 09:10 PM

Is there a setting anywhere for this or is it all automatic?

Andreas 07-27-2005 09:13 PM

No setting. It just does show the Icon/Prefix when the Product is enabled.
To disable it, disable the Product :)

Boofo 07-27-2005 09:16 PM

Thank you, sir. That's all I needed to know. ;)

FleaBag 07-27-2005 10:06 PM

OK, I may be being a little stupid here.

But there were 2 XML files, I imported product-votedpolls.xml. I don't have to do anything with the other file, right?

Andreas 07-27-2005 10:26 PM

Instead of the 2nd XML there should have been readme.txt, fixed now ;)

FleaBag 07-27-2005 10:28 PM

Ah cool, thanks for the heads up.

Boofo 07-27-2005 10:53 PM

Quote:

Originally Posted by KirbyDE
Instead of the 2nd XML there should have been readme.txt, fixed now ;)

What do I need to delete? I installed both of them.

Andreas 07-27-2005 11:00 PM

Delete the Plugins that show Product=vBulletin.

Boofo 07-27-2005 11:07 PM

Quote:

Originally Posted by KirbyDE
Delete the Plugins that show Product=vBulletin.

I hope there were only 2 of them. I have a lot of plug-ins that show that. ;)

Andreas 07-27-2005 11:12 PM

As this Hack uses only 1 Plugin, I guess 2 is correct - if you had 1 without Product :)

prawn 07-28-2005 04:41 PM

Really cool. Shows the "power" of the Product System! :)
Thanks Kirby

Oblivion Knight 09-13-2005 07:29 PM

Awesome, I didn't realise this mod had already been ported! :D

Cheers Kirby.

Brinnie 09-13-2005 07:54 PM

Now if you could only search for polls. :D Hmmm...

FleaBag 08-13-2006 10:28 AM

Just thought I would stop by and advise that this works in 3.6 as well. Not many people seem to be using this one but I think it's a nice touch. Andreas, get it into the main code so I can have one less product. ;)

Exitilus 04-29-2008 11:58 PM

It appears to work fine in 3.7 as well ....

Boofo 02-27-2011 11:34 AM

Believe it or not, one little line edit and it works on vb 4.1.0 PL2.

Manoel J?nior 02-27-2011 12:29 PM

Quote:

Originally Posted by Boofo (Post 2167498)
Believe it or not, one little line edit and it works on vb 4.1.0 PL2.

Please tell us what line we have to edit.

Boofo 02-27-2011 04:16 PM

Change this line:

Code:

$thread['threadiconpath'] = "$stylevar[imgdir_misc]/poll_posticon_checked.gif";

to this:
Code:

$thread['threadiconpath'] = vB_Template_Runtime::fetchStyleVar('imgdir_misc') . "/poll_posticon_checked.gif";

$stylevar doesn't work in vb 4.

Boofo 02-28-2011 09:46 AM

I guess there is more to this that doesn't work with vb 4. The following give a foreach error during a What's New search.

Code:

        case 'search':
            foreach ($GLOBALS['itemids'] AS $pollcheck)
            {
                if ($pollcheck['pollid'] AND $pollcheck['open'] != 10)
                {
                    $pollids[] = $pollcheck['pollid'];
                }
            }
            break;


Andreas, can this be fixed or updated for vb 4?


All times are GMT. The time now is 02:46 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.02133 seconds
  • Memory Usage 1,758KB
  • 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
  • (3)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (25)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete