
Awesome, thanks, that pointed me in just the right direction for the desired hack. Now working! While a core option setting would be great in the future, this hack will certainly work for now. :0) for others who might be interested in the hack …
FROM CORE FILES SIMPLE PRESS version 5.2.6
IN FILE simple-press\forum\content\sp-member-view-functions.php
COPY lines 432-482, or the sp_MemberListUrl() function if you’ve changed other things in that file and line numbers are different
PASTE TO THEME in my case NAME Default VERSION 1.2.2
IN FILE sp-resources\forum-themes\default\templates\spFunctions.php
PLACE wherever, I put at end
CHANGE function name as desired, I went with my_sp_MemberListUrl()
ADDED lines in the $defs array
‘showAs’ => ‘text’,
‘icon’ => ‘sp_UserWebsite.png’,
‘iconClass’ => ‘spImg’,
‘targetNew’ => 1,
‘noFollow’ => 0,
//ADDED lines in the “sanitize before use” section
$icon = sanitize_file_name($icon);
$iconClass = esc_attr($iconClass);
$targetNew = (int) $targetNew;
$noFollow = (int) $noFollow;
ADDED logic to check showAs value, output as text vs. icon as appropriate
if ($showAs == ‘icon’ && $spThisMember->user_url != ”)
{
$target = ($targetNew) ? ‘ target=”_blank”‘ : ”;
$follow = ($noFollow) ? ‘ rel=”nofollow”‘ : ”;
if(!empty($icon)) {
$out = “<div id=’$tagId’ class=’$tagClass’>”;
$out.= “<span class=’$labelClass’>”.sp_filter_title_display($label).”$att</span>”;
$out.= “<a id=’$tagId’ class=’$tagClass vtip’ href=’$spThisMember->user_url’ title=’$spThisMember->user_url’$target$follow><img class=’$iconClass’ src='”.SPTHEMEICONSURL.$icon.”‘ alt=” /></a>n”;
$out.= “</div>n”;
}
$out = apply_filters(‘sph_PostIndexUserWebsite’, $out, $a);
}
else
{
// these were the original 5 lines
$out = “<div id=’$tagId’ class=’$tagClass’>”;
$out.= “<span class=’$labelClass’>”.sp_filter_title_display($label).”$att</span>”;
$out.= “<span class=’$dateClass’>”.sp_make_clickable($spThisMember->user_url).'</span>’;
$out.= “</div>n”;
$out = apply_filters(‘sph_MemberListUrl’, $out, $a);
}
IN FILE sp-resources\forum-themes\default\templates\spMembersView.php
CHANGE call to core MemberListUrl to instead call modified one just added
AND PASS in the showAs value as “icon”
# Column 6 of the member row – url
# ———————————————————————-
sp_ColumnStart(‘tagClass=spColumnSection spRight&width=26%’);
//sp_MemberListUrl(”, __sp(‘Member URL’));
my_sp_MemberListUrl(array(‘showAs’ => ‘icon’), __sp(‘Member URL’));
sp_ColumnEnd();