Quote:
does not work in new results or search
|
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:
PHP Code:
if(file_exists(DIR . '/krscripts/xfavatar/search_results_query_threads.php'))
{
require_once(DIR . '/krscripts/xfavatar/search_results_query_threads.php');
}
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/