Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
DJ's Dynamic Tab Content for Postbit_Legacy Details »
DJ's Dynamic Tab Content for Postbit_Legacy
Mod Version: 1.50, by Digital Jedi (Coder/Designer) Digital Jedi is offline
Developer Last Online: Aug 2018 I like it Show Printable Version Email this Page

vB Version: 3.8.x Rating: (20 votes - 5.00 average) Installs: 151
Released: 02 Jul 2008 Last Update: 20 Aug 2008 Downloads: 1356
Not Supported Template Edits Additional Files Re-usable Code  

**As with most template edits, this modification is not version specific and will work on any vBulletin for vB3. You can find the vB4 version here.**

Ever felt your postbit_legacy template was just too long? Or maybe you'd like to add more content to your postbit_legacy, but you don't like the cluttered look or extended length of the post, especially when most posts are only a handful of sentences? Almost every decent modification here on vB.org has the option to add a link or a display to your postbit templates, and you've likely struggled, as I have, to come up with just the info you want to display, likely excluding things you thought would look real nice, but just couldn't justify the room for.

Now I've seen several good modifications that address this problem, and all of them are pretty nice. I've seen everything from a drop-down menu that displays the content, to a box that can be opened and closed just underneath the avatar. All of them are practical in their own way, and here's one more way that I worked out using a script from Dynamic Drive's website called Tab Content Script. This cleaned up my postbit_legacy just the way I wanted, and let me add even more content then I would have originally intended. It also allowed me to organize content in whatever manner I wished. I love it and I think you will too.


Screenshots


Live Demo
Click any of the grey dots beneath the user's avatars.


Difficulty: Intermediate
A few things you should know before moving forward. The instructions for this mod are not your standard template modification instructions. It's going to presume that you've edited your postbit_legacy template before and that you're somewhat familiar with its content, with HTML and how to wrap <if condition=""> conditionals. So it's not going to be a "look for this line of code, add this under it" kind of traditional tutorial. What I'm going to do is show you the basic code, how to implement it and then let you do with it what you want. That is, after all, the reason I came up with mod in first place, and I know everyone wont have the same postbit content and/or will want to set theirs up differently.

With that said, knowledge of how to modify your templates and basic HTML coding is something every vBulletin administrator should have. I'm not a coder. I'm a complete hack. But I know enough to take some of the wealth of code snippets available on the web and attempt to use them in new and inventive ways. Administrating a vB forum is that much more satisfying as a result.


Installation
To add this to your forum requires you to upload some files, make one edit to your headinclude template and one to your postbit_legacy template. If you don't know what postbit_legacy does, it's the template that controls the look of your posts when you've chosen to have avatars and user information appear to the left hand side of your posts. If you don't use that look for your forum, but instead use the one where avatars appear above your posts, then that means you use the postbit template, and this modification wasn't designed to look right on that template. (Though we have had a few users give it a try.)

Step 1.
First things first. After downloading the Attachment 83351 file, extract the contents and upload the postbit_tabs folder in your forum's root directory (Your forum root is the folder you have physically installed vBulletin in, which means that for some folks, this isn't the same thing as your site root.)

Step 2.
Right click and download this JavaScript file from the Dynamic Drive website: tabcontent.js (You can also download it from this page.) Upload it to the postbit_tabs folder you just added to your website.

Step 3.
Now to edit your headinclude template. Go to Admin CP >>> Styles & Templates >>> Style Manager >>> <<>> >>> headinclude.

Add the following block of code to the very bottom. Remember to keep the copyright intact for legal use.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Step 4.
Now to access your postbit_legacy template, go to Admin CP >>> Styles & Templates >>> Style Manager >>> <<>> >>> Postbit Templates >>> postbit_legacy.

From here, your going to add a basic set of code from which you can then customize it. You can pretty much add it anywhere in the template, but most likely your going to want to add it just below the avatar. If that's the case, your avatar code is most likely going to look something like this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Below that add this basic set of code. This block of code will be your physical tab content.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Now go to your forum and see if your tabs are displaying properly and your not getting any errors. You should have five dot tabs that display five different sets of information when clicked.

Final Steps
Now comes the hard part. Now you have to decide what you want to put in those places called Tab 1 Content:Block A, etc. This is where knowledge of your postbit_legacy template comes into play. Your now going to move whatever content you want in the respective tabs from their current location into the tabs. This is entirely up to you, but you can use my forum as a starting point. The following posts also have some tips to help you along the way.

Post 2 has a Basic Breakdown of what the tabs do, a tutorial on how to add more tabs, default snippets of code that you can move into the tabs containers as well some snippets from common hacks.

Post 3 has some links to other sites that have implemented this hack to give you an idea of what can be done with it. And it has some additional images to use in place of the default dots.

Post 5 has Frequently Asked Questions for most problems you would encounter.




Known Bugs
There is one minor issue with the tabs that only occurs when using the AJAX quick reply and inline editing. Actually it's two issues, but I've only seen one or the other on my live site vs. my demo board. In one instance, the entire content of all your tabs displays all at once when posting/editing using AJAX. This is not a huge deal, as the only person who sees it do that is the person doing the posting/editing. And it will return to normal anytime he reloads or refreshes the page. The other instance is when after posting/editing through AJAX, no tab content appears, except the dot tabs. This is also not a huge deal as the same thing will happen here too; only the poster sees it and it will look normal anytime he returns or reloads the page. I think it's a minor trade off for the sleek look it gives your forum the rest of the time.

Upgrade Instructions
For those using the 1.00 version of this modification, please see this post for upgrade instructions.

Download Now

Only licensed members can download files, Click Here for more information.

Addons

Screenshots

Click image for larger version

Name:	Postbit Tabs Screenie.png
Views:	13911
Size:	9.1 KB
ID:	83352   Click image for larger version

Name:	Postbit-Tabs-Screenie.gif
Views:	14198
Size:	48.7 KB
ID:	83353  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Show Thread Enhancements DJ's Translate a Thread in a Google Pop-Up Window Digital Jedi vBulletin 3.7 Template Modifications 42 11 Jun 2009 12:48
DJ's Styles - Rubescence Digital Jedi vBulletin 3.7 Styles 23 02 Mar 2009 10:50

  #376  
Old 24 Jul 2010, 15:09
Amazing2 Amazing2 is offline
 
Join Date: Feb 2010
Can you explaine this, how to get my own img in the tab menu? ( for dummys pls ^^ )

Is this the right way?

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

In the css i only delete die backround codes, right? o0

Im sorry, its not my day
Reply With Quote
  #377  
Old 06 Aug 2010, 21:23
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Real name: Mark Daniel Martinez
Originally Posted by Amazing2 View Post
Can you explaine this, how to get my own img in the tab menu? ( for dummys pls ^^ )

Is this the right way?

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

In the css i only delete die backround codes, right? o0

Im sorry, its not my day
Yes, that's the correct way. You just need to correct the errors in your <img> tag and it should work fine.
__________________
Reply With Quote
  #378  
Old 13 Oct 2010, 01:12
MonkYZ MonkYZ is offline
 
Join Date: Jul 2008
Hi Digital Jedi ! As always you have done one of the best mods for vBulletin !

Can you tell me please why my website doesn't show Age, no matter what i do ?
Also, how can i add an entry to show how many blog entries users have ?
And the last one (for now ), how can i add an entry for the level only from VBExperience ?

Thank you in advance and keep up the good work !
Reply With Quote
  #379  
Old 14 Oct 2010, 22:24
MonkYZ MonkYZ is offline
 
Join Date: Jul 2008
Ah, i have more (please don't be mad on me ). Actually, i will list all the functions below... if you can help me with them i will be really happy

- vBExperience Level
- vBExperience Awards
- vBExperience Achievements
- User Profile Picture
- The Social Groups the user is in
- Find More Posts by user
- Find all threads started by user
- Birthday (as i can't display age at all)

THANK YOUUUU !
Reply With Quote
  #380  
Old 30 Nov 2010, 12:48
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Real name: Mark Daniel Martinez
Originally Posted by MonkYZ View Post
Hi Digital Jedi ! As always you have done one of the best mods for vBulletin !

Can you tell me please why my website doesn't show Age, no matter what i do ?
Also, how can i add an entry to show how many blog entries users have ?
And the last one (for now ), how can i add an entry for the level only from VBExperience ?

Thank you in advance and keep up the good work !
Let me see your template code, at least, just the area where the blocks are. If the variables are in there, they should be displaying.


Originally Posted by MonkYZ View Post
Ah, i have more (please don't be mad on me ). Actually, i will list all the functions below... if you can help me with them i will be really happy

- vBExperience Level
- vBExperience Awards
- vBExperience Achievements
- User Profile Picture
- The Social Groups the user is in
- Find More Posts by user
- Find all threads started by user
- Birthday (as i can't display age at all)

THANK YOUUUU !
vBExperience I had to settle for putting the template hooks in the tabs. You can also migrate the code from the templates, and if I remember correctly, you just turn those items off in Experience, and it should display wherever you pates the code. Been a while since I tried those.

I don't think you'll be able to get the profile picture on the postbit. You might need to see if it's ever been done before.

The rest, I'll have to get back to you on. Not a lot of time for me today. But those all should have variables you just put in the postbit. You can find the code to More Posts in the same template, for example.
__________________
Reply With Quote
  #381  
Old 23 Dec 2010, 01:50
kevinkun kevinkun is offline
 
Join Date: Feb 2010
Hello, having some small difficulties with my postbit;; it'd be great if you could tell me what I did wrong...

i've uploaded the files onto my forum root directory.. not the images directory & I've made sure to follow every step.

here is my postbit_legacy code


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Thanks!
Attached Images
File Type: png untitled.PNG (18.8 KB, 15 views)
Reply With Quote
  #382  
Old 23 Dec 2010, 04:30
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Real name: Mark Daniel Martinez
Originally Posted by kevinkun View Post
Hello, having some small difficulties with my postbit;; it'd be great if you could tell me what I did wrong...

i've uploaded the files onto my forum root directory.. not the images directory & I've made sure to follow every step.

here is my postbit_legacy code


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Thanks!
Did you remember to add the code from Step 3 to your headinclude?
__________________
Reply With Quote
  #383  
Old 23 Dec 2010, 08:32
kevinkun kevinkun is offline
 
Join Date: Feb 2010
Originally Posted by Digital Jedi View Post
Did you remember to add the code from Step 3 to your headinclude?
Thank you very much.
but it still doesn't work.

I've rechecked my tabcontent.css & tabcontent.js to make sure they were in the same folder, but still no change..
Reply With Quote
  #384  
Old 23 Dec 2010, 18:52
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Real name: Mark Daniel Martinez
Originally Posted by kevinkun View Post
Thank you very much.
but it still doesn't work.

I've rechecked my tabcontent.css & tabcontent.js to make sure they were in the same folder, but still no change..
What is your forum address where you have this setup? I can tell you why it isn't working from looking at the source code.
__________________
Reply With Quote
  #385  
Old 28 Dec 2010, 23:57
SorentoUltimate's Avatar
SorentoUltimate SorentoUltimate is offline
 
Join Date: Jul 2009
Real name: Giorgos
Question

Perfect AddOn !!!

Known Bugs
There is one minor issue with the tabs that only occurs when using the AJAX quick reply and inline editing. Actually it's two issues, but I've only seen one or the other on my live site vs. my demo board. In one instance, the entire content of all your tabs displays all at once when posting/editing using AJAX. This is not a huge deal, as the only person who sees it do that is the person doing the posting/editing. And it will return to normal anytime he reloads or refreshes the page. The other instance is when after posting/editing through AJAX, no tab content appears, except the dot tabs. This is also not a huge deal as the same thing will happen here too; only the poster sees it and it will look normal anytime he returns or reloads the page. I think it's a minor trade off for the sleek look it gives your forum the rest of the time.
any news about it?
any one found a solution?
Reply With Quote
  #386  
Old 29 Dec 2010, 00:00
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Real name: Mark Daniel Martinez
Originally Posted by SorentoUltimate View Post
Perfect AddOn !!!

any news about it?
any one found a solution?
As far as I know, there's no way around this due to JavaScript limitations.
__________________
Reply With Quote
  #387  
Old 18 Mar 2011, 01:33
mikem164 mikem164 is offline
 
Join Date: Jan 2009
Looks like nice work. I have 6 skins, is there an easy way I can tell a template to keep this change on ALL TEMPLATES? I really don't want to do it on just one, and I can see after the 2nd one I'm gonna want to stab my eye if I go any further... eh?
Thanks for any advice
Reply With Quote
  #388  
Old 03 Apr 2011, 04:24
Alien123 Alien123 is offline
 
Join Date: Apr 2011
Originally Posted by Digital Jedi View Post
Basic Breakdown
Here's a basic explanation as to how the code works. This should help you to create new tabs and what can be edited in the code to your preferences.

The Tabs: Let's take a look back at the code you just added. In Step 4 you added a bunch of lines like this one. These are your tabs, the parts that people will actually click on to change the content view. In this example we're looking at the code for Tab 2.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

The code in red is your TITLE. It's what will show in the Tool Tip when someone mouseovers one of the tabs. Change this to your liking. I group my tabs by categories like Contact Info, TCG Info, General Info, etc. Do what cha' like.

The code in blue just a non-breaking space added in so people have something to click on. Users will see a background image, but what they'll actually be clicking is this non-breaking space. Change this space if you want to use text for your tabs instead of images. Otherwise just leave it be. (See FAQ)

The Containers: Now lets take a look at your containers. These are the DIVs that will display your content when a new tab is clicked. Each one is marked <!-- TAB [#] CONTENT --> and correspond to each of the tabs mentioned in the block of code above.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

The code in blue, the DIV, is your container, and is needed for the tabs to work. This part you would not change.

Everything on the inside is replaceable code and can be customize to look however you want. Examples of code snippets you can move into each of these tabs can be found a little further down in this post.



Creating New Tabs
Let's take a look at the Step 4 code again. Here's the code for Tab 2 again, as well as it's corresponding container.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.



Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

The green code in both blocks here is what tells Tab 2 to show container 2's content. The rel of the tab is the same as the id of the container. They're both tab2$post[postid].

So when creating additional tabs, pick up where the numbers left off on the last tab and start again. I had you install 5 tabs, so if your using all 5 and want to add another, the rel for your new tab and id for your new container would both be tab6$post[postid]. The next tab and container you add would be tab7$post[postid]. Then the next tab8$post[postid] and so on and so forth. You get the idea.



More Options

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

NOTE: This has since been set to false by default. Users have been reporting some login issues when this is set to true. So use at your own discretion.

This line of code sets the persistence of a clicked tab each time a user returns to that page during the same browser session. Set to true, and the last clicked tab will always display that tab on reload. Set to false, and it will show the tab with the ID selected each time. Note that each tab is unique, and having this set to true won't make much of a difference to your users view of the forum. The only tab that will ever persist is the one he/she clicked on, on a specific post in a specific thread, and only there. And only during the same browser session.



Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Put a number inside the parenthesis to determine how many milliseconds you want to pass between each time the tabs automatically toggle themselves. I have not tried this option yet, and I can imagine that it would be very annoying. But I figured, why not let you try it.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

vBulletin IF Conditionals can be used to show/hide whole tabs, or the specific content of tabs based on a number of parameters: Usergroup Permissions, Forum IDs, User IDs, Thread IDs, Post IDs, etc. Just wrap a conditional around a whole tab and then it's container, or wrap the content of the container in any number of fashions. To learn more about what conditionals are available here are two good resources:





Default Postbit Legacy Code Bits
Here's a few of the things that come standard in vBulletin that you might want to move to the various DIV containers.

Online Status:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Posts:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Age:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Join Date:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Biography:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Interests:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Occupation:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Infractions:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Reputation:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Instant Messengers:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.



Common Hack Postbit Legacy Code Bits
Here's a few code bits that you'll find in some of the more common vBulletin modifications that you might have installed that you'd like to move to the DIV containers.


vBCredits:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Countries/Region Flags (Replace 8 and 9 with whatever fields your using):
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


ibProArcade (With some slight additions by me):
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.



Made Up Postbit Legacy Codes:
And here's at least one I just went ahead and made up for my forum:
Send User a PM/Email/Friend Request:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.



If you have more examples that I can post, possible some I overlooked or mods I don't have installed, please feel free to post them and I'll add them to this post.
you think you could post the code you used? in yours
Reply With Quote
  #389  
Old 26 Jul 2012, 13:25
leqo leqo is offline
 
Join Date: Jan 2012


reply ajax bug :S how to fix?
Reply With Quote
  #390  
Old 19 Sep 2013, 15:26
Bubble #5 Bubble #5 is offline
 
Join Date: Apr 2005
Question

This is a great idea. Should be default in vB.

Seems to work in 4.2.1.

Does anyone know how to center the dots in Postbit?

I tried "align="center" in the div but that didn't work.

UPDATE:

For anyone who is looking for how to do this, here is the information...

Change the CSS for djdot ul to the following;


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
If we don't help each other when we can, then we're not making this world a better place.

Last edited by Bubble #5; 28 Sep 2013 at 21:09.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 07:58.

Layout Options | Width: Wide Color: