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

Reply
 
Thread Tools
Collapsable First Post using AJAX (or Last Post!) Details »»
Collapsable First Post using AJAX (or Last Post!)
Version: 1.2.1, by magnus magnus is offline
Developer Last Online: Feb 2012 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.6.8 Rating:
Released: 04-17-2007 Last Update: 04-26-2007 Installs: 412
Uses Plugins Auto-Templates
Additional Files  
No support by the author.

[hr]-[/hr]
NOTICE: This is for vBulletin v3.6 ONLY. You can find a v3.5 compatible version here.
[hr]-[/hr]
*** Confirmed working on ALL vBulletin 3.6.x versions! ***

[hr]-[/hr]
Keywords: FORUMDISPLAY, search, results, collapse, AJAX, collapsable, first, last, unread, post

Description:
Allows you to expand/collapse the first, last or first unread post of a thread from FORUMDISPLAY and search results without the need to load the entire thread.

Details:
Upon perusing the wonderful deals over at slickdeals.net, I noticed this nifty feature which caught my eye. I found it quite useful as most people have a bad habit of not being very descriptive with their thread titles. This little trick made my browsing experience much more enjoyable, so naturally I had to borrow [read: shamelessly rip] the idea.

Please note that no additional queries are added, unless using the 'First Unread Post' option. Otherwise, the only queries performed are the same as those when a thread is normally viewed.

The magic behind this modification is performed by jQuery: The Write Less, Do More, JavaScript Library.

[hr]-[/hr]
Usage:
Simply click the expand icon [+] in front of the thread title to expand, and the collapse icon [-] to collapse. Rocket science, eh?

[hr]-[/hr]
Installation:
  1. Download and unzip the ajax_first_post.zip archive.
  2. Upload necessary files to their respective locations. (Attention custom style users! Be sure to upload the images to your custom image directory.)
  3. Import the product-ajax_first_post.xml via the Product Manager.
  4. Make any desired configuration changes via AdminCP > vBulletin Options > Collapsable First Post using AJAX
  5. ???
  6. Profit!

Notes:
All template modifications are made automatically. They attach to pretty common text locations, so modified styles shouldn't* be a problem.

However, for those who wish (or need) to perform the edits manually, you can find that information here.

[hr]-[/hr]
Comments:
As with all my hacks, this modification is provided free of charge. However, if you find this product useful and have money burning a hole in your pocket, feel free to make a small donation, I won't mind.. really.

Version History:
  • 1.0.0 - Initial release, here's to hoping...
  • 1.1.0
    • Fixed JavaScript errors when using search.
    • Resolved (known) cross browser compatibility issues.
  • 1.2.0
    • New AdminCP configuration options:
      • Ability to select first or last post to be displayed.
      • Ability to disable on a per forum basis.
      • Option to update thread views when expanded.
      • Option to disable automatic template editing with a single click.
    • Tweaked a couple plugins to prevent unnecessary checking.
    • Properly registers in Who's Online
  • 1.2.1
    • Will no longer show expand icon next to thread redirects.
    • Added ability to display first unread post.
    • Completely revamped the automatic template editing system. Should now be able to make template edits to even the most modified templates as well.
    • Fixed a couple non-breaking typos.
    • Included JavaScript in USERCP_SHELL to allow expand/collapse of subscribed threads.
    • Added a hover title to the expand icon to inform the user what they can expect when clicking it.

[hr]-[/hr]
Tips, Tricks and Modifications:

Currently Known Bugs:
  • None

* Please note that this modification was developed on a forum with a userbase of 1 (myself). I've tested it for basic functionality but I cannot guarantee functionality or behavior on your forum. So, please -- make backups before installing this product!

Show Your Support

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

Comments
  #442  
Old 01-05-2008, 09:42 PM
adam75south adam75south is offline
 
Join Date: Dec 2007
Location: dallas texas
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok my problem was the default button location for my main style was different...so i uploaded the buttons in that directory. the plus signs show up now, the post drops down....but i have an error showing up.

Code:
Warning
: Invalid argument supplied for foreach() in
/includes/class_postbit.php(296) : eval()'d code
on line
15
not really sure what that means. when i went to class_postbit.php and looked at line 15 it said "exit"
Code:
if (!isset($GLOBALS['vbulletin']->db))
{
	exit;
}
the good news is it shows up in both firefox and IE and not just one of em.

i attached a screenshot for you.

any ideas would be greatly appreciated...and if it's already been addressed then i'm sorry, i jumped to the last page.
Reply With Quote
  #443  
Old 01-07-2008, 11:17 AM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by adam75south View Post
ok my problem was the default button location for my main style was different...so i uploaded the buttons in that directory. the plus signs show up now, the post drops down....but i have an error showing up.

Code:
Warning
: Invalid argument supplied for foreach() in
/includes/class_postbit.php(296) : eval()'d code
on line
15
not really sure what that means. when i went to class_postbit.php and looked at line 15 it said "exit"
Code:
if (!isset($GLOBALS['vbulletin']->db))
{
	exit;
}
the good news is it shows up in both firefox and IE and not just one of em.

i attached a screenshot for you.

any ideas would be greatly appreciated...and if it's already been addressed then i'm sorry, i jumped to the last page.
Ok, according to that error it's having trouble with line 296 in class_postbit.php.
PHP Code:
        ($hook =& vBulletinHook::fetch_hook('postbit_display_complete')) ? eval($hook) : false
So it's apparently having issue with something hooked into postbit_display_complete. Thing is, my modification does not use this hook. The problem isn't directly linked to this modification, there may be a conflict issue with another hack you're using, one that modifies the postbit in some way.

In the meantime, try this. Browse to AdminCP > Collapsable First Post using AJAX Options. Look for Forum Exclusion List, in the text field put 0. Save it, and see if that fixes it. Honestly, I don't think it will, but it can't hurt.
Reply With Quote
  #444  
Old 01-07-2008, 02:09 PM
Xeonspider Xeonspider is offline
 
Join Date: Feb 2006
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Now I recived this warning but hack working...

PHP Code:
WarningInvalid argument supplied for foreach() in /includes/class_postbit.php(296) : eval()'d code on line 21 
Reply With Quote
  #445  
Old 01-07-2008, 03:58 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xeonspider View Post
Now I recived this warning but hack working...

PHP Code:
WarningInvalid argument supplied for foreach() in /includes/class_postbit.php(296) : eval()'d code on line 21 
I'm sorry, but this is the first I've seen you post in this thread so I really don't know what's going on. Were you having the same problem as adam75south above?
Reply With Quote
  #446  
Old 01-07-2008, 05:16 PM
masterweb's Avatar
masterweb masterweb is offline
 
Join Date: Aug 2007
Location: Italy
Posts: 164
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had some problems due my custom stile, but now it works at 100 %. Thanks a lot mate!
Reply With Quote
  #447  
Old 01-08-2008, 04:51 PM
adam75south adam75south is offline
 
Join Date: Dec 2007
Location: dallas texas
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i tried adding the 0 but the warning is still there.

like i said, it works, just has the warning.

here's a list of all the mods i have on the board. although most were added after yours.

Add Search titles only check box 1.0.0 This mod adds Search titles only check box in search popup menu in navbar & in forumdisplay.

AJAX Preview For New/Edit Thread/Reply/PM 1.3 Shows preview of the message you are writing without leaving the page.

Collapsable First Post using AJAX 1.2.1 Adds a collapsable first post preview using AJAX for each thread on FORUMDISPLAY, search_results and USERCP_SHELL.

Group Leader PM Notification 2.1 Notify the group leader of join requests as well as inform the users of their join request status upon moderation.

GTPrivate Message Quickreply 1.0.1 Adds quickreply when viewing a private message. Brought to you by MyGTBlog Services - http://mygtblog.org.

GTPrivate Messages Enhanced Listing. Brought to yo 1.1.1 Adds private messages preview on pm list display

Latest Post on Forum Home 2.0 This will show the latest posts on forumhome

Miserable Users 2.12 A way to really annoy anyone you don't want visiting your forum.

nCode Image Resizer 1.0.1 Automatically resize posted images

One-touch Ban & Spam Cleanup 1.1 Bans a user, deletes all their threads, posts and PMs

Optimize Tables 1.0.0 This modification allows you to optimize all needed tables by a scheduled task.

passiveVid 1.1.1 Automaticlly turns video links like youtube, myspace videos, google vidoes into the video players.

ShowProfileFieldInPostBits 1.0 EMiN3M Show Profile Field In Post Bits

Yet Another Mass Private Message System 1.0.1 Allow Admin to send mass Private Message to users

Zoints: Timed Sticky 1.2.6 This hack lets you sticky threads for a certain amount of time
Reply With Quote
  #448  
Old 01-08-2008, 06:11 PM
adam75south adam75south is offline
 
Join Date: Dec 2007
Location: dallas texas
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just tried disabling the profile fields in postbit to see if that was the conflict but still got the warning. Do I need to completely uninstall it to see?

To the other guy with the same problem can you post your mods as well?
Reply With Quote
  #449  
Old 01-08-2008, 08:23 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by adam75south View Post
I just tried disabling the profile fields in postbit to see if that was the conflict but still got the warning. Do I need to completely uninstall it to see?

To the other guy with the same problem can you post your mods as well?
Do you receive the error only when trying to expand/collapse using the icon, or does it also display when you click the thread to view it?
Reply With Quote
  #450  
Old 01-08-2008, 09:00 PM
adam75south adam75south is offline
 
Join Date: Dec 2007
Location: dallas texas
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

only when i expand.

if i get around to it i'll start uninstalling my mods until i find the one it's conflicting with.

and it's on all of my skins, not just my custom skin.
Reply With Quote
  #451  
Old 01-08-2008, 10:11 PM
magnus's Avatar
magnus magnus is offline
 
Join Date: Apr 2002
Location: Miami, FL
Posts: 1,107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You don't need to uninstall the hacks. Just disable. This will retain any settings, etc.
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 02:56 PM.


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.05456 seconds
  • Memory Usage 2,334KB
  • Queries Executed 25 (?)
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
  • (4)bbcode_code
  • (3)bbcode_php
  • (3)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
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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_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