forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: Anturaju93 on December 16, 2013, 05:11:00 pm
-
Hello.
I have added Facebook share and Facebook comments for my Gallery, but i need to know the image URL to insert in Facebook code, because Facebook comments are not working okay - comments are shown all over my site, but i need to show different on every image.
This is the Facebook comments code:
<div class="fb-comments" data-href="http://imagini.moinesti.biz"
data-numposts="5" data-colorscheme="light"></div>
I need to replace my site imagini.moinesti.biz with the URL of the every image generated by the script. I have tried with
'{LINK}'
<a href="{LINK_TGT}">{THUMB}<br /></a>
{LINK_TGT}
{HREF_LNK}
$href_lnk
"{HREF_TGT}"
{HREF_LNK}
but none are working.
I need to know what to insert in Facebook code so the unique image URL are displayed in Facebook comments and share.
-
I have added Facebook share and Facebook comments for my Gallery
Have you already tested one of the available Facebook plugins?
-
Yes, i don't like them.
Please visit my site, i like it sipmple.
This is a sample link that i want generated in facebook code : http://imagini.moinesti.biz/displayimage.php?pid=785
-
I need some help please.
How is the image URL generated by the script? Is it like this : displayimage.php?pid={$CURRENT_PIC_DATA['pid']} (not working)
I need to insert a unique URL in facebook comments plugin plase. displayimage.php?pid= ???? how is the pid generated in URL ?
-
On intermediate-sized pages, the pid is always present as a parameter. This means, you can always access it via
$superCage = Inspekt::makeSuperCage();
$pid = $superCage->get->getInt('pid');
regardless of which variables and arrays are already set.
-
Yes, pid is working now.
I added your variables in theme.php and then constructed the unique url for every image like this mysite.biz/displayimage.php?pid=$pid
Here is the working Facebook comments code:
<div class="fb-comments" data-href="mysite.biz/displayimage.php?pid=$pid"
data-numposts="5" data-colorscheme="light"></div>
Now Facebook comments are unique for every image, thanks a lot.
-
Please
tag your thread as "solved" by clicking on the "Topic Solved" button on the bar at the left hand side at the bottom of your thread.
-
On intermediate-sized pages, the pid is always present as a parameter. This means, you can always access it via
$superCage = Inspekt::makeSuperCage();
$pid = $superCage->get->getInt('pid');
regardless of which variables and arrays are already set.
Where (what function in theme.php) I shoud add this?
I have facebook div in $template_image_rating (because I want the facebook comments under the rating stars):
<div class="fb-comments" data-href="http://allvip.us/displayimage.php?pid=$pid" data-numposts="3" data-colorscheme="dark"></div>
-
On intermediate-sized pages, the pid is always present as a parameter. This means, you can always access it via
$superCage = Inspekt::makeSuperCage();
$pid = $superCage->get->getInt('pid');
regardless of which variables and arrays are already set.
Where in theme.php I should add it?What function?Under wich line?
I have the fb plugin in $template_image_rating because I want the fb comments under rating stars?
-
As I said, you can always use this code, which means, you can add it to every function.
I want the fb comments under rating stars
I suggest to undo your current change. Instead, add your code to the function theme_display_image (obviously below "echo $votes;").
-
I have the facebook div under echo $votes; and your code before:
$superCage = Inspekt::makeSuperCage();
$width = $CONFIG['picture_table_width'];
tryed even just $pid = $superCage->get->getInt('pid'); before $width = $CONFIG['picture_table_width'];
comments show on all the images
-
Please post the whole code, or even better, your theme_display_image function with your modifications.
-
/******************************************************************************
** Section <<<theme_display_image>>> - START
******************************************************************************/
function theme_display_image($nav_menu, $picture, $votes, $pic_info, $comments, $film_strip)
{
global $CONFIG, $LINEBREAK;
$superCage = Inspekt::makeSuperCage();
$pid = $superCage->get->getInt('pid');
$superCage = Inspekt::makeSuperCage();
$width = $CONFIG['picture_table_width'];
echo '<a name="top_display_media"></a>'; // set the navbar-anchor
echo '<div class="filmnavW">';
echo '<div class="filmnav">';
if ($CONFIG['display_film_strip'] == 1) {
echo $film_strip;
}
/*starttable();*/
echo $nav_menu;
/*endtable();*/
echo '<div class="clearer">';
echo '</div>';
echo '</div>';
echo '</div>';
echo '<div class="adMedia">';
echo '</div>';
echo '<div class="dmWrapp">';
echo '<div class="clearer">';
echo '</div>';
starttable();
echo $picture;
endtable();
echo $votes;
echo '<div class="fb-comments" data-href="allvip.us/cpg/test/displayimage.php?pid=$pid" data-numposts="3" data-colorscheme="dark">';
echo '</div>';
$picinfo = $superCage->cookie->keyExists('picinfo') ? $superCage->cookie->getAlpha('picinfo') : ($CONFIG['display_pic_info'] ? 'block' : 'none');
echo $LINEBREAK . '<div id="picinfo" style="display: '.$picinfo.';">' . $LINEBREAK;
starttable();
echo $pic_info;
endtable();
echo '</div>' . $LINEBREAK;
echo '<a name="comments_top"></a>';
echo '<div id="comments">' . $LINEBREAK;
echo $comments;
echo '</div>' . $LINEBREAK;
echo '</div>';
}
/******************************************************************************
** Section <<<theme_display_image>>> - END
******************************************************************************/
-
Replace
echo '<div class="fb-comments" data-href="allvip.us/cpg/test/displayimage.php?pid=$pid" data-numposts="3" data-colorscheme="dark">';
with
echo '<div class="fb-comments" data-href="allvip.us/cpg/test/displayimage.php?pid='.$pid.'" data-numposts="3" data-colorscheme="dark">';
-
works fine.
Thanks.