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
  #122  
Old 04-19-2007, 11:40 PM
dbirosel dbirosel is offline
 
Join Date: Feb 2007
Location: San Diego
Posts: 587
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TheMilkCarton View Post
I'll be adding it regardless, but don't you think adding a reply button would be a good addition to your product anyway?

I'm also trying to figure out how to make this product more obvious, without being annoying. I don't think anyone has the slightest clue I added this product, and an announcement or post about it wouldn't do much good. haha
What i did was mass PM everyone about it and directing them to this tutorial:

http://www.caraudiojunkyard.com/foru...ng-thread.html
Reply With Quote
  #123  
Old 04-20-2007, 12:02 AM
TheMilkCarton TheMilkCarton is offline
 
Join Date: Jan 2007
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had another idea about adding an "Exclude Usergroups" option. Not sure if you'll like it as much as my "Exclude Forums" idea, but I thought I'd suggest it anyway.

I just thought that this might get pretty server-intensive if all guests can use it, so I'd like to make it an incentive to sign up! And that's another thing, dbirosel, I can't PM guests to tell them about it, so I might as well just not let them use it.
Reply With Quote
  #124  
Old 04-20-2007, 12:05 AM
dbirosel dbirosel is offline
 
Join Date: Feb 2007
Location: San Diego
Posts: 587
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TheMilkCarton View Post
I had another idea about adding an "Exclude Usergroups" option. Not sure if you'll like it as much as my "Exclude Forums" idea, but I thought I'd suggest it anyway.

I just thought that this might get pretty server-intensive if all guests can use it, so I'd like to make it an incentive to sign up! And that's another thing, dbirosel, I can't PM guests to tell them about it, so I might as well just not let them use it.
Earlier in this thread, that this can't be server-intensive. He said it should run, just like how it should when regularly viewing a thread.
Reply With Quote
  #125  
Old 04-20-2007, 12:10 AM
Slave's Avatar
Slave Slave is offline
 
Join Date: Nov 2001
Posts: 439
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wonderful hack, thank you!

A few suggestions ..

"View next/previous post in thread" links .. perhaps just << and >> links to enable a whole thread to be read from the forumdisplay page

Quote/reply buttons .. which would take you to the advanced post page

Ability to edit the number of posts to show in Admin CP .. so instead of just one, perhaps 2 or 3 etc ..

Ability to pick "First unread post" in the Admin CP as well as "First post" and "Last Post" ..

Edit button (if poster) .. yes I want the world!!
Reply With Quote
  #126  
Old 04-20-2007, 12:39 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 Slave View Post
Ability to pick "First unread post" in the Admin CP as well as "First post" and "Last Post" ..
I really like this idea.

Not to devalue your other ideas, but those have all already been mentioned and are being considered.. but the one above, that's gold. Thanks!
Reply With Quote
  #127  
Old 04-20-2007, 12:53 AM
4x4 Mecca 4x4 Mecca is offline
 
Join Date: Feb 2007
Posts: 396
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've edited the postbit just to show the user name, and nothing else on the left, changed the column width, and made attachments not show up, rather a message saying to view the thread to see attachments. Also there is an edit button and a reply button
http://www.4x4mecca.com/forum/forumdisplay.php?f=36

Magnus, if you want this removed, I'll do it, just PM me
Code:
<table id="post$post[postid]" cellpadding="10" cellspacing="0" border="0" width="100%" align="center">
<tr valign="top">
	<td class="alt2" width="64">
			
			<div id="postmenu_$post[postid]">
				<if condition="$show['profile']">
				<a class="smallfont" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
				<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
				<else />
				$post[musername]
				</if>
			</div>		
	</td>
	<if condition="$show['moderated']">
	<td class="alt2" id="td_post_$post[postid]" style="border-right: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]">
	<else />
	<td class="alt1" id="td_post_$post[postid]" style="border-right: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]">
	</if>
	
		
		
		<!-- message -->
		<div id="post_message_$post[postid]">$post[message]</div>
		<!-- / message -->
	
		<if condition="$show['attachments']">
_______________<p>
			<b>*** Please View Thread for Attachments ***</b>
			</if>
			
			</div>
		<!-- / attachments -->
		</if>
		
		<if condition="$show['postedited']">
		<!-- edit note -->
			<div class="smallfont">			<hr size="1" style="color:$stylevar[tborder_bgcolor]" />
				<em>
				<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>.
				<if condition="$post['edit_reason']">$vbphrase[reason]: $post[edit_reason]</if>
				</em>
			</div>
		<!-- / edit note -->
		</if>
		<!-- controls -->

<if condition="$post['editlink']">
<img style="display: none" id="progress_$postid" src="$stylevar[imgdir_misc]/progress.gif" alt="$vbphrase[loading_editor_please_wait]" />

<a href="$post[editlink]" name="vB::QuickEdit::$post[postid]">
<img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
		</if>

		<if condition="$post['replylink']">
			<a href="$post[replylink]" rel="nofollow"><img src="$stylevar[imgdir_button]/reply_small.gif" alt="$vbphrase[reply_with_quote]" border="0" /></a>
		</if>

		<if condition="$show['quickreply'] AND !$show['threadedmode']">
			<a href="$post[replylink]" rel="nofollow" id="qr_$post[postid]" onclick="return false"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a>
		</if>
		<!-- / controls -->
	
	</td>
</tr>
</table>

<!-- post $post[postid] popup menu -->
<div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none">
	<table cellpadding="4" cellspacing="1" border="0">
	<tr>
		<td class="thead">$post[username]</td>
	</tr>
	<if condition="$show['profile']">
		<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
	</if>
	<if condition="$show['pmlink']">
		<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
	</if>
	<if condition="$show['emaillink']">
		<tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
	</if>
	<if condition="$show['homepage']">
		<tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
	</if>
	<if condition="$show['search']">
		<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[find_more_posts_by_x]</phrase></a></td></tr>
	</if>
	<if condition="$post['userid'] AND $show['member']">
	<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
	</if>
	</table>
</div>
<!-- / post $post[postid] popup menu -->
Reply With Quote
  #128  
Old 04-20-2007, 01:06 AM
dbirosel dbirosel is offline
 
Join Date: Feb 2007
Location: San Diego
Posts: 587
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how do you add a reply button?
Reply With Quote
  #129  
Old 04-20-2007, 01:10 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 4x4 Mecca View Post
Magnus, if you want this removed, I'll do it, just PM me
I'd never ask you (or anyone) to not provide any customizations. That's the whole point of vBulletin.org -- to share ideas. By all means, share whatever you think anyone could benefit from.

As a sidenote, you no longer need to include <!-- vbpost ok --> at the top of your templates. I've phased that check out in 1.2.
Reply With Quote
  #130  
Old 04-20-2007, 01:12 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 dbirosel View Post
how do you add a reply button?
Just view your original postbit_legacy template, find the reply button block of code, cut and paste.

The vbpost_postbit template is nothing more than a copy/paste of the default postbit_legacy with a few visual modifications. In fact, you could just cut and paste the entire default postbit_legacy into vbpost_postbit if you so desired.
Reply With Quote
  #131  
Old 04-20-2007, 01:17 AM
StuntFactoryX StuntFactoryX is offline
 
Join Date: May 2006
Posts: 228
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ive been watching this for a few days. in the early posts there were reports of alot of database errors and i seen you guys working hard to sort out the bugs. the current version close to stable and bug free?
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 07:21 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07484 seconds
  • Memory Usage 2,336KB
  • 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
  • (1)bbcode_code
  • (5)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