MyBB Community Forums

Full Version: How would I change it?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, so I have the portal as the index.php and index.php as forums.php

Or to say, I am using my portal as the index instead.

But the login box does not work, it does not take them to forums.php

So how can I make it do that?
I'm not too sure I follow...

You have your own (you made it yourself) portal setup as index.php... when users login, you want them to go forum.php?

If that's right, then the login form needs to be something like this:

<form action='member.php' method='post'>
Username: <input type='text' name='username' size='25' maxlength='30' /><br />
Password: <input type='password' name='password' size='25' />
<input type='hidden' name='action' value='do_login'>
<input type='hidden' name='url' value='forum.php' />
<input type='submit' class='submit' name='submit' value='Login' /></form>

The hidden field "url" will redirect them to forum.php after they have logged in... of course, changing action='member.php' to point to where your member.php file is...
(2008-11-13, 09:19 AM)Tom.M Wrote: [ -> ]I'm not too sure I follow...

You have your own (you made it yourself) portal setup as index.php... when users login, you want them to go forum.php?

If that's right, then the login form needs to be something like this:

<form action='member.php' method='post'>
Username: <input type='text' name='username' size='25' maxlength='30' /><br />
Password: <input type='password' name='password' size='25' />
<input type='hidden' name='action' value='do_login'>
<input type='hidden' name='url' value='forum.php' />
<input type='submit' class='submit' name='submit' value='Login' /></form>

The hidden field "url" will redirect them to forum.php after they have logged in... of course, changing action='member.php' to point to where your member.php file is...
I renamed the two files.
Index.php - Forums.php
Portal.php - Index.php

So will that still work then?
(2008-11-13, 09:24 AM)Clair Wrote: [ -> ]I renamed the two files.
Index.php - Forums.php
Portal.php - Index.php

So will that still work then?

Absolutely... but it depends where you want them to go after they have logged in. You can change or force them to go to a specific place by altering the hidden URL tag...

In your templates, alter the Portal Templates, and edit "portal_welcome_guesttext". This is the login form. Then, just change the form to:

<form method="post" action="{$portal_url}"><input type="hidden" name="action" value="do_login" />
{$lang->username}<br />&nbsp;&nbsp;<input type="text" class="textbox" name="username" value="" /><br /><br />
{$lang->password}<br />&nbsp;&nbsp;<input type="password" class="textbox" name="password" value="" /><br />
<br /><input type='hidden' name='url' value='forum.php' /><input type="submit" class="button" name="loginsubmit" value="{$lang->login}" /></form>

Change value='forum.php' to wherever you want them to go...
Doesn't seem to work for me.
My URL is http://yaoilland.site90.net
(2008-11-13, 09:37 AM)Clair Wrote: [ -> ]Doesn't seem to work for me.
My URL is http://yaoilland.site90.net

Have you changed your templates with the code above? There isn't a hidden URL in your login form there...
(2008-11-13, 10:11 AM)Tom.M Wrote: [ -> ]
(2008-11-13, 09:37 AM)Clair Wrote: [ -> ]Doesn't seem to work for me.
My URL is http://yaoilland.site90.net

Have you changed your templates with the code above? There isn't a hidden URL in your login form there...

I did, and it didn't work before.
Changed it back. Unless I need to give it some time.
What happens if you tell it to use portal.php as index with .htaccess?

DirectoryIndex portal.php index.php

I have not tried this myself but if you are lucky it may just work.
(2008-11-13, 10:18 AM)Clair Wrote: [ -> ]
(2008-11-13, 10:11 AM)Tom.M Wrote: [ -> ]
(2008-11-13, 09:37 AM)Clair Wrote: [ -> ]Doesn't seem to work for me.
My URL is http://yaoilland.site90.net

Have you changed your templates with the code above? There isn't a hidden URL in your login form there...

I did, and it didn't work before.
Changed it back. Unless I need to give it some time.

Perhaps your browser cached the result?