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
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
above the pp_is_image function add this
function pp_get_ext( $filename ) {
return substr($filename, strrpos($filename,"."));
}
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.
Thanks for updating this Chuck - I needed the fix you posted as well
[]
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.
Thank you for the update.
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.
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:
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
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
I have added this to the footer of my site and changed it around a little:
http://www.laondalatina.comWhat 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!
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?
Those lines are:
while ( list($pid, $puser, $puserid, $pcat, $ptitle, $photo, $pviews) = mysql_fetch_array($result)) {
and
mysql_free_result($result);
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
[]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?
[]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?
//
// 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" />";
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
SQL Error.. see next post
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
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.ukSo now I have no idea why its trying to goto Chucks site, and is not displaying the thumbs...
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
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
[]
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
All is working ok now! Just need to work out how to reorg the layout!
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