vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Mini Mods - Bypass registration rules and add to signup page (https://vborg.vbsupport.ru/showthread.php?t=198913)

ringleader 12-14-2008 10:00 PM

Bypass registration rules and add to signup page
 
Description: This mod will remove the first step of the registration process that asks a user to agree to the forum rules, and add it to the following registration page where a user normally chooses a username. All steps (except coppa) will now be available as a single-page signup for users.

Tested & Working on 3.6.10 and 3.7.3 PL1

INSTALLATION INSTRUCTIONS:
1. Download product-moverules.xml from this thread.
2. Go to Admincp -> Manage Products -> Add/Import Product to import this product.
3. Edit template register.

FIND
Code:

$customfields_other
ADD AFTER
Code:

                        <fieldset class="fieldset">
                                <legend>$vbphrase[forum_rules]</legend>
                                <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
                                <tr>
                                        <td>$vbphrase[to_proceed_must_agree]</td>
                                </tr>
                                <tr>
                                        <td>
                                                <div class="page" style="border:thin inset; padding:$stylevar[cellpadding]px;<if condition="!is_browser('konqueror')"> height:175px; overflow:auto</if>">

                                                        <if condition="$show['coppa']">
                                                        <!-- coppa regulations -->
                                                        <p><strong>$vbphrase[coppa_policy]</strong></p>

                                                        <phrase 1="$vboptions[bbtitle]" 2="$vboptions[forumhome].php$session[sessionurl_q]" 3="register.php?$session[sessionurl]do=coppaform" 4="$vboptions[webmasteremail]">$vbphrase[coppa_rules_description]</phrase>
                                                        <!-- / coppa regulations -->
                                                        </if>

                                                        <!-- regular forum rules -->
                                                        <phrase 1="$vboptions[forumhome].php$session[sessionurl_q]" 2="$vboptions[bbtitle]">$vbphrase[forum_rules_description]</phrase>
                                                        <!-- regular forum rules -->

                                                </div>
                                                <div><label for="cb_rules_agree"><input type="checkbox" name="agreebypass" id="cb_rules_agree" value="1" /><strong><phrase 1="$vboptions[bbtitle]">$vbphrase[read_agree_abide_by_rules]</phrase></strong></label></div>
                                        </td>
                                </tr>
                                </table>
                        </fieldset>

4. You're done! Don't forget to click Install.

Attached image: The registration process will bring you directly to this page with the registration rules embedded in it.

janslu 12-15-2008 10:35 AM

Thanks :-)
Just what I needed.

ringleader 12-15-2008 01:24 PM

Quote:

Originally Posted by janslu (Post 1685794)
Thanks :-)
Just what I needed.

Glad you like it. Thanks for the install!

janslu 12-15-2008 05:35 PM

I didn't check properly. It doesn't work on my forum (3.8.0 rc1). No matter if I check the box I land on a "You didn't accept rules" page. Any idea what may be wrong?

ringleader 12-15-2008 06:49 PM

My bad.

Change this in the template edit:

Code:

<div><label for="cb_rules_agree"><input type="checkbox" name="agree" id="cb_rules_agree" value="1" /><strong><phrase 1="$vboptions[bbtitle]">$vbphrase[read_agree_abide_by_rules]</phrase></strong></label></div>
to this:

Code:

<div><label for="cb_rules_agree"><input type="checkbox" name="agreebypass" id="cb_rules_agree" value="1" /><strong><phrase 1="$vboptions[bbtitle]">$vbphrase[read_agree_abide_by_rules]</phrase></strong></label></div>

janslu 12-15-2008 07:34 PM

Thanks. Everything works fine.

mooreaa 01-10-2009 10:08 AM

This mod stopped working in 3.8. Anyway to get this working again?

xlguy 01-13-2009 05:11 PM

I'd also love to get this for 3.8 if possible?

Lincoln 01-19-2009 02:28 PM

I had to make a super-fast-and-dirty hack to make this work again. This is a core file change, so don't do it unless you're fine doing it before every upgrade:

In register.php find this:

PHP Code:

if (!$vbulletin->GPC['agree'])
{
    eval(
standard_error(fetch_error('register_not_agreed'$vbulletin->options['forumhome'], $vbulletin->session->vars['sessionurl_q'])));


And comment out the "eval" line:
PHP Code:

if (!$vbulletin->GPC['agree'])
{
    
#eval(standard_error(fetch_error('register_not_agreed', $vbulletin->options['forumhome'], $vbulletin->session->vars['sessionurl_q'])));


It's something like line 587 or so in 3.8. Anywho, that's the "bad" way of fixing the issue. :erm: Personally I don't care since this is like the third thing I have to hack in register.php to make the registration process not suck so bad.

DotSauce 02-03-2009 05:59 AM

Quick and dirty hack is installed and working on 3.8


All times are GMT. The time now is 06:44 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01139 seconds
  • Memory Usage 1,748KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete