Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 28. Nov 2024, 08:26

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: 18. Mar 2008, 19:15 
Offline

Joined: 18. Mar 2008, 16:20
Posts: 45
This gallery is great!!!

I just wanted to ask for help because my Pictures directory is dynamic. This means that if for example I have two different users A and B, sessions (A and B), i would like to change the "my_config.php" to dynamically have the directories

relative_dir_userA/pictures

or

relative_dir_userB/pictures


That is, to set in my_config.php

$basedir = "$relative_dir_userA_/pictures";


(Of course I anagously did change the directories of cache, counts and xml)

I've tried to do it (starting my session and setting the varible, starting my session in index.php and setting my variable previous to the 'include index.php' line, defining a constant) but with no success...

I hope this can be possible....

In case not, i'm thinking I could have different installations of twg17, one per directory and include the one corresponding to the session... But I would so much prefer having only one installation and a dynamic configuration ! This would be just perfect...


Thanks you very much for your help!

Again, excellent gallery, congratulations !

Siran


Top
 Profile  
 
 Post subject:
PostPosted: 18. Mar 2008, 20:05 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
The session is started in TWG already.
But this is done after the config is read.

The problem is that not only index.php is reading the config. image.php is actually as important because it does all the image and ajax stuff.

You would have to change it there as well ... (+ the backend if you like to use it! - but there I would not recommend it because which session do you like to handle ...)

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 18. Mar 2008, 20:33 
Offline

Joined: 18. Mar 2008, 16:20
Posts: 45
TinyWebGallery wrote:
The session is started in TWG already.
But this is done after the config is read.

The problem is that not only index.php is reading the config. image.php is actually as important because it does all the image and ajax stuff.

You would have to change it there as well ... (+ the backend if you like to use it! - but there I would not recommend it because which session do you like to handle ...)

/Michael


Thanks a lot, Michael !

I dont know why hadn't I tried to start the session directly in the my_config.php file ... it is working now... I don't know if it can bring some issues later....


Top
 Profile  
 
 Post subject:
PostPosted: 18. Mar 2008, 23:13 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
In the next build I do optimize this part a little bit. I found some code duplicates. I will then start the session before the config ;).

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 18. Mar 2008, 23:17 
Offline

Joined: 18. Mar 2008, 16:20
Posts: 45
TinyWebGallery wrote:
In the next build I do optimize this part a little bit. I found some code duplicates. I will then start the session before the config ;).

/Michael


Hi,

Well as I said I started my session directly in my_config.php, i grab the data I need, I setup $basedir and all seems OK for now.


Thanks for your help, Michael : )


Top
 Profile  
 
 Post subject:
PostPosted: 18. Mar 2008, 23:22 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
That's ok for you but not for me ;).
because then the session is started twice and this does only not show an error because I catch this.

I simply optimize this ;).

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 19. Mar 2008, 00:02 
Offline

Joined: 18. Mar 2008, 16:20
Posts: 45
TinyWebGallery wrote:
That's ok for you but not for me ;).
because then the session is started twice and this does only not show an error because I catch this.

I simply optimize this ;).

/Michael


OK, cool. Just tell me where should the session be started (on my part) and i'll put it there ;)

Thanks again,

siran


Top
 Profile  
 
 Post subject:
PostPosted: 19. Mar 2008, 00:35 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
you don't have to change anything - I simply start the session at a different place in the next build. Because I do some refactoring anyway ...

/Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy