vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   New vbcode.js - vBcode and smilie user interface improvement (https://vborg.vbsupport.ru/showthread.php?t=24033)

Admin 05-22-2002 04:54 PM

Then you are doing something wrong.

TECK 05-22-2002 06:37 PM

probably. i will double check. thanks.

plcguru 06-08-2002 04:59 AM

Hi,
Anybody know how to remove the space that gets inserted after the tag is closed?

for example, if you highlight a word and then click the bold button, a space is inserted after the tag automatically. I'd like to get rid of the space.

plcguru 06-12-2002 03:20 AM

Any ideas to get rid of the space? Please??

I tried modifying the vbcode.js file, but I give up as the space still remains. The hack works extremely well but that space...

s.molinari 06-12-2002 01:37 PM

Hello plcguru,

Since this feature wasn't actually programmed into the code (really! it just happens:D) I 'll have to look into how it even happens.;)

It may take a while though, cause I'm working hard on vB-germany.:)

Maybe someone else can take a shot at it.

Scott

plcguru 06-23-2002 03:44 AM

Quote:

Originally posted by s.molinari
@FWC and Brain Cruz

Thanks for the info. I think I'll have to post a fix for this. The problem is, when the user doesn't wish to use the vB buttons or smilies we have calls to functions that don't exist. The actual vbcode.js isn't the problem but rather the calling of the functions.

Keep me posted if you here some more news and I'll try to see about adding the fix.
...snip....
Scott

Was there ever a fix for this? I installed in about 3 weeks ago and I'm starting to have users complain of javascript errors. If I re-enable the VBCode for them, the problem disappears just as has been posted earier.
Any fix?
(still a great hack... :D )
Thx,
Phil

s.molinari 06-23-2002 09:13 AM

Hello plcguru,

Sorry, I had fixed this in the vB-Germany thread but forgot to update you guys.:) Shame on me.

Here is the fix. I never tested it but a couple of German users told me it works like a charm so give it a try. If you have probs. let me know. Please read the note below too!

In the newthread template replace

onChange=getActiveText(this) onclick=getActiveText(this)

with

$jsinsert

Then search for the following code in newthread.php

PHP Code:

  if ($foruminfo[allowsmilies]) {
    if (
$bbuserinfo[showvbcode] && $allowvbcodebuttons)
      
$vbcode_smilies getclickysmilies();
    eval(
"\$disablesmiliesoption = \"".gettemplate("newpost_disablesmiliesoption")."\";");
  } else {
    
$disablesmiliesoption="";
  }
  if (
$bbuserinfo[showvbcode] && $allowvbcodebuttons)
    
$vbcode_buttons getcodebuttons(); 

and replace it with:

PHP Code:

if ($foruminfo[allowsmilies]) {
    if (
$bbuserinfo[showvbcode] && $allowvbcodebuttons)
      
$vbcode_smilies getclickysmilies();
      
$jsinsert "onChange=getActiveText(this) onclick=getActiveText(this)";
    eval(
"\$disablesmiliesoption = \"".gettemplate("newpost_disablesmiliesoption")."\";");
  } else {
    
$disablesmiliesoption="";
    
$jsinsert="";
  }
  if (
$bbuserinfo[showvbcode] && $allowvbcodebuttons) {
    
$vbcode_buttons getcodebuttons();
    
$jsinsert "onChange=getActiveText(this) onclick=getActiveText(this)";
  }else{
    
$jsinsert "";
  } 

NOTE!Of course this will only fix the js errors for a new thread. You'll have to fix the other templates and scripts too. (i.e. for new replies and private messages) If someone could post the other templates and scripts here I would be very greatfull.:)

Scott

plcguru 06-25-2002 02:30 AM

Thanks Scott,
The fix worked fine :)

The php code also needs to be changed as you wrote(exactly the same) in editpost.php and newreply.php.
Then the template changes should also be done (exactly the same as you wrote) in the editpost template and newreply template.

This fixes the javascript errors.

Regarding the private message phps (private.php and private2.php) the code is different and I didn't want to mess with it (i.e. break it :ermm: ). So, I just removed the

onChange=getActiveText(this) onclick=getActiveText(this)

code from the following templates:

priv_forwardmultiple
priv_sendprivmsg
priv_sendtobuddies

Now users don't have the added convenience when sending PMs but at least they don't get an error. A reasonable trade I think.

Awesome hack :cool: ... one of my favorites! Danke

Sinecure 06-26-2002 11:59 PM

If I get a change I'll post the modifications to the rest of the templates. I can't get around to it today, I spent like 5 hours upgrading to 2.2.6 :)

plasir 07-09-2002 05:38 PM

works 2.2.5 with 2.2.6 ?

alexp 07-12-2002 03:41 PM

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 :)

plasir 07-12-2002 05:33 PM

thx. right ! It works well. It's may favourite hack also. Extreme usefull. ;-))

Webmasta XT 08-26-2002 11:28 PM

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......

Serge 09-22-2002 02:53 PM

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.

Tigga 09-22-2002 08:00 PM

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?

Learner29 09-24-2002 03:44 AM

thank you

Bison 12-07-2002 08:52 PM

works good in 2.2.9! :D

plasir 12-08-2002 04:58 PM

thx for information !

Sefiros 12-14-2002 10:17 AM

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


LancerForums 12-14-2002 02:52 PM

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

Leo[GR] 01-06-2003 09:15 AM

Quote:

Originally posted by Webmasta XT
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......
I have exactly the same problem :cry:

BigJohnson 01-27-2003 11:54 AM

me too

Leo[GR] 01-27-2003 12:24 PM

Any solution to this probem ? Please ?

o0stephane0o 01-27-2003 09:01 PM

are you german? How come you speak such a good english?

Leo[GR] 01-28-2003 04:14 AM

Quote:

Originally posted by o0stephane0o
are you german? How come you speak such a good english?
If you're talking to me, no. I am Greek :D

WebMasterAJ 02-02-2003 01:08 AM

As stated by a few others, the hack works great on everything except for the shoutbox :(

Xyphen 03-01-2003 03:21 PM

The solution is.

You upload the *Orignal* vbcode.js file as vbcodeshout.js, then edit the shoutbox template replace vbcode.js with vbcodeshout.js. Thats all. If it doesn't work, let me know, and I'll help.

Edit: There is a problem that I am looking a solution for, if someone can make this work on vB2.3.0 let me know please, thank you. ;)

Doubledoom 03-19-2003 09:36 AM

installed and working on 2.3.0. The last bit "vbcode_popup_smiliesbits" could not be completed as that bit of code to change is not present. However, the hack is working without that change.

Sun Boy 03-19-2003 10:12 AM

so can any 1 give us the hack at the final updated ?

catocom2 03-19-2003 02:40 PM

I just installed this on 2.3.0 per instructions
in the first post, also added it in my quick reply code.
:banana: It Works!
Thanks for this great hack/fix!
I've been using it at JJRs for a while, and thought I'd give
it a try since I updated to 2.3.0

I haven't thouroughly tested, but the
New Thread
New Reply
and my
Quick replybox
all work fine so far.;)

catocom2 03-25-2003 12:51 AM

Well now I stumped :surprised:

I had some other unrelated problems (I think) and decided
to do a fresh 2.3.0 install, I did install this on an upgraded
board, and it did work fine, but since I've done a fresh install
and tried to reinstall this hack, I've noticed some other slight
changes in the code. I did'nt think much about it and installed
the changes anyway.
It just doesn't seem to do anything new now. :surprised:
I'v when back over all the templates about 4 times and
tried different similar variables, but still the same.
I've even compared the templates, side by side with the
ones that were working and still no joy.
I'm wondering now if there's some other file that needs to
be hacked.

catocom2 03-25-2003 01:29 PM

Well so far,
my best guess is that it has something to do with the new "get more" function.
My old updated board didn't have that, and I only had about 15
smilies, all in one box.

catocom2 03-26-2003 11:32 PM

Man this is really wierd..
I didn't change anything, and it just decided to start working today. :confused:

may have been my cookies or something.

woohoo :banana:

SloppyGoat 04-09-2003 07:33 PM

I installed it on 2.3.0, and the get more smilies was acting very erratic. It would disappear after clicking something. I'm not sure what was going on, but something just ain't right. That was in editpost I was testing. Has this hack been confirmed to work right in 2.3.0 yet? Also, if so, are there two lines in editpost that need to be changed? Maybe I did it wrong? Is there a way to have the smilies not hide every time you click them, like it would normally be?

[edit]
After observing here, I guess that's just the way it works.
That's all that was freaking me out, actually. But I'd still like to know if the window can act like it used to.

tkeil69575 05-24-2003 09:13 PM

hi s.molinari ,
could it be that using this hack the focus to the smilie popup window is lost ... ehm to put it another way would it be possible after inserting a smilie to reset the focus to the smilie popup windows???

thanks
tina

s.molinari 05-25-2003 09:30 AM

Hi yall,

Sorry, but I really haven't had time to keep this hack up-to-date with my ventures at vbulletin-germany.com, which means you guys and gals are on your own. I hope you will forgive me.

Scott

Clarity 06-03-2003 06:27 PM

Anyone running 2.3.0 who is just now installing this for the first time, let me try and save you some time.

D/L the new .js from the first post in the thread and follow all the instructions in that post except for vbcode_popup_smiliesbits.

Test the functionality on your board (in both enhanced and normal mode). Normal is likely working, enhanced may not be. If that's the case, go to page 5 of this thread, and look for Mutt's post that includes an attachment. Download, and follow his instructions that involves making two pastes into the .js file.

Go back and test your functionality in enhanced, it should now be working. Thanks Mutt, you rule.

Now create a post, and click on "Get More" Smilies. Click on one to add it. Doesn't work, right?

The vbcode_popup_smiliesbits edit that you didn't do must have been for an old version. Go in there now, and simply turn this;

PHP Code:

"><a href="#" onclick="smilie('$smilie[text]'); 

into this;

PHP Code:

"><a href="#" onclick="opener.smilie('$smilie[text]'); 

Note that you're only adding 'opener.' -- that's it. Go back to your board and test everything, but you should be done. I was running an otherwise stock 2.3.0 clean install, and all of this did the trick.

I'm beyond newbie and clueless with all of this stuff, but I was able to get it all working properly. So everyone else should be encouraged by that.

Thanks SO much for this modification, and all the input from people in this thread to help get it going. Hoping that this little update/consolidation of the process can be a help to someone who was as clueless as I going in. If not, everything you need is in this thread somewhere.

s.molinari 06-03-2003 08:54 PM

Hi Clarity,

Thanx for the heads up.:) And sorry to all that I haven't kept this hack up to date for the later versions. However, a good note is, vB3 uses a modified version of this hack for the non-wysiwyg post, thread, calendar and PM editor. :) Cool huh?

Scott

Clarity 06-03-2003 09:14 PM

It's up to date enough for someone like me (read: non-tech oriented) to figure it out. ;)

Thanks a million for an outstanding modification, and I'm very happy to hear it's in v3.

The_Huntress 06-05-2003 11:35 PM

i have a lil prob.. on 'get more smilies' when i click on a smilie to place it before a certain word it places it but erases the word *scratches head*

oh and since im comp illiterated, what do you mean when you say " Test the functionality on your board (in both enhanced and normal mode)." ?


All times are GMT. The time now is 10:30 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
  • Page Generation 0.04038 seconds
  • Memory Usage 1,906KB
  • 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
  • (5)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete