show/hide user info
Posted: 25 Mar 2010, 15:34
This little snippet is what i use to show/hide info under the users rank on viewtopic!
open yourstyle/template/overall_header.html
find:
before:
now open yourstyle/template/viewtopic_body.html
find:
before add:
now find:
add after:
now take the attached archive, extract images and upload to your site's images folder!
DEMO:
look underneath the profile, at the arrow!
http://layerbabuena.org/viewtopic.php?f=35&p=360#p360
open yourstyle/template/overall_header.html
find:
Code: Select all
// ]]>
</script>
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; }
find:
Code: Select all
<!-- IF postrow.POSTER_POSTS != '' -->
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;">
Code: Select all
<!-- ENDIF -->
<!-- END custom_fields -->
Code: Select all
</dl>
DEMO:
look underneath the profile, at the arrow!
http://layerbabuena.org/viewtopic.php?f=35&p=360#p360