Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[AJAX] Ajax Poll Preview Details »»
[AJAX] Ajax Poll Preview
Version: 0.5.5, by Alphawolf83 Alphawolf83 is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.7.x Rating:
Released: 12-24-2007 Last Update: 12-26-2007 Installs: 87
Uses Plugins Template Edits
Additional Files Translations  
No support by the author.

WORKS WITH 3.6.x to 3.8.x!

DESCRIPTION

We're living in a world of AJAX (at least some say so ), so why not minimize traffic by using AJAX technology? That's why I made this little hack for vbulletin (upon a request of a fellow mod on another forum).

So what this hack does is to display the poll results by hovering the thread poll icon in FORUMDISPLAY view (see screenshot), so you dont have to view the entire thread (and all its graphics and stuff) when you're just wanting to view the current poll results, and with this save forum traffic (though, granted, it's not that much). The hack uses the great jQuery javascript library and the modification jTip by Cody Lindley, which I've modified for proper vbulletin use (especially layout issues).

It uses every forum's custom style, so it'll look like it was made for your vbulletin.

The hack has been tested on 3.7.0B3 and 3.6.8, but should work on 3.5.x aswell.

STATISTICS

File Uploads: 5
File Changes: 0
Template Changes: 1
Products to Install: 1
Time to Install: ~ 2 minutes


FEATURES
  • Configuration Options in the AdminCP
    • Enable the Inline Poll Preview Plugin? (bool)
    • Tooltip Width (int)
  • Uses AJAX technology, so no extra query on any page
  • Uses vbulletin's permission system


INSTALLATION

- Upload files from the upload folder
- Import the product via ACP > Manage Products > Import
- Do the template change (can also be found within the ZIP file!)

In threadbit template replace
PHP Code:
<if condition="$show['threadicon']"><img src="$thread[threadiconpath]alt="$thread[threadicontitle]border="0" /><else />&nbsp;</if> 
with
PHP Code:
<if condition="$show['threadicon']">
    <if 
condition="($vboptions[enable_inlinepollpreview]==TRUE) AND $thread['pollid']">
        <
a href="pollinline.php?width=$vboptions[tipwidth_inlinepollpreview]&threadid=$thread[realthreadid]&rand={$pollprevrand}class="jTip" id="pollpreview$thread[realthreadid]name="$thread[threadtitle]onclick="return false;"><img src="$thread[threadiconpath]alt="$thread[threadicontitle]border="0" /></a>
    <else />
        <
img src="$thread[threadiconpath]alt="$thread[threadicontitle]border="0" />
    </if>
<else />
    &
nbsp;
</if> 

CONFIGURATION

Note that by default (after installation) the hack in disabled! Go to the options page to enable and configure it.

The (yet) few configuration options shouldnt be hard to understand so no further info here. If someone has any questions (or suggestions), the hack is supported by myself. Just reply here.


SCREENSHOTS

1.) The options panel.
2.) Poll Preview on another forum layout.
3.) Permission message when the user doesnt have the rights to view thread's contents.
4.) Poll Preview in FORUMDISPLAY view.

VERSION HISTORY

0.5.5
- Fixed issue on vb3.7.0B3 with unregistered users using Internet Explorer
- Added some additional template caching
- Fixed issue when users were able to click the poll icon link and got a white results page

0.5.0
- Initial Release of Ajax Poll Preview

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 12-26-2007, 09:44 AM
bokmade bokmade is offline
 
Join Date: Feb 2002
Location: Doha
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Alphawolf83 View Post
Why, if I may ask? You can use the vbulletin permission system to deny certain usergroups to view thread content / poll results.
No I'm Looking for Ajax thread Preview mod and just the admin can used this function ..
Reply With Quote
  #13  
Old 12-26-2007, 11:04 AM
Hornstar Hornstar is offline
 
Join Date: Jun 2005
Location: Australia
Posts: 2,469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah looking forward to vbulletin implementing new and useful ajax ways to save bandwidth. Thanks.
Reply With Quote
  #14  
Old 12-26-2007, 12:26 PM
Alphawolf83's Avatar
Alphawolf83 Alphawolf83 is offline
 
Join Date: Mar 2005
Location: Germany
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SwollenCranium View Post
The following error occurred when attempting to evaluate this template:
The conditional on line 18 appears to be missing its beginning tag (<if>). This may cause unexpected behavior.
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.


I get the above error .. repeatedly.

**** Corrected *****

User head space and timing error.
What vb version are you running? And when does the error appear? I am using the hack on 2 productive boards and didnt get any error messages yet...

Quote:
Originally Posted by SwollenCranium View Post
While using IE as an unregistered user I can not get the Ajax poll to auto populate. Also is it suppose to dynamically update ? Because I only see new poll results when I refresh the page.

Works fine in FF though.
Well, I tested it and works fine in IE7 on vb3.7.0B3 as a guest. Can I have a link?

Quote:
Originally Posted by bokmade View Post
No I'm Looking for Ajax thread Preview mod and just the admin can used this function ..
Well, I thought there's such a hack already, which pops up the first (or last) post of a thread using AJAX. A forum search might help.
Reply With Quote
  #15  
Old 12-26-2007, 06:05 PM
SwollenCranium's Avatar
SwollenCranium SwollenCranium is offline
 
Join Date: Oct 2007
Location: Raleigh, NC
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Alphawolf83 View Post
What vb version are you running? And when does the error appear? I am using the hack on 2 productive boards and didnt get any error messages yet...


Well, I tested it and works fine in IE7 on vb3.7.0B3 as a guest. Can I have a link?

I'm running 3.7 beta 3.

I fixed the if tag issue.

But still get the white page in IE.

And this is the ERROR I get ---> Here.

This is the actual forum display link ---> here


I've had 14 different users confirm my error with IE. Works EVERY time for a registered user, but almost never for an unregistered first time viewer using IE.

After clearing cookies on my IE, I am even able to reproduce this effect in about 75% of my tries.




**********
I may be crazy but having unregistered access to some features is vital in building a member base. There are problems with Vbulletin and Vblog with unregistered users, I've already listed them in the bug section.
Reply With Quote
  #16  
Old 12-27-2007, 07:55 AM
Sofia Sofia is offline
 
Join Date: Oct 2006
Location: France
Posts: 725
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice hack Thanks a lot
Reply With Quote
  #17  
Old 12-27-2007, 01:29 PM
Alphawolf83's Avatar
Alphawolf83 Alphawolf83 is offline
 
Join Date: Mar 2005
Location: Germany
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SwollenCranium View Post
I fixed the if tag issue.
May I ask what the problem has been?

Quote:
Originally Posted by SwollenCranium View Post
But still get the white page in IE.

And this is the ERROR I get ---> Here.

This is the actual forum display link ---> here

I've had 14 different users confirm my error with IE. Works EVERY time for a registered user, but almost never for an unregistered first time viewer using IE.

After clearing cookies on my IE, I am even able to reproduce this effect in about 75% of my tries.
I guess I managed to fix all the issues you had. Would you please download the new version 0.5.5 and give feedback if that helped? If so, I can send out an update.

Thanks for your feedback!
Reply With Quote
  #18  
Old 12-27-2007, 06:07 PM
SwollenCranium's Avatar
SwollenCranium SwollenCranium is offline
 
Join Date: Oct 2007
Location: Raleigh, NC
Posts: 263
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Alphawolf83 View Post
May I ask what the problem has been?
It was an editing error on MY part. I inadvertently removed a closing > from an 'if' .




Quote:
Originally Posted by Alphawolf83 View Post
I guess I managed to fix all the issues you had. Would you please download the new version 0.5.5 and give feedback if that helped? If so, I can send out an update.

Thanks for your feedback!
Thanks for your efforts, it appears to have solved the problem. :up:
Reply With Quote
  #19  
Old 01-11-2008, 04:23 PM
Xplorer4x4 Xplorer4x4 is offline
 
Join Date: Apr 2005
Posts: 938
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's be great to see AJAX used for counting the votes, and showing the poll results in showthread. Any chance you might work on such a hack?
Reply With Quote
  #20  
Old 01-12-2008, 04:46 PM
Alphawolf83's Avatar
Alphawolf83 Alphawolf83 is offline
 
Join Date: Mar 2005
Location: Germany
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xplorer4x4 View Post
It's be great to see AJAX used for counting the votes, and showing the poll results in showthread. Any chance you might work on such a hack?
Well, what'd be the difference to the way it's handeled at the moment?
Reply With Quote
  #21  
Old 03-03-2008, 07:35 AM
iBaker's Avatar
iBaker iBaker is offline
 
Join Date: Oct 2006
Location: Melbourne, Australia
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi
Installed this hack into v3.7 BETA 5 and it works ok using Firefox but all I get is the question mark showing in IE and nothing else. Any suggestions - thanks for a great addon but unfortunately I have uninstalled
Reply With Quote
Reply


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. 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.04567 seconds
  • Memory Usage 2,336KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (10)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete