Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Mod Requests => Aiheen aloitti: softtouch - tammikuu 01, 2008, 08:09:48 AP

Otsikko: Mod which display an agreement page before entering a specific board
Kirjoitti: softtouch - tammikuu 01, 2008, 08:09:48 AP
I am in need for a mod (or code to insert) which does:

If the user click a specific board, he should get redirected to a page (similar the registration page), where he has to read an agreement. There he can click either to agree or to cancel.
If he click agree, he can enter that board (gets redirected to the board). If he click cancel, he can not enter the board and will be redirected back to where he was before he clicked the board.
This must occur every time somebody click on that board, so no need to store data etc.
It should be similar to the registration agreement, where a text is displayed and where at the bottom a checkbox and a button is.
Otsikko: Re: Mod which display an agreement page before entering a specific board
Kirjoitti: crash56 - tammikuu 01, 2008, 08:33:21 AP
This is a great idea.  We could use the same sort of thing.  I just wasn't smart enough to think of it and put in a request.  At our forum, it would be useful for the individual board to remember the settings, instead of asking to verify each time.  Sounds like that would involve a separate cookie from the general forum cookie, so that would just be icing on the cake, not a requirement. 
Otsikko: Re: Mod which display an agreement page before entering a specific board
Kirjoitti: softtouch - tammikuu 02, 2008, 09:40:59 AP
Once the user agreed, it could be save in the members table in the database, so he will not be bothered over and over again, or we might want that he has to agree every time he enter that specific board.

Cool would be if we could set it up in the board settings, just a textbox (bbc and html allowed), where we enter the text and tick a checkbox to enable it for that board.

This way, we could use it as a reminder for all kind of things related to that board.
Otsikko: Re: Mod which display an agreement page before entering a specific board
Kirjoitti: softtouch - tammikuu 03, 2008, 02:24:17 AP
Seems to be quiet difficult to do, because nobody seems to have any idea or suggestion on how it could be done...
Otsikko: Re: Mod which display an agreement page before entering a specific board
Kirjoitti: Rudolf - tammikuu 03, 2008, 02:52:40 AP
You might get lucky and get a mod for this by the time SMF 2 is released.
If you are extremely lucky even before. :P
Otsikko: Re: Mod which display an agreement page before entering a specific board
Kirjoitti: softtouch - tammikuu 03, 2008, 09:40:23 IP
How bad... so it looks like nobody ever though about this...
If I only would know where to intercept the function which display the board and how to reroute a user to finally enter that board, I could write the rest by myself... but I dont know much about SMF.
Otsikko: Re: Mod which display an agreement page before entering a specific board
Kirjoitti: snakeplissken - tammikuu 04, 2008, 03:34:42 AP
I would have thought all you need is to redirect the link to the boards that you want it for to a agreement page via the board loop in the Boardindex.template and Messageindex.template.php. You could setup a checkbox in admin and add an if in the board loops.
Otsikko: Re: Mod which display an agreement page before entering a specific board
Kirjoitti: softtouch - tammikuu 04, 2008, 05:22:25 AP
Lainaus käyttäjältä: Snake Plissken - tammikuu 04, 2008, 03:34:42 AP
I would have thought all you need is to redirect the link to the boards that you want it for to a agreement page via the board loop in the Boardindex.template and Messageindex.template.php. You could setup a checkbox in admin and add an if in the board loops.

Something like that. No need for a checkbox, it would be hardcoded, because its just for one board, which board number is given.

But, if I redirect if the board was clicked (how? with redirectexit(...)???), HOW can I, after the user click "I Agree", redirect him from an external agreement page to the board? I guess, I dont understand how it is managed with the agreement for the registration.
If you are a guest, and click a board which you can not enter as guest, you get redirected to the login. Once you enter your usernamer and password there, you get redirected to the board which you wanted to enter... how is that done?
Otsikko: Re: Mod which display an agreement page before entering a specific board
Kirjoitti: Rudolf - tammikuu 04, 2008, 05:49:21 AP
You need to create a second function (or page) that handles the user input from the agreement page.
If the user clicked yes, then you do a redirectexit('?board=10'); otherwise you do redirectexit(); which will take him back to the forum index.
Otsikko: Re: Mod which display an agreement page before entering a specific board
Kirjoitti: softtouch - tammikuu 04, 2008, 07:22:41 AP
Lainaus käyttäjältä: Rudolf - tammikuu 04, 2008, 05:49:21 AP
You need to create a second function (or page) that handles the user input from the agreement page.
If the user clicked yes, then you do a redirectexit('?board=10'); otherwise you do redirectexit(); which will take him back to the forum index.

Ok, I understand that so far, but will a redirectexit(?board=xxx) redirect him again to the agreement page?
I mean, if I redirect him at messageindex.template.php to the agreement page, and there I call redirectexit(?board=xxx), will he not get redirected again to the agreement page or where would I have to redirect him to the agreement page?
Otsikko: Re: Mod which display an agreement page before entering a specific board
Kirjoitti: eric1234 - huhtikuu 23, 2012, 07:27:59 IP
So do we have such function now? :)
Otsikko: Re: Mod which display an agreement page before entering a specific board
Kirjoitti: Biology Forums - huhtikuu 23, 2012, 07:57:16 IP
You'd have to some how create a new column in the database for each board so that when someone agrees, it registers onto the database and as a result, won't be asked again and again. Like the idea, potential mod for sure.
Otsikko: Re: Mod which display an agreement page before entering a specific board
Kirjoitti: eric1234 - huhtikuu 24, 2012, 10:55:08 AP
Lainaus käyttäjältä: Liam_michael - huhtikuu 23, 2012, 07:57:16 IP
You'd have to some how create a new column in the database for each board so that when someone agrees, it registers onto the database and as a result, won't be asked again and again. Like the idea, potential mod for sure.
but from 2008 to now , nobody develop it :(
Otsikko: Re: Mod which display an agreement page before entering a specific board
Kirjoitti: 4Kstore - huhtikuu 24, 2012, 06:20:00 IP
I can see the possible to develop this... but i need time ...