Author Topic: Link ( share ) to Facebook - twitter ...?  (Read 5153 times)

0 Members and 1 Guest are viewing this topic.

Offline m_7

  • Newbie
  • *
  • Posts: 37
    • View Profile
Link ( share ) to Facebook - twitter ...?
« on: March 20, 2011, 04:01:29 PM »
Hi @ all

I have a small problem that is , how to share my photo in facebook & twitter .

this is what i do,
Code: [Select]
<a title="Add to FaceBook" href="http://www.facebook.com/sharer.php?u={image_url}&amp;title={image_name}"><img border="0" src="{template_url}/images/facebook.png"></a>
Code: [Select]
<a title="Add to Twitter" href="http://twitter.com/home?status={image_url}"><img border="0" src="{template_url}/images/twitter.png"></a>

I used {image_url} but it didn't work ?

How to make it work ?

Thank you.

( I hope that is clear  :oops: )

Rembrandt

  • Guest
Re: Link ( share ) to Facebook - twitter ...?
« Reply #1 on: March 20, 2011, 04:41:30 PM »
search in your details.php:

if ($image_allow_comments == 1) {
  
$site_template->register_vars(array(

and replace:

if ($image_allow_comments == 1) {
  
$site_template->register_vars(array(
      
"full_url" => $script_url."/details.php?".URL_IMAGE_ID."=".$image_id,


now you can write:
Code: [Select]
<a title="Add to FaceBook" href="http://www.facebook.com/sharer.php?u={full_url}&amp;title={image_name}"><img border="0" src="{template_url}/images/facebook.png"></a>
mfg Andi

Offline m_7

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Link ( share ) to Facebook - twitter ...?
« Reply #2 on: March 20, 2011, 05:49:39 PM »
Thank you a lot ,

It's work perfectly .