FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » login on my main news page
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
login on my main news page [message #8556] Fri, 07 February 2003 19:41 Go to next message
borbjo is currently offline  borbjo   Norway
Messages: 6
Registered: January 2003
Location: Stavanger, Norway
Karma: 0
Junior Member

Hi, I'm trying to make a login box on my main page (not where the forum is) .. and I want to use the "returnto" tag to send the user back to the main page (/index.php) when the user has logged in.

I assumed that was what the "returnto" tag was for. However, it does not work Sad ..

The user is sent to /fud/index.php not /index.php, even though I specify the full URL ..

here's my code:
<?

	$sess_string = $HTTP_GET_VARS["S"];
?>	
	<form name="quick_login_form" method="post" action="/fud/index.php?t=login">
	<input type="hidden" name="S" value="<?=$sess_string?>">
<table>
<tr class="SmallText">
	<td>brukernavn</td>
	<td>Passord</td>
	<td colspan=2>&nbsp;</td>
</tr>
<tr>
	<td><input class="SmallText" type="text" name="quick_login" size=18></td>
	<td><input class="SmallText" type="password" name="quick_password" size=18></td>
	<td><input type="checkbox" name="quick_use_cookies" value="1"><font class="SmallText"> Bruk cookies?</font> </td>
	<td><input type="submit" class="button" name="quick_login_submit" value="Logg inn"></td>
</tr>
</table>
<input type="hidden" name="returnto" value="http://127.0.0.1">
</form>


Also, if someone had a short snippet for finding out wheter or not a user is logged in, that would be appreciated.

- bjorn


Re: login on my main news page [message #8585 is a reply to message #8556] Mon, 10 February 2003 15:09 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
This is due to the nature of the forum redirect's returnto can ONLY be a forum based URL. This is done to prevent XSS exploits by specifying offsite returnto URLs. If you want to redirect the user to a non-forum URL create a small php script inside the forum's directory that will do just that and then redirect the user to that script.

FUDforum Core Developer
Re:login on my main news page [message #8588 is a reply to message #8556] Mon, 10 February 2003 15:26 Go to previous messageGo to next message
borbjo is currently offline  borbjo   Norway
Messages: 6
Registered: January 2003
Location: Stavanger, Norway
Karma: 0
Junior Member


ah, ok, thanks.

btw; have you guys thought about providing a developer's documentation or something? That would be very useful IMHO, and would probably increase the number of plugins etc. drastically Smile

- bjorn


Re: Re:login on my main news page [message #8589 is a reply to message #8588] Mon, 10 February 2003 15:43 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
My view on plugins is somewhat mixed, while I see no problem with people adding all kinds of functionaly, I do see a problem with an audited plugins being out there. Many of the security faults in other forums often results from such plug-ins and detract from the overall image of the forum. By making requiring the developers who want to make modification first obtain good understanding of the code I believe this can be avoided.

FUDforum Core Developer
icon9.gif  same problem but returnto does not work [message #11973 is a reply to message #8556] Thu, 24 July 2003 08:16 Go to previous messageGo to next message
luzifer84 is currently offline  luzifer84   Germany
Messages: 1
Registered: July 2003
Karma: 0
Junior Member
hello folks,

have the same problem as well. i built a site seite1.php and saved it to the www-root, took the code above and changed the url and hoped it would work. it did not...
the line: $sess_string = $HTTP_GET_VARS["S"]; caused an error of an undefined index s and the redirection opened the index.php again.
so, please do me a gib favour and tell me what to do!

thnxx a lot

Re: same problem but returnto does not work [message #11978 is a reply to message #11973] Thu, 24 July 2003 13:28 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The line that causes a warning tries to find the URL session. To fix the problem do this:
<?php
$sess_string
= isset($_GET['S']) ? $_GET['S'] : '';
?>


FUDforum Core Developer
Re: Re:login on my main news page [message #11981 is a reply to message #8589] Thu, 24 July 2003 15:21 Go to previous messageGo to next message
JamesS is currently offline  JamesS   United States
Messages: 275
Registered: July 2002
Location: Atlanta, GA
Karma: 0
Senior Member
prottoss wrote on Mon, 10 February 2003 10:43

My view on plugins is somewhat mixed, while I see no problem with people adding all kinds of functionaly, I do see a problem with an audited plugins being out there. Many of the security faults in other forums often results from such plug-ins and detract from the overall image of the forum. By making requiring the developers who want to make modification first obtain good understanding of the code I believe this can be avoided.


Aye, but there are hardly even any comments that allude to what is going on in the code. My biggest issue is trying to understand how the templating system works; it is really funky IMHO.
Re: Re:login on my main news page [message #11988 is a reply to message #11981] Thu, 24 July 2003 17:35 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The whole idea about the templating system is that you do not need to go into PHP code, you can make the necessary altertions by modifying the mostly plain HTML .tmpl files. The code which does the template compiling probably would take a small book to fully describe and document and even then there would be a few ambiguities.

FUDforum Core Developer
Re: login on my main news page [message #11992 is a reply to message #8556] Thu, 24 July 2003 18:40 Go to previous messageGo to next message
JamesS is currently offline  JamesS   United States
Messages: 275
Registered: July 2002
Location: Atlanta, GA
Karma: 0
Senior Member
Maybe I was reading things incorrectly, but wouldn't someone need to know how it works to add new php code that has a user interface?
Re: login on my main news page [message #11995 is a reply to message #11992] Thu, 24 July 2003 18:55 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Not really, first of all you can copy/paste from existing page and there is also documention on the various templating tags and basic theme compiler operation.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Question about templates
Next Topic: showing only one category at a time
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 23:10:05 GMT 2024

Total time taken to generate the page: 0.02410 seconds