Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Hacks and Modifications

Post Reply
 
Thread Tools
  #1  
Old 12-29-2008, 12:54 AM
elektrik Offline
forum loafer
 
Join Date: Dec 2008
Posts: 10
Question 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
Reply With Quote
  #2  
Old 12-29-2008, 01:53 PM
fredxeric's Avatar
fredxeric Offline
pixelpost guru
 
Join Date: Sep 2006
Location: Montréal, Québec, Canada
Posts: 407
Send a message via AIM to fredxeric Send a message via MSN to fredxeric
Here is the code you wanted

download: http://www.pixelxdesign.com/download...bs_linking.zip
Reply With Quote
  #3  
Old 01-02-2009, 06:04 PM
elektrik Offline
forum loafer
 
Join Date: Dec 2008
Posts: 10
Thumbs up

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
Reply With Quote
  #4  
Old 03-28-2009, 05:37 AM
elektrik Offline
forum loafer
 
Join Date: Dec 2008
Posts: 10
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!
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 01:56 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs