vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Panic Button 1.01 (https://vborg.vbsupport.ru/showthread.php?t=91779)

yinyang 07-06-2005 09:00 PM

Panic Button 1.01
 
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 is defaulted to stay glued to the lower right hand corner, but this can be changed in the CSS settings stated below.

Inspired by dsboyce8624's Boss Button problems he was having, I tried to first use a simple "floating menu" script. However, all the scripts i could find were only written for dhtml. That just doesn't work in vB (i tried many versions)... I'm not sure why, but i think it is because vB is XHTML.

I am NOT a coder. I am more of a reverse engineer when it comes to this stuff.

Anyhow, I came across the website of Dean Edwards: http://dean.edwards.name/. In his welcoming paragraph he writes, "This site exists so that I can perform tests on web tools that I?m currently building. This work is open source and is available for download. In other words, I?m always messing about with this site but you can rip-off any code you want. You can alleviate any associated guilt by making a donation."

Well, he has a pretty interesting script called "IE7" that I have no idea how it works. However, it can be found here (and a portion is renamed and included in the zip file): http://dean.edwards.name/IE7/

The rest is history. This works on my test site and I attach it herewith. Oh, since I only tinkered with this thing, I'd like to share the credit and copyright with dsboyce8624, whoever he shares his credit with, and especially Dean Edwards.

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. I'll do my best to support this.

DEMO - My Test Board, 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


Thanks for reading,
YinYang

BTW, you can move the placement of the image anywhere on the screen by editing the .panicbutton CSS .


v1.01 - Update 070805
----------
1. Panic Button may not work if you have Custom Error Pages hack installed. No clue why.


v1.01 - Update 070505
----------
1. changed out the original button with dsboyce8624's cooler button.
2. changed the placement of the script from Footer to Header
3. added a user choice "On/Off" conditional which is a template conditional and controlled via another Profile Field.

kall 07-07-2005 07:13 AM

Quote:

This may be copied, reproduced or published anywhere without my permission.
That's very nice of you! ;)

yinyang 07-07-2005 07:17 AM

Quote:

Originally Posted by kall
That's very nice of you! ;)

Yup! I figure since i didn't actually create any real coding here (all the heavy lifting was done by Dean Edwards), I shouldn't be possessive about it. :classic:

Besides, if Dean made it free-for-all, then it only makes sense I should.

oh yeah, this is my first hack, albeit mini. woot!

dsboyce8624 07-07-2005 12:39 PM

Now we just need the conditional to make it a user option and it's what I was doing.

Biker_GA 07-07-2005 12:46 PM

So what does thing thing do?

jesus likes pie 07-07-2005 01:19 PM

i dont get what this thing does....

StarBuG 07-07-2005 04:00 PM

I also have no clue what this extension does.

You also violate a copyright if you use the microsoft office help image ;)
I would advice against using this graphic

StarBuG

dsboyce8624 07-07-2005 04:43 PM

It puts a floating button on the page, you can hit it to open a new site if your boos comes over to your desk.

dsboyce8624 07-07-2005 04:45 PM

Quote:

Originally Posted by StarBuG
I would advice against using this graphic

You can use the button from my zip if you want.

And let me know when you add the conditional based on a second user field.

Some users don't want to use it.

Biker_GA 07-07-2005 04:52 PM

Quote:

Originally Posted by dsboyce8624
It puts a floating button on the page, you can hit it to open a new site if your boos comes over to your desk.

Who sets the URL? User or Admin? I can see some awesome possibilities with this (like setting the panic button to playboy.com). **GRIN**

dsboyce8624 07-07-2005 04:53 PM

Quote:

Originally Posted by Biker_GA
Who sets the URL? User or Admin? I can see some awesome possibilities with this (like setting the panic button to playboy.com). **GRIN**

The field you add is for the user to fill in the url.

Biker_GA 07-07-2005 04:54 PM

Drat! LOL

yinyang 07-07-2005 05:58 PM

Quote:

Originally Posted by Biker_GA
Drat! LOL

the URL defaults to whatever you set. but you can disable it (i.e. not add the Profile Part) and point it to any URL you want. I've seen some point it to a fake Excel spreadsheet, etc. or a dummy html page you set up.

Quote:

Originally Posted by dsboyce8624
You can use the button from my zip if you want.

And let me know when you add the conditional based on a second user field.

Some users don't want to use it.

Thanks.

1. I've gone ahead and changed out the button and added yours.
2. I've changed the placement of the script from Footer to Header
3. I've also added the On/Off conditional which is a template conditional and controlled via another Profile Field.

In the ACP, go to User Profile Fields > Add New User Profile Field

Profile Field Type: Single-Selection Radio Buttons
Title: Turn "Panic Button" on?
Description: The Panic Button is an icon that resides in a fixed place of your choosing on your screen on your screen. Clicking the icon immediately sends you to another URL of your choice.
Options: Yes (carriage-return)
No
Set default: Yes (thus Panic Button is automatically "on" until the user changes the option to "no")
Display Order: (Fills in automatically)
Field Required: Yes
Filed Editable by User: Yes
Private Field: Yes
Field Searchable on Members list: No
Show on Members List: No

Don't touch anything else and save.
!! Remember the field ID number. In my example, the field number is 6 !!

dsboyce8624 07-07-2005 07:29 PM

Okay, I'm not sure why, but when I put the piece in the header it open the page the first time, then goes 404 error over and over.

Continuous refresh. Of course I have so much crap it could just be placement.

Tried it in headinclude and same result.

yinyang 07-07-2005 07:53 PM

Quote:

Originally Posted by dsboyce8624
Okay, I'm not sure why, but when I put the piece in the header it open the page the first time, then goes 404 error over and over.

Continuous refresh. Of course I have so much crap it could just be placement.

Tried it in headinclude and same result.

well that sucks. try in the footer.

also, try checking in FireFox. for some reason, it works better in firefox as dean edwards is a firefox fanatic.

I put up a test board on my server. You can demo it here. Please don't register. Thanks.

dsboyce8624 07-08-2005 11:55 AM

Maybe so, but 98% of the world uses IE. I will try it in the footer later today.

yinyang 07-08-2005 04:13 PM

Quote:

Originally Posted by dsboyce8624
Maybe so, but 98% of the world uses IE. I will try it in the footer later today.

personally, i'm with you. i don't use FF. if it still doesn't work, you may want to look into the panicbutton.js. i am positive the scripting that allows the panic button to remain absolute/fixed on your screen may be interfering with the rest of your custom coding.

the panic button works on my test site, but i have no hacks added in except for a few true plug ins.

dsboyce8624 07-08-2005 06:29 PM

Hrm, okay I have the custom 404, 403, etc error hack installed.

If I set the 404 error back to default, everything is fine.

Otherwise I get the constant 404 page reload.

Must be a windows thing. I changed the custom 404 from file to URL and now I'm fine.

Somehow I don't think this will be a big problem, not many windows servers combined with that hack.

But you may wanna make a note.

yinyang 07-08-2005 08:43 PM

Quote:

Originally Posted by dsboyce8624
Hrm, okay I have the custom 404, 403, etc error hack installed.

If I set the 404 error back to default, everything is fine.

Otherwise I get the constant 404 page reload.

Must be a windows thing. I changed the custom 404 from file to URL and now I'm fine.

Somehow I don't think this will be a big problem, not many windows servers combined with that hack.

But you may wanna make a note.

will do.

i'll put it in the opening notes that it may, for some reason, conflict with the Custom 404 Error Hack.

AquilaEagle 12-26-2005 08:55 PM

I'm going to try this at th0ng.org :D

dan35 12-26-2005 09:12 PM

me too ;)

pross 12-27-2005 08:02 PM

One of our sites is especially popular with students and we've had reports of various colleges blocking our site on their network. This will come in handy lol

Bounce 12-28-2005 10:36 PM

cant get it to work at all on vb 3.5.0. gold

am I missing something , have even changed the id userfield in the script to go in header without any joy :(

What is carraige return , is the image been left out on new version ??

quanvo81 02-21-2006 07:22 PM

man, it was working good, but after I installed the Post Thank you Hack and Download Thread As PDF, this hack stop working, because it doesn't stick in the right side in the bottom of the page, when I scroll the bar, it move with the page as well.
Man, don't know what to do , because I can't figure out what is going on exactly, can someone give me a hint please?
Thanks

arcadian_girl 05-20-2006 03:14 AM

is there any way to enable this on a per usergroup basis? i wanted to give this as an option for my premium users only....

lard007 01-04-2007 03:50 PM

Installed this on a 3.6 board and working fine - thanks!

shaynehammy 04-25-2007 01:56 AM

Loads of request for this. Anyone got this working in 3.6.4?


All times are GMT. The time now is 01:53 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.02096 seconds
  • Memory Usage 1,798KB
  • 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
  • (10)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