vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   Forum Home Enhancements - UKBL ~ Admin Notice - Timed Popup for Non-Members (https://vborg.vbsupport.ru/showthread.php?t=203966)

UKBusinessLive 02-01-2009 10:00 PM

UKBL ~ Admin Notice - Timed Popup for Non-Members
 
UKBL ~ Admin Notice - Timed Popup for Non-Members


Want to tell non members why they should sign up to your forums, 10 different messages, on a pop up, and its timed so it dissappears after X seconds (adjustable)


DEMO : http://www.ukbusinesslive.co.uk/forum

A Friend wanted this done on his forum asked me if it could be done, With a basic Popup script and a few add ons we came up with The Admin Notice with a difference.

https://vborg.vbsupport.ru/external/2009/02/113.png

When a non member views your forum, a popup appears for X seconds and tells the viewer, some reason why they should sign up, Be it a competition in the arcade, to promoting links from your forum.

The edititing is very easy and you could even use html to add links in the popup, The key word here is to experiment.

The popup is fully sizeable and you can chose the colors of the background and fonts to suit your site, i've just filled my 10 notices with just some ramdom bits but you can be as creative as you want.

The great thing about this popup is the fact that it will switch off after so many seconds, and once they've joined, they won't see it at all, so hopefully it may push people to sign up as a result of your offers etc..

So where do we start??

1. Download the zip file and open it in notepad or any other text editor

2 Find...

Code:

config='toolbar=no,location=no,directories=no,status=no,menubar=no,width=350,height=150'
Here we can change the width and the height, at the end of that line to what we want.

3. Find...

Code:

output.document.write(';",10000)');
This is the time that the pop up is on display, remember its in milliseconds so the default 10000 = 10 seconds, feel free to adjust this to your requirements

4. Find...

Code:

output.document.write('<title>Admin Notice</title>');
output.document.write('<BODY bgcolor=#FDF09A text=#FC040D>');
output.document.write('<center><font face=arial size=-1><b>Admin Notice:</b></font>');

Now this is where we change the pop up title, The popup color and the text color, Oh and the font and size (Almost forgot about that :D )

This is my fave Hex editor http://www.2createawebsite.com/build/hex-colors.html or you can use your sites own hex numbers ;)

Finally, we need to edit the Text Notices, So find these at the very end of the code, it really is that simple

Code:

output.document.write('<hr><br><p>');
if (generateRandomNumber()=="1")
 {output.document.write('<font face=arial size=-1>Competition Time in the Arcade every Monday Night 9pm til 12 Midnight');

And just change "Competition Time in the Arcade every Monday Night 9pm til 12 Midnight" to a notice or message of your choice, remember to keep the same format as the code, just change the wording, nothing else.

The conditional at the begining takes into account the non-registered usergroup, so no one else will view it only those that havn't registered, But if you want to use it for another purpose you can change the usergroup or delete it here

Code:

<if condition="$bbuserinfo['usergroupid'] == 1">
When you've finished with the edits, just copy and paste the code to your forums style, header template, right at the end, and save :D

Log yourself out and try it :up:


As always don't forget to chick the magical Installed Button
:D

Have Fun :D

UKBusinessLive 02-02-2009 04:50 PM

;) Reserved :eek:

F0xy 02-02-2009 05:40 PM

will standard pop up blockers block this?

UKBusinessLive 02-02-2009 05:52 PM

Quote:

Originally Posted by F0xy (Post 1732152)
will standard pop up blockers block this?

Hi Foxy, Yes it will at the moment but as its a forum and the non member is viewing i guess they would view the pop ups out of curiosity. ???

PLUS !!!

if your using this to benefit your members, say like a competition hack or as a tip or quote of the day, then you've tell your members to allow pop ups from your site, to reap the benefits ;)

1320Nation 02-02-2009 07:56 PM

How would you adjust the code if you wanted to add additional user groups to be able to view the popup?

UKBusinessLive 02-02-2009 08:15 PM

Hi you'd replace the condition in the code with this one

Code:

<if condition="is_member_of($vbulletin->userinfo, 1, 2, 3)"></if>
and add the usergroups seperated by commas

murekhalir 02-20-2009 12:01 AM

this ide looks awesome, UKBL you make some REALLY cool mods.

Truly - i've been following it all.

UKBusinessLive 02-20-2009 04:50 AM

Quote:

Originally Posted by murekhalir (Post 1749466)
this ide looks awesome, UKBL you make some REALLY cool mods.

Truly - i've been following it all.

Thanks you Sir, ;)

kawe 02-22-2009 11:29 PM

The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected ',' in /chk/forum/includes/adminfunctions_template.php(3929) : eval()'d code on line 1

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

UKBusinessLive 02-23-2009 04:44 AM

Quote:

Originally Posted by kawe (Post 1751864)
The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected ',' in /chk/forum/includes/adminfunctions_template.php(3929) : eval()'d code on line 1

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

It look like you have an incomplete conditial statement have to remembered to an

Code:

</if>
at the end ??? ;)


All times are GMT. The time now is 06:45 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.01026 seconds
  • Memory Usage 1,749KB
  • 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
  • (7)bbcode_code_printable
  • (3)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