vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 5.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=259)
-   -   Mini Mods - New way to force guests to register (https://vborg.vbsupport.ru/showthread.php?t=297931)

dszuecs 05-07-2013 10:00 PM

New way to force guests to register
 
1 Attachment(s)
If you want me to do the setup for you and create a unique character for your site please check my fiverr.com Gig and spend those 5 bucks :)
http://fiverr.com/dszuecs/create-a-c...d-implement-it


ABOUT THIS MOD

My idea was to place a fix characater on the bottom right, which 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 4.X.X CHECK THIS THREAD
IF YOU RUN VBULLETIN 3.X.X CHECK THIS THREAD


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

2. Open your "css_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 "footer" template and add the following line on top:

To show it on every page add this on bottom right before the </body> tag in footer:
Quote:

<vb:if condition="$bbuserinfo['userid'] == 0"><a href="/register"><div class="forcetoregister"></div></a></vb:if>
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 "css_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!

ForceHSS 05-08-2013 01:37 PM

You spelled wich like this should be which

newbie2007 05-31-2013 10:54 PM

Great trick!

I cant find the css_additional.css file, would I need to create one?

dszuecs 06-05-2013 01:39 PM

Quote:

Originally Posted by newbie2007 (Post 2425151)
Great trick!

I cant find the css_additional.css file, would I need to create one?

Hi there

Please perform a template search for 'additional.css' via admincp, you should be able to see it there.

Cheers
Dennis

newbie2007 06-06-2013 05:35 PM

Quote:

Originally Posted by dszuecs (Post 2425942)
Hi there

Please perform a template search for 'additional.css' via admincp, you should be able to see it there.

Cheers
Dennis

Thank You very much! :up:

newbie2007 06-25-2013 12:01 AM

Hello again!

Is there any way to remove the image on the registration page? The image covers the "Complete Signup" button, when viewed on a mobile device, and stops users from registering!

EDIT: Never mind, I changed the size of the image. But still something to look at.

Scanu 06-25-2013 12:43 PM

Change this
Code:

<vb:if condition="$bbuserinfo['userid'] == 0"><a href="/register"><div class="forcetoregister"></div></a></vb:if>
to this
Code:

<vb:if condition="$bbuserinfo['userid'] == 0 && THIS_SCRIPT != 'register'"><a href="/register"><div class="forcetoregister"></div></a></vb:if>
I haven't tested this on vB5 but it should works :)

newbie2007 06-25-2013 09:58 PM

Thank you

kiba snowpaw 08-03-2013 11:41 PM

WOW this is so nice i only have one problem i Use vBulletin 4.2.1 and i get a error every time i click on the photo ??

Edit:

what i can see the problem is my forum is in a Folder call forum so the link should be /forum/register but every time i try to cheance it nothin happen it still try to open Homepage.dk/register but it should be Homepage.dk/forum/register know anyhow to chence
that

i was looking around in FTP and found out it was call register.php
so i chence The

PHP Code:

<vb:if condition="$bbuserinfo['userid'] == 0"><a href="/register"><div class="forcetoregister"></div></a></vb:if> 

to
PHP Code:

<vb:if condition="$bbuserinfo['userid'] == 0"><a href="/Forum/register.php"><div class="forcetoregister"></div></a></vb:if> 

and that help now it work

Jasonspd 10-10-2013 11:11 AM

Quote:

Originally Posted by Scanu (Post 2430369)
Change this
Code:

<vb:if condition="$bbuserinfo['userid'] == 0"><a href="/register"><div class="forcetoregister"></div></a></vb:if>
to this
Code:

<vb:if condition="$bbuserinfo['userid'] == 0 && THIS_SCRIPT != 'register'"><a href="/register"><div class="forcetoregister"></div></a></vb:if>
I haven't tested this on vB5 but it should works :)

I tried this but it doesn't work. Is there another way to not have the mod on the register page?

ozzy47 10-10-2013 11:12 AM

Use this.

Code:

<vb:if condition="$bbuserinfo['userid'] == 0 && THIS_SCRIPT != 'register'"><a href="/register"><div class="forcetoregister"></div></a></vb:if>

Jasonspd 10-14-2013 07:52 PM

Quote:

Originally Posted by ozzy47 (Post 2451757)
Use this.

Code:

<vb:if condition="$bbuserinfo['userid'] == 0 && THIS_SCRIPT != 'register'"><a href="/register"><div class="forcetoregister"></div></a></vb:if>

That's the exact same code

smile2me 10-30-2013 01:55 AM

Quote:

<vb:if condition="$bbuserinfo['userid'] == 0 && THIS_SCRIPT != 'register'"><a href="/register"><div class="forcetoregister"></div></a></vb:if>
it's not working at all. anybody else can help please ?!! is there any possible way not to show this picture in the registration page ?!!

bhalkum 10-31-2013 07:32 AM

Works fine on 5.0.5, except the image covers the submit button on the registration page.

Timotimoti 12-18-2013 12:15 AM

Thank you, works fine to me.

ndut 01-11-2014 06:07 PM

nice forum, srowned

Macgiber 04-29-2014 03:07 AM

works 5.1.0 thanks

classicrv 07-01-2014 04:33 PM

This is very cool! Thanks!!

Still can't get it OFF the registration page. Anyone have any idea?

Rahstyles 07-07-2014 12:32 PM

dont work at all nothing shows up

mellesoft 09-09-2014 05:28 AM

dont work for me either. please help. V 5.1.3

Righard 09-11-2014 09:04 PM

Doesn't work here on 5.1.3... Too bad... I like it...

shimei 05-29-2015 02:26 AM

Great and working with 5.1.7


You can see it here: https://www.christforums.org

Thanks much,
Shim

shimei 06-05-2015 02:15 AM

Quote:

Originally Posted by bhalkum (Post 2457413)
Works fine on 5.0.5, except the image covers the submit button on the registration page.

You could move the registration button to the left side:

Code:

.action-buttons {
  text-align: left;
}

I suspect people are having issue with smaller screen sizes. To not display the image on screens smaller than 600px:

Code:

@media only screen and (max-width: 600px) {
  div.forcetoregister {display: none;}
}


MokeyII 09-14-2016 10:24 AM

I can't seem to get it to work on 5.2.3

tattotattoo 08-27-2020 06:06 PM

like bro!

ywwz 08-31-2020 03:05 AM

Does it work on 5.6.3?

Mboora 12-31-2020 09:41 PM

Please could someone update this for 5.6.4?


All times are GMT. The time now is 05:23 PM.

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.01308 seconds
  • Memory Usage 1,804KB
  • 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
  • (8)bbcode_code_printable
  • (2)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (27)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