Text
Logo Changer For Members

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    howtodoit.myfreeforum.org Forum Index -> Add-on`s for your forum
View previous topic :: View next topic  
Author Message
Please Register and Login to this forum to stop seeing this advertsing.





Add Karma

Posted:     Post subject:

Back to top
symon
Site Admin
Site Admin

Location: 

Joined: 13 Mar 2006
Posts: 866


Location: Hampshire Add Karma

PostPosted: Sun Aug 05, 2007 8:42 pm    Post subject: Logo Changer For Members Reply with quote

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.

For a live example of this please check out the first forum on myff able to do this at: http://portalogy.myfastforum.org/index.php

So This Is HOWTODOIT

Please remember to use the Editor account before making any template changes, If you have not made an editor account yet please read HERE

Second you must have all ready a template you can edit.

If you have not done this please read HOWTODOIT


1. Go to your forum's Administration Panel ----- 2. General --- Profile Fields


[b]Now add
SITELOGO 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:



Code:
<td class="row1"><span class="gen">{L_INTERESTS}:</span></td>
     <td class="row2">
      <input type="text" class="post" style="width: 200px"  name="interests" size="35" maxlength="150" value="{INTERESTS}" />
     </td>
   </tr>{SITELOGO}



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


It may look like this

Code:

            <td><a href="{U_INDEX}"><img src="templates/myfs_testhtml3/images/logo_phpBB.gif" border="0" alt="{L_INDEX}" vspace="1" /></a></td>
            </span>


Now change that to the following code


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 -->




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.


So the final code may look like this


Code:
<a name="top"></a>
<img id="formStyleTestImage" src="templates/myfs_testhtml4/images/spacer.gif" />
<table width="{T_BODY_BACKGROUND}" cellspacing="0" cellpadding="0" border="0" align="center" id="maintable">
<tr>
   <td valign="top" class="content-row"><table border="0" width="100%" cellspacing="0" cellpadding="0" id="logotable">
   <tr>

<!-- 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
Code:
myff_whatever1



And thats HOWTODOIT

Guide courtsey of NICK Author Of PORTOLOGY


Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    howtodoit.myfreeforum.org Forum Index -> Add-on`s for your forum All times are GMT
Page 1 of 1

 
Jump to:  
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

Card File  Gallery  Forum Archive
HOWTODOIT was designed and built by Symon Field
Creator Of ☆ FarnboroughInvinciblesAgonyAuntFairiesAsylum Alliance FunnyWorldHOWTODOIT PHPbb3
HOWTODOIT© Symon Field 2006,2007,2008

Powered by phpBB Group © 2001,2005.
 

Create your own free forum | Buy a domain to use with your forum