Support Forum

Adversaries ignore the "Display profile information in" setting

CE cwwcwi0ecnuwijcowecwreiovuejwcko
cwwcwi0ecnuwijcowecwreiovuejwcko
Member

I have set the simple-press option “Display profile information in” to “WordPress author page” instead of Forum profile page.

This is working everywhere on the forum except the adversaries tab page and having the PM plugin installed. When you click on the view profile button behind a contact name, a lightbox with the forum profile is loaded instead of taking the user to the WordPress profile page. Can this be fixed?

5 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

Wow – really…
I have open a bug ticket for it so that it can be looked at and, if needed, fixed up.
Thanks for the information.

CE cwwcwi0ecnuwijcowecwreiovuejwcko
cwwcwi0ecnuwijcowecwreiovuejwcko
Member

Thanks, I hope it can be fixed soon. It’s something that affects all my forum users.

MP Mr Papa
Mr Papa
Member

have made the fix tonight… but cannot release a plugin update since we have other private messaging updates awaiting the next version of sp…

but you can make the changes yourself if you like…  within the pm plugin, in the forms subdirectory, find the files:

sp-pm-adversaries-form.php
sp-m-buddies-form.php

you will need to edit both…  In the adversaries one, change

        $site = SFHOMEURL."index.php?sp_ahah=profile&sfnonce=".wp_create_nonce('forum-ahah')."&action=popup&user=$adversary";
        $title = esc_attr(__("View profile of this adversary", 'sp-pm'));
        $out.= "<a rel='nofollow' href='javascript:void(null)' class='spButton vtip' title='$title' onclick='spjDialogAjax(this, "$site", "$title", 750, 0, "center");'>";
        $out.= '<img src="'.sp_find_icon(PMIMAGES, 'sp_PmUser.png').'" alt="" />';
        $out.= __('View Profile', 'sp-pm');
        $out.= '</a>';

to

        $tmp = sp_attach_user_profile_link($spThisUser->ID, __('View Profile', 'sp-pm'));
        $tmp = str_replace("class='spLink", "class='spButton", $tmp);
        $out.= preg_replace("/>/", "><img class='spIcon' src='".sp_find_icon(PMIMAGES, 'sp_PmUser.png')."' alt='' />", $tmp, 1);

and in the buddies one, change

        $site = SFHOMEURL."index.php?sp_ahah=profile&sfnonce=".wp_create_nonce('forum-ahah')."&action=popup&user=$buddy";
        $title = esc_attr(__("View profile of this buddy", 'sp-pm'));
        $out.= "<a rel='nofollow' href='javascript:void(null)' class='spButton vtip' title='$title' onclick='spjDialogAjax(this, "$site", "$title", 750, 0, "center");'>";
        $out.= '<img src="'.sp_find_icon(PMIMAGES, 'sp_PmUser.png').'" alt="" />';
        $out.= __('View Profile', 'sp-pm');
        $out.= '</a>';

to

        $tmp = sp_attach_user_profile_link($spThisUser->ID, __('View Profile', 'sp-pm'));
        $tmp = str_replace("class='spLink", "class='spButton", $tmp);
        $out.= preg_replace("/>/", "><img class='spIcon' src='".sp_find_icon(PMIMAGES, 'sp_PmUser.png')."' alt='' />", $tmp, 1);
MP Mr Papa
Mr Papa
Member

its not quite correct, but should work for now…  the $spThisUser should be $spProfileUser I think for when you edit a users profile… but need to test that in the formal fix…