vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   User info collapsable table on left side of postbit_legacy (https://vborg.vbsupport.ru/showthread.php?t=68043)

Steve St.Lauren 08-05-2004 10:00 PM

User info collapsable table on left side of postbit_legacy
 
******* User info collapse on postbit_legacy v.9 **********


I had a number of users complaining about how much "white space" there was on posts where the person had only entered 1 line of text because of the size of the user information below the username on the left hand side.

This hack puts the user information (online/offline status, location, post count, join date, etc) in the postbit_legacy template (only works if you are using the legacy postbit) into a collapsable table like many of the other collapsable tables in vB3. Users can collapse/expand this information at will while viewing a thread and the status is saved in the cookie.

This is the very first javascript code I've ever written so go easy on me ;) .

Please click on install if you use this hack!

insanctus 08-06-2004 09:20 AM

Does this collpase all or just the ones you choose ?

Steve St.Lauren 08-06-2004 09:29 AM

It collapses all. You can see it here if you want - http://www.turbodieselregister.com/f...d.php?t=105948 . Just click on the up arrow below any of the names. It does it on the fly so you can switch back and forth at any time.

Gaffer 08-06-2004 09:34 AM

oh this is SOOO being installed.... our postbits are so damn long.

thats steve i needed this.

Floris 08-06-2004 12:37 PM

Quote:

Originally Posted by Gaffer
oh this is SOOO being installed.... our postbits are so damn long.

thats steve i needed this.

Does this remember which threads have it collapsed, or does it remember at all if you have it collapsed or do you need to set it each time?

Steve St.Lauren 08-06-2004 12:43 PM

Quote:

Originally Posted by floris
Does this remember which threads have it collapsed, or does it remember at all if you have it collapsed or do you need to set it each time?

They are collapsed or uncollapsed for all threads. Once you change it, it's that way for everything until you change it back.

Hiro 08-06-2004 12:45 PM

Great, Thanks steve ima have a fiddle.

alkatraz 08-06-2004 06:19 PM

nice idea! thx

Polo 08-06-2004 07:39 PM

Wow, maybe with this mod I will be back to the traditional postbit_legacy!

Steve St.Lauren 08-06-2004 07:58 PM

Please click on install if you guys use this that way I know how many are running it! I use that to judge when to go full release.

Steve St.Lauren 09-03-2004 02:25 AM

Moved to full release - no known issues

nelto 09-06-2004 02:00 AM

only works if you are using the legacy
postbit

Where can I turn this on?

venomx 09-06-2004 08:37 AM

I may install this when I feel like making some edits to the hack. I have added so much to my postbit legacy that I would have to add them all... :(

Steve St.Lauren 09-07-2004 03:10 AM

Quote:

Originally Posted by nelto
only works if you are using the legacy
postbit

Where can I turn this on?

You can change to the legacy postbit (vertical columns like on this site rather than the newer horizontal style) by going to vBulletin options and then "style & language settings) - it's the last option there.

integra99 09-14-2004 04:36 PM

* integra99 clicks Install!


I redid your template hacks a bit though.. I like it better :)

Sooner95 01-10-2005 05:33 PM

beauty, nice job

JD210 01-14-2005 09:22 AM

Okay, installed this and it looks good, however, I am experiencing a small problem. Whenever you click on the small arrow to collapse the user info, all it does is take you to the top of the page and the user info stays open. Here is a link to one of my posts there so you can see for yourself: http://www.gothicgaming.com/forum/showthread.php?t=3

cinq 01-14-2005 09:56 AM

Doing a hard refresh of your browser CTRL-F5 should do the trick.

Steve St.Lauren 01-14-2005 01:32 PM

Quote:

Originally Posted by JD210
Okay, installed this and it looks good, however, I am experiencing a small problem. Whenever you click on the small arrow to collapse the user info, all it does is take you to the top of the page and the user info stays open. Here is a link to one of my posts there so you can see for yourself: http://www.gothicgaming.com/forum/showthread.php?t=3

It's giving an error on the page. My guess would be that you made a mistake installing the hack somewhere. If you email me your clientscript/vbulletin_global.js and includes/functions_showthread.php to (removed) I'll take a look at them for you.

JD210 01-15-2005 01:24 AM

Email sent, and thanks.

Steve St.Lauren 01-15-2005 03:23 PM

Quote:

Originally Posted by JD210
Email sent, and thanks.

I sent your files back to you. Looks like none of the modifications were made to the two .php files.

JD210 01-15-2005 05:06 PM

I think I sent you the backups and not the modified files. I will check and resend them

JD210 01-18-2005 12:21 AM

Resolved and working well, thanks.

*clicks installed*

Acid_Reflux 03-16-2005 03:14 AM

I am having a slight problem where I'm supposed to post the following code in my postbit:

Code:

<table class="tborder" cellspacing="1" border="0" width="100%"><tbody>       
<tr>
                <td class="thead" colspan="2">
                        <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapseuserinfo('postbit_legacy_userinfo$post[postcount]')"><img id="collapseimg_postbit_legacy_userinfo$post[postcount]" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_postbit_legacy_userinfo].gif" alt="" border="0" /></a>$post[onlinestatus]
                </td>
        </tr>
</tbody>
<tbody id="collapseobj_postbit_legacy_userinfo$post[postcount]" style="$vbcollapse[collapseobj_postbit_legacy_userinfo]"><tr><td class="alt2">
                        <if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
               
                        <if condition="$show['avatar']">
                                <div class="smallfont">
                                        &nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$avatarurl" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
                                </div>
                        </if>
                       
                        <div class="smallfont">
                                <if condition="$post['joindate']">$vbphrase[join_date]: $post[joindate]<br /></if>
                                <if condition="$post['field2']">$vbphrase[location_perm]: $post[field2]<br /></if>
                                <if condition="$post['age']">$vbphrase[age]: $post[age]<br /></if>
                                $vbphrase[posts]: $post[posts]
                                <if condition="$show['reputation']">
                                <if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower] </if>
                                        $post[reputationdisplay]
                                </if><br />
                                <if condition="$post[icqicon] or $post[aimicon] or $post[msnicon] or $post[yahooicon]">
                                $post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]<br /></if>

                                </div></td></tr></tbody></table>

My problem is that my postbit code that I'm supposed to replace looks like this instead of the default code:

Code:

                        <if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
                        <if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
               
          <if condition="$post[IsOnline] == true">
                                          &nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$avatarurl" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
          <else />
                                          &nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$avatarurl" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" style="filter:alpha(opacity=30);-moz-opacity:0.3;opacity: 0.3;" /></a>
          </if>
                       
                        <div class="smallfont">
                                &nbsp;<br />
<if condition="$post[starsign]">
<a href="#" onclick="window.open('zodiac.php?do=$post[starsign]&amp;focus=1','horroscope','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=450,height=350'); return false;">
<img src="images/starsign/$post[starsign].gif" alt="weekly horoscope for $post[starsign]" border="0"></a>
</if>                               
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
                                <if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
                                <if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
                                <div>
                                        $vbphrase[posts]: $post[posts]
                                </div>
                                <if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower]</if>$post[reputationdisplay]</div></if>
<!-- user forum style -->
<div>$vbphrase[style]: <if condition="$post[style] == '$vbphrase[not_specified]'"><a href="$vboptions[forumhome].php?styleid=$vboptions[styleid]">Default Style</a><else />$post[style]</if></div>
                                        <!-- / user forum style -->                               
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]</div>
                        </div>

I've tried a few times to incorporate this hack with my existing code as I do not want to get rid of the profile options I've installed; however, none of my attempts have worked. That is not surprising considering I'm a Class A Newbie when it comes to this kind of thing and I'm only able to install vBulletin hacks because I'm capable of reading directions. I was wondering if someone would be kind enough to let me know how I can install this hack with my existing code?

DJDarknez 04-04-2005 04:30 AM

Got this one installed, works good!

Questions:

How can I make the title / rank visible? It seems to hide it.

Also, how can I get rid of the border around the table? I tried sniffing around the code for the border width code, but everything was set to zero!

Help me! Please! :nervous:

ChrisLM2001 04-15-2005 01:02 AM

Nice mod. Friendly for those who don't like postbit clutter, but also allows a lot for those info hounds. ;)

DJDarknez: If you haven't found a workaround yet: just add the table code below the title/rank (inbetween the divs), then it won't hide them.

And change this in clientscript/vbulletin_global.js (there's 2 of these) from thead|tcat to your new CSS class names for a different thead and tcat for the postbit...

PHP Code:

if (cel)
            {
                
cel_re = new RegExp("^(thead|tcat)(_collapsed)$");
                
cel.className cel.className.replace(cel_re'$1');
            } 

Also set the table around 20px larger than the divs inside it. 100% will cause it to shrink and expand to the contents. That way when it opens and closes it won't cause that width expand/shrink movement. Keeps it tidier.

Added: you can also change the table class from tborder to something else to customize the border (easier).

Chris

venomx 04-25-2005 04:57 PM

How hard is it to change this so only some things collapse?

Polo 04-25-2005 08:05 PM

Quote:

Originally Posted by venomx
How hard is it to change this so only some things collapse?

shouldt be that hard... whatever is in the tags <tbody> are the things that will collapse...

DJDarknez 04-26-2005 05:07 AM

edit......

Officially uninstalled. Followed instructions to a T, but gave me, and my users, this message:

Warning: Cannot modify header information - headers already sent by (output started at /home/djd/public_html/forums/includes/functions_showthread.php:673) in /includes/functions.php on line 2946

whenever trying to view a thread.

Allan 05-02-2005 12:23 AM

Hello Steven, thanks for this hack :)

a question :p, in your installation, kept silent asks to replace a complete part of text, regrettably, I have to modify my postbit, can you put, just change has to make in the postbit Please ?

Cyricx 08-09-2005 04:48 PM

I sent a pm to you, Steven, asking for permission to port this over to 3.5 :)

Please respond when you have a chance :)

Steve St.Lauren 08-13-2005 05:41 AM

Quote:

Originally Posted by Cyricx
I sent a pm to you, Steven, asking for permission to port this over to 3.5 :)

Please respond when you have a chance :)

Thanks for porting it Chris. Here's the 3.5 port - https://vborg.vbsupport.ru/showthread.php?t=94092

Ryuk 06-23-2007 08:29 PM

Thanks ;D I got a few questions tho...
how does this works? I mean, once u click on the arrow, it stays collapsed till?? I mean, each time the user logs out he has to re-collapse it? or every time he goes to the forum?
Is there a way to keep by default, the user info collapsed? n_n

Steve St.Lauren 06-23-2007 08:47 PM

It sets a cookie on the users PC for the setting. They will stay collapsed until they either uncollapse them or delete their cookies.

hddstudio 10-24-2007 02:38 PM

Is there anything similar for 3.6.8 or is it possible to set it from default Vbulletin options ? I can't find it....newbie in vBUlletin...:(


All times are GMT. The time now is 05:03 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.01573 seconds
  • Memory Usage 1,829KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (35)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete