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
  #2  
Old 05-04-2010, 01:43 PM
iask iask is offline
 
Join Date: Jan 2010
Location: Home
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Demo ?
Reply With Quote
  #3  
Old 05-04-2010, 06:27 PM
Trasion Trasion is offline
 
Join Date: Sep 2009
Location: New York
Posts: 178
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Demo at http://trasion.com/showthread.php?t=217

Can someone please take a screenshot of it, and upload it here before I change my style in a few days? I can't do it myself right now, but I don't want it to disappear.
Reply With Quote
  #4  
Old 05-04-2010, 09:09 PM
Aaron873's Avatar
Aaron873 Aaron873 is offline
 
Join Date: Apr 2010
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow thanks so much.
I needed this for my forum.
Reply With Quote
  #5  
Old 05-05-2010, 11:13 PM
ForumsMods ForumsMods is offline
 
Join Date: Aug 2007
Location: Argentina
Posts: 667
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not XHTML Valid.
Reply With Quote
  #6  
Old 05-07-2010, 10:52 AM
Trip's Avatar
Trip Trip is offline
 
Join Date: Mar 2008
Location: Eastern Canada
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is your screenshot...
Attached Images
File Type: jpg post_screen.jpg (57.4 KB, 0 views)
Reply With Quote
  #7  
Old 05-08-2010, 02:56 AM
kmohamed kmohamed is offline
 
Join Date: Nov 2008
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vb4 ?!
Reply With Quote
  #8  
Old 05-14-2010, 07:31 AM
valdet's Avatar
valdet valdet is offline
 
Join Date: Feb 2007
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice. I might modify that to include a skyscrapper sized advertisement on the right side of postbit_legacy
Reply With Quote
  #9  
Old 06-04-2010, 01:06 PM
ChopSuey ChopSuey is offline
 
Join Date: Jun 2009
Location: Alaska
Posts: 2,140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your site is listed as an attack site! Look at attached image. Avast doesn't lie.
Attached Images
File Type: jpg trasionattacksite.jpg (85.6 KB, 0 views)
Reply With Quote
  #10  
Old 06-08-2010, 05:23 AM
danyz81's Avatar
danyz81 danyz81 is offline
 
Join Date: Apr 2009
Location: Rome
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ChopSuey View Post
Your site is listed as an attack site! Look at attached image. Avast doesn't lie.
same for me! The site is blocked from my antivirus!
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 01:48 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.04332 seconds
  • Memory Usage 2,315KB
  • Queries Executed 24 (?)
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)bbcode_quote
  • (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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (3)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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