2012-03-16, 04:06:42
2012-03-17, 19:02:24
Hi again,
when i loggin with a name called 'BjÖrn' for example, the 'Ö' isn't display right. Also with ö, ä, ü.
Please note this on version 3.1
Regards,
SlazZe.
when i loggin with a name called 'BjÖrn' for example, the 'Ö' isn't display right. Also with ö, ä, ü.
Please note this on version 3.1
Regards,
SlazZe.
2012-03-21, 03:18:51
mvlcek Wrote:lrsk Wrote:I am having some trouble adding I18N functionality to another plugin I'm using (user-login). I have previously hard-coded messages to the user etc, but would now like to add a language switching capability.
I decided to use I18N for this, and I followed the instructions here to be able to call e.g. i18n_r("user-login/REGISTER_MSG"). This works to a degree, but I am not able to switch between languages.
At first, everything was always English, confirmed by dumping $LANG to the screen. Then I decided to add $LANG = "nb_NO"; To my gsconfig.php file. This made everything Norwegian. The user-login plugin is using the language files I made in user-login/lang/ but I don't understand how to make the ?setlang=en/nb work with it.
Thanks for a great plugin. Hoping for a quick resolution.
The Front End User Plugin does not support the I18N plugin but relies on the $LANG variable.
Depending on how the Front End User Plugin works internally, you might have success with adding the following somewhere to the top of your template:
(of course this will not work, if the plugin loads the language texts before the template is executed)Code:<?php global $language; $LANG = $language == 'nb' ? 'nb_NO' : 'en_US'; ?>
I have tried adding this code in the header.php file that I use for the template, but the setlang functionality is still not working right with the user-login plugin. I have tried adding the code:
Code:
if (function_exists('i18n_load_texts')) {
i18n_load_texts('user-login');
} else {
i18n_merge('user-login', substr($LANG,0,2)) || i18n_merge('user-login', 'en');
}
into the plugin file, but it still won't work correctly. In fact, it does work if I set the language using setlang and then navigate to a different page or refresh the login page. I have dug deeper into the code and found that $LANG does not change until after I navigate to a different page or rerun the same page, nor does $_SESSION['language']. I thought about setting $LANG = $language in the i18n_load_texts() function or something, but the $language variable is empty there for some reason.
I don't want to create a solution that is so hacky that I can't maintain the site...
2012-03-21, 05:37:17
Quote:Frad wrote
i get this message when i want to add an user:
"Username Already Taken"
GetSimple: 3.1
Frontend User 3.0
Hi,
To solve this problem, create a directory which name is "site-users" on the data directory (/data/site-users/).
Doing this, each user data created will be stored on it in a xml file.
Hope it help,
Simply enjoy get simple!
2012-03-22, 05:40:30
How can i place the login form on my start page - not on the sidebar?
If i place this code in the "Edit Protected Message" source code
<?php echo show_login_box(); ?>
IT doesn´t work...
Any idea?
If i place this code in the "Edit Protected Message" source code
<?php echo show_login_box(); ?>
IT doesn´t work...
Any idea?
2012-03-22, 05:52:46
thanks mckael !!! it works fine...
2012-03-22, 06:00:06
FRAD Wrote:How can i place the login form on my start page - not on the sidebar?You have a few ways to accomplish this.
If i place this code in the "Edit Protected Message" source code
<?php echo show_login_box(); ?>
IT doesn´t work...
Any idea?
- 1. The Normal Way: Put the function in your template file.
- 2. Put the php code in a component and use the dynpages plugin to place the component in your page
- 3. If you want to only display the login form only on your homepage you could place somthing like the below coding into your template file:
Code:
<?php
if(!isset($_GET['id']) || $_GET['id'] == 'index')
{
echo show_login_box();
}
?>
2012-03-22, 07:08:24
hi,
i had the sam idea but when i insert this in the source code "Edit Protected Message" nothing works
{% loginform %}
I see this on my frontend page: {% lwz_start %}
dynpages are installed....
i had the sam idea but when i insert this in the source code "Edit Protected Message" nothing works
{% loginform %}
I see this on my frontend page: {% lwz_start %}
dynpages are installed....
2012-03-22, 07:24:42
FRAD Wrote:hi,That is because the dynpages checks the content of the page for components, not my plugins protected message node. There is currently no way to place the login form *inside* the actual protected message without editing the core plugin.
i had the sam idea but when i insert this in the source code "Edit Protected Message" nothing works
{% loginform %}
I see this on my frontend page: {% lwz_start %}
dynpages are installed....
2012-03-22, 07:27:17
ok thanks!! great job. It works very well for me!
2012-03-22, 07:57:47
FRAD Wrote:ok thanks!! great job. It works very well for me!NP, if you really feel it necessary to have the login form directly above or in between the protected message, let me know and I will instruct you on editing the plugin files.
Also if there is any capabilities you find would be useful, feel free to suggest them.
2012-03-30, 10:49:17
Not sure why I cant add new users.
This is the error message returned for any user and configuration.
Any ideas how I can fix this?
ty
This is the error message returned for any user and configuration.
Any ideas how I can fix this?
ty
2012-03-30, 10:55:16
roy_b8te Wrote:Not sure why I cant add new users.What more than likely happened is the data/site-users directory was not created. Create the directory and it should work fine
This is the error message returned for any user and configuration.
Any ideas how I can fix this?
ty
2012-03-30, 13:38:16
I can now create a new user in the Admin page but not from the live webpage.
I receive confirmation of new-user + login but see no new users in my list.
When I look in site-users I only see the user(s) created from Admin.
Thanks again for any insight.
I receive confirmation of new-user + login but see no new users in my list.
When I look in site-users I only see the user(s) created from Admin.
Thanks again for any insight.
2012-03-31, 00:16:11
roy_b8te Wrote:Hrm seems like I spoke too soon.
I can now create a new user in the Admin page but not from the live webpage.
I receive confirmation of new-user + login but see no new users in my list.
When I look in site-users I only see the user(s) created from Admin.
Thanks again for any insight.
Please turn on debug mode, attempt the front end user creation, and report your errors.
2012-03-31, 02:27:27
Turned on Debug mode in gsconfig.php and tried another register.
The debug console comes up empty
but I do get this message directly on the User Management tab and directly on the login page.
../data/other/logs
[29-Mar-2012 21:29:34] PHP Notice: Undefined index: usernamec in x:\xampp\htdocs\xxxx\plugins\user-login\class\Feul.php on line 510
Your help is much appreciated.
The debug console comes up empty
but I do get this message directly on the User Management tab and directly on the login page.
Quote:Notice: Undefined variable: result in x:\xampp\htdocs\xxxx\plugins\user-login\class\Feul.php on line 343
../data/other/logs
[29-Mar-2012 21:29:34] PHP Notice: Undefined index: usernamec in x:\xampp\htdocs\xxxx\plugins\user-login\class\Feul.php on line 510
Your help is much appreciated.
2012-03-31, 07:18:43
roy_b8te Wrote:I forgot to add that I tried this on both online and local servers.Are you using a database or xml for the users storage?
I'm going to try defining the var @ line 315
and see what happens.Code:$result = '';
2012-03-31, 07:19:38
I tracked the problem down to a simple typeo in username var
located @ Feul.php on line 511.
I'm now able to create new users on the web page but not in Admin.
located @ Feul.php on line 511.
Code:
$usrfile = strtolower($_POST['usernamec']); // removing the "c" at the end
$usrfile = strtolower($_POST['username']); // works !
2012-03-31, 12:11:09
The post you changed was for the admin form not the front end form. I will look into the original issue tonight
2012-04-01, 20:09:14
I tried again with a fresh download of GS3.1 and FEUL3.0 manual install on local and internet servers.
( local server [PHP: 5.3.8] online server [PHP 5.2.17] )
From the User Management tab I can create new users ( local + online servers ).
I add the lines of code to the template file.
I then try to create a new user from the web page ( online server ).
I receive the confirmation message.
Debug messages ( online server ):
When I go back to the User Management tab I see no new user(s).
When I look at FTP I see 1 new unnamed XML file was created ( online server ).
If I open this unnamed XML file, I see the name of the last web based registered user.
I then attempt to login as the last registered user ( online server ).
This message is returned to the browser.
When I change the variable name usernamec in Feul.phpI'm able to create new users from the webpage but not the User Management tab.
Heres the message thrown ( local server )
Messages thrown ( online server )
Or can you tell me where the code is that names the xml file created from the web register new user form?
Thank you for your support.
( local server [PHP: 5.3.8] online server [PHP 5.2.17] )
From the User Management tab I can create new users ( local + online servers ).
I add the lines of code to the template file.
Code:
<?php echo show_login_box(); ?>
<?php echo welcome_message_login(); ?>
<?php user_login_register(); ?>
I then try to create a new user from the web page ( online server ).
I receive the confirmation message.
Debug messages ( online server ):
Quote:Strict Standards: Feul::processAddUserAdmin() [feul.processadduseradmin]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/server/public_html/gs31/plugins/user-login/class/Feul.php on line 510
Notice: Undefined index: usernamec in /home/server/public_html/gs31/plugins/user-login/class/Feul.php on line 510
When I go back to the User Management tab I see no new user(s).
When I look at FTP I see 1 new unnamed XML file was created ( online server ).
If I open this unnamed XML file, I see the name of the last web based registered user.
Code:
<?xml version="1.0"?>
<item><Username>user</Username><Password>( hash )</Password><EmailAddress>user@user.com</EmailAddress></item>
I then attempt to login as the last registered user ( online server ).
This message is returned to the browser.
When I change the variable name usernamec in Feul.php
Code:
$usrfile = strtolower($_POST['usernamec']); // from
$usrfile = strtolower($_POST['username']); // to
Heres the message thrown ( local server )
Messages thrown ( online server )
Quote:Strict Standards: Feul::processAddUserAdmin() [feul.processadduseradmin]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/truedia1/public_html/gs31/plugins/user-login/class/Feul.php on line 510I hope this full description helps with a possible solution.
Notice: Undefined index: username in /home/truedia1/public_html/gs31/plugins/user-login/class/Feul.php on line 510
Strict Standards: Feul::getAllUsers() [feul.getallusers]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/truedia1/public_html/gs31/plugins/user-login/class/Feul.php on line 343
Notice: Undefined variable: result in /home/truedia1/public_html/gs31/plugins/user-login/class/Feul.php on line 343
Or can you tell me where the code is that names the xml file created from the web register new user form?
Thank you for your support.
2012-04-02, 01:33:28
Hi roy_b8te, hi mikeh...
The easiest is that you modify in user_login.php:
1) in function 'function user_login_register()' change everywhere is written $_POST['username'] by $_POST['usernamec'].
I think that there is 4: 3 at the first and other in form...
You do not change anything in Feul.php.
2) in 'function welcome_message_login()' there is other small bug, and link of logout is wrong:
//Display Logout Link
Change:
$logout_link = '<a href="'.$SITEURL.'?logout=yes" class="user-login-logout-link">Logout</a>';
by:
$logout_link = '<a href="'.$_SERVER['REQUEST_URI'].'?logout=yes" class="user-login-logout-link">Logout</a>';
I am playing with this plugin because i am doing other plugin that will work with front-end users plugin
Regards.
The easiest is that you modify in user_login.php:
1) in function 'function user_login_register()' change everywhere is written $_POST['username'] by $_POST['usernamec'].
I think that there is 4: 3 at the first and other in form...
You do not change anything in Feul.php.
2) in 'function welcome_message_login()' there is other small bug, and link of logout is wrong:
//Display Logout Link
Change:
$logout_link = '<a href="'.$SITEURL.'?logout=yes" class="user-login-logout-link">Logout</a>';
by:
$logout_link = '<a href="'.$_SERVER['REQUEST_URI'].'?logout=yes" class="user-login-logout-link">Logout</a>';
I am playing with this plugin because i am doing other plugin that will work with front-end users plugin
Regards.
2012-04-02, 02:47:15
Thanks cumbe for your reply.
I tried everything you said but it only fixes adding users in the User Management page.
There are also $_POST['username'] found in Feul.php on lines: 789,774,771 & 513.
I tried switching these too. Same results.
I tried everything you said but it only fixes adding users in the User Management page.
There are also $_POST['username'] found in Feul.php on lines: 789,774,771 & 513.
I tried switching these too. Same results.
2012-04-02, 03:14:14
Hi,
line 513 must to put: $usrfile = strtolower($_POST['usernamec']);
the other lines do not changes.
line 513 must to put: $usrfile = strtolower($_POST['usernamec']);
the other lines do not changes.
2012-04-02, 03:16:18
or better,
copy original Feul.php and does not change anyting here.
Only the changes in user_login.php.
copy original Feul.php and does not change anyting here.
Only the changes in user_login.php.
2012-04-02, 04:19:02
Version 3.1 Has Been Added To Extend
Thank you both for your assistance.
It turned out the problem was the $_POST['usernamec'] on line 525 of Feul.php shouldn't even have been there. There should be no posts in the class file as the variables are passed to the methods from user_login.php.
Changing $_POST['usernamec'] to $username fixed the problem.
I also fixed a few other bugs such the data/site-users directory not being created.
Thank you both for your assistance.
It turned out the problem was the $_POST['usernamec'] on line 525 of Feul.php shouldn't even have been there. There should be no posts in the class file as the variables are passed to the methods from user_login.php.
Changing $_POST['usernamec'] to $username fixed the problem.
I also fixed a few other bugs such the data/site-users directory not being created.