Page 1 of 1

show/hide user info

Posted: 25 Mar 2010, 15:34
by cisco007
This little snippet is what i use to show/hide info under the users rank on viewtopic!


open yourstyle/template/overall_header.html

find:

Code: Select all

// ]]>
</script>
before:

Code: Select all

function doCollapseExpand(id,img){
	var b = document.getElementById(id);
		if (b.style.display=='none'){
		b.style.display='';
	document.images[img].src='{ROOT_PATH}images/arrow_user_up.gif'; 
} else {
		b.style.display='none';
	document.images[img].src='{ROOT_PATH}images/arrow_user_down.gif';
} return false; }
now open yourstyle/template/viewtopic_body.html

find:

Code: Select all

<!-- IF postrow.POSTER_POSTS != '' -->
before add:

Code: Select all

<dl style="padding-left:5px;">
       <!-- IF postrow.U_POST_AUTHOR -->
        <a href="#" onclick="return doCollapseExpand('box{postrow.POST_ID}','btn{postrow.POST_ID}')"> 
        <img src="{ROOT_PATH}images/arrow_user_down.gif" alt="{L_USERS} {L_INFORMATION}" title="{L_USERS} {L_INFORMATION}" height="11" width="11" name="btn{postrow.POST_ID}" /></a>
            <!-- ENDIF -->
            {L_USERS} {L_INFORMATION}     
        </dl>	
       <dl id="box{postrow.POST_ID}" style="display:none; margin-top:15px; margin-bottom:5px;"> 
now find:

Code: Select all

<!-- ENDIF -->
		<!-- END custom_fields -->
add after:

Code: Select all

</dl>	
now take the attached archive, extract images and upload to your site's images folder!
images.rar

DEMO:
look underneath the profile, at the arrow!
http://layerbabuena.org/viewtopic.php?f=35&p=360#p360

Re: show/hide user info

Posted: 31 Mar 2010, 10:37
by neptune
thx very nice snippet

Re: show/hide user info

Posted: 31 Mar 2010, 10:47
by Stoker
Cool, do you have a demo? Or maybe screenshots?

Re: show/hide user info

Posted: 31 Mar 2010, 15:12
by neptune
yes here:

Image

Re: show/hide user info

Posted: 31 Mar 2010, 15:27
by cisco007
sorry, i thought i had already put up a demo, added to first post!

Re: show/hide user info

Posted: 31 Mar 2010, 16:42
by IpHeX
Great share, gracias

Re: show/hide user info

Posted: 09 Sep 2010, 01:58
by neuropass
This is actually what Stoker made for the old board. the windows pane was i little bit better. just a smoother layout..

Re: show/hide user info

Posted: 09 Sep 2010, 05:01
by cisco007
he did, Hmm! i go to that site all the time and don't see it! where did he have it? as a mod? maybe i didn't look hard enough!

Re: show/hide user info

Posted: 09 Sep 2010, 17:39
by eng-joker
Nice snippet