News:

Wondering if this will always be free?  See why free is better.

Main Menu

registration redirected to a rules

Started by Mystiquo, September 06, 2008, 07:18:44 AM

Previous topic - Next topic

Mystiquo

   
I want that when a guest is just that makes the confirmation of registration is addressed or mod rules or to a post where I put things that must necessarily read

babjusi

Quote from: Mystiquo on September 06, 2008, 07:18:44 AM
   
I want that when a guest is just that makes the confirmation of registration is addressed or mod rules or to a post where I put things that must necessarily read

I was going to make a mod for it, but due to lack of time I decided to postpone it.

Anyway, here is what you should do to achive what you need. It is only a small edit.

The file you need is Register.php in the /Sources/ directory

Find the part where the function Activate() is called.

function Activate()
{
    global $db_prefix, $context, $txt, $modSettings, $scripturl, $sourcedir;


After that add:

$_SESSION['login_url'] = 'here the url where you want to redirect your members';


That was it. And as always don''t forget to backup first the file before applying the changes and to use a decent php editor program  :)

If you are uncomfortable with editing the file, then upload it here and I will make the edits for you   :)



Mystiquo

   
thanks sorry    
but this will work only after the user has activated? that is, I want it appears that only the first time after receiving the email to activate and click on the link and entering makes him see the rules or the post

babjusi

Quote from: Mystiquo on September 06, 2008, 08:53:35 AM
   
thanks sorry   
but this will work only after the user has activated? that is, I want it appears that only the first time after receiving the email to activate and click on the link and entering makes him see the rules or the post

That is exactly what this does. After the users activate their account, they will be redirected immediately to where you want them. Only that first time, for the rest not, just like you asked. It has been tested several times on test and live forums alike and it works flawless.

Eliana Tamerin

Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

babjusi

Quote from: Eliana Tamerin on September 06, 2008, 08:56:41 AM
You can use my Force Read Topic on Login mod.

That is a nice mod, but does it work for the users that activate their accounts for the first time, as the op asked? Because from what I could read at the mod description it is only for normal users when they log in and not when the new users activate their account.

Eliana Tamerin

When new users log in, they get redirected, just like any other users. When they activate their accounts, they're automatically logged in, and thus redirected to the topic.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

babjusi

#7
Quote from: Eliana Tamerin on September 06, 2008, 09:21:00 AM
When new users log in, they get redirected, just like any other users. When they activate their accounts, they're automatically logged in, and thus redirected to the topic.

I just tested your mod out of curiosity and as I suspected it doesn''t work for this. It worked fine to redirect users to a topic of admin''s choise upon logging in but not when the new users activated their accounts from their emails.

Eliana Tamerin

It should, because that should be counted as the first time they login.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

babjusi

Quote from: Eliana Tamerin on September 06, 2008, 12:27:50 PM
It should, because that should be counted as the first time they login.

I don''t know about that. As I said I tested it several times and it didn''t work for that. Look, I don''t want to argue with you or anything like that :)

I am merely pointing out that your mod doesn''t work for what the OP has in mind. But you can test it out for yourself, don''t take my word for it :)


Eliana Tamerin

I'll do that, I've added it as a bug for my mod. Thanks for finding that.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

babjusi

Quote from: Eliana Tamerin on September 06, 2008, 12:51:58 PM
I'll do that, I've added it as a bug for my mod. Thanks for finding that.

No problem. That would be a nice add-on to your nice mod :)

Mystiquo

thanks babjusi, Eliana Tamerin you are a beautiful friends for me thanks

mikeb206

Quote from: Eliana Tamerin on September 06, 2008, 08:56:41 AM
You can use my Force Read Topic on Login mod.

I have applied this mod and it does not work. Any ideas? I have tried it on version 1.1.5 and 1.1.6 with the same result - nothing happens.

babjusi

Quote from: mikeb206 on September 09, 2008, 10:12:08 PM
Quote from: Eliana Tamerin on September 06, 2008, 08:56:41 AM
You can use my Force Read Topic on Login mod.

I have applied this mod and it does not work. Any ideas? I have tried it on version 1.1.5 and 1.1.6 with the same result - nothing happens.

Use the suggestion I posted in my first post.

babjusi

Quote from: Mystiquo on September 06, 2008, 07:18:44 AM
   
I want that when a guest is just that makes the confirmation of registration is addressed or mod rules or to a post where I put things that must necessarily read

I released this as a mod now.

http://custom.simplemachines.org/mods/index.php?mod=1445

Advertisement: