4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: m_7 on March 20, 2011, 04:01:29 PM

Title: Link ( share ) to Facebook - twitter ...?
Post by: m_7 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: )
Title: Re: Link ( share ) to Facebook - twitter ...?
Post by: Rembrandt 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
Title: Re: Link ( share ) to Facebook - twitter ...?
Post by: m_7 on March 20, 2011, 05:49:39 PM
Thank you a lot ,

It's work perfectly .