View Full Version : Changing default path for images
andy.schofield283961
11-29-2009, 04:07 PM
Hi,
I have amended the uploads and all management of photos from
"/images/" + GalleryID + "/" + Photos
to "/images/" + UserID + "/" + GalleryID + "/" + Photos.
All the admin pages work fine and now i can have multiple users creating their own galleries.
Problem is all the previews dont work, sorry very new to php and cannot find where to amend the root to include the new session variable for the UserID.
Can someone please help!
Justin Nemeth
11-30-2009, 09:16 AM
Open the mediarss.php file and on line 31 added in your UserID variable. I think that will fix it.
-justin
andy.schofield283961
11-30-2009, 02:10 PM
Thanks for that, I have made several changes but all based off your direction.
Everything appears to work now, apart from the image on the popup under manageimages.php
The popup works and functions as directed but does not show the image, the standard line is this:
<img id="rotate-image" alt="Checking" src="" />
But cannot figure out how to update this to include the images with changes I have made.
Can you please help with this.
Justin Nemeth
11-30-2009, 02:18 PM
Open the admin/common/imageinfo.php file and change line 25 to be $info = array('"user_id":"' . [UserID] . '"'); replacing [UserID] with your PHP code.
Then open admin/js/manageimages.js and on line 215, add + '/' + image.user_id after where it says image.gallery_id
Give that a try and see if it works. Essentially you are adding a new javascript variable so the image path can be set correctly.
-justin
andy.schofield283961
11-30-2009, 02:32 PM
Justin,
Your a star, worked like a dream. Looks almost back to normal now.
Slight issue is that when updating the image Title and Description the header image isnt being shown.
<div id="manage" <?php echo mysql_num_rows($result_images) <= 0 ? 'style="display:none"' : '' ?>>
<div class="edit">
<h2><img src="images/noimages_62c.png" alt="test" width="42" height="42" id="edit_image" />Image <span id="edit_number">1</span> Info</h2>
Is this as small a change to make this in sync!
Thanks again,
Andy
andy.schofield283961
11-30-2009, 02:38 PM
Justin,
All sorted. Thanks for the help.
Changed all references in the js file and now it works like a charm.
Thanks so much.
Andy
Justin Nemeth
11-30-2009, 02:40 PM
Yeah, pretty much the same change. Open admin/js/manageimages.js and on line 86, add + '/' + image.user_id after where it says image.gallery_id
-justin
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.