Tutorials
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOtherTutorials

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old April 18th, 2006, 05:14 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
Image Gallery 2.0 script - problem

Hi notepad, I'm new to php and I'm using your fantastic Image Gallery 2.0 script, but I'm having some issues with it.
I want to use your script so that each user of my site can see his personnal photos.
So I thought I would create a folder for each user and then inside config.php I would change the constant: PATH.
Here is a bit of the code of config.php that I changed:
php Code:
Original - php Code
  1.  
  2. $user_id = $HTTP_SESSION_VARS["user_id"];
  3. echo $user_id;
  4.  
  5. define("PATH", "photo_gallery/$user_id"); // where photo_gallery is the folder that has each users folder.
  6.  

I do this so each user can see only his photos. But when I do this the photos don´t appear.
Maybe its something easy but if you could help me I would be most apreciated.

Thank you in advance,
It very good what you do for the commmunity

Michael Silva


Reply With Quote
  #2  
Old April 18th, 2006, 08:52 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Image Gallery 2.0 script - problem

Hello there!

There are a few things you can try!

First off.

Does
php Code:
Original - php Code
  1. <? echo $user_id; ?>
actually print the users id?

If not try this:
php Code:
Original - php Code
  1.  
  2. <?php
  3. $user_id = $_SESSION['user_id'];
  4. ?>


I also think that you need to use an absolute path.
Try: /the/path/to/your/gallery/$user_id or in windows:
c:thepathtoyourgallery$user_id

You can also try to put the complete path into a variable before
defining the constant PATH.
php Code:
Original - php Code
  1.  
  2. <?php
  3. $path = "/the/path/to/your/gallery/".$user_id;
  4. define("PATH", $path);
  5. ?>


Hope this will solve your problem!

Reply With Quote
Reply

Viewing: Codewalkers ForumsOtherTutorials > Image Gallery 2.0 script - problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway