Previous Thread
Next Thread
Print Thread
Rate Thread
PhotoPal 1.4 #284384 03/21/2005 4:08 PM
Joined: Apr 2001
Posts: 3,266
omegatron Offline OP
Member
OP Offline
Member
Joined: Apr 2001
Posts: 3,266
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 Files
126478-photopal1.4.zip (0 Bytes, 89 downloads)
Sponsored Links
Re: PhotoPal 1.4 [Re: sf49rminer] #284385 03/21/2005 4:31 PM
Joined: Mar 2003
Posts: 159
BWilliams_dup1 Offline
Member
Offline
Member
Joined: Mar 2003
Posts: 159
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

Re: PhotoPal 1.4 [Re: vajraman] #284386 03/21/2005 8:32 PM
Joined: Apr 2001
Posts: 3,266
omegatron Offline OP
Member
OP Offline
Member
Joined: Apr 2001
Posts: 3,266
above the pp_is_image function add this

function pp_get_ext( $filename ) {
return substr($filename, strrpos($filename,"."));
}

Re: PhotoPal 1.4 [Re: sf49rminer] #284387 03/21/2005 8:50 PM
Joined: Mar 2003
Posts: 159
BWilliams_dup1 Offline
Member
Offline
Member
Joined: Mar 2003
Posts: 159
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.

Re: PhotoPal 1.4 [Re: sf49rminer] #284388 03/21/2005 10:11 PM
Joined: Mar 2000
Posts: 21,079
AllenAyres Offline
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Thanks for updating this Chuck - I needed the fix you posted as well


- Allen wavey
- What Drives You?
Sponsored Links
Re: PhotoPal 1.4 [Re: SurfMinister] #284389 03/21/2005 11:36 PM
Joined: Mar 2003
Posts: 159
BWilliams_dup1 Offline
Member
Offline
Member
Joined: Mar 2003
Posts: 159
[]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.

Re: PhotoPal 1.4 [Re: vajraman] #284390 03/22/2005 1:36 AM
Joined: Jul 2001
Posts: 808
Zarzal Offline
Coder
Offline
Coder
Joined: Jul 2001
Posts: 808
Thank you for the update.

Re: PhotoPal 1.4 [Re: landyphil] #284391 03/22/2005 4:04 AM
Joined: Jul 2001
Posts: 808
Zarzal Offline
Coder
Offline
Coder
Joined: Jul 2001
Posts: 808
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 Files
126498-custombox2pal.php.txt (0 Bytes, 237 downloads)
Re: PhotoPal 1.4 [Re: landyphil] #284392 03/22/2005 11:52 AM
Joined: Mar 2003
Posts: 159
BWilliams_dup1 Offline
Member
Offline
Member
Joined: Mar 2003
Posts: 159
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

Re: PhotoPal 1.4 [Re: vajraman] #284393 03/22/2005 12:34 PM
Joined: Oct 2003
Posts: 2,305
scroungr Offline
Old Hand
Offline
Old Hand
Joined: Oct 2003
Posts: 2,305
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

Sponsored Links
Re: PhotoPal 1.4 [Re: 234234] #284394 03/29/2005 12:49 AM
Joined: Nov 2001
Posts: 10,369
JoshPet Offline
I type Like navaho
Offline
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Thanks Chuck!

Re: PhotoPal 1.4 [Re: Daine] #284395 04/25/2005 5:11 PM
Joined: Jun 2002
Posts: 670
donJulio Offline
Code Monkey
Offline
Code Monkey
Joined: Jun 2002
Posts: 670
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!

Re: PhotoPal 1.4 [Re: luan] #284396 05/27/2005 6:12 AM
Joined: Nov 2001
Posts: 134
MattUK Offline
Journeyman
Offline
Journeyman
Joined: Nov 2001
Posts: 134
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?

Re: PhotoPal 1.4 [Re: statusblue] #284397 05/27/2005 6:14 AM
Joined: Nov 2001
Posts: 134
MattUK Offline
Journeyman
Offline
Journeyman
Joined: Nov 2001
Posts: 134
Those lines are:

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

and

mysql_free_result($result);

Re: PhotoPal 1.4 [Re: statusblue] #284398 05/27/2005 7:24 PM
Joined: Apr 2003
Posts: 359
smoknz28 Offline
Enthusiast
Offline
Enthusiast
Joined: Apr 2003
Posts: 359
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

Re: PhotoPal 1.4 [Re: statusblue] #284399 05/29/2005 11:08 AM
Joined: Nov 2001
Posts: 134
MattUK Offline
Journeyman
Offline
Journeyman
Joined: Nov 2001
Posts: 134
[]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?

Re: PhotoPal 1.4 [Re: statusblue] #284400 05/29/2005 5:01 PM
Joined: Oct 2003
Posts: 2,305
scroungr Offline
Old Hand
Offline
Old Hand
Joined: Oct 2003
Posts: 2,305
[]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?

Re: PhotoPal 1.4 [Re: 234234] #284401 06/04/2005 12:55 AM
Joined: Nov 2001
Posts: 134
MattUK Offline
Journeyman
Offline
Journeyman
Joined: Nov 2001
Posts: 134
//
// 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" />";

Re: PhotoPal 1.4 [Re: statusblue] #284402 06/04/2005 10:55 AM
Joined: Oct 2003
Posts: 2,305
scroungr Offline
Old Hand
Offline
Old Hand
Joined: Oct 2003
Posts: 2,305
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

Re: PhotoPal 1.4 [Re: 234234] #284403 06/04/2005 11:05 AM
Joined: Nov 2001
Posts: 134
MattUK Offline
Journeyman
Offline
Journeyman
Joined: Nov 2001
Posts: 134
SQL Error.. see next post

Re: PhotoPal 1.4 [Re: statusblue] #284404 06/04/2005 11:15 AM
Joined: Nov 2001
Posts: 134
MattUK Offline
Journeyman
Offline
Journeyman
Joined: Nov 2001
Posts: 134
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

Re: PhotoPal 1.4 [Re: statusblue] #284405 06/04/2005 3:36 PM
Joined: Nov 2001
Posts: 134
MattUK Offline
Journeyman
Offline
Journeyman
Joined: Nov 2001
Posts: 134
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...

Re: PhotoPal 1.4 [Re: statusblue] #284406 06/04/2005 4:18 PM
Joined: Oct 2003
Posts: 2,305
scroungr Offline
Old Hand
Offline
Old Hand
Joined: Oct 2003
Posts: 2,305
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

Re: PhotoPal 1.4 [Re: 234234] #284407 06/04/2005 4:25 PM
Joined: Nov 2001
Posts: 134
MattUK Offline
Journeyman
Offline
Journeyman
Joined: Nov 2001
Posts: 134
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

Re: PhotoPal 1.4 [Re: General_Failure] #284408 06/04/2005 4:59 PM
Joined: Apr 2003
Posts: 359
smoknz28 Offline
Enthusiast
Offline
Enthusiast
Joined: Apr 2003
Posts: 359
[]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

Re: PhotoPal 1.4 [Re: statusblue] #284409 06/05/2005 1:36 AM
Joined: Nov 2001
Posts: 134
MattUK Offline
Journeyman
Offline
Journeyman
Joined: Nov 2001
Posts: 134
All is working ok now! Just need to work out how to reorg the layout!

Re: PhotoPal 1.4 [Re: statusblue] #284410 06/04/2006 10:05 AM
Joined: Jul 2002
Posts: 79
StanCA Offline
Power User
Offline
Power User
Joined: Jul 2002
Posts: 79
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


Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
JAISP
JAISP
PA
Posts: 448
Joined: February 2008
Forum Statistics
Forums63
Topics37,493
Posts293,671
Members13,829
Most Online5,166
Sep 15th, 2019
Top Posters(All Time)
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,787
Greg Hard 4,625
Top Posters(30 Days)
isaac 4
DCPhil 2
Gizmo 1
Today's Statistics
Currently Online 1003
Topics Created 0
Posts Made 0
Users Online 1
Birthdays
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2019 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Snapshot build 20191111.dev)
Responsive Width:

PHP: 5.4.45 Page Time: 0.061s Queries: 17 (0.017s) Memory: 3.4193 MB (Peak: 3.7498 MB) Data Comp: Zlib Server Time: 2019-11-15 22:35:36 UTC
Valid HTML 5 and Valid CSS