![]() |
Panic Button 1.0.1
This is a Panic Button (Should work in IE and FF) in case a member is worried about being on your site at a particular time, for example, at work.
The button defaults to staying glued to the lower right hand corner, but this can be changed in the CSS settings stated below. The button can also be turned off by each member if they don't want to use it. This is a hybrid of my Boss Button and yinyangs work to make the java right. If you have the Custom Error Pages hack installed on a Windows server, you need to edit the settings to use URLs and not files or this will conflict. The image I use is can obviously be substituted with anything else you like. Just be sure to name your image "panicbutton.gif". This may be copied, reproduced or published anywhere without my permission. vB 3.5 Beta Version Demo Please do not register. Details ------- 2 Files to upload (1 Javascript File and 1 Panic Button image) 2 New Profile Field entries (Remember the Field ID# !!) 1 New CSS definition 1 Template Edit You can change the placement of the image anywhere on the screen by editing the .panicbutton CSS. dsboyce8624/yinyang Changes: 7/8/5 - Updated instructions with note about case sensitivty of user field options and conditional code. 7/12/5 - Updated URLs for vBadvanced compatibility. . |
That's great! Thanks! Could this possibly be toggled on/off by the user?
|
Quote:
|
Quote:
1. Turn the Panic Button On/Off with On being the default 2. Allows each user to specify which URL for the panic button to send them to. If someone wants, you can also add two more profile fields that controls a) top or bottom of screen and b) left or right. you would just substitute the corresponding profile field in the Panic Button CSS definitions. |
Quote:
|
Quote:
|
This seems more like a "Misc. Option" Than a profile field :cross-eyed:
I hate to be a pain, but I installed this on a 3.0.7 forum, and it doesn't seem to be working for me. I triple-checked the edits, and css and also checked the proflile field ID in PHPMyAdmin to make sure that they were correct, but it still doesn't work. Yes, I also uploaded the javascript and image as mentioned in the read me. There are only a few steps, so I am at a loss to see what I did wrong. |
I suppose you could put the fields anywhere you like.
Open your site and do a veiw source. Search the source for panic. Is everything there correct? Look for the CSS entry first. Then look at the URL for the script, the destination URL for the button and the image file. You may want to edit the code to show a full URL if they are not correct. |
Quote:
Code:
/* ***** Panic Button Location***** */ |
Show me the code you have in the header, it seems to be missing.
Give me a few lines after as well. Mine shows this in view source: Code:
<!-- BEGIN TEMPLATE: header --> |
Quote:
Code:
<!-- PANIC BUTTON --> |
What are your field numbers?
|
Doesn't:
HTML Code:
.panicbutton { |
Quote:
Panic Button URL Redirect: ID 5 Turn "Panic Button" on?: ID 6 |
Quote:
Although I don't see how that makes the code disappear. I assumed he failed the conditional by not editing the field numbers. I guess you got lucky with the field numbers, mine are different. Thought you forgot to change them. |
Quote:
|
No problem, glad to help.
|
Is that a coincidence that the hack is "Panic Button 101"? Cause I don't see a reference to 1.0.0 anywhere... :P
|
Quote:
anyhow, dsboyce8624 originated this hack and when I looked for a compliant script for xhtml, i coded it and placed it in the vB3.5 area ... even though it will work for all vb3.x. so there is a genesis of 1.00 to 1.01 in the vB3.5 area which you can read here. |
Quote:
There's nothing like making stupid mistakes in public :D |
As long as it got fixed it doesn't matter.
|
Quote:
|
Quote:
Code:
Profile Field Type: Single-Selection Radio Buttons Code:
<if condition="$bbuserinfo[field12] == yes"> Code:
<if condition="$bbuserinfo[field12] == Yes"> |
Quote:
Done. |
well I can't get this to work on vb 3.0.7 and all files, paths, etc are correct.
Shame that, I could do with it on www.meeting4fun.com |
What problem did you have?
|
I have the same problem. im running a board with 3.0.7 and it just wont come up. i verified that the field #'s are correct and the capital and lowercase y correspond and it wont work.
|
Quote:
let's strip it and try it this way first before doing the profile fields. 1. add the new CSS definition 2. make sure the panicbutton.js and panicbutton.gif files are uploaded into the proper folders. 3. add this stripped down code to the beginning of your header: PHP Code:
|
Thanks for your support but when i add that to the header i get this error
The following error occurred when attempting to evaluate this template: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/content/b/i/g/bigdog829/html/includes/adminfunctions_template.php(3096) : eval()'d code on line 104 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. |
Quote:
|
Yup now its working and at a fixed location with a fixed url what do you think the problem is?
|
Quote:
|
Quote:
|
Quote:
Code:
<!--[if lt IE 7]><script src="clientscript/panicbutton.js" type="text/javascript"></script><![endif]--> |
Quote:
thanks yoyoyo - ! |
Quote:
|
Quote:
You need to put the <if . . . > </if> back around it and make sure you have the field numbers right. Seems you had a problem there the first time. And please click Install. |
Quote:
this will allow your users more flexibility and choices. |
One suggestion:
change this Code:
<img src="images/misc/panicbutton.gif" border="0" alt="Panic Button"> Code:
<img src="$vboptions[bburl]/images/misc/panicbutton.gif" border="0" alt="Panic Button"> |
I dont get this hack. What does it do? Close down your browser with a click of a button?
|
All times are GMT. The time now is 02:49 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|