vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Limit Registration to Mobile App (https://vborg.vbsupport.ru/showthread.php?t=276931)

khalid 01-14-2012 06:39 AM

Limit Registration to Mobile App
 
I have a forum and the mobile app and would like to allow forum Registration throgh mobile app only. I mean if someone try to register through the website he gets a message that Registration is allowed through mobile app only.

Is it easy to do?
Any idea that might help?

Thank you

LifesGreatestGift 01-14-2012 05:47 PM

1 Attachment(s)
edit your register template to remove all registration form options, add a custom styled div explaining that registration is only available through the forum app and supply links on how to obtain the app.

Worse case scenario is you would have to revert the register template.

This way, when someone clicks register on the forum, they are directed to your customized version of the register page.

Here is an example register template that would work. (btw, just finished coding/styling it hope you enjoy! ;) )

Code:

{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml"<vb:if condition="$vboptions['enablefacebookconnect']"> xmlns:fb="http://www.facebook.com/2008/fbml"</vb:if> dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}">
<head>
        {vb:raw headinclude}

        {vb:cssfile register.css}
        <title><vb:if condition="$show['coppa']">{vb:rawphrase coppa} </vb:if>{vb:rawphrase register_at_x, {vb:raw vboptions.bbtitle}}</title>
{vb:raw headinclude_bottom}
</head>
<body>

{vb:raw header}
{vb:raw navbar}

<style type="text/css">
#apponly{
                background-color: #4ea5cd;             
                -webkit-background-size: 40px 40px;
                -moz-background-size: 40px 40px;
                background-size: 40px 40px;
                background-image: -webkit-gradient(linear, left top, right bottom,
                                                        color-stop(.25, rgba(255, 255, 255, .05)), color-stop(.25, transparent),
                                                        color-stop(.5, transparent), color-stop(.5, rgba(255, 255, 255, .05)),
                                                        color-stop(.75, rgba(255, 255, 255, .05)), color-stop(.75, transparent),
                                                        to(transparent));
                background-image: -webkit-linear-gradient(135deg, rgba(255, 255, 255, .05) 25%, transparent 25%,
                                                        transparent 50%, rgba(255, 255, 255, .05) 50%, rgba(255, 255, 255, .05) 75%,
                                                        transparent 75%, transparent);
                background-image: -moz-linear-gradient(135deg, rgba(255, 255, 255, .05) 25%, transparent 25%,
                                                        transparent 50%, rgba(255, 255, 255, .05) 50%, rgba(255, 255, 255, .05) 75%,
                                                        transparent 75%, transparent);
                background-image: -ms-linear-gradient(135deg, rgba(255, 255, 255, .05) 25%, transparent 25%,
                                                        transparent 50%, rgba(255, 255, 255, .05) 50%, rgba(255, 255, 255, .05) 75%,
                                                        transparent 75%, transparent);
                background-image: -o-linear-gradient(135deg, rgba(255, 255, 255, .05) 25%, transparent 25%,
                                                        transparent 50%, rgba(255, 255, 255, .05) 50%, rgba(255, 255, 255, .05) 75%,
                                                        transparent 75%, transparent);
                background-image: linear-gradient(135deg, rgba(255, 255, 255, .05) 25%, transparent 25%,
                                                        transparent 50%, rgba(255, 255, 255, .05) 50%, rgba(255, 255, 255, .05) 75%,
                                                        transparent 75%, transparent);
                width: 80%;
                border: 1px solid #414141;
                color: #fff;
                padding: 15px;
                text-shadow: 0 1px 0 rgba(0,0,0,.5);
                -webkit-animation: animate-bg 5s linear infinite;
                -moz-animation: animate-bg 5s linear infinite;
                margin: 0 auto;
}
p.apponly{font-size:17px;font-weight:bold;padding-bottom:10px}
p.apponlybody{padding-bottom:20px}
#apponly a{color:#FFF;font-style:italic}
@-webkit-keyframes animate-bg
{
    from {
        background-position: 0 0;
    }
    to {
      background-position: -80px 0;
    }
}

@-moz-keyframes animate-bg
{
    from {
        background-position: 0 0;
    }
    to {
      background-position: -80px 0;
    }
}
</style>

<div id="apponly">
<p class="apponly">Registration is available only through our Mobile Application!</p>
<p class="apponlybody">We have disabled registration through our forums. The only way to register now is through our mobile app. Below are links for obtaining this app on your phone. For more information please <a href="mysite.com/link-to-thread-explaining-forum-registration-disabled-through-browser">click this link</a>.</p>
<p class="apponlylinks">App Store: <a href="mysite.com/link-to-app-store-app">My App Store App Name</a></p>
<p class="apponlylinks">Android Market: <a href="mysite.com/link-to-android-market-app">My Android App Name</a></p>
</div>

{vb:raw footer}

</body>
</html>

Enjoy! Feel free to edit/style as needed.

khalid 01-15-2012 06:00 AM

Thank you very much. I never thought of that. I thought of deleteing the register.php file but this also stopped the registeration from mobile.

Thanks again.


All times are GMT. The time now is 02:13 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.00990 seconds
  • Memory Usage 1,740KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete