Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles

Reply
 
Thread Tools
Nice Postbit Sidebar
Trasion
Join Date: Sep 2009
Posts: 178

 

New York
Show Printable Version Email this Page Subscription
Trasion Trasion is offline 05-03-2010, 10:00 PM

This tutorial will teach you how to add a nice sidebar in the first post of every thread (unless you change it not to).

Just follow the simple steps below.

Open up your postbit template, and find:

Code:
		<div id="post_message_$post[postid]">
			$post[message]
		</div>
Change that to:

Code:
<div class="content">
		<div id="post_message_$post[postid]">
			$post[message]
		</div>

</div>


<if condition="$post[postcount] == 1">
<div class="sidebar">

<table class="sidebaritem">
<tr>
<td width="20px"><img src="images/postbit/user.png"></td>
<td><a href="member.php?$session[sessionurl]u=$post[userid]">Authors Profile</a></td>
</tr>
</table>
<div style="height:4px;"></div>
<table class="sidebaritem">
<tr>
<td width="20px"><img src="images/postbit/heart.png"></td>
<td><a href="reputation.php?p=$post[postid]">Add to Reputation</a></td>
</tr>
</table>
<div style="height:24px;"></div>
<table class="sidebaritem">
<tr>
<td width="20px"><img src="images/postbit/add.png"></td>
<td><a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$post[postid]" rel="nofollow">Reply to Thread</a></td>
</tr>
</table>
<div style="height:4px;"></div>
<table class="sidebaritem">
<tr>
<td width="20px"><img src="images/postbit/printer.png"></td>
<td><a href="printthread.php?t=$post[threadid]">Print Thread</a></td>
</tr>
</table>
<div style="height:4px;"></div>
<table class="sidebaritem">
<tr>
<td width="20px"><img src="images/postbit/email.png"></td>
<td><a href="sendmessage.php?do=sendtofriend&t=$post[threadid]">Share Thread</a></td>
</tr>
</table>
<div style="height:4px;"></div>
<table class="sidebaritem">
<tr>
<td width="20px"><img src="images/postbit/flag_red.png"></td>
<td><a href="report.php?p=$post[postid]">Report Thread</a></td>
</tr>
</table>
</div>
</if>
<div class="clear"></div>
Now in the same template, find:

Code:
$post[signature]
Replace it with this:

Code:
<if condition="$post[postcount] !== 1"><div style="width:910px;background:#D1D1E1;height:1px;margin-left:auto;margin-right:auto;"></div><br /><div style="width:90%;margin-left:auto;margin-right:auto;">$post[signature]</div></if>
Close that template, and go into All Style Options, and find the Additional CSS Definitions box. In the second box down, add this:

Code:
.content {
	width:700px;
	margin:10px;
	float:left;
}

.sidebar {
	width:200px;
	margin:10px;
	float:right;
padding: 5px;
}


.sidebaritem {
        border: 1px solid #D1D1E1;
border-left: 2px solid #D1D1E1;
	width:200px;
background: #fbfbfb url(images/misc/alts.gif) repeat-x;
padding: 5px;
}


.clear {
	clear:both;
}
Then upload the attached file to your /images/ folder.

Now go to vBulletin Options, find Use Legacy (Vertical) Postbit Template, and make sure it's checked to "No".

You should have a working sidebar. In CSS, you will need to edit widths, and colors to suit your forum.

If you want more icons, please go to FamFamFam.com and find the silk icons.
Attached Files
File Type: zip upload.zip (5.2 KB, 59 views)
Reply With Quote
  #12  
Old 06-08-2010, 03:53 PM
ChopSuey ChopSuey is offline
 
Join Date: Jun 2009
Location: Alaska
Posts: 2,140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Im so glad i didn't give him my gaming database a few months back. Whew. Looks like he doesn't know about it.
Reply With Quote
  #13  
Old 08-01-2010, 09:35 PM
Trasion Trasion is offline
 
Join Date: Sep 2009
Location: New York
Posts: 178
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry guys, my site was hacked. This modification still works great though. You can see the preview in the 4th post or so.
Reply With Quote
  #14  
Old 07-24-2011, 06:09 PM
Sepehr-Jandali Sepehr-Jandali is offline
 
Join Date: Jun 2011
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please give demo ؟
Reply With Quote
Reply

Thread Tools

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:52 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.07581 seconds
  • Memory Usage 2,245KB
  • Queries Executed 19 (?)
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
  • (5)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (1)postbit_attachment
  • (4)postbit_onlinestatus
  • (4)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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete