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
Links to Facebook, Linkedin etc
Avatar
Stefano Prete
Melbourne, Australia
Member
Free Members
Offline
Jun 28, 2013 - 5:17 am

Steve, I really don't know...

What I need to do is the link in the user's profile to work. The small icons below your picture on the left.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Jun 28, 2013 - 4:00 pm

yes, I understood that...

please post back here the code I gave you that you posted... use the code button in the editor...

all it does is search for the string you gave me (I have to assume you gave me the correct string) and replace it with the shortened url...

Avatar
Stefano Prete
Melbourne, Australia
Member
Free Members
Offline
Jun 29, 2013 - 4:17 am

Steve, I used this code:

add_filter('the_content', 'my_ln_url', 9999);
function my_ln_url($content) {
    $content = str_replace('http://www.linkedin.com/problem-with-post-edit-buttonttp://www.linkedin.com/in/', 'http://www.linkedin.com/in/', $content);
    return $content;
}

I have also tried like this:

add_filter('the_content', 'my_ln_url', 9999);
function my_ln_url($content) {
    $content = str_replace('http://www.linkedin.com/problem-with-post-edit-buttonttp://www.linkedin.com/in/', '', $content);
    return $content;
}

and like this:

add_filter('the_content', 'my_ln_url', 9999);
function my_ln_url($content) {
    $content = str_replace('http://www.linkedin.com/problem-with-post-edit-buttonttp://www.linkedin.com/in/', '/', $content);
    return $content;
}

but none of them seems to work...
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Jun 29, 2013 - 6:20 pm

so all three of those search for

http://www.linkedin.com/proble.....in.com/in/

is that really the string we are looking for?  check the source of you page and make sure that is the exact url we are looking for.

The last two would not be correct... but did they have any effect?

what if you go to forum - integration - page and permalink and turn on the strict wp api opion?

Avatar
Stefano Prete
Melbourne, Australia
Member
Free Members
Offline
Jun 30, 2013 - 4:51 am

Steve, I turned on the strict wp api and the template got all messed up!

I looked at the source of the Linkedin icon and the URL is

http://linkedin.com/problem-wi.....efanoprete

The last 2 (not correct) didn't have any effect at all.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Jun 30, 2013 - 10:34 am

so did you try:

add_filter('the_content', 'my_ln_url', 9999); function my_ln_url($content) {
    $content = str_replace('http://linkedin.com/problem-with-post-edit-buttonttp://www.linkedin.com/in/', 'http://www.linkedin.com/in/', $content);
    return $content;
}

since the needle changed?

Avatar
Stefano Prete
Melbourne, Australia
Member
Free Members
Offline
Jul 1, 2013 - 5:19 am

Yes, it is in. And still it doesn't work...

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Jul 1, 2013 - 12:34 pm

only explanation I can think of then is that the other plugin is adding the link in post content set up via js or something... and not sure how we would affect that...

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: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625