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 24. Nov 2024, 20:23

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  [ 4 posts ] 
Author Message
 Post subject: Login Problem
PostPosted: 25. Sep 2006, 06:08 
Offline

Joined: 25. Sep 2006, 06:04
Posts: 2
I have read almost everything and still do not understand what is probably the most basic thing as I am a newbie.

It says in the config file to place "auth" to enable the password login somewhere $Login or something, but I can not tell what line of code is where I need to insert the "auth" on the config page.

Are there multiple areas or just one?

Please advise and thanks in advance,
Dave


Top
 Profile  
 
 Post subject:
PostPosted: 25. Sep 2006, 08:33 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
1st. What do you want to use?
TWG or TWG Flash Uploader only?

if you use TWG Flash Uploader it's simply in the tfu_config.php - But you still have to implement your own authorization. Because normally I use my user management from TWG for the flash of course ;).

/Michael


Top
 Profile  
 
 Post subject: TWG
PostPosted: 25. Sep 2006, 18:32 
Offline

Joined: 25. Sep 2006, 06:04
Posts: 2
Hi,

I want to use the .html page. Where would I insert the "auth" in the config file?

$login = "true"; // The login flag - has to set by yourself below "true" is logged in, "auth" shows the login form, "reauth" should be set if the authentification has failed. "false" if the flash should be disabled.
$folder="upload"; // this is the upload folder. If the folders are more "complex" I recommend to use this as the display string and handle the directories in the readDir and upload in the session (like TWG does!)

$maxfilesize = return_kbytes(ini_get('upload_max_filesize')); // The max files size limit of the server
$resize_show = "true"; // Show the resize box!
$resize_data = "100000,1280,1024,800"; // The data for the resize dropdown
$resize_label = "Original,1280,1024,800"; // The labels for the resize dropdown
$resize_default = "0"; // The preselected entry in the dropdown (1st = 0)
$allowed_file_extensions="txt,mp3"; // Allowed file extensions! jpg,jpeg,gif,png are allowed by default. "all" allowes all types
$forbidden_file_extensions="php"; // Forbidden file extensions!

// some optional things - can be removed as well - the defaults are entered below!
$login_text = "&login_text=Please login"; // Login Text
$relogin_text = "&relogin_text=Wrong Username/Password. Please retry"; // Retry login text
$upload_file= "&upload_file=tfu_upload.php"; // Upload php file - this is relative to he flash
$readdir_file = "&readdir_file=tfu_readDir.php"; // readDir php file - this dir is relative to the caller html file
$image_file = "&image_file=tfu_image.php"; // image php file - creates the preview images - this dir is relative to the caller html file

$titel="&titel=TWG Flash Uploader"; // This is the title of the flash - can not be set in the free version!
$warning_setting="&warning_setting=all"; // the warning is shown if remote files do already exist - can be set to all,once,none

/*
AUTHENTIFICATION

This part is interesting if you want to use the login!
*/
if (isset($_POST['twg_user'])) { // twg_user and twg_pass are always sent by the flash!
$user = $_POST['twg_user'];
$pass = $_POST['twg_pass'];
/*
Now you have to autentificate the user somehow and set the flag login
For the demo the user and the pass is simpy test/test. If you want a little bit
more secure implementation you could check the TWG Admin source code.
The login setting is checked in the tfu_upload.php and tfu_readDir.php.
*/
if ($user != "") {
if ($user=="test" && $pass == "test") {
$login = "true";
} else {
$login = "reauth";
}
}

if ($login == "true") {
$_SESSION["TFU_LOGIN"] = "true";
}


// the sessionid is mandatory because upload in flash and Firefox would create a new session otherwise - sessionhandled login would fail then!
echo "&session_id=" . session_id() . "&login=". $login . "&maxfilesize=". $maxfilesize ."&dir=". $folder ."&resize_show=". $resize_show . "&resize_data=". $resize_data . "&resize_label=". $resize_label . " &resize_default=" . $resize_default . "&allowed_file_extensions=". $allowed_file_extensions . "&forbidden_file_extensions=" . $forbidden_file_extensions . $login_text . $relogin_text . $upload_file . $readdir_file . $titel . $image_file . $warning_setting;
} else {
echo "Direct calls are not allowed!";
}


Top
 Profile  
 
 Post subject:
PostPosted: 25. Sep 2006, 22:40 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
where the $login="true" is.

but you have to implement your own user checking - i will implement a small one in version 2.0 of the flash. Will be online nex week I think ;):

/Michael


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 41 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