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 ?


All times are GMT. The time now is 05:11 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.01303 seconds
  • Memory Usage 1,749KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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