Pixelpost Forum

Pixelpost Forum (http://www.pixelpost.org/forum/index.php)
-   Hacks and Modifications (http://www.pixelpost.org/forum/forumdisplay.php?f=16)
-   -   Display a specific thumbnail inside an external page? (Sort of like Promote) (http://www.pixelpost.org/forum/showthread.php?t=10020)

elektrik 12-29-2008 12:54 AM

Display a specific thumbnail inside an external page? (Sort of like Promote)
 
Hi all,

I have question that's related to the great Promote addon that has been posted, but involves a distinct challenge. I'm hoping someone familiar with PHP/scripting knows how to do it.

While viewing a photo, I'd like a PP user to be able to click on a link that takes them to a specific page in my Joomla-powered site, but where I have carved out a space for the specific thumbnail of the photo they were just viewing. This is different from the Promote addon's 'random' or 'recent' feature, because I just want this one particular thumbnail.

Essentially, I need to be able to take a photo's pixelpost ID, then load a Joomla page with the Promote module that then loads that ID's thumb.

I'm sure there's a correct, technical way to explain this "passing" of variables, but I hope it's clear what I'd like to be able to do. Anybody have ideas?

Many thanks in advance,

e

fredxeric 12-29-2008 01:53 PM

Here is the code you wanted

download: http://www.pixelxdesign.com/download...bs_linking.zip

elektrik 01-02-2009 06:04 PM

Hi Fredxeric,

Sorry for the late reply (been away), but many thanks for your amazing efforts. I think this is probably 95% of what I'm looking for, but based on what you wrote, I think my original post wasn't clear enough.

Rather than always display one particular PP thumbnail in my Joomla site, I'd like to be able to change that ID based on where the PP viewer came from.

For example: a viewer browsing a photo from two weeks ago (say, ID=37) clicks on the PP link and gets taken back to my Joomla page with that thumbnail ID=37 embedded in it. But then going back to PP and seeing another photo (ID=17) and clicking that same link goes back to the same Joomla page with the thumbnail for ID=17.

I essentially want to remember the ID number of the PP photo and use that to generate the thumb. Is there a way to add that into your code?

Thank you so much already for your help!

matt

elektrik 03-28-2009 05:37 AM

So when I wrote the above reply, I was clearly not aware of how to actually use PHP variables. I've taken some time to sort out a couple details and it became clear how easy my next step was.

In this wonderful code from Fredxeric, I modified the second last line:

Code:

print "document.write('".javaconvertstr($link)."');";
to be simply:

Code:

print $link;
and in my PHP page in Joomla, I use an url with the pixelpost id renamed 'ppid' and then code in the Joomla content to read 'ppid', sanitize it and spit it back out in an url which forms the link to Fredxeric's code. It's:

Code:

<?php $ident = JRequest::getVar('ppid',0); @readfile('http://mysite.com/photoblog/external_thumbs_linking.php?id='.$ident); ?>
I hope that's clear. Thanks again, Fredxeric, for the huge help!


All times are GMT. The time now is 02:05 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.