Previous Thread
Next Thread
Print Thread
Rate Thread
#284384 03/21/2005 5:08 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
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
Attachments
126478-photopal1.4.zip (0 Bytes, 89 downloads)

Sponsored Links
sf49rminer #284385 03/21/2005 5:31 PM
Joined: Mar 2003
Posts: 159
Member
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

vajraman #284386 03/21/2005 9:32 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
above the pp_is_image function add this

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

sf49rminer #284387 03/21/2005 9:50 PM
Joined: Mar 2003
Posts: 159
Member
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.

sf49rminer #284388 03/21/2005 11:11 PM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Thanks for updating this Chuck - I needed the fix you posted as well


- Allen wavey
- What Drives You?
Sponsored Links
SurfMinister #284389 03/22/2005 12:36 AM
Joined: Mar 2003
Posts: 159
Member
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.

vajraman #284390 03/22/2005 2:36 AM
Joined: Jul 2001
Posts: 808
Coder
Coder
Joined: Jul 2001
Posts: 808
Thank you for the update.

landyphil #284391 03/22/2005 5:04 AM
Joined: Jul 2001
Posts: 808
Coder
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.
Attachments
126498-custombox2pal.php.txt (0 Bytes, 237 downloads)

landyphil #284392 03/22/2005 12:52 PM
Joined: Mar 2003
Posts: 159
Member
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

vajraman #284393 03/22/2005 1:34 PM
Joined: Oct 2003
Posts: 2,305
Old Hand
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
234234 #284394 03/29/2005 1:49 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Thanks Chuck!

Daine #284395 04/25/2005 6:11 PM
Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
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!

luan #284396 05/27/2005 7:12 AM
Joined: Nov 2001
Posts: 134
Journeyman
Journeyman
Offline
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?

statusblue #284397 05/27/2005 7:14 AM
Joined: Nov 2001
Posts: 134
Journeyman
Journeyman
Offline
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);

statusblue #284398 05/27/2005 8:24 PM
Joined: Apr 2003
Posts: 359
Enthusiast
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

statusblue #284399 05/29/2005 12:08 PM
Joined: Nov 2001
Posts: 134
Journeyman
Journeyman
Offline
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?

statusblue #284400 05/29/2005 6:01 PM
Joined: Oct 2003
Posts: 2,305
Old Hand
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?

234234 #284401 06/04/2005 1:55 AM
Joined: Nov 2001
Posts: 134
Journeyman
Journeyman
Offline
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" />";

statusblue #284402 06/04/2005 11:55 AM
Joined: Oct 2003
Posts: 2,305
Old Hand
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

234234 #284403 06/04/2005 12:05 PM
Joined: Nov 2001
Posts: 134
Journeyman
Journeyman
Offline
Joined: Nov 2001
Posts: 134
SQL Error.. see next post

statusblue #284404 06/04/2005 12:15 PM
Joined: Nov 2001
Posts: 134
Journeyman
Journeyman
Offline
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

statusblue #284405 06/04/2005 4:36 PM
Joined: Nov 2001
Posts: 134
Journeyman
Journeyman
Offline
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...

statusblue #284406 06/04/2005 5:18 PM
Joined: Oct 2003
Posts: 2,305
Old Hand
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

234234 #284407 06/04/2005 5:25 PM
Joined: Nov 2001
Posts: 134
Journeyman
Journeyman
Offline
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

Joined: Apr 2003
Posts: 359
Enthusiast
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

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

statusblue #284410 06/04/2006 11:05 AM
Joined: Jul 2002
Posts: 79
Power User
Power User
Offline
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


Link Copied to Clipboard
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
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)