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: , by s.molinari s.molinari is offline
Developer Last Online: Sep 2018 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 07-29-2001 Last Update: Never Installs: 102
 
No support by the author.

Hello vB Troopers,

With special permission from the Dev Team I am proud to release an improved version of vbcode.js. Any usage of this script other than in licensed vBulletin driven Boards is a direct violation of Jelsoft copyrights. Any violators will be prosecuted to the full extent of the law!

One MAJOR Improvement(note: only works with IE, NS users are out o luck! But who uses NS anyway?)

vBcode and smilies will be inserted wherever the cursor is instead of at the end of the text.

Installation
Copy the new vbcode.js file over your old one(see "Another small note" below). If you'd like to keep the old file just rename it before copying the new one.

You need to add the following text to the "message" textarea tag:
Code:
onChange=getActiveText(this) onclick=getActiveText(this)
It should basically look similiar to this:
Code:
<textarea name="message" rows="20" cols="$textareacols" wrap="virtual" tabindex="2" 
onChange=getActiveText(this) onclick=getActiveText(this) >$message</textarea>
Please note: The variable($message) may be different in some templates, editpost for example, so make sure to keep the original variable in the textarea attribute "name =". Otherwise the text may be missing in some instances.

This textarea can be found in the following templates:

Calendar Templates

calendar_enterevent

New Posting Templates

newreply

newthread

Private Messaging Templates

priv_forwardmultiple

priv_sendprivmsg

priv_sendtobuddies

and the editpost template

additional template changes

In the vbcode_popup_smilies template you must delete the following code:
Code:
<script language="JavaScript">
function smilie(smilietext) {
        opener.document.vbform.message.value += smilietext+" ";
        //opener.vbform.message.focus();
}
</script>
In the vbcode__popup_smiliebits template you must change:
Code:
<a href="javascript:smilie('$smilie[text]')">
to:
Code:
<a href="javascript:opener.smilie('$smilie[text]')">
small note:If you use the above code pleas omit the space between java and script.


If these changes aren't made the new script WILL NOT WORK!

I hope to hear from those who use it, and please let me know if you find a bug.


vB.org is using this hack. Try it out!

Scott

Latest release date: 20.04.2002
Any version older than this should be updated.

Show Your Support

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

Comments
  #172  
Old 07-12-2002, 03:41 PM
alexp alexp is offline
 
Join Date: Jan 2002
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works on our 2.2.6 with the original instructions from the top post on this thread. 2 mins job to implement.

still my fave hack
Reply With Quote
  #173  
Old 07-12-2002, 05:33 PM
plasir plasir is offline
 
Join Date: Mar 2002
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thx. right ! It works well. It's may favourite hack also. Extreme usefull. ;-))
Reply With Quote
  #174  
Old 08-26-2002, 11:28 PM
Webmasta XT's Avatar
Webmasta XT Webmasta XT is offline
 
Join Date: Mar 2002
Posts: 359
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i installed the shoutbox, than i install this hack, now the shoutbox smilies don't work, but the hack works for the rest of the forums......
Reply With Quote
  #175  
Old 09-22-2002, 02:53 PM
Serge's Avatar
Serge Serge is offline
 
Join Date: Jan 2002
Location: The Matrix
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well I'm having problems with verison 2.2.7 with your hack I think. When I try to edit or quote someone I get a blank in the message thing.
Reply With Quote
  #176  
Old 09-22-2002, 08:00 PM
Tigga's Avatar
Tigga Tigga is offline
 
Join Date: Dec 2001
Location: Atlanta
Posts: 1,061
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works fine for me on 2.2.7.
I haven't been getting any javascript errors or extra spaces, so should I still apply the fix listed above?
Reply With Quote
  #177  
Old 09-24-2002, 03:44 AM
Learner29's Avatar
Learner29 Learner29 is offline
 
Join Date: Nov 2001
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you
Reply With Quote
  #178  
Old 12-07-2002, 08:52 PM
Bison's Avatar
Bison Bison is offline
 
Join Date: Jun 2002
Location: Virginia Beach, Virginia
Posts: 522
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works good in 2.2.9!
Reply With Quote
  #179  
Old 12-08-2002, 04:58 PM
plasir plasir is offline
 
Join Date: Mar 2002
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thx for information !
Reply With Quote
  #180  
Old 12-14-2002, 10:17 AM
Sefiros Sefiros is offline
 
Join Date: Jan 2002
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In response to this last post, here's the correct code:

PHP Code:
<table bgcolor="#0E3652" width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td width="10"><img width="10" height="1" src="https://vborg.vbsupport.ru/images/space.gif" alt=""></td><td width="100%"><!-- spacer -->

<
table cellpadding="0" cellspacing="0" border="0" bgcolor="#0A293E" {tableouterextrawidth="95%" align="center"><tr><td>
<
table cellpadding="4" cellspacing="1" border="0" {tableinnerextrawidth="100%">
<
tr>
    <
td bgcolor="$post[backcolor]width="175" valign="top" nowrap>
    <
a name="post$post[postid]"></a>
    
$post[firstnewinsert]
    <
normalfont><b>$post[username]</b></normalfont><br>
    <
smallfont>$post[usertitle]</smallfont><br>
    
$post[avatar]<p>
<
br>
                  <
p> <smallfont><b>Level$showlevel<br>
                    
Member ID$post[userid]</b></smallfont><br><br>
                    <
smallfont>HP$hp  $maxhp</smallfont
                  <
table width="100" border="1" cellspacing="0" cellpadding="0" bordercolor="#000000">
                    <
tr>
                      <
td bgcolor="#0A1C40"><img src="images/bar/bhg.gif" width="$hpf%" height="9"><img src="images/bar/bhb.gif" width="1" height="9"></td>
                    </
tr>
                  </
table>
                  <
smallfont>MP$mp  $maxmp</smallfont>
                  <
table width="100" border="1" cellspacing="0" cellpadding="0" bordercolor="#000000">
                    <
tr
                      <
td bgcolor="#0A1C40"><img src="images/bar/bmg.gif" width="$mpf%" height="9"><img src="images/bar/bmb.gif" width="1" height="9"></td>
                    </
tr>
                  </
table>
                  <
smallfont>Exp$ep%</smallfont>
                  <
table width="100" border="1" cellspacing="0" cellpadding="0" bordercolor="#000000">
                    <
tr
                      <
td bgcolor="#0A1C40"><img src="images/bar/bxg.gif" width="$ep%" height="9"><img src="images/bar/bxb.gif" width="1" height="9"></td>
                    </
tr> </table>

    <
smallfont>Registered$post[joindate]<br>
    
Location$post[field2]<br>
    
Posts$post[posts]</smallfont></td>
    
    <
td bgcolor="$post[backcolor]width="100%" valign="top">
    <
smallfont>$post[icon] <b>$post[title]</b></smallfont>
    <
p><normalfont>$post[message]</normalfont></p>
    
$post[attachment]
    <
p>$post[signature]</p>
    <
p>$post[editedby]</p>
    <
p align="right"><smallfont><a href="report.php?s=$session[sessionhash]&postid=$post[postid]">Report this post to a moderator</a> | $post[iplogged]</smallfont></p>
    </
td>
</
tr>
<
tr>
    <
td bgcolor="$post[backcolor]width="175" height="16" nowrap><smallfont>$post[foldericon]
    
$post[postdate] <font color="#FF9C58">$post[posttime]</font></smallfont></td>
    
    <
td bgcolor="$post[backcolor]width="100%" valign="middle" height="16">
        <
table width="100%" border="0" cellpadding="0" cellspacing="0">
        <
tr valign="bottom">
            <
td><smallfont>$onlinestatus
            $post
[profile$post[pmlink$post[useremail$post[homepage$post[search$post[buddy]
            <!-- $ 
post[icqicon] --> <!-- $ post[aimicon] --> <!-- $ post[yahooicon] --> 
            </
smallfont></td>
            <
td align="right" nowrap><smallfont>
            <
a href="editpost.php?s=$session[sessionhash]&action=editpost&postid=$post[postid]"><img src="https://vborg.vbsupport.ru/images/edit.gif" border="0" alt="Edit/Delete Message"></a>
            <
a href="newreply.php?s=$session[sessionhash]&action=newreply&postid=$post[postid]"><img src="https://vborg.vbsupport.ru/images/quote.gif" border="0" alt="Reply w/Quote"></a>
            </
smallfont></td>
        </
tr>
        </
table>
    </
td>
</
tr>
</
table>
</
td></tr></table>

<!-- 
spacer --></td><td width="10"><img width="10" height="1" src="https://vborg.vbsupport.ru/images/space.gif" alt=""></td></tr></table
Reply With Quote
  #181  
Old 12-14-2002, 02:52 PM
LancerForums's Avatar
LancerForums LancerForums is offline
 
Join Date: Nov 2001
Location: CA
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm using smilies w/ the quickreply hack and I seem to get a javascript error only on that page with the new smilie code. Any idea what could be causing this?

I just tried running the old js code and it works, but without the additional features. Right when I switch to the new vbcode.js I get this error:
Quote:
Line: 59
Char: 9
Error: 'message' is null or not an object
Code: 0
I get this same error even when I add the getActiveText functions for the textarea field.

Mark
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 07:09 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08330 seconds
  • Memory Usage 2,378KB
  • 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
  • (5)bbcode_code
  • (1)bbcode_php
  • (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
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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