Posted: Sun Aug 05, 2007 8:42 pm Post subject: Logo Changer For Members
This guide will allow you to set your default logo to appear when logged out, but when logged in it will hide the default logo and show a logo set by the person logged in.
1. Go to your forum's Administration Panel ----- 2. General --- Profile Fields
[b]Now addSITELOGO and click Add Custom Profile Field
You will now see this screen:
Now set up the field as seen in the picture.
If you can not view the picture then read the spoiler
Spoiler:
Parameters for custom profile field: Field name: SiteLogo
Displayed title: SiteLogo
Display title: check NO
Topic display position: set to NONE
Automatic entry: set to YES
Automatic display: set to YES
Required: set to YES
Display at user registration: set to YES
Visibility: set to ALL
Access: set to USER
Field type options:
Type: Dropdown
Default: logo1
Link: leave empty
Options: logo1,logo2 (logo3,logo4 and so on depending on how many choices you want)
Display as image: leave empty
Style: leave empty
Now goto profile_add_body.tpl
And add the following code where you need it to go.
Code:
{SITELOGO}
For example if you wish it to be on the list under interests, and before the sig box place the code like this:
Now you must remember to upload yours logos, and title them logo1.gif, logo2.gif, logo3.gif and so on, make sure the logo titles are all lowercase, for this example i have used .gif you can of course use any format you wish.
Goto overall_header.tpl you should now locate the block of code that contains your currant logo
<!-- BEGIN switch_user_logged_in -->
<center><a href="{U_INDEX}"><img src="templates/YOUR TEMPLATE NAME HERE /images/{SiteLogo}.gif" border="0" alt="portal my free forum"></a></center>
<br />
<!-- END switch_user_logged_in -->
The above will show the chosen members logo option only while logged in
You now need to add this code after the above code.
Code:
<!-- BEGIN switch_user_logged_out -->
<center><a href="{U_INDEX}"><img src="templates/YOUR TEMPLATE NAME/images/logo1.gif" border="0" alt="portal my free forum"></a></center><br />
<center><span class="gensmall">You can now set your logo by choosing which one you want when editing your profile</span></center>
<!-- END switch_user_logged_out -->
The above will show the All logged out users and guests the default logo you chose whilst you set up the profile field, you can change this at any time, by changing logo1 to logo2 and so on.
<!-- BEGIN switch_user_logged_out -->
<center><a href="{U_INDEX}"><img src="templates/myfs_testhtml4/images/logo2.gif" border="0" alt="portal my free forum"></a></center><br />
<center><span class="gensmall">You can now set your logo by choosing which one you want when editing your profile</span></center>
<!-- END switch_user_logged_out -->
<!-- BEGIN switch_user_logged_in -->
<center><a href="{U_INDEX}"><img src="templates/myfs_testhtml4/images/{SITELOGO}.gif" border="0" alt="portal my free forum"></a></center>
<br />
<!-- END switch_user_logged_in -->
</tr>
</table>
Please note
1. you must upload logos in the same format , you can not have logo1 as a .gif and logo2 as a .png
2. If you upload your logo not in .gif then you must change the code in overall_header.tpl to reflect this, so if you wanted .jpg
Code:
<!-- BEGIN switch_user_logged_in -->
<center><a href="{U_INDEX}"><img src="templates/YOUR TEMPLATE NAME HERE /images/{SiteLogo}.gif" border="0" alt="portal my free forum"></a></center>
<br />
<!-- END switch_user_logged_in -->
Would become
Code:
<!-- BEGIN switch_user_logged_in -->
<center><a href="{U_INDEX}"><img src="templates/YOUR TEMPLATE NAME HERE /images/{SiteLogo}.jpg" border="0" alt="portal my free forum"></a></center>
<br />
<!-- END switch_user_logged_in -->
3. YOUR TEMPLATE HERE means you must type in the name of your template ffor example
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum