Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dialogue box at page load

Status
Not open for further replies.

talhamoin

IS-IT--Management
Mar 3, 2011
14
AE
I want that if user is not logged in on my site, he will be presented with a dialogue box that should ask the user to select okay or cancel. if he selects okay he is redirected to login page. if he selects cancel he is redirected to main page of the site. How can I do this? I want this behavior on only one of the pages of my site.

Do i need to change something in function login() in controller.php in comp_user? Can someone help me out? I am just a newbie in joomla.
 
if you wish to ask a joomla specific question then I suggest you go to a joomla specific forum.

from a general php perspective you would do the following


1. test whether the person is logged in
2. if yes, do not interrupt
3. if no, then test whether the person has pressed cancel
4. if yes, then do whatever action you think is required
5. if no, test whether the person has pressed ok.
6. if yes, then display the login page
7. if no then display the ok/cancel dialogue

 
Hi

[tt][blue][small][ignore][off-topic][/ignore][/small][/blue][/tt]
To protect only one page I would just set up HTTP authentication.
[tt][blue][small][ignore][/off-topic][/ignore][/small][/blue][/tt]


Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top