Events Made Easy › Forums › How do I … › Nice URLs/Permalinks
Tagged: facebook, like button, nice urls, permalink, send button
- This topic has 8 replies, 3 voices, and was last updated 13 years, 5 months ago by Franky.
-
AuthorPosts
-
Sun 22 May 2011 at 09:36 #42854AnonymousInactive
I have a problem handing over the nice URLs created by the plugin to Facebook Like and Send button.
Currently, I’m using
.urlencode(get_permalink($post->ID)).
in that piece of FB code to get the URL of the post or page. On event listings made with Event Manager Extended that results inexample.com/events/
.What would the correct piece of PHP be to call the EME URLs?
Sun 22 May 2011 at 17:33 #47769FrankyKeymasterFor a single event:
$event=eme_get_event($eventID);
.urlencode(eme_event_url($event));If you want this inside a EME format setting, it’s easier:
.urlencode(#_EVENTPAGEURL);
Fri 27 May 2011 at 14:25 #47770AnonymousInactiveErr, thanks Franky. Still can’t work it out (little wonder since I only know enough about PHP to be a thread to my own websites).
This is the function I’m using to put the buttons on the end of posts and pages
<br />
function insertFootNote($content) {<br />
if(!is_feed() && is_singular() && !is_page(array('events','wir'))) {<br />
$content .= '<div class="fb-footnote"><fb:like href='.urlencode(get_permalink($post->ID)).' send="true" layout="button_count" width="450" show_faces="false" action="recommend" font="verdana"></fb:like></div>';<br />
}<br />
return $content;<br />
}<br />
add_filter ('the_content', 'insertFootNote');<br />Thinkable – if somebody is kind enough to give me the correct syntax – would be to amend this function with
<br />
if(is_page('envents')) {<br />
$content .= '<div class="fb-footnote"><fb:like href='.urlencode(eme_event_url($event)).' send="true" BLA BLA<br />But I don’t get it to work. Tried several ideas like
<br />
if(is_page('events')) {<br />
$event=eme_get_event($eventID);<br />
$content .= '<div class="fb-footnote"><fb:like href='.urlencode(eme_event_url($event)).' send="true" BLA BLA<br />To no avail. I’m a comlplete PHP illiterate.
Could you please help me?!
Sat 28 May 2011 at 10:23 #47771FrankyKeymasterIf coding this, you need to get the event ID. Look into the filters available for event lists: http://www.e-dynamics.be/wordpress/?cat=41
Fri 3 Jun 2011 at 19:15 #47772AnonymousInactiveI have exactly the same problem, FB like button doesn’t share the single event page, it does share (example.com/events/) only 🙁 Please, would tell us how to fix this?
Sun 5 Jun 2011 at 17:48 #47773AnonymousInactivehelloo? 🙁
Sun 5 Jun 2011 at 17:59 #47774FrankyKeymasterWhat, hello? The facebook button issue is not related to the problem at hand here, hijacking a thread is not polite. Also: when searching old posts you’ll find a solution for this problem (I believe admintiger is the person who found a solution).
Sun 5 Jun 2011 at 20:00 #47775AnonymousInactiveThanks for replying my politely! but again still cant find that post by admintiger ….would you post the link please!
Sun 5 Jun 2011 at 20:55 #47776FrankyKeymasterRead the posts made by admintiger here:
http://www.e-dynamics.be/bbpress/topic.php?id=565&page=2
and
-
AuthorPosts
- The forum ‘How do I …’ is closed to new topics and replies.