- Posts: 29
- Thank you received: 0
Facebook link : linking to another event
- moabi
- Topic Author
- Offline
- Junior Member
-
Less
More
14 years 4 months ago #6820
by moabi
Facebook link : linking to another event was created by moabi
hi,
the title talk itself,
if you "like" an event, it will link to a previous event or a wrong page with the event,
Any idea ?
Thx,
David
the title talk itself,
if you "like" an event, it will link to a previous event or a wrong page with the event,
Any idea ?
Thx,
David
Please Log in or Create an account to join the conversation.
- mhadmin
- Offline
- New Member
-
Less
More
- Posts: 3
- Thank you received: 0
14 years 3 months ago #7451
by mhadmin
Ben Cheek
MuddyHudson LLC
muddyhudson.com/consulting/web
Replied by mhadmin on topic Re: Facebook link : linking to another event
Not sure if this is the same issue, but the Facebook sharer button on the bottom of the event page was not producing the correct link or preserving the title of the event when the URL was passed to
facebook.com/sharer.php
.
The problem was ampersands in the URL. Facebook's sharer.php uses the ampersand to indicted parameters as well, so it was dumping the rest of the link.
Here's my solution:
I applied the rawurlencode function to the $link variable in /components/com_eventbooking/helper/helper.php:
Change (around line 696):
To:
This worked for me. Would be nice if Event Booking modified the page description in the meta tags with the event description so Facebook could pick that up as well when it scrapes the page.
The problem was ampersands in the URL. Facebook's sharer.php uses the ampersand to indicted parameters as well, so it was dumping the rest of the link.
Here's my solution:
I applied the rawurlencode function to the $link variable in /components/com_eventbooking/helper/helper.php:
Change (around line 696):
Code:
function getFacebookButton( $title, $link ) {
$img_url = JURI::base()."/components/com_eventbooking/assets/images/socials/facebook.png";
return '<a href="http://www.facebook.com/sharer.php?u=' . $link . '&t=' . rawurlencode( $title ) . '" title="Submit ' . $title . ' in FaceBook" target="blank" >
<img src="' . $img_url . '" alt="Submit ' . $title . ' in FaceBook" />
</a>' ;
}
To:
Code:
function getFacebookButton( $title, $link ) {
$img_url = JURI::base()."/components/com_eventbooking/assets/images/socials/facebook.png";
return '<a href="http://www.facebook.com/sharer.php?u=' . rawurlencode( $link ) . '&t=' . rawurlencode( $title ) . '" title="Submit ' . $title . ' in FaceBook" target="blank" >
<img src="' . $img_url . '" alt="Submit ' . $title . ' in FaceBook" />
</a>' ;
}
This worked for me. Would be nice if Event Booking modified the page description in the meta tags with the event description so Facebook could pick that up as well when it scrapes the page.
Ben Cheek
MuddyHudson LLC
muddyhudson.com/consulting/web
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
14 years 3 months ago #7463
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Facebook link : linking to another event
Hi mhadmin
Thanks for sharing your fix . I applied the code to latest version of the extension and It is available on the download package on server .
If someone want to get this fixed without doing the upgrade, you can simply get this file, unzip it and upload to folder components/com_eventbooking/helper folder . After that, the issue will be fixed .
Thanks ,
Tuan
Thanks for sharing your fix . I applied the code to latest version of the extension and It is available on the download package on server .
If someone want to get this fixed without doing the upgrade, you can simply get this file, unzip it and upload to folder components/com_eventbooking/helper folder . After that, the issue will be fixed .
Thanks ,
Tuan
Attachment helper-20110209.zip not found
- Tuan Pham Ngoc
- Offline
- Administrator
-
14 years 3 months ago #7464
by Tuan Pham Ngoc
=> I added this to latest version of the extension , too . If you want to get this feature, simply get this file, unzip it and upload to folder components/com_eventbooking/views/event of your site . After that, It will work as expected .
Thanks,
Tuan
Replied by Tuan Pham Ngoc on topic Re: Facebook link : linking to another event
Would be nice if Event Booking modified the page description in the meta tags with the event description so Facebook could pick that up as well when it scrapes the page.
=> I added this to latest version of the extension , too . If you want to get this feature, simply get this file, unzip it and upload to folder components/com_eventbooking/views/event of your site . After that, It will work as expected .
Thanks,
Tuan
Attachment view-20110209.zip not found
Moderators: Tuan Pham Ngoc
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.