UBB.Dev
Posted By: Mudpuppy IIP 5.3 and Photopost - 01/25/2003 11:20 PM
I can't seem to find a thread which addresses my specific question, so I'm starting a new one. Sorry if this is redundant.

I'm using Threads 6.2.1, IIP 5.3, and Photopost 3.2.1. I'd like to put a PAL box on my Entrance page which displays one random photo (thumbnail) from the ones available in my PP gallery. Perhaps it could be captioned with something like, "Visit the Gallery", etc.

I've found threads on this board with instructions to integrate PP with other, earlier versions of IIP and earlier versions of Threads. I couldn't get those instructions to work with my configuration. Are there updated instructions posted anywhere, or could I politely request them?!
Posted By: omegatron Re: IIP 5.3 and Photopost - 01/26/2003 3:28 AM
Okay here you go I wrote up directions for you. Click the attachment above.

MAKE SURE TO FILL IN THE CONFIG OPTIONS IN THE CODE I POSTED FOR YOU WITH YOUR SPECFIC DATABASE INFORMATION.

Attached File
66244-PhotopostPALBOX.txt  (58 downloads)
Posted By: Mudpuppy Re: IIP 5.3 and Photopost - 01/26/2003 4:57 AM
Thanks so much -- it was easy to do and looks great!

My goldfish and I bow at your feet
Posted By: omegatron Re: IIP 5.3 and Photopost - 01/26/2003 5:04 AM
Don't meantion it. Glad that I could help!
Posted By: JustDave Re: IIP 5.3 and Photopost - 01/26/2003 7:53 AM
Thanks for lending a hand Chuck Much appreciated!
Posted By: SWFan_dup1 Re: IIP 5.3 and Photopost - 01/26/2003 8:21 AM
I've missed something. I tried the above and its pulling the title and contributor info into the custom pal, but not the picture. If you go to my IIP page at http://www.coreplanets.com and look to the far right column, last box in that column you'll see what I'm talking about. No errors appear to be generated, and if its pulling the title and contributor then it should pull the pic by my way of thinking, but its not.
Posted By: Mudpuppy Re: IIP 5.3 and Photopost - 01/26/2003 11:00 AM
I had the same problem, and then noticed that the path to the thumbnail wasn't correct in my custompal file. I'd listed the path as www.mydomain.com/photopost, but the correct path to my thumbs is www.mydomain.com/photopost/data. It's set in the section that comes after

// Start forming the Thumbnail Name

Don't know if that will help you, but it fixed my issue.
Posted By: omegatron Re: IIP 5.3 and Photopost - 01/26/2003 2:06 PM
Yes one must make sure all path's are filled out.
Posted By: gblue Re: IIP 5.3 and Photopost - 01/26/2003 5:59 PM
can we specify a image size, I would like to display a larger image.

Posted By: omegatron Re: IIP 5.3 and Photopost - 01/26/2003 6:12 PM
Gill,

That exact size is being controlled by you not this hack.


All this does is pull the Thumbnail. You need to go into your Photopost admin panel and under Options set the thumbnail size to what you want and then under scan database select redo thumbnails. Your thumbnails will be updated to the size ratio you specified.
Posted By: gblue Re: IIP 5.3 and Photopost - 01/26/2003 6:22 PM
Thanks I will take a look at that, I was displaying a image on my front page with a size of eight= "320 "width= "420" but It was just looking at a image I uploaded everyday as a random photo. I dont know if I want to change the size of the thumbs to 320 x 420 I will play with it and see what happens. Thanks for your imput.



Posted By: omegatron Re: IIP 5.3 and Photopost - 01/26/2003 6:46 PM
This as you know is in a PAL box so you do not want the image to large. Now the only exeption might be to set thumbnails to like 200-250px is placed in the center column.
Posted By: gblue Re: IIP 5.3 and Photopost - 01/26/2003 6:57 PM
Yeah, I had it in the center colum, I increased the thumb size to 200 thats a bit better, as least I dont manually have to upload them each day


Posted By: omegatron Re: IIP 5.3 and Photopost - 01/26/2003 7:03 PM
Nope only drawback is of course your thumbnails are a bit bigger.
Posted By: SWFan_dup1 Re: IIP 5.3 and Photopost - 01/26/2003 7:08 PM
[]I had the same problem, and then noticed that the path to the thumbnail wasn't correct in my custompal file. I'd listed the path as www.mydomain.com/photopost, but the correct path to my thumbs is www.mydomain.com/photopost/data. It's set in the section that comes after

// Start forming the Thumbnail Name

Don't know if that will help you, but it fixed my issue. [/]

coy7, thank you so much! That is exactly the problem I had, I was missing "data" off the end of the URL.
Posted By: omegatron Re: IIP 5.3 and Photopost - 01/26/2003 7:12 PM
Number one problem from the get go is not setting paths correctly

I am glad to see that both of you solved your problem without getting too much of a migraine.
Posted By: smilesforu Re: IIP 5.3 and Photopost - 02/08/2003 2:00 PM
How do I define which catagory to pull from. I only want it to pull from catagory 2 but it pulls from other areas I don't want featured in the palbox


I can hard code the catagory but it still pulls the other images, then I get the red x because the address is wrong.

//Define some variables
$photo_id = $query_data[id];
$theid = $query_data[userid];
$theuser = $query_data[user];
$thecat = $query_data[cat];
$title = $query_data[title];
$bigimage = $query_data[bigimage];

got me stumped again... need to fix where it queries for picture.

http://www.steelheader.net/photopost/index.php
but only want the steelhead pictures to be shown in the box. (catagory 2)

Posted By: omegatron Re: IIP 5.3 and Photopost - 02/08/2003 4:17 PM
Smilesforu,

Your thinking too much. It's alot easier than your making it. You just need to modify the query with an extra line.

FIND:

WHERE bigimage!=''

ADD BELOW:

AND cat='502'

502 is just an example of cat numbers. You would replace this number with what you category is. This will only pull the random images from that category.
Posted By: smilesforu Re: IIP 5.3 and Photopost - 02/08/2003 6:03 PM
Thanks... my limited programming skills are showing. Worked great.

Would you add if you wanted more catagories to draw from?

AND cat='502' or '503'
Posted By: omegatron Re: IIP 5.3 and Photopost - 02/08/2003 7:00 PM
WELL I am no expert. I just muddle through all this stuff but the following works although there might be a better way of doing it.

AND cat='502'
OR cat='503'


There is another way to do this as well. The Photopost Integration hack does it by PHP not through MYSQL query statements. Place this code if you like above the query

// leave blank for no customization, otherwise list cats you only want images to appear from
$forcats = "502,503";

if ($forcats) {
$forcats = "AND cat = '$forcats'";
}

THEN right before the ORDER BY statement stick this

$forcats

That should do it as well.
Posted By: JoshPet Re: IIP 5.3 and Photopost - 02/08/2003 8:21 PM
Omegatron.... didn't think about multiple Categories when I tweaked that for you.

If that doesn't work for multiple categories, you might need to tweak it a bit more like this:

Code
// leave blank for no customization, otherwise list cats you only want images to appear from <br />$forcats = "502,503"; <br /><br />if ($forcats) { <br />$forcats = "AND cat in ($forcats)"; <br />} <br /><br />THEN right before the ORDER BY statement stick this <br /><br />$forcats <br /><br />


Then it should break apart the category numbers by the commas and search for them. <fingers crossed - untested>
© UBB.Developers