show/hide user info

Guides & Snippets for phpBB3. Try the Snippets here and share Your own Snippets
There is no support here! Only Read Access!
Locked
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

show/hide user info

Post 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
User avatar
neptune
BBCoder II
BBCoder II
Posts: 35
Joined: 09 Mar 2010, 12:23

Re: show/hide user info

Post by neptune »

thx very nice snippet
Image
User avatar
Stoker
Site Admin
Site Admin
Posts: 3554
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Re: show/hide user info

Post by Stoker »

Cool, do you have a demo? Or maybe screenshots?
Board rules! No PM support
User avatar
neptune
BBCoder II
BBCoder II
Posts: 35
Joined: 09 Mar 2010, 12:23

Re: show/hide user info

Post by neptune »

yes here:

Image
Image
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: show/hide user info

Post by cisco007 »

sorry, i thought i had already put up a demo, added to first post!
User avatar
IpHeX
BBCoder II
BBCoder II
Posts: 23
Joined: 23 Mar 2010, 21:02

Re: show/hide user info

Post by IpHeX »

Great share, gracias
User avatar
neuropass
BBCoder IV
BBCoder IV
Posts: 173
Joined: 11 Apr 2010, 02:33

Re: show/hide user info

Post by neuropass »

This is actually what Stoker made for the old board. the windows pane was i little bit better. just a smoother layout..
Modd it up! TweakScene ;-) Support us! || Follow us ||

Image
cisco007
BBCoder VI
BBCoder VI
Posts: 1015
Joined: 16 Mar 2010, 18:14
Location: Don't really know!

Re: show/hide user info

Post 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!
User avatar
eng-joker
BBCoder II
BBCoder II
Posts: 23
Joined: 05 Mar 2010, 01:01
Contact:

Re: show/hide user info

Post by eng-joker »

Nice snippet
Locked