Photo Gallery

I have been trying to create a second (eventually third) shared photos gallery. Though, I seem to be having trouble. So far, I have traced all the files that seem to interact with the original gallery (viewPhoto.php, browsePhoto.php, uploadSharedPhoto.php, BxDolSharedMedia.php, BxDolSharedMediaView.php, and BxDolPageView.php). I created a copy and added (for trial purposes) "2" at the end of each file (ie; viewPhoto2.php). I've created a second table for shared media as well as a second folder to store the files. For some reason, I cannot get the second album to load correctly. All I get is a white page. So I assume I am doing something wrong. My best guess is I have missed a file, or I have missed a line of code. I have poured over the codes for all the pages listed above. I can't seem to find what I'm doing wrong. I am not editing the main coding at all. I am only changing the table name, the folder name, and adding "2" as needed to the files. Can anyone offer any insight?

I'm working with a straight copy (no mods) of 6.1.6 - any help will be greatly welcomed and appriciated. Even some pointers in the right direction would be helpful.

Quote · 20 Dec 2009

I got everything to work now, but when you upload a photo, it gets uploaded to the main dir instead of the newly created folder for the files. So when you click the thumb to bring up the file (the thumb shows when viewing in browse) it says "Requested File Doesn't Exist". Again, the thumb does appear while browsing photos.

Quote · 20 Dec 2009

After alot of work, and trial and error, I discovered my problem is with sharing.inc.php - I am unable to get a copy working (sharing2.inc.php). I have copied the exact doc and it won't work. Only the original sharing will work. Any idea why?

Quote · 20 Dec 2009

did you do anything with inc/header.inc and media paths?

I have video tutorials to help you mrpowless.com
Quote · 21 Dec 2009

did you do anything with inc/header.inc and media paths?

I haven't edited inc/header.inc ... as far as media paths, I've only edited the paths in the files I mentioned previously (viewPhoto.php, browsePhoto.php, uploadSharedPhoto.php, BxDolSharedMedia.php, BxDolSharedMediaView.php, and BxDolPageView.php).

Quote · 21 Dec 2009

thats your hint:

$dir['gallery']            = "{$dir['root']}media/images/gallery/";

I have video tutorials to help you mrpowless.com
Quote · 21 Dec 2009

I just looked in header.inc and now see what you mean. I've added the neccessary dirs to the list and that part now works correctly. The files are now being uploaded to the correct file. Now I just need to get viewPhoto to work correctly. I keep getting "Requested File Doesn't Exist" and I'm almost positive it's an issue with sharing.inc.php.

Quote · 21 Dec 2009

You need to go through the file (all of them actually) and catch any reference in your new files that you have copied to the old file names.  For instance, do you want viewphoto.php or viewphoto2.php?  If you do, then you need to make sure you have the appropriate url's on everything and the .htaccess is correct if it has reference.

Quote · 21 Dec 2009

I have. I've gotten everything working except for viewPhoto2.php ... it's calling sharing.inc.php. Specifically;

$iFile = 0;
if (isset($_GET['fileUri']))
$iFile = getFileIdByUri($_GET['fileUri'], 'photo');
elseif (isset($_GET['fileID']))
$iFile = (int)$_GET['fileID'];

So I went into sharing.inc.php and added;

function getFileIdByUri2($sFileName, $sType = '') {
$sFileName =  process_db_input($sFileName);

switch ($sType) {
case 'photo':
$sqlQuery = "SELECT `medID` FROM `sharePhotoFiles2` WHERE `medUri`='$sFileName'";
break;
case 'music':
$sqlQuery = "SELECT `ID` FROM `RayMusicFiles` WHERE `Uri`='$sFileName'";
break;
case 'video':
$sqlQuery = "SELECT `ID` FROM `RayMovieFiles` WHERE `Uri`='$sFileName'";
break;
default: break;   
}

return (int)db_value($sqlQuery);
}

function getFileUrl2($iFileId, $sFileUri, $sType, $bPermalink) {
if ($bPermalink)
$sLink = $sType.'/new/'.$sFileUri;
else
$sLink = 'view'.ucfirst($sType).'.php?fileID='.$iFileId;

return $GLOBALS['site']['url'].$sLink;
}

Then I went back to viewPhoto2.php and changed it t;

$iFile = 0;
if (isset($_GET['fileUri']))
$iFile = getFileIdByUri2($_GET['fileUri'], 'photo');
elseif (isset($_GET['fileID']))
$iFile = (int)$_GET['fileID'];

Any idea what I did wrong?

Quote · 21 Dec 2009

I fixed it! Finally! There was a call "getFileUrl" in UploadShareMedia.php that I didn't see. That was the root of my problem. Once I corrected that, everything worked fine! Thank you everyone for all the help you've given me!

Quote · 21 Dec 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.