Archive for myfreeforum.org Before posting please check the "stickies" in the support forums.
Please ask questions in real English and not "txt". You will get a better response.
Please do not ask support questions via PMs.
 



       myfreeforum.org Forum Index -> Portal components
admin (no pm's please)

LOGIN component

Thanks to Nick for this one

{MYFF.LOGIN} will show a login dialog, the cms_login.tpl template will hide the dialog if the user is already logged in.

Options are trivial

[LOGIN]
show_title=1
title="Login"
Andrew(AP)

thank you thank you very much i've been waitint a long time for this
Andrew(AP)

It doesn't seem to work ok i added every thign right {MYFF.LOGIN} in overall_header.tpl and i added
[LOGIN]
show_title=1
title="Login"
in options but all it does is not show to portal log in thingy and at the top it says cannot find: {MYFF.LOGIN}
admin (no pm's please)

try now.
Andrew(AP)

now its all screwed up my left side ot the portal went above the hole forum here look http://techland.myfreeforum.org

but when ever i loged on its back to normal but when im logged off its liek i said above
Andrew(AP)

coke17 wrote:
now its all screwed up my left side ot the portal went above the hole forum here look http://techland.myfreeforum.org

but when ever i loged on its back to normal but when im logged off its liek i said above


ops well ok now every thign is back to normal and it works but now the log in box is not in a portal its jsut free on the right side http://techland.myfreeforum.org on the right top side of the duel portal
admin (no pm's please)

Well it will depend on where you put it, you do need the correct html framework.
Andrew(AP)

i know i fixed it
Nick(NR)

Just Curious

Is there a way of changing the page that loads once you login?

because I'd like the full portal page to reload once a member is logged in without being directed to the forum first.
admin (no pm's please)

I'd imagine that would be possible with a tweak to the component. But as you know I am on holiday till Friday!
Nick(NR)

No worries, It can wait till next year

I'm in no rush for it.
stewarty79

You could do it now.
admin (no pm's please)

it is all a matter of priorities.
Nick(NR)

Nick(NR) wrote:
Just Curious

Is there a way of changing the page that loads once you login?

because I'd like the full portal page to reload once a member is logged in without being directed to the forum first.


*cough?* now updates are in *cough?*
admin (no pm's please)

Certainly it is time to revisit these things.
Nick(NR)

admin wrote:
Certainly it is time to revisit these things.


I'm thinking an extra option where we can input a re-direct link?

Like so:

[LOGIN]
show_title=1
title="Login"
redirect=http://www.portalogy.myfastforum.org

if not an actual link then a number setup:

redirect=1 (leads to portal view)
or
redirect=2 (leads to forum view)
admin (no pm's please)

Okay you can now have:

redirect=/index.php

Note the http:// is not only not needed, but will actually break the system if done as {MYFF.LOGIN redirect="http://...."} as at the template level a lot of special characters are rejected.
Nick(NR)

admin (no pm's please) wrote:
Okay you can now have:

redirect=/index.php

Note the http:// is not only not needed, but will actually break the system if done as {MYFF.LOGIN redirect="http://...."} as at the template level a lot of special characters are rejected.


so this is an option tab extra, but to redirect to the full portal?

redirect=/index.php?component=indexpage
Brandon

This is a great option!

Thanks for putting it up, admin.
Wills

Hi,
I'm having problems redirecting Login to a webpage

In Options I have put this:

[LOGIN]
show_title=1
title="Login"
redirect=/poker-forum.html

When logging in using {MYFF.LOGIN} I get this:

poker-forum.html?sid=d0adfe54004625c8bdeba3bec3ba15c1
page not found

Any ideas
admin (no pm's please)

Another case of wait a day or more. You cannot pass parameters into html pages at the moment, but the "office" code allows it and the upgrade is due to go in.
I know you don't intend to pass the SID but that happens automatically.
Wills

Hmmm

Guess I should slow down a little

I have trouble waiting for anything, Christmas, Birthdays, Summer, Holidays or even Lunch
admin (no pm's please)

Does seem you are running into the bleeding edge, but think if it this way, the odd cut you got and may well get again in the upgrade process could easily be mortal wounds if we deployed much faster.
Our testing clearly is not picking up everything but with haste it would be a whole lot worse.
At least when Mays changes are in, they will be the last major structural changes for quite a while.
admin (no pm's please)

Parameter passing is now installed.
Wills

Great stuff

My redirects are working well Wink
admin (no pm's please)

Good

6 of a list of 16 updates needed went in today. Seems to be a quite endless lot of stuff that is needing to go in and be seen to be okay, before the changes that actually give people stuff happen.

Probably this is no real bad thing, as there are still things being tested and improved, and there is no real urgency in one sense on any of it. It is not as if we are trying to catch up with any competition here
Nick(NR)

Just an addition to this, after recieving a request for a portal with only a button to logout, I decided to alter the existing login portal and use the switches to make it mutate, when logged in and out it shows two different things.

How to do it:
Navigate through your admin panel to edit templates/logos and pick your template, now find the cms_login.tpl file in the portal component list, open it up and go to the very bottom of the files contents and add a empty line, now put in the following and save:

Code:
<!-- BEGIN switch_user_logged_in -->
<table width="100%" cellpadding="4" cellspacing="1" border="0" align="center">
<form method="post" action="{S_LOGIN_ACTION}">{S_HIDDEN_FIELDS}
<tr>
<th class="row1log">{L_LOGIN_LOGOUT}</th>
</tr>
<tr>
<td class="row2log" align="center">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td ><a href="{U_LOGIN_LOGOUT}" style="text-decoration:none;"><input name="Logout" type="submit" value="Logout"></a></td>
</tr>
</table>
</td>
</tr>
</form>
</table>
<!-- END switch_user_logged_in -->


While logged out, shows the portal as it stands now
While logged In, will now show a button to log you out.

*please note that a little tweaking may be needed to suit it to your chosen template*
Nick(NR)

Nick(NR) wrote:
Just an addition to this, after recieving a request for a portal with only a button to logout, I decided to alter the existing login portal and use the switches to make it mutate, when logged in and out it shows two different things.

How to do it:
Navigate through your admin panel to edit templates/logos and pick your template, now find the cms_login.tpl file in the portal component list, open it up and go to the very bottom of the files contents and add a empty line, now put in the following and save:

Code:
<!-- BEGIN switch_user_logged_in -->
<table width="100%" cellpadding="4" cellspacing="1" border="0" align="center">
<form method="post" action="{S_LOGIN_ACTION}">{S_HIDDEN_FIELDS}
<tr>
<th class="row1log">{L_LOGIN_LOGOUT}</th>
</tr>
<tr>
<td class="row2log" align="center">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td ><a href="{U_LOGIN_LOGOUT}" style="text-decoration:none;"><input name="Logout" type="submit" value="Logout"></a></td>
</tr>
</table>
</td>
</tr>
</form>
</table>
<!-- END switch_user_logged_in -->


While logged out, shows the portal as it stands now
While logged In, will now show a button to log you out.

*please note that a little tweaking may be needed to suit it to your chosen template*


Ok, this has a bug in IE7, so it will only work with firefox for the time being, will work on a fix tomorrow.
K

also know that if the font color on the button is wrong then change the
Code:
<input name="Logout" type="submit" value="Logout">
to
Code:
<input name="Logout" class="mainoption" type="submit" value="Logout">
adding in the class="mainoption". that should show the right font.

the bug in ie7 is that when you hit logout, the page blinks and sends you to the top, nothing else. but it shows up correctly and looks nice lol

edit: and caps for Logout/logout do make a difference. if you have logout instead of Logout, you get an Invalid_session error
Nick(NR)

I know, as said this is buggy in IE7, but does work perfectly in firefox, so I will be tweaking this, as there are a few things I have in motion at the moment.
Nick(NR)

I've not been able to find a fix for the IE bug, but did a complete rework, which DOES work across browsers:

This will however need to go into your css file:
Code:
#logoutbtn {margin:4px;}

#logoutbtn a {
   font-family: Verdana, Arial, Helvetica, sans-serif;
   font-size: 12px;
   color: #FF0000;
   text-decoration: none;
   border: 1px solid #FF0000;
   padding-top:2px;
   padding-bottom:2px;
   padding-right:25px;
   padding-left:25px;
   background-color: #000000;
}

#logoutbtn a:hover {
   font-family: Verdana, Arial, Helvetica, sans-serif;
   font-size: 12px;
   color: #990000;
   text-decoration: none;
   border: 1px solid #990000;
   padding-top:2px;
   padding-bottom:2px;
   padding-right:25px;
   padding-left:25px;
   background-color: #000000;
}


To obtain a border similar to how the buttons appear normally, then the following needs to be followed:
#logoutbtn a would need it's border set to:
Code:
border: 2px outset #FF0000;

#logoutbtn a:hover would need it's border set to:
Code:
border: 2px inset #990000;


Changing the border color, background color and font color will allow you to heavily customise the appearance of the button as you can see and test on template 1 of portalogy.

Go into your admin panel, option 3 styles, then edit templates/logos and pick the template your going to work on, now from the bottom drop down list pick cms_login.tpl open it up and add the following below whats already inside the file:
Code:
<!-- BEGIN switch_user_logged_in -->
<table width="100%" cellpadding="4" cellspacing="1" border="0" align="center">
<form method="post" action="{S_LOGIN_ACTION}">{S_HIDDEN_FIELDS}
<tr>
<th class="row1log">{L_LOGIN_LOGOUT}</th>
</tr>
<tr>
<td class="row2log" align="center">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td >
<div id="logoutbtn"><a href="{U_LOGIN_LOGOUT}" id="logoutbtn">Logout</a></div>
</td>
</tr>
</table>
</td>
</tr>
</form>
</table>
<!-- END switch_user_logged_in -->
Nick(NR)

K, please don't post what's already been solved, what you posted was what I gave to you of which you moaned wasn't working?
K

no what i posted was what you gave me the first time, then i revised, and it works in both ie and mozilla, without having to edit css.


the problem was {S_LOGIN_ACTION}, should be {U_LOGIN_LOGOUT}, and then i just used an input. just look at the one i did. it really works

i didnt mean to offend you if i did and i thanked you for your work. i just happened to find what you were looking for in your first attempt.
Nick(NR)

tbh, it was rushed on my part, I never even looked at the form actions, was busy trying to concentrate on doing my theory.

       myfreeforum.org Forum Index -> Portal components
Page 1 of 1
Create your own free forum | Buy a domain to use with your forum