PDA

View Full Version : Show Thread Enhancements - Set Avatar Link


cono1717
15 May 2009, 18:43
This small change will automatically add a "Set Avatar" link under a users avatar area when no avatar is detected.

In this you have two options A link or a noavatar image.

No Avatar Image
Demo can be found http://cc-designs.co.uk/index.php?styleid=1 just view the main forum post "Welcome".

Firstly Download the ZIP file below. Upload the contents to your forums root directory (or your image directory) basically you want to upload the picture to YOURBOARD/images/misc

Now in ACP > Style Manager > Edit Templates > postbit OR postbit_legacy find:

<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td>

BEFORE THE </if> add:

<else />
<td class="alt2">
<img src="images/misc/noavatar.jpg" /><a href="./profile.php?do=editavatar"><br />Set Avatar</a>
</td>

Simple Link

Demo can be found http://cc-designs.co.uk/index.php?styleid=16 just view the main forum post.

Here is what you have to do, there is no need to download any files.

Go to ACP > Style Manger and choose either postbit or postbit_legacy (whichever you are using).

Next find this


<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td>


BEFORE THE </if> add:

<td class="alt2">
<a href="./profile.php?do=editavatar">Set Avatar</a>
</td>
</if>

Job Done :D Save and view your posts and click install :D

As you can see this is only a simple edit but I saw it on a forum once and I thought that it would be a nice edition to those that want it.

A PSD has also been included in the ZIP file,

Thanks,

Connor :cool:

Daniel_HBK
15 May 2009, 19:14
thx man for this add-ons

cono1717
15 May 2009, 19:50
No Problem :D

peleh
17 May 2009, 01:26
I prefer like this, marked as installed anyway...

<else />
<td class="alt2">
<a href="./profile.php?do=editavatar"><img src="images/misc/setavatar.gif" border="0"/></a>
</td>

Michael.A
19 May 2009, 14:38
lol thanks peleh marked as installed anyway..

shinng
30 May 2009, 01:11
used peleh's coding. installed

ctrlbrk
21 Jun 2009, 21:18
it's not clear to me --- does this show for EVERYONE viewing a thread, or only to the individuals who don't have an avatar?

for instance, I only want it to show up for the person that can actually set it...

Mike
http://forum.bigmiketrading.com