UBB.Dev
Posted By: omegatron PhotoPal 1.4 - 03/22/2005 12:08 AM
Okay this is an upgrade to the PhotoPal so that it is compatible to run with Photopost 5.0 file structure

You must be running Photopost 5.0 or above

Attached File
126478-photopal1.4.zip  (89 downloads)
Posted By: BWilliams_dup1 Re: PhotoPal 1.4 - 03/22/2005 12:31 AM
I was just making a post asking about an update


I have everything set, well, at least I think I do and am getting this error:


Fatal error: Call to undefined function: pp_get_ext() in /home/socaps/public_html/ubbthreads/pals/custombox2pal.php on line 11
Posted By: omegatron Re: PhotoPal 1.4 - 03/22/2005 4:32 AM
above the pp_is_image function add this

function pp_get_ext( $filename ) {
return substr($filename, strrpos($filename,"."));
}
Posted By: BWilliams_dup1 Re: PhotoPal 1.4 - 03/22/2005 4:50 AM
ok, did that and now it's showing up, but not showing the images. I can however click on the broken image and it does link to the medium image.
Posted By: AllenAyres Re: PhotoPal 1.4 - 03/22/2005 6:11 AM
Thanks for updating this Chuck - I needed the fix you posted as well
Posted By: BWilliams_dup1 Re: PhotoPal 1.4 - 03/22/2005 7:36 AM
[]AllenAyres said:
Thanks for updating this Chuck - I needed the fix you posted as well [/]
OK, what am I doing wrong here? When I add the fix above it does not show the images and also make the calendar go crazy ???

I guess I will delete the files and try from scratch again.
Posted By: Zarzal Re: PhotoPal 1.4 - 03/22/2005 9:36 AM
Thank you for the update.
Posted By: Zarzal Re: PhotoPal 1.4 - 03/22/2005 12:04 PM
I know, this pal is sometimes a little bit tricky. I attach my working version here. Always remeber to setup your inc file properly. In my script you need to set your path and your threads DB name at the end.

Attached File
126498-custombox2pal.php.txt  (237 downloads)
Posted By: BWilliams_dup1 Re: PhotoPal 1.4 - 03/22/2005 7:52 PM
thanks, I figured it out. I was not setting the data directory path correct.

Now, I have a problem with the calendar pal, which is 2 boxes bellow and am getting this error:

Code
Script: /home/socaps/public_html/ubbthreads/pals/calendarpal.php <br />Line#: 70 <br />SQL Error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 3 <br />SQL Error #: 1064 <br />Query: SELECT Bo_Keyword FROM w3t_Boards WHERE () <br /> <br />Please use your back button to return to the previous page.


Whats weird is that if I turn the Photopal off it works.

Idea's ???


www.socaps.com
Posted By: scroungr Re: PhotoPal 1.4 - 03/22/2005 8:34 PM
sounds like a variable in the photopal is conflicting with a variable in the calendar pal.. try this.. add the photopal to your sidebar and just the photopal and go to the calendar itself.. see if same error
Posted By: JoshPet Re: PhotoPal 1.4 - 03/29/2005 8:49 AM
Thanks Chuck!
Posted By: donJulio Re: PhotoPal 1.4 - 04/26/2005 1:11 AM
I have added this to the footer of my site and changed it around a little:
http://www.laondalatina.com

What I want to know is what change would I have to make so it doesn't pull any photos from users member albums, private or not.

Thanks!
Posted By: MattUK Re: PhotoPal 1.4 - 05/27/2005 2:12 PM
As I was having problems with 1.3, ive upgraded to 5.1 and this version, but I still get the same error..

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in g:\webs\www.bm3w.co.uk\public_html\ubbthreads\pals\custombox1pal.php on line 78

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in g:\webs\www.bm3w.co.uk\public_html\ubbthreads\pals\custombox1pal.php on line 103

Anyone have any idea why?
Posted By: MattUK Re: PhotoPal 1.4 - 05/27/2005 2:14 PM
Those lines are:

while ( list($pid, $puser, $puserid, $pcat, $ptitle, $photo, $pviews) = mysql_fetch_array($result)) {

and

mysql_free_result($result);
Posted By: smoknz28 Re: PhotoPal 1.4 - 05/28/2005 3:24 AM
Featured Photos

I'm not getting any pictures displayed on the sidebar. It just shows the title bar on the side that says Featured Photos.

Mmm....any thoughts on this?

You can view this at: www.f-bodyhideout.com/ubbthreads
Posted By: MattUK Re: PhotoPal 1.4 - 05/29/2005 7:08 PM
[]MattUK said:
As I was having problems with 1.3, ive upgraded to 5.1 and this version, but I still get the same error..

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in g:\webs\www.bm3w.co.uk\public_html\ubbthreads\pals\custombox1pal.php on line 78

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in g:\webs\www.bm3w.co.uk\public_html\ubbthreads\pals\custombox1pal.php on line 103

Anyone have any idea why? [/]

Anyone?
Posted By: scroungr Re: PhotoPal 1.4 - 05/30/2005 1:01 AM
[]MattUK said:
Those lines are:

while ( list($pid, $puser, $puserid, $pcat, $ptitle, $photo, $pviews) = mysql_fetch_array($result)) {

and

mysql_free_result($result); [/]

thats not the line in question.. those only respond to the query.. whats the query above those lines?
Posted By: MattUK Re: PhotoPal 1.4 - 06/04/2005 8:55 AM
//
// Featured Photos Code
// Follow down to End Feature Photos Code
//

// which type of images do you want to show
$q_switch = "random";

switch ($q_switch) {
case "most_view":
$query = "SELECT p.id,p.user,p.userid,p.cat,p.title,p.bigimage,p.views
FROM {$pp_db_prefix}photos p
LEFT JOIN {$pp_db_prefix}categories c ON c.id=p.cat
WHERE c.password = ''
ORDER BY c.views DESC";
break;
case "lastest":
$query = "SELECT p.id,p.user,p.userid,p.cat,p.title,p.bigimage,p.views
FROM {$pp_db_prefix}photos p
LEFT JOIN {$pp_db_prefix}categories c ON c.id=p.cat
WHERE c.password = ''
ORDER BY date DESC";
break;
case "random":
$query = "SELECT p.id,p.user,p.userid,p.cat,p.title,p.bigimage,p.views
FROM {$pp_db_prefix}photos p
LEFT JOIN {$pp_db_prefix}categories c ON c.id=p.cat
WHERE c.password = ''
ORDER BY RAND()";
break;
}
$result = mysql_query($query);

$counted = 0; $featured = "";

while ( list($pid, $puser, $puserid, $pcat, $ptitle, $photo, $pviews) = mysql_fetch_array($result)) {
if ( pp_is_image($photo) ) {
$photolen = strlen($photo);
$theext = pp_get_ext($photo);
$photo_name = str_replace( $theext, "", $photo );

$temp_user = $line['userid'];
$thumbtag = "{$full_path}{$pcat}/thumbs/{$photo}";
$mthumb = "<img border="0" src="{$data_dir}{$pcat}/thumbs/{$photo}" alt="$thumbtag" />";
Posted By: scroungr Re: PhotoPal 1.4 - 06/04/2005 6:55 PM
so then this is the actual query that is giving you problems

$query = "SELECT p.id,p.user,p.userid,p.cat,p.title,p.bigimage,p.views
FROM {$pp_db_prefix}photos p
LEFT JOIN {$pp_db_prefix}categories c ON c.id=p.cat
WHERE c.password = ''
ORDER BY RAND()";
break;
}

so in a sql window try running


SELECT p.id,p.user,p.userid,p.cat,p.title,p.bigimage,p.views
FROM pp_photos p
LEFT JOIN pp_categories c ON c.id=p.cat
WHERE c.password = ''
ORDER BY RAND()";
break;
}

pp_ is whatever YOUR table PREFIX is
Posted By: MattUK Re: PhotoPal 1.4 - 06/04/2005 7:05 PM
SQL Error.. see next post
Posted By: MattUK Re: PhotoPal 1.4 - 06/04/2005 7:15 PM
Ok I found it.. I get an SQL error..

"You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ";break;}' at line 1
Posted By: MattUK Re: PhotoPal 1.4 - 06/04/2005 11:36 PM
SELECT p.id,p.user,p.userid,p.cat,p.title,p.bigimage,p.views
FROM pp_photos p
LEFT JOIN pp_categories c ON c.id=p.cat
WHERE c.password = ''
ORDER BY RAND()";
break;
}

It seems to be the RAND() that is causing the problem. Also, it is not picking up the correct prefix for the database name.

If I hard code those, then we start to see something working, but rather than thumbs I get links to the pictures, but then it tries to link to Chucks website at reef.

See at www.bm3w.co.uk

So now I have no idea why its trying to goto Chucks site, and is not displaying the thumbs...
Posted By: scroungr Re: PhotoPal 1.4 - 06/05/2005 12:18 AM
BTW you did change these settings in the photopost.inc.php
right?

$url_path = "http://www.reeftalk.com/ubbthreads/gallery"; //URL of your photo album, where the index.pl is (with / at end)
$data_dir = "URL/TO/PHOTOPOST/DATA/DIR/"; //URL of your photo dir where those jpeg stored (with / at end)


they should be pointed to YOU
Posted By: MattUK Re: PhotoPal 1.4 - 06/05/2005 12:25 AM
Er...

Yeah.. you know.. er...

<blush>

I just fixed that and now the links work

So.. all that is left now.. is that i dont have thumb pics... just links... no doubt ive cocked up elsewhere again
Posted By: smoknz28 Re: PhotoPal 1.4 - 06/05/2005 12:59 AM
[]smoknz28 said:
Featured Photos

I'm not getting any pictures displayed on the sidebar. It just shows the title bar on the side that says Featured Photos.

Mmm....any thoughts on this?

You can view this at: www.f-bodyhideout.com/ubbthreads [/]

Any ideas on the above quote?

Thanks guys,
Gonzo
Posted By: MattUK Re: PhotoPal 1.4 - 06/05/2005 9:36 AM
All is working ok now! Just need to work out how to reorg the layout!
Posted By: StanCA Re: PhotoPal 1.4 - 06/04/2006 6:05 PM
O, I will try again...

IS there a way to have random photos, from photopost, show up in the top or bottom of a forum??


Thanks

Stan
© UBB.Developers