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 05-27-2009 01:21 AM

Quote:

Originally Posted by dancue (Post 1817164)
I know the title says Postbit_legacy, but can this be done for the postbit as well?

I haven't had any success.

Look for Boosted Panda's posts in this thread and look for his postbit modification where he implements it for the postbit.

dancue 05-27-2009 01:48 AM

sorry, I should have read through the thread...

Thanks for your help!

dancue 05-27-2009 02:01 AM

I should have explained myself better. Can I have this working in postbit as well as postbit_legacy. My users have the option of selecting vertical or horizontal postbit view.

Digital Jedi 05-27-2009 03:24 AM

Quote:

Originally Posted by dancue (Post 1817835)
I should have explained myself better. Can I have this working in postbit as well as postbit_legacy. My users have the option of selecting vertical or horizontal postbit view.

Yes, being able to switch wouldn't matter. But you need to take a look at Boosted Panda's Better Postbit Template to make it work in the postbit. The reason being is that it sets a fixed height for the postbit.

dancue 05-29-2009 09:36 PM

Okay, I've managed to add this to the postbit and am not able to get the 6th tab to show the content I'm inputing. Instead it's giving me the "Tab 6 content..."

In fact, I don't understand what's going on with this. If I have the Dynamic tabs running on both the postbit and postbit legacy they will not show correctly on either.

Digital Jedi 05-30-2009 03:05 AM

Would help if I could see your site and/or your postbit code.

dancue 05-30-2009 12:07 PM

Okay, what I did was start from scratch. I did one tab at a time for each the postbit and postbit_legacy.

It all seems to work now, except the code for the contact me info I'd like to add.

Here it is:
Code:

<div class="info" align="center">
<if condition="$show['pmlink'] OR $show['emaillink'] OR $post['userid'] AND $show['member']">
Contact $post[username]:<br /></if>

<if condition="$show['pmlink']><fieldset class="fieldset"><legend>PM</legend>
  <a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]"><img src="images/buttons/pmthisuser.png" alt="Send $post[username] a Private Message" style="border:0" /></a><br />
</fieldset></if>

<if condition="$show['emaillink']"><fieldset class="fieldset"><legend>E-Mail</legend>
  <a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]" rel="nofollow"><img src="images/buttons/emailuser.png" alt="Send $post[username] an E-Mail" style="border:0" /></a><br />
</fieldset></if>

<if condition="$post['userid'] AND $show['member']"><fieldset class="fieldset"><legend>Befriend</legend>
 <a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><img src="images/buttons/Befriend.png" alt="Send $post[username] a Friendship Request" style="border:0" /></a>
</fieldset></if>

<if condition="$post['userid'] AND $show['member']"><fieldset class="fieldset"><legend>Profile Message</legend>
 <a href="http://www.unifiedchamp.com/ucforum/members/$post[username]"><img src="images/buttons/visitormessage.png" alt="Leave $post[username] a Profile Message" style="border:0" /></a>
</fieldset></if>

</div>


Digital Jedi 05-30-2009 12:54 PM

This line is the problem. Your missing a closing tag and a quotation mark. Highlighted in red.

Code:

<if condition="$show['pmlink']"><fieldset class="fieldset"><legend>PM</legend>
  <a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]"><img src="images/buttons/pmthisuser.png" alt="Send $post[username] a Private Message" style="border:0" /></phrase></a><br />
</fieldset></if>


DobieGillis? 05-30-2009 07:14 PM

fantastic Mod, nominated.

dancue 05-30-2009 08:14 PM

1 Attachment(s)
Quote:

Originally Posted by Digital Jedi (Post 1820106)
This line is the problem. Your missing a closing tag and a quotation mark. Highlighted in red.

Code:

<if condition="$show['pmlink']"><fieldset class="fieldset"><legend>PM</legend>
  <a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]"><img src="images/buttons/pmthisuser.png" alt="Send $post[username] a Private Message" style="border:0" /></phrase></a><br />
</fieldset></if>


I lie to you not...I've spent many, many hours trying different things. Didn't even bother checking all of the closing tags...

Thank you. Works now... :D

The only thing I can't understand is the text not wrapping within the the <div class="info"> tags. It wraps within the postbit_legacy, but the postbit looks like the picture below.

Digital Jedi 05-31-2009 01:11 AM

Quote:

Originally Posted by DobieGillis? (Post 1820238)
fantastic Mod, nominated.

Thank you.

Quote:

Originally Posted by dancue (Post 1820271)
I lie to you not...I've spent many, many hours trying different things. Didn't even bother checking all of the closing tags...

Thank you. Works now... :D

The only thing I can't understand is the text not wrapping within the the <div class="info"> tags. It wraps within the postbit_legacy, but the postbit looks like the picture below.

Check the div tag that's holding that text and check to see if you have a a nowrap tag in it. Take it out if you do and see if that helps.

dancue 05-31-2009 01:39 AM

None of them have "nowrap" within them.

Here is the complete code:
Code:

<div class="smallfont">
                <div class="postbittop" align="left"> 
<!-- BEGIN POSTBIT TABS -->
<div id="postbittabs$post[postid]" class="djdot">
 
<ul>
<li><span title="General"><a href="#" rel="tab1$post[postid]" id="selected$post[postid]">&nbsp;</a></span></li>
<li><span title="Statistics"><a href="#" rel="tab2$post[postid]">&nbsp;</a></span></li>
<li><span title="UCMoney"><a href="#" rel="tab3$post[postid]">&nbsp;</a></span></li>
<li><span title="Fun Stats"><a href="#" rel="tab4$post[postid]">&nbsp;</a></span></li>
<li><span title="Personal Details"><a href="#" rel="tab5$post[postid]">&nbsp;</a></span></li>
<li><span title="Contact Information"><a href="#" rel="tab6$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">
 
                                <if condition="$post['joindate']"><div class="info">$vbphrase[join_date]: $post[joindate]</div></if>
                                <if condition="$post['field2']"><div class="info">$vbphrase[location_perm]: $post[field2]</div></if>
                                <if condition="$post['age']"><div class="info">$vbphrase[age]: $post[age]</div></if>
                                <div class="info">$vbphrase[posts]: $post[posts]</div>
                                <if condition="$post['entries'] > 0">
                                <div class="info">$template_hook[postbit_userinfo_right_after_posts] </div>
                                </if>
 <!-- FLAGS START -->
  <if condition="$post['field5'] OR $post['field6']">
      <div class="info">
      <if condition="$post[field5]">
        <img src="images/flags/$post[field5].gif" alt="$post[field5]" /></if>
 
      <if condition="$post[field6]">
        <img src="images/region/$post[field6].gif" alt="$post[field6]" /></if>
      </div>
  </if>
  <!-- / FLAG END -->



</div>

 
<!-- TAB 2 CONTENT -->
<div id="tab2$post[postid]" class="tabcontent">
 
                                <if condition="$show['infraction']"><div class="info">$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>
                                <if condition="$show['reputation']"><div class="info"><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
                                <if condition="$show['reppower']"><div class="info">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span></div></if>

<if condition="$post[userid]">
        <div class="info">$vbphrase[post_thanks_thanks]: $post[post_thanks_user_amount_formatted]
<br/>
                <if condition="$post[post_thanks_thanked_times] == 1">
                        $vbphrase[post_thanks_time_post]
                <else />
                        <if condition="$post[post_thanks_thanked_posts] == 1">
                                <phrase 1="$post[post_thanks_thanked_times_formatted]">$vbphrase[post_thanks_times_post]</phrase>
                        <else />
                                <phrase 1="$post[post_thanks_thanked_times_formatted]" 2="$post[post_thanks_thanked_posts_formatted]">$vbphrase[post_thanks_times_posts]</phrase>
                        </if>
                </if>
        </div>
</if>

<if condition="$post[userid]">
        <div class="info">$vbphrase[post_groan_groans]: $post[post_groan_user_amount_formatted]
<br/>
                <if condition="$post[post_groan_times] == 1">
                        $vbphrase[post_groan_time_post]
                <else />
                        <if condition="$post[post_groan_posts] == 1">
                                <phrase 1="$post[post_groan_times_formatted]">$vbphrase[post_groan_times_post]</phrase>
                        <else />
                                <phrase 1="$post[post_groan_times_formatted]" 2="$post[post_groan_posts_formatted]">$vbphrase[post_groan_times_posts]</phrase>
                        </if>
                </if>
        </div>
</if>

 
</div>

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

                                <if condition="$show['credits_post']">
                                        <div class="info">
                                                $vbphrase[credits]: <span id="cdt_$post[postid]_$post[userid]">$post[credits]</span> <if condition="$show['credits_donate']"><br>[<a href="credits.php?$session[sessionurl]do=manage&amp;u=$post[userid]#donate">$vbphrase[donate]</a>]</if> <if condition="$show['credits_check']">[<a href="credits.php?$session[sessionurl]do=banking&amp;u=$post[userid]">$vbphrase[check]</a>]</br></if>
                                        </div>
                                </if>
                                $template_hook[postbit_userinfo_right]
 
</div>

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

      <div class="info">$system_totals_bits</div>

<div class="info">
        <if condition="$crowns">
 $post[crowns]$post[champtext]
  <else />
  $post[username] has not championed any arcade games.  </if>
      </div>
 
</div>

 
<!-- TAB 5 CONTENT -->
<div id="tab5$post[postid]" class="tabcontent">
 
                                <if condition="$post[field29]"><div class="info"><b>Favorite Boxer:</b><br/> $post[field29]</div></if>
                                <if condition="$post[field30]"><div class="info"><b>Favorite Fight:</b><br/> $post[field30]</div></if>
                                <if condition="$post[field25]"><div class="info"><b>Who I'd Like to Meet:</b><br/> $post[field25]</div></if>
                                <if condition="$post[field39]"><div class="info"><b>Fight That Should've Happened:</b><br/> $post[field39]</div></if>
                                <if condition="$post[field40]"><div class="info"><b>Fight That Should Happen:</b><br/> $post[field40]</div></if>

 
</div>


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

<div class="info" align="center">
<if condition="$show['pmlink'] OR $show['emaillink'] OR $post['userid'] AND $show['member']">
Contact $post[username]:<br /></if>

<if condition="$show['pmlink']"><fieldset class="fieldset"><legend>PM</legend>
  <a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]"><img src="images/buttons/pmthisuser.png" alt="Send $post[username] a Private Message" style="border:0" /></phrase></a><br />
</fieldset></if>

<if condition="$show['emaillink']"><fieldset class="fieldset"><legend>E-Mail</legend>
  <a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]" rel="nofollow"><img src="images/buttons/emailuser.png" alt="Send $post[username] an E-Mail" style="border:0" /></a><br />
</fieldset></if>

<if condition="$post['userid'] AND $show['member']"><fieldset class="fieldset"><legend>Befriend</legend>
 <a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><img src="images/buttons/Befriend.png" alt="Send $post[username] a Friendship Request" style="border:0" /></a>
</fieldset></if>

<if condition="$post['userid'] AND $show['member']"><fieldset class="fieldset"><legend>Profile Message</legend>
 <a href="http://www.unifiedchamp.com/ucforum/members/$post[username]"><img src="images/buttons/visitormessage.png" alt="Leave $post[username] a Profile Message" style="border:0" /></a>
</fieldset></if>

</div>
 
                                <if condition="$post[icqicon] or $post[aimicon] or $post[msnicon] or $post[yahooicon] or $post[skypeicon]"><div class="info" align="center">$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div></if>

            <div class="info" align="center">
                <a href="member.php?$session[sessionurl]u=$post[userid]" title="View Public Profile">
                <img src="images/buttons/folder_user.png" alt="View $post[username]'s Profile" style="border:0" /></a>
                &nbsp;
                <a href="album.php?u=$post[userid]" title="View $post[username]'s Album" rel="nofollow">
                <img src="images/buttons/add_album.png" alt="View $post[username]'s Photo Album" style="border:0" /></a>
                &nbsp;
                <a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]" title="Add $post[username]'s to Your Contacts" rel="nofollow">
                <img src="images/buttons/heart_add.png" alt="Add $post[username]'s to Your Contacts" style="border:0" /></a>
                &nbsp;
                <a href="group.php?$session[sessionurl]u=$post[userid]" title="Social Groups">
                <img src="images/buttons/social.png" alt="View Social Groups" style="border:0" /></a>             
            </div>
 
</div>

 
</div>
 
 
<script type="text/javascript">
var mytabs=new ddtabcontent("postbittabs$post[postid]")
mytabs.setpersist(false)
mytabs.setselectedClassTarget("link")
mytabs.init()
</script>
 
<!-- END POSTBIT TABS --> 
</div></div>

Thanks for all your help so far!

Digital Jedi 05-31-2009 01:46 AM

Check the various classes in that code and see if there's a nowrap in there. First ones I'd check are the ones in my CSS file, like tabcontent ( I don't think it's there, but just in case), also check the info and smallfont classes and any above level classes that could be affecting blocks down the line.

dancue 05-31-2009 03:37 AM

nothing

It all is the way it should be.

I have the same exact code for both postbit templates and the postbit_legacy is wrapping the text.

tipoboy 06-01-2009 11:33 AM

Works great with 3.8 alsoo added a 6th tab thats only viewable to my mods and admin that contains Ban/unban links

thanks DJ

Digital Jedi 06-01-2009 11:37 AM

Quote:

Originally Posted by dancue (Post 1820438)
nothing

It all is the way it should be.

I have the same exact code for both postbit templates and the postbit_legacy is wrapping the text.

We're just not finding it. I would need to see you forum page so I could look at the source code.

Quote:

Originally Posted by tipoboy (Post 1821251)
Works great with 3.8 alsoo added a 6th tab thats only viewable to my mods and admin that contains Ban/unban links

thanks DJ

That was something I was meaning to mention how to do in this thread. How to use the permission conditionals. I probably need to do that on my own forum as well.

tipoboy 06-01-2009 11:44 AM

here's the code i used for the 6th admin and super/mod tab

In the <!-- begin postbit tabs --> section add:

Code:

<if condition="$show['modcplink']">
<li><span title="Admin Tab"><a href="#" rel="tab6$post[postid]">&nbsp;</a></span></li>
</if>

wherever you want your tab to show, i added it after the 5th tab and therefor called it tab 6

below the </div> of tab 5 content add:

Code:

<!-- TAB 6 CONTENT -->
<div id="tab6$post[postid]" class="tabcontent">
<div>
<if condition="($bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==7 || $bbuserinfo[usergroupid]==5)">
<span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/banning.php?do=banuser&userid=$post[userid]','ban','width=500,height=375,scrollbars=yes')"><a>Ban $post[username]</a></span>
</if>
</div>
<div>
<if condition="($bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==7 || $bbuserinfo[usergroupid]==5)">
<span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/banning.php?do=liftban&userid=$post[userid]','liftban','width=500,height=375,scrollbars=yes')"><a>Lift Ban on $post[username]</a></span>
</if>
</div>
</div>

and voila a 6th tab for your mods and admin containing the ban and unban links that open in a pop up with cudos to https://vborg.vbsupport.ru/showthread.php?t=93057 for the idea :D

DobieGillis? 06-01-2009 04:02 PM

Quote:

Originally Posted by tipoboy (Post 1821258)
here's the code i used for the 6th admin and super/mod tab

In the <!-- begin postbit tabs --> section add:

Code:

<if condition="$show['modcplink']">
<li><span title="Admin Tab"><a href="#" rel="tab6$post[postid]">&nbsp;</a></span></li>
</if>

wherever you want your tab to show, i added it after the 5th tab and therefor called it tab 6

below the </div> of tab 5 content add:

Code:

<!-- TAB 6 CONTENT -->
<div id="tab6$post[postid]" class="tabcontent">
<div>
<if condition="($bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==7 || $bbuserinfo[usergroupid]==5)">
<span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/banning.php?do=banuser&userid=$post[userid]','ban','width=500,height=375,scrollbars=yes')"><a>Ban $post[username]</a></span>
</if>
</div>
<div>
<if condition="($bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==7 || $bbuserinfo[usergroupid]==5)">
<span onmouseover="this.style.cursor='hand';" onClick="window.open('modcp/banning.php?do=liftban&userid=$post[userid]','liftban','width=500,height=375,scrollbars=yes')"><a>Lift Ban on $post[username]</a></span>
</if>
</div>
</div>

and voila a 6th tab for your mods and admin containing the ban and unban links that open in a pop up with cudos to https://vborg.vbsupport.ru/showthread.php?t=93057 for the idea :D

you're such a mensch! :)

tipoboy 06-01-2009 07:17 PM

Quote:

Originally Posted by DobieGillis? (Post 1821394)
you're such a mensch! :)

what the hell is a mensch lol :D

Tacama 06-02-2009 10:57 PM

1 Attachment(s)
Finally finished adjusting everything.

This is the final result:

http://img4.glowfoto.com/images/2009...745279211T.jpg
Thanks again.

dieKetzer 06-04-2009 03:10 PM

really looking forward to patching this in tonight!

BlueNinjaGo 06-23-2009 12:43 PM

First off, I haven't finished configuring this to my site yet, but I foresee no problems except for ones I create... lol...

So i just want to say.... AWESOME JOB!!

MOTM for sure!

I'm not sure if I'm more impressed by the mod or the author! The instructions were very well written... and although I didn't need every little thing spelled out, some people do, and I think it's great that you took the time to write instructions anyone can follow.

So, overall, thank you! Excellent... 10/10... nominated.... Thanks!

TheLastSuperman 06-23-2009 01:23 PM

Quote:

Originally Posted by BlueNinjaGo (Post 1835573)
First off, I haven't finished configuring this to my site yet, but I foresee no problems except for ones I create... lol...

So i just want to say.... AWESOME JOB!!

MOTM for sure!

I'm not sure if I'm more impressed by the mod or the author! The instructions were very well written... and although I didn't need every little thing spelled out, some people do, and I think it's great that you took the time to write instructions anyone can follow.

So, overall, thank you! Excellent... 10/10... nominated.... Thanks!

I'm ALWAYS impressed by both BlueNinjaGo :D

BlueNinjaGo 06-26-2009 05:02 PM

Quote:

Originally Posted by dancue (Post 1816598)
What about rollover instead of click?

That would be awesome.

dancue 08-26-2009 02:28 PM

Quote:

Originally Posted by dancue (Post 1820271)
I lie to you not...I've spent many, many hours trying different things. Didn't even bother checking all of the closing tags...

Thank you. Works now... :D

The only thing I can't understand is the text not wrapping within the the <div class="info"> tags. It wraps within the postbit_legacy, but the postbit looks like the picture below.

Figured it out. I placed the tabs within td's.

Mobo 09-19-2009 11:34 AM

I've tried installing this mod twice and can not get it to work correctly. I've uploaded the postbit_tabs folder to my /forums directory and also uploaded the tabcontent.js file to that same folder (after removing the .htm on the end of it from download). Then I did the two template edits.

Whenever I click on a tab, the page jumps up to the top of the page. I saw this listed in the FAQ, but I've verified that I have the folder in my forum root and it is still doing it.

Any thoughts?

TheLastSuperman 09-19-2009 02:32 PM

Quote:

Originally Posted by Mobo (Post 1887463)
I've tried installing this mod twice and can not get it to work correctly. I've uploaded the postbit_tabs folder to my /forums directory and also uploaded the tabcontent.js file to that same folder (after removing the .htm on the end of it from download). Then I did the two template edits.

Whenever I click on a tab, the page jumps up to the top of the page. I saw this listed in the FAQ, but I've verified that I have the folder in my forum root and it is still doing it.

Any thoughts?

Double-check all the files i.e. the .css and or .js files as some people need or don't need the / before the folder and or file names...

Example:
Code:

/foldername/tabcontent.css
You might need it to read:
Code:

foldername/tabcontent.css
See if it is that simple, if not we need more info and screenshots or something to help us help you ;) (Also, you do run postbit_legacy via vB Options correct? If not your editing the wrong template and yes it can be done in postbit just find the right spot and left/center/right align the tabs to suit.

S-MAN

Digital Jedi 09-20-2009 02:27 AM

Quote:

Originally Posted by Mobo (Post 1887463)
I've tried installing this mod twice and can not get it to work correctly. I've uploaded the postbit_tabs folder to my /forums directory and also uploaded the tabcontent.js file to that same folder (after removing the .htm on the end of it from download). Then I did the two template edits.

Whenever I click on a tab, the page jumps up to the top of the page. I saw this listed in the FAQ, but I've verified that I have the folder in my forum root and it is still doing it.

Any thoughts?

Linking me to your threads would help as well, so I could get a look at the Source Code and see if anything is wrong there.

Mobo 09-20-2009 12:41 PM

Thanks for the quick reply. I'll check into that stuff when I get back on Monday.

Mobo 09-21-2009 06:35 PM

Alright, I just opened up the .js file and it with garbbage
Code:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /dynamicindex17/tabcontent/tabcontent.js
on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
<hr>
<address>Apache/2.2.10 (Unix) mod_ssl/2.2.10 OpenSSL/0.9.7a mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.6 Server at www.dynamicdrive.com Port 80</address>
</body></html>

So, I downloaded it again and placed it on my site. Now it is working correctly. I just need to figure out how to arrange my postbit stuff and get those nice boxes you all have around yours. If you are interested, take a look at this thread.

Digital Jedi 09-22-2009 12:32 AM

The boxes are added by using the info class that comes with a lot of forum skins. Some skins use different names so people just change the class names on the inner DIV containers to whatever it is they use. Your skin might not have one, but you can create one using CSS to look pretty much however you want. I use a box with 2 pixels width on the right and bottom and one pixel width on the left and top to create the illusion of a shadow.

Mobo 09-22-2009 02:57 AM

Thanks, I'll look into the classes my style uses and see about creating one if needed.


Wondering if I could get a little help. I've gotten most of my bit stuff worked out the way I want them. I have having problems with moving the Albums link/icon to one of the tabs and the same thing with the awards.

They both use a hook location and php code in the actual plugin.

Digital Jedi 09-22-2009 04:51 AM

Quote:

Originally Posted by Mobo (Post 1888778)
Thanks, I'll look into the classes my style uses and see about creating one if needed.


Wondering if I could get a little help. I've gotten most of my bit stuff worked out the way I want them. I have having problems with moving the Albums link/icon to one of the tabs and the same thing with the awards.

They both use a hook location and php code in the actual plugin.

Check the FAQ on the first page of this thread, as I'm sure you should be able to use one of those solutions.

Mobo 09-22-2009 02:26 PM

I've been trying to figure it out from that FAQ. For the album like, I traced down this code...

Code:

if (!empty($post['hasalbum']))
{

$template_hook['postbit_userinfo_right'] .= '<div><a href="album.php?' . $vbulletin->session->vars['sessionurl'] . 'u=' . $post['userid'] . '" rel="nofollow"><img src="images/buttons/add_album.png" border="0" alt="Member Photo Albums"></a></div>';

}


There is no call to a template, and I can't find any HTML for it. When I place that into a tab, I get this error in vB before the template will save...

Code:

The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /hermes/web05/b980/pow.mobowow/htdocs/forums/includes/adminfunctions_template.php(3939) : eval()'d code on line 132

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.


Digital Jedi 09-22-2009 05:05 PM

There is not a template being used in that instance. The HTML is there after the template hook.

HTML Code:

<div><a href="album.php?' . $vbulletin->session->vars['sessionurl'] . 'u=' . $post['userid'] . '" rel="nofollow"><img src="images/buttons/add_album.png" border="0" alt="Member Photo Albums"></a></div>
You don't copy the entirety of the plugin in any case, as a template won't parse PHP. HTML inside of a plugin or PHP file will be specially formatted to prevent errors. You can tell what it is by the use of traditional HTML tags being used, such as the <div> tag in this case. You just need to strip out the PHP stuff, like the single quotes, the decimal points and spaces. Probably something like this:

HTML Code:

<div><a href="album.php?$session[sessionurl]u=$post['userid']" rel="nofollow"><img src="images/buttons/add_album.png" border="0" alt="Member Photo Albums"></a></div>
Note that I also changed the PHP variable to the kind that vB templates typically use.

Mobo 09-23-2009 05:48 AM

Sorry, I did only add the part in the <div> section. I will try and strip out the PHP code stuff from my various plugins I need.

Thanks for the help and support.

Mobo 09-23-2009 10:47 AM

Okay, I got every thing sorted and it is working great. Every thing is in the tabs I want and I even got the .info class to work.

Now I'm having a very odd issues. For some of the users (they are not in the same usergroups) the text does not appear the same as other users in some of the tabs (not all tabs). Also, for these same users, my Reputation icon that is assigned to tab one only, shows up at the top of all the other tabs.

If you would like to have a look, see posts 18-20 on this thread. User Jmac, post #19 is one of the members having this odd issue. Post #18 and #20 do not have this issue.

Just encase you want it, here is my code for the tabs...

Code:

<!-- BEGIN POSTBIT TABS -->
<div id="postbittabs$post[postid]" class="djdot">
 
<ul>
<li><span title="User Info"><a href="#" rel="tab1$post[postid]" id="selected$post[postid]">&nbsp;</a></span></li>
<li><span title="Game Info"><a href="#" rel="tab2$post[postid]">&nbsp;</a></span></li>
<li><span title="Files Info"><a href="#" rel="tab3$post[postid]">&nbsp;</a></span></li>
<li><span title="Medals"><a href="#" rel="tab4$post[postid]">&nbsp;</a></span></li>
<li><span title="Contact"><a href="#" rel="tab5$post[postid]">&nbsp;</a></span></li>
</ul>
 
<br style="clear: left" />
 
</div>
 
<div class="smallfont" align= "left" >
 
<!--TAB 1 CONTENT -->
<div id="tab1$post[postid]" class="tabcontent" >
 
<div class="info">$vbphrase[posts]: $post[posts]</div>

<div class="info"><if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if></div>
       
<if condition="$post['field7']"><div class="info">Group: $post[field7]</if></div>

<if condition="$show['reputation']"><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><div><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
             
             
 
</div> 
<!-- TAB 2 CONTENT -->
<div id="tab2$post[postid]" class="tabcontent">
 
<if condition="$post[field6]"><div class="info">Favorite Plane: $post[field6]</div></if>
<if condition="$post[field21]"><div class="info">Side: $post[field21]</div></if>
<if condition="$post[field22]"><div class="info">War: $post[field22]</div></if> 
</div>
 
<!-- TAB 3 CONTENT -->
<div id="tab3$post[postid]" class="tabcontent">
 
<if condition="$post[downloads]>0"><div class="info">{$vbphrase['ecdownloads_downloads']}: $post[downloads]</div></if>
<if condition="$post[uploads]>0"><div class="info"><a href="member.php?$session[sessionurl]u=$post[userid]&tab=dl2modification">{$vbphrase['ecdownloads_uploads']}: $post[uploads]</a></div></if>

<div class="info"><a href="album.php?u=$post[userid]" title="View $post[username]'s Album" rel="nofollow"><img src="images/buttons/add_album.png" alt="Member's Picture Albums" border="0"/></a>  </div>
</div>
 
<!-- TAB 4 CONTENT -->
<div id="tab4$post[postid]" class="tabcontent">
 
<if condition="$post[showuserawards]"><div class="info">$post[userawards]</div></if>
 
</div>
 
<!-- TAB 5 CONTENT -->
<div id="tab5$post[postid]" class="tabcontent">
 
<div class="info">
<if condition="$show['pmlink'] OR $show['emaillink'] OR $post['userid'] AND $show['member']">
Send $post[username]:<br /></if>
        <if condition="$show['pmlink']">
  <a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">a Private Message</a><br />
 </if>
  <if condition="$post['userid'] AND $show['member']">
 <a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]">a Friend Request</a>
 </if></div>
<br />
 <div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
                        </div>
 
</div>
 
</div>
 
 
<script type="text/javascript">
var mytabs=new ddtabcontent("postbittabs$post[postid]")
mytabs.setpersist(false)
mytabs.setselectedClassTarget("link")
mytabs.init()
</script>
 
<!-- END POSTBIT TABS -->

Sorry to be such a bother!

Digital Jedi 09-23-2009 08:33 PM

Quote:

Originally Posted by Mobo (Post 1889342)
Okay, I got every thing sorted and it is working great. Every thing is in the tabs I want and I even got the .info class to work.

Now I'm having a very odd issues. For some of the users (they are not in the same usergroups) the text does not appear the same as other users in some of the tabs (not all tabs). Also, for these same users, my Reputation icon that is assigned to tab one only, shows up at the top of all the other tabs.

If you would like to have a look, see posts 18-20 on this thread. User Jmac, post #19 is one of the members having this odd issue. Post #18 and #20 do not have this issue.

Just encase you want it, here is my code for the tabs...

Code:

<!-- BEGIN POSTBIT TABS -->
<div id="postbittabs$post[postid]" class="djdot">
 
<ul>
<li><span title="User Info"><a href="#" rel="tab1$post[postid]" id="selected$post[postid]">&nbsp;</a></span></li>
<li><span title="Game Info"><a href="#" rel="tab2$post[postid]">&nbsp;</a></span></li>
<li><span title="Files Info"><a href="#" rel="tab3$post[postid]">&nbsp;</a></span></li>
<li><span title="Medals"><a href="#" rel="tab4$post[postid]">&nbsp;</a></span></li>
<li><span title="Contact"><a href="#" rel="tab5$post[postid]">&nbsp;</a></span></li>
</ul>
 
<br style="clear: left" />
 
</div>
 
<div class="smallfont" align= "left" >
 
<!--TAB 1 CONTENT -->
<div id="tab1$post[postid]" class="tabcontent" >
 
<div class="info">$vbphrase[posts]: $post[posts]</div>

<div class="info"><if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if></div>
       
<if condition="$post['field7']"><div class="info">Group: $post[field7]</if></div>

<if condition="$show['reputation']"><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><div><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
             
             
 
</div> 
<!-- TAB 2 CONTENT -->
<div id="tab2$post[postid]" class="tabcontent">
 
<if condition="$post[field6]"><div class="info">Favorite Plane: $post[field6]</div></if>
<if condition="$post[field21]"><div class="info">Side: $post[field21]</div></if>
<if condition="$post[field22]"><div class="info">War: $post[field22]</div></if> 
</div>
 
<!-- TAB 3 CONTENT -->
<div id="tab3$post[postid]" class="tabcontent">
 
<if condition="$post[downloads]>0"><div class="info">{$vbphrase['ecdownloads_downloads']}: $post[downloads]</div></if>
<if condition="$post[uploads]>0"><div class="info"><a href="member.php?$session[sessionurl]u=$post[userid]&tab=dl2modification">{$vbphrase['ecdownloads_uploads']}: $post[uploads]</a></div></if>

<div class="info"><a href="album.php?u=$post[userid]" title="View $post[username]'s Album" rel="nofollow"><img src="images/buttons/add_album.png" alt="Member's Picture Albums" border="0"/></a>  </div>
</div>
 
<!-- TAB 4 CONTENT -->
<div id="tab4$post[postid]" class="tabcontent">
 
<if condition="$post[showuserawards]"><div class="info">$post[userawards]</div></if>
 
</div>
 
<!-- TAB 5 CONTENT -->
<div id="tab5$post[postid]" class="tabcontent">
 
<div class="info">
<if condition="$show['pmlink'] OR $show['emaillink'] OR $post['userid'] AND $show['member']">
Send $post[username]:<br /></if>
        <if condition="$show['pmlink']">
  <a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">a Private Message</a><br />
 </if>
  <if condition="$post['userid'] AND $show['member']">
 <a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]">a Friend Request</a>
 </if></div>
<br />
 <div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
                        </div>
 
</div>
 
</div>
 
 
<script type="text/javascript">
var mytabs=new ddtabcontent("postbittabs$post[postid]")
mytabs.setpersist(false)
mytabs.setselectedClassTarget("link")
mytabs.init()
</script>
 
<!-- END POSTBIT TABS -->

Sorry to be such a bother!

In Tab 1, you have a couple of improperly nested tags that's no doubt causing a cascade effect.

Code:

<!--TAB 1 CONTENT -->
<div id="tab1$post[postid]" class="tabcontent" >
 
<div class="info">$vbphrase[posts]: $post[posts]</div>

<div class="info"><if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if></div>
       
<if condition="$post['field7']"><div class="info">Group: $post[field7]</if></div>

<if condition="$show['reputation']"><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><div><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
             
             
 
</div>

Also, and this is probably an error in my documentation, but it appears that the Private Message link is missing it's closing </phrase> tag. There should be one before the </a>:

Code:

<!-- TAB 5 CONTENT -->
<div id="tab5$post[postid]" class="tabcontent">
 
<div class="info">
<if condition="$show['pmlink'] OR $show['emaillink'] OR $post['userid'] AND $show['member']">
Send $post[username]:<br /></if>
        <if condition="$show['pmlink']">
  <a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">a Private Message</phrase></a><br />
 </if>
  <if condition="$post['userid'] AND $show['member']">
 <a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]">a Friend Request</a>
 </if></div>
<br />
 <div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
                        </div>
 
</div>


MissKalunji 09-23-2009 10:12 PM

I can't seem to see what change in the new version?

Mobo 09-24-2009 07:05 AM

Thank you! I've got it all sorted out now!


All times are GMT. The time now is 09:36 PM.

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.01900 seconds
  • Memory Usage 1,992KB
  • 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
  • (17)bbcode_code_printable
  • (2)bbcode_html_printable
  • (16)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