[Template] Modifying Guest Mini Profiles
Dec 7, 2012 13:36:56 GMT -8
Shorty, entity007, and 1 more like this
Post by pawl on Dec 7, 2012 13:36:56 GMT -8
The following template mod will make a few simple changes to the mini-profile displayed next to posts made by guests (or deleted members).
First, head through your Admin Panel -> Themes -> Layout Templates -> Mini Profile
The first four lines should read thus;
<div class="$[miniprofile_class]">
$[user]<br />
{if !$[user.is_member]}Guest<br />{/if}
{if $[user.group]}
Now, replace it with the following, and then read on.
<div class="$[miniprofile_class]">
{if !$[user.is_member]}
<span style="font-weight: bold;"><span style="color: #FF0000;">$[user]</span><br />Guest</span><br />
{else}$[user]<br />
{/if}
{if $[user.group]}
The hex code in red is the colour that the guests' name will appear in. You can also change the font-weight attributes if you wish. The way it's set up above, the first <span> affects both the Name & Guest text and the second affects just the Name. In the example above, both the Name and Guest title are bold, and the name is Red (#FF0000)
Now, if you wish we can also change the avatar for Guests.
As standard they will use the forum default avatar, however you may wish for this to be for members only, with a seperate avatar for guests. To do that, there are two changes to make. The first is to the above code - add in the purple section.
<div class="$[miniprofile_class]">
{if !$[user.is_member]}
<span style="font-weight: bold;"><span style="color: #FF0000;">$[user]</span><br />Guest</span><br /><div class="avatar"><img src="AVATAR-URL" alt="$[user.name]'s Avatar" /></div>
{else}$[user]<br />
{/if}
{if $[user.group]}
The AVATAR-URL needs to be replaced with the URL to your Guest-Avatar.
The default alt-text here is $[user.name]' Avatar - for me for example this would display "Paul's Avatar" when you hover on it. This too can be changed, if you wish.
For the second change look for the following line;
{if $[user.avatar]}
<div class="avatar">$[user.avatar]</div><br />
{/if}
Add the orange text;
{if $[user.is_member]}{if $[user.avatar]}
<div class="avatar">$[user.avatar]</div><br />
{/if}{/if}
If you want your colour change to appear on the thread list page (in a board) too, then head over to the Thread List template.
Approx line 17 below, add in the green;
<td class="created-by clickable">by {if $[thread.created_by.is_member]}$[thread.created_by_user]{else}<span style="color: #FF0000">$[thread.created_by_user]</span>{/if}</td>
And that's it done. Simple enough, but if you have any trouble, or think I've missed anything, feel free to reply. =]
First, head through your Admin Panel -> Themes -> Layout Templates -> Mini Profile
The first four lines should read thus;
<div class="$[miniprofile_class]">
$[user]<br />
{if !$[user.is_member]}Guest<br />{/if}
{if $[user.group]}
Now, replace it with the following, and then read on.
<div class="$[miniprofile_class]">
{if !$[user.is_member]}
<span style="font-weight: bold;"><span style="color: #FF0000;">$[user]</span><br />Guest</span><br />
{else}$[user]<br />
{/if}
{if $[user.group]}
The hex code in red is the colour that the guests' name will appear in. You can also change the font-weight attributes if you wish. The way it's set up above, the first <span> affects both the Name & Guest text and the second affects just the Name. In the example above, both the Name and Guest title are bold, and the name is Red (#FF0000)
Now, if you wish we can also change the avatar for Guests.
As standard they will use the forum default avatar, however you may wish for this to be for members only, with a seperate avatar for guests. To do that, there are two changes to make. The first is to the above code - add in the purple section.
<div class="$[miniprofile_class]">
{if !$[user.is_member]}
<span style="font-weight: bold;"><span style="color: #FF0000;">$[user]</span><br />Guest</span><br /><div class="avatar"><img src="AVATAR-URL" alt="$[user.name]'s Avatar" /></div>
{else}$[user]<br />
{/if}
{if $[user.group]}
The AVATAR-URL needs to be replaced with the URL to your Guest-Avatar.
The default alt-text here is $[user.name]' Avatar - for me for example this would display "Paul's Avatar" when you hover on it. This too can be changed, if you wish.
For the second change look for the following line;
{if $[user.avatar]}
<div class="avatar">$[user.avatar]</div><br />
{/if}
Add the orange text;
{if $[user.is_member]}{if $[user.avatar]}
<div class="avatar">$[user.avatar]</div><br />
{/if}{/if}
If you want your colour change to appear on the thread list page (in a board) too, then head over to the Thread List template.
Approx line 17 below, add in the green;
<td class="created-by clickable">by {if $[thread.created_by.is_member]}$[thread.created_by_user]{else}<span style="color: #FF0000">$[thread.created_by_user]</span>{/if}</td>
And that's it done. Simple enough, but if you have any trouble, or think I've missed anything, feel free to reply. =]