САБЖ
Fat. добавил 30.12.2005 в 09:48
http://www.vbsupport.org/forum/showthread.php?t=342пробывал как тут всю ночь, да что то совсем не то
там код немного другой хотя суть то вродк одна оставется но почесу то все равно не пашет :(
Fat. добавил 30.12.2005 в 18:51
Пробывал этот код кидать из user.php в member.php
Код:
// ############################### start reputation ###############################
$show['reputation'] = false;
if ($vbulletin->options['reputationenable'] AND ($vbulletin->userinfo['showreputation'] OR !($permissions['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canhiderep'])))
{
$vbulletin->options['showuserrates'] = intval($vbulletin->options['showuserrates']);
$vbulletin->options['showuserraters'] = $permissions['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseeownrep'];
$reputations = $db->query_read("
SELECT
user.username, reputation.whoadded,
reputation.postid as postid,
reputation.reputation, reputation.reason,
post.threadid as threadid,
reputation.dateline as dateline,
thread.title as title
FROM " . TABLE_PREFIX . "reputation AS reputation
LEFT JOIN " . TABLE_PREFIX . "post AS post ON(reputation.postid = post.postid)
LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON(post.threadid = thread.threadid)
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = reputation.whoadded)
WHERE reputation.userid = " . $vbulletin->userinfo['userid'] . "
" . iif($vbulletin->options['showuserraters'] AND trim($vbulletin->userinfo['ignorelist']), " AND reputation.whoadded NOT IN (0," . str_replace(' ', ',', trim($vbulletin->userinfo['ignorelist'])). ")") . "
AND thread.visible = 1
AND post.visible = 1
ORDER BY reputation.dateline DESC
LIMIT 0, " . $vbulletin->options['showuserrates']
);
$reputationcommentbits = '';
if ($vbulletin->options['showuserraters'])
{
$reputationcolspan = 5;
$reputationbgclass = 'alt2';
}
else
{
$reputationcolspan = 4;
$reputationbgclass = 'alt1';
}
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
while ($reputation = $db->fetch_array($reputations))
{
if ($reputation['reputation'] > 0)
{
$posneg = 'pos';
}
else if ($reputation['reputation'] < 0)
{
$posneg = 'neg';
}
else
{
$posneg = 'balance';
}
$reputation['timeline'] = vbdate($vbulletin->options['timeformat'], $reputation['dateline']);
$reputation['dateline'] = vbdate($vbulletin->options['dateformat'], $reputation['dateline']);
$reputation['reason'] = $bbcode_parser->parse($reputation['reason']);
if (vbstrlen($reputation['title']) > 25)
{
$reputation['title'] = fetch_trimmed_title($reputation['title'], 24);
}
($hook = vBulletinHook::fetch_hook('usercp_reputationbit')) ? eval($hook) : false;
eval('$reputationcommentbits .= "' . fetch_template('usercp_reputationbits') . '";');
$show['reputation'] = true;
}
}
$show['currentlocation'] = true;
}
и соответсвено в шаблон ЬУЬИЩШТАЩ
Код:
<!-- ############## REPUTATION GIVEN - PAUL M ############## -->
<if condition="$show['reputationgv']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
<td class="tcat" colspan="$reputationcolspan_gv">
<span class="smallfont" style="float:$stylevar[right]">$vbphrase[your_reputation_power] $rpower $vbphrase[points]
<a href="#top" onclick="return toggle_collapse('usercp_repgiven')"><img id="collapseimg_usercp_repgiven" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_usercp_repgiven].gif" alt="" border="0" /></a>
</span>
$vbphrase[latest_reputation_given]
</td>
</tr>
</thead>
<tbody id="collapseobj_usercp_repgiven" style="$vbcollapse[collapseobj_usercp_repgiven]">
<tr>
<td class="thead" colspan="2"> $vbphrase[thread]</td>
<td class="thead">$vbphrase[date]</td>
<td class="thead" nowrap="nowrap">Given To</td>
<td class="thead">$vbphrase[comment]</td>
</tr>
$reputationcommentbits
</tbody>
</table>
<br />
</if>
<!-- ############## END REPUTATION GIVEN ############## -->
получилось так что в каждом профиле вижу комментарии