Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: 1.00, by Bioderm Bioderm is offline
Developer Last Online: Jun 2002 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 01-20-2002 Last Update: Never Installs: 7
 
No support by the author.

This hack adds the glow and shadow buttons with the bold and italics buttons.You must have the glow and shadow codes installed for it to work.

Files to Edit:Template(vbcode_buttons)
vbcode_language.js
vbcode.js

Under vbcode code template
>> Vbcode_buttons

add:

<input type="button" class="bginput" value=" Glow " onclick="glow(this.form,'glow','')" onmouseover="stat('glow')" title="Glow (alt+g)" accesskey="g"
><input type="button" class="bginput" value=" Shadow " onclick="shadow(this.form,'shadow','')" onmouseover="stat('shadow')" title="Shadow (alt+s)" accesskey="s"
>

near the other buttons,make it look like you want of course.

now for vbcode.js

At the bottom add:

function smilie(thesmilie) {
// inserts smilie text
document.vbform.message.value += thesmilie+" ";
document.vbform.message.focus();
}

function opensmiliewindow(x,y,sessionhash) {
// um... opens smilie overflow window.
window.open("misc.php?action=getsmilies&s"+session hash, "smilies", "toolbar=no,scrollbars=yes,resizable=yes,width="+x +",height="+y);
}

// ************************************************** *****

function glow(theform,thetype) {
// inserts glow text - [glow=color]xxx[/glow]
glowcolor = prompt(color_text_prompt,"");
var prompttext;
if (thetype == "GLOW") {
prompt_text = glow_text_prompt;
prompt_contents = "color";
}
else {
prompt_text = glow_text_prompt;
prompt_contents = "";
}
glow = prompt(prompt_text,prompt_contents);
if ((glow != null) && (glow != "")) {
if ((glowcolor != null) && (glowcolor != ""))
theform.message.value += "["+thetype+"="+glowcolor+"]"+glow+"[/"+thetype+"] ";
else
theform.message.value += "["+thetype+"="+glowcolor+"]"+glow+"[/"+thetype+"] ";
}
theform.message.focus();
}


// ************************************************** *****

function shadow(theform,thetype) {
// inserts shadowed text - [shadow=color]xxx[/shadow]
shadowcolor = prompt(color_text_prompt,"");
var prompttext;
if (thetype == "Shadow") {
prompt_text = shadow_text_prompt;
prompt_contents = "color";
}
else {
prompt_text = shadow_text_prompt;
prompt_contents = "color";
}
shadow = prompt(prompt_text,prompt_contents);
if ((shadow != null) && (shadow != "")) {
if ((shadowcolor != null) && (shadowcolor != ""))
theform.message.value += "["+thetype+"="+shadowcolor+"]"+shadow+"[/"+thetype+"] ";
else
theform.message.value += "["+thetype+"="+shadowcolor+"]"+shadow+"[/"+thetype+"] ";
}
theform.message.focus();
}


// ************************************************** *****

save and close

In vbcode_language.js add:

glow_text_prompt = "Enter the glowing text";
color_text_prompt = "Enter the color you want to use";
shadow_text_prompt = "Enter the text that you want to have a shadow around";

near:

link_text_prompt = "Enter the text to be displayed for the link (optional)";
link_url_prompt = "Enter the full URL for the link";
link_email_prompt = "Enter the email address for the link";

save and close.

Now upload the 2 js files you should have added the glow and shadow commands to your buttons list in the add/reply to views.

Always backup files before modifying them.

I did not write this code fully.

It is a modified version of the code already in these 2 files.

The reason i did this is because i saw someone asking for this ode over at www.vbulletin.com and wasnt sure if someone already made it.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 01-22-2002, 03:47 PM
Bald Bouncer's Avatar
Bald Bouncer Bald Bouncer is offline
 
Join Date: Oct 2001
Location: UK
Posts: 228
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you missed on thing mate

in vbcode_language

add

glow_text = "Make your text Glow";
shadow_text = "Give text a Shadow effect";

below

img_text = "Insert an image into your message";


cheers for this hack mate
Reply With Quote
  #13  
Old 01-22-2002, 04:46 PM
StarBuG's Avatar
StarBuG StarBuG is offline
 
Join Date: Dec 2001
Location: Germany
Posts: 1,033
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

VERY NICE! Hehe

Is it possible to let the User define both (the font and the glow color? The same for Shadow??

Would be a great improvment!!!!

Hope you can help!

Thx

StarBuG
Reply With Quote
  #14  
Old 01-22-2002, 05:01 PM
Bald Bouncer's Avatar
Bald Bouncer Bald Bouncer is offline
 
Join Date: Oct 2001
Location: UK
Posts: 228
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

heres the ICQ button
Reply With Quote
  #15  
Old 01-22-2002, 07:53 PM
Bioderm Bioderm is offline
 
Join Date: Dec 2001
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Bald Bouncer
you missed on thing mate

in vbcode_language

add

glow_text = "Make your text Glow";
shadow_text = "Give text a Shadow effect";

below

img_text = "Insert an image into your message";


cheers for this hack mate
well thats an old button was included with it,so it should have been in there already.atleast i though it was.
Reply With Quote
  #16  
Old 01-23-2002, 12:34 PM
Bald Bouncer's Avatar
Bald Bouncer Bald Bouncer is offline
 
Join Date: Oct 2001
Location: UK
Posts: 228
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how come you can only use these once before getting a JS error?
Reply With Quote
  #17  
Old 01-23-2002, 03:54 PM
Xelation's Avatar
Xelation Xelation is offline
 
Join Date: Jan 2002
Location: Buffalo, New York
Posts: 457
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes, please make a drop down menu!! that would be very helpful!
Reply With Quote
  #18  
Old 01-24-2002, 09:09 PM
Bioderm Bioderm is offline
 
Join Date: Dec 2001
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you get a js error.weird i have had no problems with it.
Reply With Quote
  #19  
Old 01-25-2002, 12:44 AM
Psychdrone Psychdrone is offline
 
Join Date: Nov 2001
Posts: 525
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

like I siad before I have a problem also when I click it more than ounce!
Reply With Quote
  #20  
Old 01-30-2002, 11:54 AM
pogo's Avatar
pogo pogo is offline
 
Join Date: Oct 2001
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I rewrote this hack because I couldn't find the error in the first version
I had the same problem that the Glow and Shadow buttons were working one time only.

Add this add the end of vbcode.js :
Code:
function glow(theform) {
	glowtext = prompt(glow_text_prompt,"");
	glowcolor = prompt(color_text_prompt,"");
	if ((glowcolor != null) && (glowcolor != "")) {
		if ((glowtext != null) && (glowtext != ""))
			theform.message.value += "[GLOW="+glowcolor+"]"+glowtext+"[/GLOW] ";
		else
			theform.message.value += "[GLOW="+glowcolor+"][/GLOW] ";
		}
	theform.message.focus();
}


// ******************************************************* 

function shadow(theform) {
	shadowtext = prompt(shadow_text_prompt,"");
	shadowcolor = prompt(color_text_prompt,"");
	if ((shadowcolor != null) && (shadowcolor != "")) {
		if ((shadowtext != null) && (shadowtext != ""))
			theform.message.value += "[SHADOW="+shadowcolor+"]"+shadowtext+"[/SHADOW] ";
		else
			theform.message.value += "[SHADOW="+shadowcolor+"][/SHADOW] ";
		}
	theform.message.focus();
}


// *******************************************************
Add this at the end of vbcode_language.js :
Code:
glow_text_prompt = "Enter the glowing text"; 
color_text_prompt = "Enter the color you want to use"; 
shadow_text_prompt = "Enter the text that you want to have a shadow around";
glow_text = "Make your text Glow"; 
shadow_text = "Give text a Shadow effect";
Insert this into the vbcode_buttons template :
Code:
<input type="button" class="bginput" value=" Glow " onclick="glow(this.form)" onmouseover="stat('glow')" title="Glow (alt+g)" accesskey="g">
<input type="button" class="bginput" value=" Shadow " onclick="shadow(this.form)" onmouseover="stat('shadow')" title="Shadow (alt+s)" accesskey="s">
possibly before
Code:
<input type="button" class="bginput" value=" B " onclick="vbcode(this.form,'B','')" onmouseover="stat('b')" title="BOLD (alt+b)" accesskey="b">
Reply With Quote
  #21  
Old 04-12-2002, 09:42 PM
Platinumgamer's Avatar
Platinumgamer Platinumgamer is offline
 
Join Date: Jan 2002
Location: Phoenix, AZ
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am going to install this. Is there any chance someone could make something like this for alignment?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:30 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.07195 seconds
  • Memory Usage 2,314KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete