Support Forum
Hi guys.
I have a small problem and I hope someone will help me to solve.
I have a plugin installed, called WP-Biographia. Really nice, it puts small icons to the bottom of each post/page. They are linked to Facebook, Linkedin and so on.
The links required must be like "http://www.facebook.com/stefano". They must be written inside the user profile. Unfortunately, SP reads those URL and the identities don't work. SP needs just "/stefano". But if I put "/stefano" in SP, the links in WP-Biographia don't work anymore! Pretty much, WP reads the links from SP.
Same thing with Linkedin, Google+ etc.
Is there a way to modify the system somewhat, so they will both work?
Thank you very much.
sorry, not really following you.... can you explain further what you are doing?
we already have identities like that in our profile... and displayed in the user info for each post...
are you saying that this other plugin is using the same data fields in a users db info for those fields?
Visit Cruise Talk Central and Mr Papa's World
I don't know how it works, Steve...
Let's use my Linkedin account... The link is http://www.linkedin.com/in/stefanoprete
In the SP user profile we need to put only /in/stefanoprete and it works perfectly.
But in the WP user profile (that's where WP-Biography gets the link from) we need to put http://www.linkedin.com/in/stefanoprete
So I did that. But when I do, the links in the SP profiles return a 404, because the link shown becomes http://www.linkedin.com/proble.....efanoprete
So it's like SP already add http://www.linkedin.com automatically.
I hope I have been able to explain myself better this time...
yes, we automatically add the base url in... but that does mean what I asked... that somehow, that other plugin and simple press has chose the same db table and db entry name for the options... not easy to occur.
and no easy way around... we wont be changing ours because way too many users already using it and we cannot break it for them...
best I can offer you currently, is to filter each of those urls to clean them up. in other words, go ahead and require the full url in the sp profile... as you note, you end up with:
http://www.linkedin.com/problem-with-post-edit-buttonttp://www.linkedin.com/in/stefanoprete
the you can use the 'sph_PostIndexUserLinkedIn' filter to clean up the url for simple press...
there is a similar filter for each of the identities... see: http://codex.simple-press.com/.....opic-view/
Visit Cruise Talk Central and Mr Papa's World
something like this for linked in...
add_filter('sph_PostIndexUserLinkedIn', 'my_ln_url'); 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; }
then repeat (with proper hook) for other identities...
this would go in your spFunctions.php file of your sp theme... as always, make sure you have your own sp theme and are not editing ours...
Visit Cruise Talk Central and Mr Papa's World
Steve, it doesn't work...
I have added this:
add_filter('sph_PostIndexUserLinkedIn', 'my_ln_url'); 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/', $content); return $content; } and the URL become http://www.linkedin.com/problem-with-post-edit-buttonttp://www.linkedin.com/in/stefanoprete We need to find a way to remove the first http://www.linkedin.com
well sounds like that means the other plugin is running late.. after our stuff... so you might try
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; }
and catch it after everyone is done mucking with the content... I have no way to test this, so kind of shooting in the dark...
Visit Cruise Talk Central and Mr Papa's World
then I am afraid I do not understand how they are getting the extra links in there...
are you sure the pattern you gave me is correct? it must be exact, because we are searching for that string in the page content to replace it... not sure how it would not be found...
Visit Cruise Talk Central and Mr Papa's World