Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Users unable to update profiles - buttons not repsonding
Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Jun 17, 2015 - 11:45 am

Thank you. It is indeed just an anchor tag. Unfortunately following your instructions of creating sp-user-functions.php and placing it in wp-content leads to:

Warning: Cannot modify header information - headers already sent by (output started at /xxxx/public_html/wp-content/sp-user-functions.php:5) in /xxxx/public_html/wp-includes/pluggable.php on line 1196. Here's the code:

function myProfileButton($out) {
    $out.= '<a href="/account/" class="spButton">Edit Your Profile</a>';
    return $out;
}
add_filter('sph_ProfileFormBottom', 'myProfileButton', 999);

So I placed the code in my (child) theme's functions.php. That works but the button is a little off to the side:

Capture-3.JPGImage Enlarger

Ideally I'd like it next to the other two buttons (to the left).

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jun 17, 2015 - 12:08 pm

I reckon you did not create a proper php file with the opening and closing php tags on the very first and very last lines of the file...

I don't believe you will be able to positon it alongside those two buttons exactly but I will check. Along with the spButton class also use spRight. See what that does.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Thorsten B
Member
sp_UserOfflineSmall Offline
Jun 17, 2015 - 1:14 pm

Ah, the closing tag, I am used to editing functions.php, which has no closing tag.

Not sure if anyone would be interested in the final code but here it is:

// ==================================================================
// Add Profile Edit Button to Forum Profile Overview
// ==================================================================

function myProfileButton($out) {
    $out.= '<div class="spColumnSection spProfileLeftCol"></div><div class="spColumnSection spProfileSpacerCol"></div><div class="spColumnSection spProfileRightCol"></br></br><a href="/account/" class="spButton spRight">Edit Your Profile Details</a></br></br></br></div>';
    return $out;
}
add_filter('sph_ProfileFormBottom', 'myProfileButton', 999);

A bit of CSS to get it properly placed and hopefully visible enough:

#spMainContainer .spProfileOverview .spButton {
    font-size: 15px;
    margin-left: 82px;
    font-weight: bold;
}

The result looks like this:

Capture-4.JPGImage Enlarger

Thanks again for pointing me in the right direction.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jun 17, 2015 - 1:36 pm

Pretty good...

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626