PDA

View Full Version : I Need the second version of a mod for vb 3.8.6


MrHorror
06-12-2011, 04:57 PM
Using this code as an uploaded XML....

require_once('./includes/functions_user.php');
$userid = $thread['postuserid'];
$username = $thread['postusername'];
$avatarurl = fetch_avatar_url($userid);
if ($avatarurl == '') {
$avatar = "<div class='avatar_forumdisplay' style='float:$stylevar[left]'><a href='member.php?u=$userid'><img src='$stylevar[imgdir_misc]/aucun_avatar.gif' border='0' width='40' height='40' alt='Profil de $username'></a></div>";
}
else {
$avatar = "<div class='avatar_forumdisplay' style='float:$stylevar[left]'><a href='member.php?u=$userid'><img src='image.php?u=$userid' border='0' width='40' height='40' alt='Avatar $username'></a></div>";
}




and then by placing this bit of code...

.avatar_forumdisplay {
padding:0px 5px 0px 0px;
}

into additional CSS...and then by finding this bit of html:

<if condition="$show['gotonewpost']"><a href="showthread.php?$session[sessionurl]goto=newpost&t=$thread[threadid]" id="thread_gotonew_$thread[realthreadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]" border="0" /></a></if>

and adding $avatar to it...you can make avatars appear next to threads. As shown in this photo:

http://i55.tinypic.com/2wpkxz7.jpg





What I need help with, is for someone to take the xml, and edit it so along with avatars next to threads on forum display, it can also show avatars next to threads on forum home. As shown in the below photo...

https://vborg.vbsupport.ru/external/2011/06/60.jpg







I'd appreciate it if someone could do this for me?

BirdOPrey5
06-16-2011, 07:59 PM
OK I made a plugin that will display the avatar on your FORUMHOME template.

This is a PLUGIN not a product, you upload the plugin into vbulletin as opposed to install a product.

Also you need to manually edit your forumhome_forumbit_level2_post template.

Add the phrase: $avatar anywhere in the template. You can figure out where it looks best for you... use HTML to position it where you want.

Plugin attached.

If I have the time I will make it into an install-able product. If anyone else wants to try they are free to use this code.

This will probably only work if your avatars are stored in the database. If the "Avatar on forumdisplay" plugin works for you, so will this.

MrHorror
06-16-2011, 08:34 PM
OK I made a plugin that will display the avatar on your FORUMHOME template.

This is a PLUGIN not a product, you upload the plugin into vbulletin as opposed to install a product.

Also you need to manually edit your forumhome_forumbit_level2_post template.

Add the phrase: $avatar anywhere in the template. You can figure out where it looks best for you... use HTML to position it where you want.

Plugin attached.

If I have the time I will make it into an install-able product. If anyone else wants to try they are free to use this code.

This will probably only work if your avatars are stored in the database. If the "Avatar on forumdisplay" plugin works for you, so will this.



Thanks for the try. But I uploaded the product, and instead got a database error. So I uninstalled.

BirdOPrey5
06-16-2011, 11:12 PM
That's weird... can you give me a copy of the database error so I can check it out? It's working on my test forum.

MrHorror
06-17-2011, 11:13 PM
Here's the database error I keep getting. Sent you a PM also.



Database error in vBulletin 3.8.6:

Invalid SQL:

SELECT user.avatarid, user.avatarrevision, avatarpath, NOT ISNULL(customavatar.userid) AS hascustom, customavatar.dateline,
customavatar.width, customavatar.height, customavatar.width_thumb, customavatar.height_thumb
FROM user AS user
LEFT JOIN avatar AS avatar ON avatar.avatarid = user.avatarid
LEFT JOIN customavatar AS customavatar ON customavatar.userid = user.userid
WHERE user.userid =;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 6
Error Number : 1064
Request Date : Saturday, June 18th 2011 @ 03:09:55 AM
Error Date : Saturday, June 18th 2011 @ 03:09:55 AM
Script : http://hmandsforums.oliwy.net/forums/
Referrer :
IP Address : 72.80.233.138
Username : Mr.Horror
Classname : vB_Database
MySQL Version : 5.1.52

BirdOPrey5
06-17-2011, 11:21 PM
Hmmm... Ok I have an idea what it might be, it's not getting any data from the SQL Query I wrote in it... I'm not sure why but I think if I re-write it to use the built in VB database functions it may work.

Give me some time with this.

MrHorror
06-18-2011, 12:25 AM
Sure thing brother.