Version: 1.0.1, by kotkerk
Developer Last Online: Jul 2021
Category: Miscellaneous Hacks -
Version: 3.8.7
Rating:
Released: 08-23-2011
Last Update: 09-06-2011
Installs: 29
Uses Plugins Template Edits
Additional Files Translations
No support by the author.
yes, i know =)
exists similar mods, but they produce mount of SQL queries on forum home page and forumdisplay page
i'm tried to create one product, that has no additional queries and save server resources
debug from my test forum (vbkerk.com) No hack
====
Homepage
Page Generation 0.02608 seconds Memory Usage 1,558KB Queries Executed 10
Forumdisplay (Has threads)
Page Generation 0.03031 seconds Memory Usage 1,878KB Queries Executed 14
Forumdisplay (No threads - Category)
Page Generation 0.02724 seconds Memory Usage 1,832KB Queries Executed 8
Important Note!
avatar files must be in the File System! Not in Data Base!
and users used custom avatars, not uploaded by admin
====
I will no support this product
I don't know, how forum will work with this mod and mods, that used hooks:
cache_ordered_forums
forumdisplay_query
becouse, if you use hook cache_ordered_forums, you can not add fields, unless unsetting one variable ($counter_select) before
in mod description not promised, that mod would work in search results =)
look at thread title:
Forum Home and Forumdisplay avatars
ok, if you want to add this feature, add new module in: 1. Plugins & Products
Add New Plugin =>
=== Product = XFAvatar Hook Location = search_results_query_threads Title = XFAvatar - search_results_query_threads Execution Order = 5 (default) Plugin PHP Code:
2.
Create new file called search_results_query_threads.php
put php code in this file:
PHP Code:
<?php
if(!is_object($vbulletin))
{
exit;
}
$hook_query_fields = ",
post_user.userid AS lastposterid, post_user.avatarrevision AS avatarrevision, user.avatarrevision AS post_avatarrevision,
customavatar.width AS avwidth, customavatar.height AS avheight,
post_customavatar.width AS post_avwidth, post_customavatar.height AS post_avheight,
NOT ISNULL(post_customavatar.userid) AS post_customavatar,
NOT ISNULL(customavatar.userid) AS hascustom
";
$hook_query_joins = "
LEFT JOIN " . TABLE_PREFIX . "user AS post_user ON(post_user.username = thread.lastposter)
LEFT JOIN " . TABLE_PREFIX . "avatar AS avatar ON(avatar.avatarid = user.avatarid)
LEFT JOIN " . TABLE_PREFIX . "avatar AS post_avatar ON(post_avatar.avatarid = post_user.avatarid)
LEFT JOIN " . TABLE_PREFIX . "customavatar AS customavatar ON(customavatar.userid = user.userid)
LEFT JOIN " . TABLE_PREFIX . "customavatar AS post_customavatar ON(post_customavatar.userid = thread.postuserid)
";
?>
upload this file to your server into folder *your_forum*/krscripts/xfavatar/
Sorry to bother you again.
It seems that some users without avatar avatars are not displayed correctly, there is no apparent reason for this failure.
The problem is that the image looks in the folder but they are users without avatars avatar.
The image should have this route images/misc/unknown.gif but somehow find a route in the folder customavatars.
For this error they must have at least 10 new messages in 5 for example you may not see the error
example: http://www.foroartesmarciales.com/se...hp?do=getdaily
I wonder if you could review the code for a solution. Thank you very much for your patience and apologize for any inconvenience.