Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
New way to force guests to register Details »»
New way to force guests to register
Version: 2.00, by dszuecs dszuecs is offline
Developer Last Online: Mar 2018 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.2.x Rating:
Released: 10-17-2011 Last Update: 01-04-2012 Installs: 391
Template Edits
Additional Files  
No support by the author.

ABOUT THIS MOD

My idea was to place a fix characater on the bottom right, wich forces guests to register an account, because i was sick of those standard "hello guest, register" mods.

So with this little modification, you are able to display a nice and flashy character to all guests - forcing them to register

All examples on the bottom are free to use.

-----------------------------------------------------------------------------------------------------------------

LIVE-DEMO: http://www.srowned.org

-----------------------------------------------------------------------------------------------------------------

IF YOU RUN VBULLETIN 3.X.X CHECK THIS THREAD

1. Upload your desired image to "/images/misc/register.png" (if you want my symples, feel free to use them, they are all attached below)

2. Open your "additional.css" and add the following lines:

Quote:
div.forcetoregister {
background:url(images/misc/register.png);
background-repeat: no-repeat;
width:300px;
height:200px;
padding:0 5px 3px;
position:fixed;
right:1px;
bottom:0px;
z-index:1;
}
3. Open your "header" template and add the following line on top:

To show it on EVERY PAGE add this:
Quote:
<vb:if condition="$show['guest']"><a href="/register.php"><div class="forcetoregister"></div></a></vb:if>
To show it only on FIRST PAGE (forum home) add this (thx @ Whity):
Quote:
<vb:if condition="THIS_SCRIPT == 'index'">
<vb:if condition="$show['guest']"><a href="/register.php"><div class="forcetoregister"></div></a></vb:if>
</vb:if>
To show it on every page EXCEP THE REGISTER PAGE, add this code:
Quote:
<vb:if condition="THIS_SCRIPT != 'register'">
<vb:if condition="$show['guest']"><a href="/register.php"><div class="forcetoregister"></div></a></vb:if>
</vb:if>
If you want the image to show up only for SPECIFIC USERGROUP(S), for example User who need to verify their e-mail adress - use this code:
Quote:
<vb:if condition="is_member_of($bbuserinfo, 3)"><a href="/register.php"><div class="forcetoregister"></div></a></vb:if>
Make sure to check your Usergroup ID in the ADMINCP as these may differ!



4. Mark as installed

5. You are done!


-----------------------------------------------------------------------------------------------------------------

NEW FEATURE: RANDOM IMAGE ON EVERY PAGERELOAD


Since some one at the forum came up with the wish, to have random images on every pagereload, i can now provide you a solution:

1. Add this code to your "additional.css" instead of the code provided on top:

Quote:
div.forcetoregister {
background:url(rotate.php);
background-repeat: no-repeat;
width:300px;
height:200px;
position:fixed;
right:1px;
bottom:0px;
z-index:1;
}
2. Download the file "rotate.php" wich is attached below

3. Upload the file "rotate.php" to your FORUMROOT

4. Open "images/misc" via FTP and create a new folder called "ftr" (Complete path should look like this: /images/misc/ftr)

5. Upload your desired images to the "ftr" folder (supported file extensions are: PNG, GIF & JPG)

6. Your done!

SPEND ME A BUCK

If you like my Mod feel free to check my fiverr.com gig: http://fiverr.com/dszuecs/create-a-c...d-implement-it

Download Now

File Type: php rotate.php (1.5 KB, 796 views)

Screenshots

File Type: png register.png (72.5 KB, 0 views)
File Type: png registerv2.png (60.9 KB, 0 views)
File Type: png registerV3.png (40.7 KB, 0 views)
File Type: png registerV4.png (67.6 KB, 0 views)
File Type: png registerV5.png (64.5 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 10-26-2011, 07:14 AM
thedarkroom's Avatar
thedarkroom thedarkroom is offline
 
Join Date: Oct 2011
Location: mexico
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there a way that the images change by themselves in different times? i mean you load the page and one image comes out, you load the page again and another image shows up
Reply With Quote
Благодарность от:
mIQe
  #43  
Old 10-26-2011, 07:27 AM
Whity's Avatar
Whity Whity is offline
 
Join Date: Dec 2004
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

3. Open your "header" template and add the following line on top:

PHP Code:
<vb:if condition="THIS_SCRIPT == 'index'">
<
vb:if condition="$show['guest']"><a  href="/register.php"><div  class="forcetoregister"></div></a></vb:if>
</
vb:if> 

or

PHP Code:
<vb:if condition="THIS_SCRIPT !== 'register'">
<
vb:if condition="$show['guest']"><a  href="/register.php"><div  class="forcetoregister"></div></a></vb:if>
</
vb:if> 
Reply With Quote
Благодарность от:
d19rnyxx
  #44  
Old 10-26-2011, 08:28 AM
thedarkroom's Avatar
thedarkroom thedarkroom is offline
 
Join Date: Oct 2011
Location: mexico
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i added the image, and the syntax on the header, but is not showing
Reply With Quote
  #45  
Old 10-26-2011, 03:34 PM
dszuecs dszuecs is offline
 
Join Date: Oct 2011
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by thedarkroom View Post
i added the image, and the syntax on the header, but is not showing
Did you also add the class to your "additional.css" ?
Reply With Quote
  #46  
Old 10-26-2011, 04:07 PM
thedarkroom's Avatar
thedarkroom thedarkroom is offline
 
Join Date: Oct 2011
Location: mexico
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dszuecs View Post
Did you also add the class to your "additional.css" ?
yes i did

UPDATE
i manage to make it work by editing the additional.css of the default template, but how can i make the image to be more small? www.megaportes.com/foro
Reply With Quote
  #47  
Old 10-26-2011, 04:08 PM
dszuecs dszuecs is offline
 
Join Date: Oct 2011
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by d19rnyxx View Post
can someone guide me on how to center the "complete registration" and "reset fields" because the image stops users from pressing them.

Thanks in advance
Simply add this in your "additional.css":

Quote:
<vb:if condition="THIS_SCRIPT != 'register'">
<vb:if condition="$show['guest']"><a href="/register.php"><div class="forcetoregister"></div></a></vb:if>
</vb:if>
This will exclude the register-avatar on your /register.php.

Greetings
Reply With Quote
Благодарность от:
d19rnyxx
  #48  
Old 10-26-2011, 04:48 PM
thedarkroom's Avatar
thedarkroom thedarkroom is offline
 
Join Date: Oct 2011
Location: mexico
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HTML Code:
<vb:if condition="THIS_SCRIPT != 'register'">
<vb:if condition="$show['guest']"><a href="/register.php"><div class="forcetoregister"></div></a></vb:if>
</vb:if>
when i try to add this to the header says that theres a bad syntax and cannot save the template ._.
Reply With Quote
  #49  
Old 10-26-2011, 04:53 PM
dszuecs dszuecs is offline
 
Join Date: Oct 2011
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by thedarkroom View Post
HTML Code:
<vb:if condition="THIS_SCRIPT != 'register'">
<vb:if condition="$show['guest']"><a href="/register.php"><div class="forcetoregister"></div></a></vb:if>
</vb:if>
when i try to add this to the header says that theres a bad syntax and cannot save the template ._.
What vbulletin version are you using?
Reply With Quote
  #50  
Old 10-26-2011, 05:18 PM
thedarkroom's Avatar
thedarkroom thedarkroom is offline
 
Join Date: Oct 2011
Location: mexico
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dszuecs View Post
What vbulletin version are you using?
4.1.7
Reply With Quote
  #51  
Old 10-26-2011, 05:26 PM
Whity's Avatar
Whity Whity is offline
 
Join Date: Dec 2004
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by thedarkroom View Post
4.1.7

great rabbit :up:
Reply With Quote
Благодарность от:
thedarkroom
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:51 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07997 seconds
  • Memory Usage 2,400KB
  • Queries Executed 28 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_html
  • (2)bbcode_php
  • (13)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (25)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (6)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete