News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

WysiBB for SMF

Started by Bugo, September 27, 2012, 11:46:19 AM

Previous topic - Next topic

MaccabeeY

I now am UTF-8 and have this working like a champ in both Default and Core themes.  I need it in my other theme.

Being still in the "SMF development learning curve" I have dug around and around but do not yet see what hook I need to manually implement to have this working in the other theme.

I would bet it is something quick and/or obvious but I cannot find the manual step to get this working with other themes.

What would I need to put in effect to make available to themes, I am very technical.
Thx,
Edward

MaccabeeY

Well, I figured out WHAT prevented WysiBB from working in my other theme, but I do not yet know WHY.

I discovered that my other theme has a file in it's theme folder "...Themes/mytheme/scripts/jquery-1.4.2.min.js"  When I delete this file from the theme's folder, WysiBB works.  When I put it back WysiBB does not.

If anyone has theories, I would love to hear them.
Thx,
Edward

MaccabeeY

Also, there is another bug worth reporting.  When clicking the "Quote" link of a post, the text of the quoted post does not populate the textarea of quick reply UNTIL you click somewhere OUTSIDE of the textarea (but not the WysiBB toolbar, that won't do it).  Even clicking on the scrollbar of your browser seems to do the trick.

In Firefox 26, there is added treat, the "Loading..." bar at the top of the page, stays forever (not in IE10, there it flashes but goes away)

Click outside and presto, the quote appears.
ED

MaccabeeY

I found and repaired the Quote bug in your Subs-WysiBB.php.  Bugo is using a discontinued function, ".live" is deprecated as of jQuery 1.7, yet his routines are using jQuery 1.9.1.

To get quotes working, in Subs-WysiBB.php replace

$(".quote_button").live("click", function(){


$context['insert_after_template'] .= '
]
};
jQuery(document).ready(function($){
$(\'textarea[name="message"]\').wysibb(smfOpt);
$(".quote_button").live("click", function(){
var name = $(this).children("span").html();
var id = $(this).children("a").attr("id");
var msg = $("#m" + id).html();
if (oQuickReply.bCollapsed)
{
window.location.href = smf_prepareScriptUrl(oQuickReply.opt.sScriptUrl) + \'action=post;quote=\' + id.substr(3) + \';topic=\' + oQuickReply.opt.iTopicId + \'.\' + oQuickReply.opt.iStart;
return false;
}
$(\'textarea[name="message"]\').execCommand("quote", {author: name, seltext: msg});
});
});
// ]]></script>';


with

$("#forumposts").on("click", ".quote_button", function(){


$context['insert_after_template'] .= '
]
};
jQuery(document).ready(function($){
$(\'textarea[name="message"]\').wysibb(smfOpt);
$("#forumposts").on("click", ".quote_button", function(){
var name = $(this).children("span").html();
var id = $(this).children("a").attr("id");
var msg = $("#m" + id).html();
if (oQuickReply.bCollapsed)
{
window.location.href = smf_prepareScriptUrl(oQuickReply.opt.sScriptUrl) + \'action=post;quote=\' + id.substr(3) + \';topic=\' + oQuickReply.opt.iTopicId + \'.\' + oQuickReply.opt.iStart;
return false;
}
$(\'textarea[name="message"]\').execCommand("quote", {author: name, seltext: msg});
});
});
// ]]></script>';


This should "fix" the Quote bug.  If you all find anything I missed, let me know.

NOTE:  Please note that Bugo's code still has some bugs.  For examples, when you click "Quote" on a post, even tho Quick all the formating, fonts, color displays via bbcodes, once you click "Post" (also his [BBCode] button will strip too), it seems no matter what, all bbcode is stripped away.

I have not yet found the cause of lost bbcodes, but at least simple quoting now works.
ED

Gryzor

Hope the fix is included in an update. Thanks for finding the bug :)

Gryzor

Hm, I'll be damned. Just installed the mod, after a long time; installed without errors, but the buttons do not appear! Quoting doesn't work, even with the workarounds, even with the fix described above. It's like the mod isn't even there! Any ideas anyone?

MaccabeeY

The answers to your troubles with this mod are in this topic.  The mod only works with UTF-8.  You can add the "...charset="UTF-8..." in the "<script..." tag in the WysiBB php file or use UTF-8 as you forum language.

Once you are seeing the WysiBB toolbar, then the fix listed above should help with the quote issue.
ED

Gryzor

Quote from: MaccabeeY on January 04, 2014, 01:07:06 AM
The answers to your troubles with this mod are in this topic.  The mod only works with UTF-8.  You can add the "...charset="UTF-8..." in the "<script..." tag in the WysiBB php file or use UTF-8 as you forum language.

Once you are seeing the WysiBB toolbar, then the fix listed above should help with the quote issue.
ED

Not sure if you were referring to my post; in any case, my DB *was* UTF-8 - just to be sure I ran the conversion again, but nothing appeared...

MaccabeeY

It is not your DB that must be UTF-8, but your "language" of the forum itself..."Admin" then "Language"...

Gryzor

Oh, apologies, I had not noticed that before! And thanks for pointing it out. I've switched (wonder if I broke anything :D ) and will try installing again... Though it used to work in the past, so I don't know; I'll report here.

Thanks again!

littlenicki

Hello, could you please also make this mod available for SMF 1.1.X ? Thank you
Fomer SMF user. Switched to Invision Power Board and VBulletin

Biology Forums

I don't think this mod works correctly on mobile devices.

DSystem

I really like this mod. 8) So has a detail that I would like it to work.

Automatically link posted URLs

This option this marked on my forum, but does not work on WysiBB. Is there any way to activate this manually?

Darkness_Black


Translator - Brazilian

Não respondo MP de ajuda, Poste sua duvida no forum!!! Se alguém te Ajudou Agradeça!!!

Jack_Elixir

Now days many images come with links which not ended with .jpg .png .gif (picture extensions) so when we try those link, it says


The entered data is invalid

So please see that, I just it works with all image links

please guide

2.0.9 default theme

strano

It's possible to active BBCODE like default option?

lahmfan

Quote from: strano on July 11, 2015, 01:30:33 PM
It's possible to active BBCODE like default option?
have you gotten a reply for this?

MULITRI

It didn't work for me in 2.0.13 with Anecdota Theme and Spanish UTF8 enabled, so i have uninstalled it. It should have been a nice addition, but i give up, sorry.

Dwev

Because of this Mod I converted my forum from ISO to UTF8 and I checked if I could find a script somewhere that stopped it from working.

But still no dice, it installs without any errors, but just doesn't show up.

I have a relatively clean test-forum on the side, where it works like a charm, even in the same theme.
So there must be something that stops this from working, does anyone here have a clue how to find what that would be?

natcip

I just noticed that whenever a user posts an URL it gets automatically wrapped in the [url] bbcode when I check the final post. Is there a way to turn that off?
The reason I'm asking this is because I have the Simple Audio Video Embedder mod and it automatically embeds Instagram/Youtube content by simply posting the URL.

Advertisement: