in ..joomla/components/com_smf/smf.class.php:
Find:
if ($jsmfConfig->cb_profile && strpos($tmpurl->query, 'action=profile') !== FALSE && strpos($tmpurl->query, 'sa=') === FALSE) {
Replace it with:
if ($jsmfConfig->cb_profile && strpos($tmpurl->query, 'action=profile') !== FALSE && strpos($tmpurl->query, 'sa=') === FALSE && strpos($tmpurl->query, 'jreviews') === FALSE) {
Then find:
} else {
array_push($replace, 'option=com_comprofiler&task=userProfile&user='.$user->id, 'ACTION=PROFILE2', 'option=com_comprofiler', substr($jsmfConfig->url, strpos($jsmfConfig->url, '?')+1).'action=profile2');
}
}
Add after it:
if ($jsmfConfig->cb_profile && strpos($tmpurl->query, 'action=profile') !== FALSE && strpos($tmpurl->query, 'sa=') === FALSE && strpos($tmpurl->query, 'jreviews') !== FALSE) {
array_push($search, 'action=profile;u='.$smf_uid.'jreviews');
array_push($replace, 'option=com_jreviews&task=myreviews&user='.$user->id);
in ..smf/Themes/default/Display.template.php:
(location may be different, depending on your theme configuration in SMF)
Find:
if ($message['member']['can_view_profile'])
echo '
<a href="', $message['member']['href'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/profile_sm.gif" alt="' . $txt[27] . '" title="' . $txt[27] . '" border="0" />' : $txt[27]), '</a>';
Add after it:
echo '
<a href="', $message['member']['href'], 'jreviews">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/jr_smf.gif" alt="Show reviews by this user" title="Show reviews by this user" border="0" />' : 'Show reviews by this user'), '</a>';
in ..smf/Themes/default/PersonalMessage.template.php:
(location may be different, depending on your theme configuration in SMF)
Find:
if ($settings['show_profile_buttons'])
{
echo '
<a href="', $message['member']['href'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/profile_sm.gif" alt="' . $txt[27] . '" title="' . $txt[27] . '" />' : $txt[27]), '</a>';
Add after it:
echo '
<a href="', $message['member']['href'], 'jreviews">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/icons/jr_smf.gif" alt="Show reviews by this user" title="Show reviews by this user" />' : 'Show reviews by this user'), '</a>';
that's it. don't know if it's the best way to do it but it seems to work.
important notes:
1. 'redirect profile links' must be enabled in JSMF. you can circumvent it if you dig into the conditional statements structure in smf.class.php, but i didn't get into that.
2. after changing smf.class.php, be aware that it sometimes may be cached on your server (there are some cache settings in JSMF config) and it may take it some time until the changes get reflected.
3. you must choose an icon file (GIF) for the ratings icon, name it jr_smf.gif and put it in the SMF icon folder: ..smf/Themes/default/images/icons/ (if you're using the default SMF theme).
let me know if there's any trouble.
all the best,
gigi
