Support Forum
The error is nothing big but it is caused by not editing the functions template to change localization on your new theme. It will still run fine.
See here, step 5, on changing that.
Regarding the making a new button and that html.
This should work for you and may be easier.
sp_MemberButton('tagClass=spButton spRight&link="racecraftmag.co.uk/?page_id=133/members"&icon="sp_livechat.png" ', __sp('Live Chat'), __sp('Enter the chat room'));
That function checks to see if the user can view the members list so your button would only be shown if they can.
You may want to create a completely new button that way you can customize further or use the same function and have buttons that can be placed anywhere in the forum.
You could create a new function in your theme's spFunctions.php (in /template folder)
Call it any button.
function sp_AnyButton($args='', $label='', $toolTip='') {
# Check if logged in if not don't show.
if (is_user_logged_in() != true) return;
global $sfvars;
$defs = array('tagId' => 'spAnyButton',
'tagClass' => 'spButton',
'link' => '../',
'icon' => 'sp_AnyButton.png',
'iconClass' => 'spIcon',
'echo' => 1,
);
$a = wp_parse_args($args, $defs);
$a = apply_filters('sph_AnyButton_args', $a);
extract($a, EXTR_SKIP);
# sanitize before use
$tagId = esc_attr($tagId);
$tagClass = esc_attr($tagClass);
$link = esc_url($link);
$icon = sanitize_file_name($icon);
$iconClass = esc_attr($iconClass);
$toolTip = esc_attr($toolTip);
$echo = (int) $echo;
$out = "<a class='$tagClass vtip' id='$tagId' title='$toolTip' href='$link'>";
if (!empty($icon)) $out.= "<img class='$iconClass' src='".SPTHEMEICONSURL.$icon."' alt=''/>";
if (!empty($label)) $out.= sp_filter_title_display($label);
$out.= '</a>';
$out = apply_filters('sph_AnyButton', $out, $a);
if ($echo) {
echo $out;
} else {
return $out;
}
Then put this where you want it.
sp_AnyButton('tagClass=spButton spRight&link="PageToGoTo" ', __sp('Any Button'), __sp('Any Button Text'));
Hey Brandon - thank you for the information.
The localisation worked, and the first snippet of code works like a dream - but second addition of "any button" doesn't work.
I added the code as you pointed out - changed the references of "Any Button" to the correct term and uploaded, but got a syntax error.
I then re-checked, and after pasting the code into the functions file again - it is giving me a syntax error on line 68 - at the end of the page.
This is don't understand, as it is saying the close tag - ?> - is incorrect, but that was in the page to begin with.
Any ideas ?
the routine is missing the closing }...
Add it before the ?>
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)