vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   The Alert (https://vborg.vbsupport.ru/showthread.php?t=36624)

Atian 03-27-2002 01:39 PM

The Alert
 
Place this in your <HEAD></HEAD> tags.

<script language="JavaScript">
<!-- Hide from old Browsers
//Beginning of script
//Specify what you want the alert to say

var alertmessage="My Message"

//***No editing required beyond here***

//Alert only once per browser session (0=no, 1=yes)
//The variable below controls whether or not you want the
//alert to popup every browser session or just once

var once_per_session=1

//The functions below will add a cookie
//to tell your computer whether or not you've been
//alerted or not

//The following function controls the cookie itself

function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if cookie exists
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(off set, end))
}
}
return returnvalue;
}

//The following function determines whether to alert you
//or not, if you've recieved the cookie

function alertornot(){
if (get_cookie('alerted')==''){
loadalert()
document.cookie="alerted=yes"
}
}

//The following function loads the alert

function loadalert(){
alert(alertmessage)
}

//The following is an if/else statement on the frequency
//of the alert

if (once_per_session==0)
loadalert()
else
alertornot()

//-->End of Script End of hiding
</script>

Not too bad, if you look at it and get it down

MrLister 03-27-2002 01:40 PM

Template... not a hack

Jawelin 03-27-2002 01:44 PM

Excuse me: why do you put here a javascript course not having anything to do with VBulletin ?

Atian 03-27-2002 01:47 PM

oops,sorry,i sometimes over act >_< and why cant i delete the thread?

wooolF[RM] 03-27-2002 06:42 PM

couse u're not MOD / Admin

Neo 03-28-2002 01:56 AM

I am sure they will delete it soon.... I think there should be a hack making guild line.. and people should read it.

Erwin 03-28-2002 05:10 AM

This is indeed a template hack...


All times are GMT. The time now is 01:33 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.01733 seconds
  • Memory Usage 1,713KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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