ProtectedPages/UserId

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
roan

ProtectedPages/UserId

Post by roan »

One humble request and one question:

The request:
It would be nice if the next version of ProtectedPages had an optional parameter. login="Myloginpage", which would make a redirection to Myloginpage where the UserId module will take care of the log in. After a successful login you should be brought back to the initial protected page.

I have now knowledge of PHP-programming so I don't know if it is possible to do.

The question:
I have tried to translate ProtectedPages to Swedish with no luck. This is what I have done in the file lang.php:

Code: Select all

//Swedish:
		case "sv" :
		case "se" : {
			switch ($str) {
 				case "This is a protected page - " : 
 							$result="Det här är en skyddad sida - "; break;
 				case "You are now logged off. Access a protected page to log in again": 
 							$result="Du är nu utloggad. Gå till en skyddad sida för att logga in igen"; break;
 				case "You are currently logged in as <em>%s1</em> " : 
 							$result="Du är nu inloggad som <em>%s1</em> "; break;
 				case "Sorry, you do not have access to this page!" : 
 							$result="Du måste vara inloggad med rätt behörighet för att kunna läsa den här sidan"; break;
 				case "Log out" :
 							$result="Logga ut"; break;
 				case "Are you sure you want to log out?" :
 							$result="Vill du verkligen logga ut?"; break;
 			}
 			break;
 		}
Then I call the module:

Code: Select all

{cms_module module="ProtectedPages" allow_groups="koren" lang="se"}
I still get the english language.

Any hints?

/Roan
User avatar
Silmarillion
Dev Team Member
Dev Team Member
Posts: 483
Joined: Sun Jan 02, 2005 9:10 pm
Location: Denmark

Re: ProtectedPages/UserId

Post by Silmarillion »

Hi Roan

The redirection to another page is in the module now! Check out the latest version on the wikipage. Some other exciting features are coming up soon. Just have to test them a bit.

The translation stuff is strange, but as I'm currently in the process of moving translation to the built-in system provided by CMS I must ask you to wait a bit as I won't maintain my own translation method any longer.

Hang in there, while I prepare the next version.

Best regards
Morten/Silmarillion
roan wrote: One humble request and one question:

The request:
It would be nice if the next version of ProtectedPages had an optional parameter. login="Myloginpage", which would make a redirection to Myloginpage where the UserId module will take care of the log in. After a successful login you should be brought back to the initial protected page.

I have now knowledge of PHP-programming so I don't know if it is possible to do.

The question:
I have tried to translate ProtectedPages to Swedish with no luck. This is what I have done in the file lang.php:

Code: Select all

//Swedish:
		case "sv" :
		case "se" : {
			switch ($str) {
 				case "This is a protected page - " : 
 							$result="Det här är en skyddad sida - "; break;
 				case "You are now logged off. Access a protected page to log in again": 
 							$result="Du är nu utloggad. Gå till en skyddad sida för att logga in igen"; break;
 				case "You are currently logged in as <em>%s1</em> " : 
 							$result="Du är nu inloggad som <em>%s1</em> "; break;
 				case "Sorry, you do not have access to this page!" : 
 							$result="Du måste vara inloggad med rätt behörighet för att kunna läsa den här sidan"; break;
 				case "Log out" :
 							$result="Logga ut"; break;
 				case "Are you sure you want to log out?" :
 							$result="Vill du verkligen logga ut?"; break;
 			}
 			break;
 		}
Then I call the module:

Code: Select all

{cms_module module="ProtectedPages" allow_groups="koren" lang="se"}
I still get the english language.

Any hints?

/Roan
roan

Re: ProtectedPages/UserId

Post by roan »

Tjena Morten!

Wonderful. Sure I'll wait for your next version. :-)

Thanks
/Roger (aka roan)
User avatar
Silmarillion
Dev Team Member
Dev Team Member
Posts: 483
Joined: Sun Jan 02, 2005 9:10 pm
Location: Denmark

Re: ProtectedPages/UserId

Post by Silmarillion »

Hi Roan

I just uploaded an new somehat experimental version of UserID. But you might be interested in the new way translations are handled. I now use the builtin translation system from CMS, so you should be able to add a new file within the lang/ dir which is called something like se_SV.php (don't know exactly..) and it should be used if your language setting is set to Svenska. The translation files are not 100% complete but all the frontend stuff and a lot of the administration stuff are in there. It will be complete in the next version.

Hope you can use it

Best regards
Morten/Silmarillion
roan

Re: ProtectedPages/UserId

Post by roan »

Thanks a lot!

I'll give it a try towards the end of the week.

/Roan
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Feature Request - expiry date for accounts

Post by calguy1000 »

I would live to have accounts expire after a given period of time unless they're renewed.

I need accounts for like days.  almost none of mine are permanent.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: ProtectedPages/UserId

Post by calguy1000 »

FYI I am in the midst of hacking this module to pieces and back again to allow the following functionality:  a) filtering to support massive numbers of users b) email registration (optional)  c) templates for the various forms d) a very flexible api e)  mail notifications (I may write an email module that this module depends on)..  and account expiration too I guess.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
kishman155
Translator
Translator
Posts: 169
Joined: Sat Mar 12, 2005 12:30 pm
Location: Vienna

Re: ProtectedPages/UserId

Post by kishman155 »

callguy 1000 check out zugriffmodulbetha

i had the same thoughts.

mfg
kishman155
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: ProtectedPages/UserId

Post by calguy1000 »

though I can't read german with a damn it looks like you're heading in the same direction as me.

One of the things I forgot to mention though is
a) modularizing everything (all of the sql queries, etc) into api function so that later we can further modularize it and perhaps extract
    user/group information from a third party database of some sort.  Therefore, the user and group requirements need to be
    relatively simple.

  b) Simalarion's first module incorporated a "property" mechanism whereby you could keep any details you wanted on a particular user (age/sex/location/phone/fax, etc, etc).  But this would be done in another dependant module.

  c) email registration, yep, need that.

  d) Similarion asked me quite nicely to keep the api working identical to it currently does in UserID so that Protectedpages, CustomContent, and a few other modules he has written for customers confinue to work.

  e) I am using wishy's built in permissions (as much as possible) in my admin section so that I don't have to maintain two sets of administrators.

  f) Similarrions original UserID module allows you to use the cms built in tables for extracting user and group information, though I haven't started this yet, I am working on doing this so that essentially, UserID can also (optionally) replace and augment user management inside of cmsms.

Just thought I'd let you know.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
roan

Re: ProtectedPages/UserId

Post by roan »

Calguy: This all sound very interesting!

Somewhere back this thread I said I would try out the mods that Silmarillion made. I have done that, but I haven't given any feedback. The fact is that I haven't had any luck with the new translation method either. I have fiddled around with a lot of things, but no. Eventually I fooled the module by renaming my sv_SE.php to en_US.php.

I have also found some bugs, but all that seem to belong to the history. Now I will take it easy, enjoy a cup of coffee and wait for the result of your hacking Calguy.

/roan
iNSiPiD

Re: ProtectedPages/UserId

Post by iNSiPiD »

calguy1000, how's your module coming along? And will this be a replacement module?

I thought it was interesting that you use the built-in permissions. Me too, for the same reasons. Will you be removing the other option in your new module? At the moment this is quite confusing and it would be great to have a single module that could do userID, protected pages and custom content.

A subsrciption option would be terrific, too. As would the added functionality of having it work as a contacts database (for this I think the built-in permissions should be extended to take more fields).
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: ProtectedPages/UserId

Post by calguy1000 »

I am currently working on the module and using a separate users, groups, and belongs tables (this is merely for development). When it works, I'll be adding the option (hopefully without losing any functionality) to tie into the original cms tables. 

I am though adding expiry details to the table so that accounts can expire..  This is extra useful with the email registration stuff.

As far as contact information goes, I think that the property capabilities of the original UserID module would be useful for that.  it just needs a front end on it.

As far as one super monster module, I don't like this idea.  The CustomContent module does what protected pages does, but with much more flexibility.  I would do contact management as a separate module as well. 
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
iNSiPiD

Re: ProtectedPages/UserId

Post by iNSiPiD »

Ah, gotcha. So I guess that was my question. CustomContent is a replacement for the ProtectedPages module?

I'll check it out.
numer9

Re: ProtectedPages/UserId

Post by numer9 »

Hey, just had to use Polish language with Protected Pages, so I made a quick translation.

I think I'm working on some old stuff, cause my translation-engine was old-fashioned. I put it in my production site, in spare time i'll try to sniff around and upgrade if any is possible, but until then - maybe somebody will need Polish texts.

I used utf-8 as character encoding, as it was the only one to work properly. I can provide u iso-8859-2 as well, just ask.

Code: Select all

// Polish - by numer9.pl 20051129:
		case "pl" : {
			switch ($str) {
 				case "This is a protected page - " : 
 							$result="Ta strona chroniona jest hasłem"; break;
 				case "You are now logged off. Access a protected page to log in again": 
 							$result="Nie jesteś zalogowany. Wróć do strony logowania."; break;
 				case "You are currently logged in as <em>%s1</em> " : 
 							$result="Zalogowany jako <em>%s1</em> "; break;
 				case "Sorry, you do not have access to this page!" : 
 							$result="Dostęp do tej części serwisu po zalogowaniu!"; break;
 				case "Log out" :
 							$result="Wyloguj"; break;
 				case "Are you sure you want to log out?" :
 							$result="Czy jesteś pewien, że chcesz się wylogować?"; break;
 			}
 			break;
 		}
regards!
#9
Locked

Return to “Modules/Add-Ons”