[]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.
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:
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.
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
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
[]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
// // 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);
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; }
"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.
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)
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.