I figured what was wrong. I don't know if how I got it working matches the original code or not but it works.
Here's what I needed to do.
in pppanel.php, find:
Code:
while ( $thisphoto = $DB_site->fetch_array($myphotos) ) {
under that, put:
Code:
$theext = get_ext( $thisphoto['bigimage'] );
next, find:
Code:
if ( $medsize > 0 ) $imgurl = "{$data_dir}/$ppcat/{$user}{$photo_name}-med{$theext}";
else $imgurl = "{$data_dir}/$ppcat/{$user}{$photo}";
$mthumb = "<img border=\"0\" src=\"{$data_dir}/{$ppcat}/thumbs/$photo\" alt=\"\" />";
and replace with:
To make clickable thumbnails in posts
Code:
if ( $medsize > 0 ) $imgurl = "[*url={$data_dir}/$ppcat/{$user}{$photo}][img]{$data_dir}/$ppcat/{$user}{$photo_name}-thumb{$theext}[/img][/url*]";
else $imgurl = "
";
$mthumb = "<img border=\"1\" src=\"{$data_dir}/{$ppcat}/$user$photo_name-thumb$theext\" alt=\"\" />";
(Removing the * in the [*url][/url*]
And need to change the template,
Find:
Code:
opener.document.vbform.message.value = BodyVal + '[img]' + UBBCode + '[/img]';
replace with:
Code:
opener.document.vbform.message.value = BodyVal + UBBCode;
Or if you want to have space between the thumbs, replace with this:
Code:
opener.document.vbform.message.value = BodyVal + UBBCode + ' ';
or:
To place medium images in the post or full sized if medium not available
Code:
if ( $medsize > 0 ) $imgurl = "[img]{$data_dir}/$ppcat/{$user}{$photo_name}-med{$theext}[/img]";
else $imgurl = "
";
$mthumb = "<img border=\"1\" src=\"{$data_dir}/{$ppcat}/$user$photo_name-thumb$theext\" alt=\"\" />";
If your DB's are separate but have the same password, change the
FROM pp_photos in the query.
Code:
$query = "SELECT id,cat,title,bigimage,medsize FROM pp_photos WHERE userid ='{$user}' AND storecat=0 ORDER BY date DESC LIMIT $page,16";
to
FROM databasename.photos so it looks sort of like this:
Code:
$query = "SELECT id,cat,title,bigimage,medsize FROM databasename.photos WHERE userid ='{$user}' AND storecat=0 ORDER BY date DESC LIMIT $page,16";
(Changing the databasename to match what your PP database name is)
Side note.. I had to include the [*img][*/img] tags in the code to get them to input if you get two sets, remove the ones inthe aove codes.