Source language: Translate to:

Usage of lgaDialog plugin

Questions or information that don't quite fit anywhere else

Moderator: Neosoft Support

Usage of lgaDialog plugin

Postby eliaskho » Mon Oct 10, 2005 10:03 pm

I am trying to use lgaDialog plugin. I want to use the lgaDialogLogin to access a certain page in the pub. For example, I need the user to enter username and password to access one or certailn page in the in the pub otherwise he is not entitled to access it.
Anybody has any idea of the usage of this function?

Posts: 32
Joined: Tue Aug 30, 2005 9:23 am

Postby Gaev » Tue Oct 11, 2005 5:49 am


The owner of this plug-in has stopped supporting it. But you can accomplish your objectives using native NeoBook facilities ... try using the PageChange section (Book>>Book Properties>>Actions>>Page Change) ... from the Help file ...
Code: Select all
Page Change: These actions are executed whenever the reader attempts to navigate to another page. Optionally, the page change can be redirected or canceled by altering the value of the global [PageChangeName] variable. To redirect the reader to a different page, insert the new page’s title into the variable. For example:

SetVar "[PageChangeName]" "ErrorPage"

You can also cancel the page change by setting the variable to any empty title. For example:

If "[PageChangeName]" "=" "Goodies"

  If "[User]" "<>" "Register User"

    AlertBox "Sorry" "Only registered users can view that page."

    SetVar "[PageChangeName]" ""


... in your case, you can first check if the user is trying to go to a page in your "authorized list" e.g.
Code: Select all
SearchStr "{[PageChangeName]}" "[myAuthorizedPageList]" "[result]"
If "[result]" ">" "0"
  If "[UserType]" "<>" "Authorized"
    AlertBox "Sorry" "Only registered users can view that page."
    SetVar "[PageChangeName]" ""
... and in your Startup section you can ...

a) prompt user for name and password ... either using the InputBox command (once for each item) or the CustomWindow command that has both items (each with a TextEntry Box and a Text Box as its label) in a Container object ... then evaluate the entered values to SetVar "[UserType]" to "Authorized" or "NotAuthorized"

b) Something like ...
Code: Select all
SetVar "[myAuthorizedPageList]" "{Secret}{EvenMoreSecret}{Do Not Enter}"
... where the text between the { and } are names of your restricted pages"

If required, the same techniques can be enhanced to support "different sets of authorized pages" for "different users".
User avatar
Posts: 3748
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby HPW » Tue Oct 11, 2005 6:05 am

>Anybody has any idea of the usage of this function?

Gaev is right that you can do it with neobook.
(Make a custom window for the dialog)

But the demo-pub of lgaDialog is pretty clear about the usage.
See the page 'password' and have a look into the 2 demo buttons actions.
The result is the the vars [pwdboxuser] and [pwdboxpwd].
Then your code has to check [pwdboxpwd] and go the right page.
User avatar
Posts: 2526
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby eliaskho » Tue Oct 11, 2005 8:38 am


Thank you guys for your help and support.

Posts: 32
Joined: Tue Aug 30, 2005 9:23 am

Return to Misc. Questions and Information

Who is online

Users browsing this forum: No registered users and 3 guests