vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Miscellaneous Hacks - DJ's Dynamic Tab Content for Postbit_Legacy (https://vborg.vbsupport.ru/showthread.php?t=184136)

Digital Jedi 10-22-2008 06:27 PM

For just the dots, I'm not entirely sure it will work, but you can try adding a style="text-align:center" element to the containing DIV tag:

Code:


<div id="postbittabs$post[postid]" class="djdot">


RobbieZ 10-22-2008 09:44 PM

Now that i have it all set up like your demo.

my posts/reps and (little green light)Im on Line) is still showing

I just delete them right ?

And

Do you know of a viable code to do for YAAS 4 . so it shows the awards up ?

Thank you DJ (excellent Thread)

Digital Jedi 10-22-2008 10:51 PM

Quote:

Originally Posted by RobbieZ (Post 1650740)
Now that i have it all set up like your demo.

my posts/reps and (little green light)Im on Line) is still showing

I just delete them right ?

And

Do you know of a viable code to do for YAAS 4 . so it shows the awards up ?

Thank you DJ (excellent Thread)

Yes, you can just delete or <!-- comment out --> the parts your not using.

I don't know what YAAS 4 is, but if it's some kind of awards system then you can probably get them to show up by putting the template_hook that it's using inside the tabs. Look for a template hook right around where your awards are showing up and move it around to see if that's what's controlling it.

RobbieZ 10-22-2008 11:53 PM

Quote:

Originally Posted by Digital Jedi (Post 1650772)
Yes, you can just delete or <!-- comment out --> the parts your not using.

I don't know what YAAS 4 is, but if it's some kind of awards system then you can probably get them to show up by putting the template_hook that it's using inside the tabs. Look for a template hook right around where your awards are showing up and move it around to see if that's what's controlling it.

I did not realise this. so i put <!-- comment out --> at the begining and the end of what i do not want to show ?

sorry my bad YAAS 4 is this: https://vborg.vbsupport.ru/showthrea...highlight=YAAS

I will look this hook up.

Thanks again DJ

Digital Jedi 10-23-2008 12:25 AM

To comment out something, you'd put <!-- at the beginning of it and --> at the end of it. It turns everything inbetween into a comment, rather then functional code.

a marked man 70 10-24-2008 09:07 AM

Quote:

Originally Posted by Digital Jedi (Post 1650616)
For just the dots, I'm not entirely sure it will work, but you can try adding a style="text-align:center" element to the containing DIV tag:

Code:


<div id="postbittabs$post[postid]" class="djdot">


nope, that did not do anything:confused:

Digital Jedi 10-24-2008 06:28 PM

Hrm, I'm not sure where my head was that night. You can center the DIV by editing the CSS class for djdot.

gorentals 11-18-2008 02:49 PM

cool hack

GlamRockTalk 11-21-2008 07:55 PM

Quote:

Originally Posted by Digital Jedi (Post 1651947)
Hrm, I'm not sure where my head was that night. You can center the DIV by editing the CSS class for djdot.

So, I'm assuming that I edit the tabcontent.css file. But, where do I edit it and what do I place in there to center the tabs?

And, if someone does not fill in one of the fields that you have in the tabs, it kinda collapses the little space but still shows. Any suggestions as to what to do so that either it doesn't show the little collapsed box or to have some sort of default term in there?

By the way DJ...another mod that ROCKS! :D

GlamRockTalk 11-21-2008 09:44 PM

Quote:

Originally Posted by Digital Jedi (Post 1564486)

DJ,

FYI, I was looking for examples and I noticed the two middle ones were not showing with the script being utilized. Might want to double check, but it didn't look like it.

Digital Jedi 11-21-2008 10:04 PM

Quote:

Originally Posted by GlamRockTalk (Post 1670250)
So, I'm assuming that I edit the tabcontent.css file. But, where do I edit it and what do I place in there to center the tabs?

And, if someone does not fill in one of the fields that you have in the tabs, it kinda collapses the little space but still shows. Any suggestions as to what to do so that either it doesn't show the little collapsed box or to have some sort of default term in there?

By the way DJ...another mod that ROCKS! :D

When you setup a block that may or may not be used by a user, you would put that block in an if conditional, like in the example I have for the flags. <if condition="$post[fieldXX]"> where XX is the ID number of the field that will be filled in. See vBulletin Conditionals for more information.


Quote:

Originally Posted by GlamRockTalk (Post 1670297)
DJ,

FYI, I was looking for examples and I noticed the two middle ones were not showing with the script being utilized. Might want to double check, but it didn't look like it.

A couple of sites are no longer using the script. I just haven't had a chance to update the list.

TheLastSuperman 11-21-2008 10:05 PM

Very nice.... going to DL and modify for different use - THANKS :D

Nice to see a DD script being used again for implementation w/ VB and Thanks for not violating their terms of use like others i.e. you used their DL link not hosting the DL yourself which is against it ;)

GlamRockTalk 11-21-2008 10:11 PM

Quote:

Originally Posted by Digital Jedi (Post 1670301)
When you setup a block that may or may not be used by a user, you would put that block in an if conditional, like in the example I have for the flags. <if condition="$post[fieldXX]"> where XX is the ID number of the field that will be filled in. See vBulletin Conditionals for more information.

Thanks DJ. But, this is what I have right now. Is there something wrong with it?

Code:

<div class="pbit"><if condition="$post[field2]"><strong>Location:</strong> $post[field2]</if></div>

Also, we didn't get to this one about the centering of the tabs....

Quote:

So, I'm assuming that I edit the tabcontent.css file. But, where do I edit it and what do I place in there to center the tabs?

GlamRockTalk 11-21-2008 10:24 PM

1 Attachment(s)
Just found another issue with the 'post thanks' hack showing in both boxes. I used the following code.....

Code:

$template_hook[postbit_userinfo_right_after_posts]

....and it shows this.....

Attachment 89663


....when I try and add this....

Code:

<div class="pbit">$template_hook[postbit_userinfo_right_after_posts]</div>

....it then shows this.....

Attachment 89664


.....what should I do to fix this? Any suggestions?

Digital Jedi 11-22-2008 01:11 AM

Quote:

Originally Posted by GlamRockTalk (Post 1670307)
Thanks DJ. But, this is what I have right now. Is there something wrong with it?

Code:

<div class="pbit"><if condition="$post[field2]"><strong>Location:</strong> $post[field2]</if></div>

Move your if condition outside the DIV if you want the DIV to be hidden when there's no Location content. Right now you have the if condition around the Location only, so only the location text is going to be hidden when that field is not filled in by the user.


Quote:

Also, we didn't get to this one about the centering of the tabs....
You should be able to get it to center by adding a style tag to the main container:

Code:

<div id="$post[postid]postbittabs" class="djdot" style="text-align:center;">


Quote:

Originally Posted by GlamRockTalk (Post 1670313)
Just found another issue with the 'post thanks' hack showing in both boxes. I used the following code.....

Code:

$template_hook[postbit_userinfo_right_after_posts]

....and it shows this.....

Attachment 89663


....when I try and add this....

Code:

<div class="pbit">$template_hook[postbit_userinfo_right_after_posts]</div>

....it then shows this.....

Attachment 89664


.....what should I do to fix this? Any suggestions?

The template hook probably already displays the upper portion in a div of that class, so encasing it in another pbit class DIV just encases the whole thing. Try looking for any plugins the Post Thanks Hacks uses in relation to the postbit and look inside the code for a DIV containing the literal HTML for that particular code. You should be able to edit it from there.

GlamRockTalk 11-22-2008 06:43 PM

Thanks for taking the time to answer DJ.

Well, here are the results...

1. The 'centering' of the tabs did not work. Any other suggestions? I remember you mentioning about something within the CSS being changed, is that another option?

2. The conditions on the 'outside' piece of the advice worked. Thanks! :D

3. And the final piece .... I've gotta go fishin' around the code for the 'post thanks' hack to see if it'll work. I'll see if I can do that tonight.

GlamRockTalk 11-25-2008 01:54 PM

Has anyone figured out how to do the 'centering' of the tabs yet?

Someone had mentioned about changing something within the CSS file. Any help on this would be appreciated. Thanks! :D

Digital Jedi 11-26-2008 10:51 AM

You can try adding the text-align:center to the djdot class, and see if that does the trick.

GlamRockTalk 11-26-2008 01:19 PM

Sorry to have to ask this...but, which one is the "djdot class"?

I see many, many lines with djdot in them and I want to make sure that I'm editing the correct one within the tabcontent.css file.

Thanks DJ!

Digital Jedi 11-27-2008 03:26 AM

Quote:

Originally Posted by GlamRockTalk (Post 1673323)
Sorry to have to ask this...but, which one is the "djdot class"?

I see many, many lines with djdot in them and I want to make sure that I'm editing the correct one within the tabcontent.css file.

Thanks DJ!

In your tabcontent.css file, try adding a text-align:center into the first class:

Code:

.djdot{
font: bold 13px Arial;
width: 100%; /*leave this value as is in most cases*/
text-align:center;
}


GlamRockTalk 11-27-2008 03:35 AM

DJ, it didn't work. :(

Any other suggestions?

Digital Jedi 11-27-2008 03:42 AM

Try adding that same style attribute to the main DIV or TD containing that area of the postbit. In this case, it will probably be TD containing the avatar and username, etc. (in the case of a TD, I believe you can still use align="center" instead of the style tag.)

GlamRockTalk 11-27-2008 04:09 AM

Man oh man...nothing seems to work. :(

Digital Jedi 11-27-2008 04:26 AM

Alright, let's take a look at your postbit_legacy code.

GlamRockTalk 11-27-2008 04:29 AM

DJ, sent PM with info

Thanks for the help! :D

stickskills 11-27-2008 03:49 PM

The centering issue has been something I've tried to figure out for awhile, but to no avail just yet.

GlamRockTalk 11-27-2008 06:29 PM

I wonder if we should ask the DynamicDrive folks about the possibilities of centering the tabs.

stickskills 11-28-2008 06:06 PM

Yes! I have figured it out! Here's what you'll need to do:

Open up your tabcontent.css

Change from
PHP Code:

.djdot{
fontbold 13px Arial;
width100%; /*leave this value as is in most cases*/


To
PHP Code:

.djdot{
fontbold 13px Arial;
width100%; /*leave this value as is in most cases*/
margin-left:20px;


The 20PX is just a random number I threw in there, and really depends on your width of your personal forum. Enjoy!

GlamRockTalk 11-28-2008 07:26 PM

stickskills, you are THE man! That is, unless you are a woman...in that case, you are THE woman! :D

Didn't even think to 'push' it to the center in that way. Very cool idea. Maybe someday we'll actually have it done correctly. Since I only had three tabs, I had to move it over more. Mine was about 47px. But, it's good now! :)

Thanks!

stickskills 11-28-2008 10:20 PM

Ha, yeah.. I was so fixed on how to "center" it, that I never thought about just pushing the margin. Though it's not a true way of centering, it does work.

Btw, definitely a man haha.

GlamRockTalk 11-29-2008 02:00 PM

LOL...Okay, so you are THE man! :D

You finally started thinking 'outside the postbit box' , right? ;)

stickskills 11-29-2008 10:44 PM

Haha, exaaaaaactly. ;)

Now I just have to redo the entire postbit because of the new skin I'm doing, apparently I missed a div somewhere, so I'd rather just reconstruct the entire thing. :P

ScienceOfMuscle 11-30-2008 02:09 AM

I am still a bit confused on what codes to put in the div holders. For instance if I wanted to add this: <if condition="$show['infraction']"><div class="info">$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>

to tab 1. Where would I put it? Do I completely replace the placeholder under Tab 1 or do I add it inside of it somehwere? Also do I need to change the <li> coding at all once I add one thing or more? Sorry I am a bit new to vBulletin but I am not computarded or anything. Haven't coded in quite some time.

Digital Jedi 11-30-2008 03:48 PM

Quote:

Originally Posted by ScienceOfMuscle (Post 1675512)
I am still a bit confused on what codes to put in the div holders. For instance if I wanted to add this: <if condition="$show['infraction']"><div class="info">$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>

to tab 1. Where would I put it? Do I completely replace the placeholder under Tab 1 or do I add it inside of it somehwere? Also do I need to change the <li> coding at all once I add one thing or more? Sorry I am a bit new to vBulletin but I am not computarded or anything. Haven't coded in quite some time.

The code is red is your container, which you need to keep to make is work. Everything on the inside is replaceable code:


Code:


<!--TAB 1 CONTENT -->
<div id="tab1$post[postid]" class="tabcontent">
 
<div class="info">Tab 1 Content:Block A</div>
<div class="info">Tab 1 Content:Block B</div>
<div class="info">Tab 1 Content:Block C</div>
 
</div>

For the LI, just change the TITLE to whatever you want the mouseover tool tip to say:

Code:


<li><span title="View Tab 1"><a href="#" rel="tab1$post[postid]" id="selected$post[postid]">&nbsp;</a></span></li>


Frank Sinatra 12-01-2008 09:28 AM

thanksss, working perfect here :p

ScienceOfMuscle 12-01-2008 11:42 AM

Quote:

Originally Posted by Digital Jedi (Post 1675835)
The code is red is your container, which you need to keep to make is work. Everything on the inside is replaceable code:


Code:


<!--TAB 1 CONTENT -->
<div id="tab1$post[postid]" class="tabcontent">
 
<div class="info">Tab 1 Content:Block A</div>
<div class="info">Tab 1 Content:Block B</div>
<div class="info">Tab 1 Content:Block C</div>
 
</div>

For the LI, just change the TITLE to whatever you want the mouseover tool tip to say:

Code:


<li><span title="View Tab 1"><a href="#" rel="tab1$post[postid]" id="selected$post[postid]">&nbsp;</a></span></li>


Ok that makes sense. It is doing the same thing as before though, when I click one of the tabs it just brings me back to the top of the page instead of just showing that tab. I only modified tab 3 to test this out but here it is:

<!-- BEGIN AJAX CONTENT -->
<div id="postbittabs$post[postid]" class="djdot">

<ul>
<li><span title="View Tab 1"><a href="#" rel="tab1$post[postid]" id="selected$post[postid]">&nbsp;</a></span></li>
<li><span title="View Tab 2"><a href="#" rel="tab2$post[postid]">&nbsp;</a></span></li>
<li><span title="View Tab 3"><a href="#" rel="tab3$post[postid]">&nbsp;</a></span></li>
<li><span title="View Tab 4"><a href="#" rel="tab4$post[postid]">&nbsp;</a></span></li>
<li><span title="View Tab 5"><a href="#" rel="tab5$post[postid]">&nbsp;</a></span></li>
</ul>

<br style="clear: left" />

</div>

<div class="smallfont">

<!--TAB 1 CONTENT -->
<div id="tab1$post[postid]" class="tabcontent">


<div class="info">Tab 1 Content:Block B</div>
<div class="info">Tab 1 Content:Block C</div>

</div>

<!-- TAB 2 CONTENT -->
<div id="tab2$post[postid]" class="tabcontent">

<div class="info">Tab 2 Content:Block A</div>
<div class="info">Tab 2 Content:Block B</div>
<div class="info">Tab 2 Content:Block C</div>
<div class="info">Tab 2 Content:Block D</div>

</div>

<!-- TAB 3 CONTENT -->
<div id="tab3$post[postid]" class="tabcontent">

<div class="info">$vbphrase[posts]: $post[posts]</div>
<if condition="$post['joindate']"><div class="info">$vbphrase[join_date]: $post[joindate]</div></if>
<div class="info">Tab 3 Content:Block C</div>
<div class="info">Tab 3 Content:Block D</div>
<div class="info">Tab 3 Content:Block E</div>
<div class="info">Tab 3 Content:Block F</div>

</div>

father guido 12-01-2008 03:08 PM

Quote:

Originally Posted by ScienceOfMuscle (Post 1676394)
Ok that makes sense. It is doing the same thing as before though, when I click one of the tabs it just brings me back to the top of the page instead of just showing that tab. I only modified tab 3 to test this out but here it is:

I had the same issue until I changed the "persistance" back to false - then it worked fine. THAT was the issue for me.
Code:

mytabs.setpersist(false)

GlamRockTalk 12-01-2008 03:47 PM

Strange....I just had a new member make their first post (we're still testing things out at the site, it's not 100% open yet) and it doesn't show anything other than the three tabs. Then, when you click on a tab, it goes up to the top of the page like the others mentioned.

Any thoughts on what I should do?

Here's the example: It's the member named hms1016 and the thread is http://www.glamrocktalk.com/showthre...?p=265#post265

EDITED: I always had the 'persistence' as false. So, that's not a solution for me.

ScienceOfMuscle 12-01-2008 09:35 PM

Quote:

Originally Posted by father guido (Post 1676497)
I had the same issue until I changed the "persistance" back to false - then it worked fine. THAT was the issue for me.
Code:

mytabs.setpersist(false)

Isn't it false by default?

father guido 12-01-2008 11:34 PM

Quote:

Originally Posted by ScienceOfMuscle (Post 1676698)
Isn't it false by default?


Yes but in the initial instructions it was suggested to change it to "true" - I did before upload but had the "jump to the top" issues until I changed it back to false.


All times are GMT. The time now is 02:25 AM.

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.01710 seconds
  • Memory Usage 1,870KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (16)bbcode_code_printable
  • (2)bbcode_php_printable
  • (18)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete