@DirtyDog Those classes are added by the javascript. If they aren't being added, it means the javascript isn't running. Remove those classes and focus on figuring out why your JS isn't being included, or being run once included.
@DirtyDog Those classes are added by the javascript. If they aren't being added, it means the javascript isn't running. Remove those classes and focus on figuring out why your JS isn't being included, or being run once included.
Okay, I did the above and now the spoiler button appears. when pressed it envelopes teh selected text in a [spoiler] tag, as it should .... but that tag doesn't seem to DO anything. does that make sense?
Sounds like it's not parsing the BBCode. Do other BBCode tags work? Is it parsing HTML tags? Are you testing this in an old discussion or a new discussion? Also make sure you don't have that config line entered in twice.
I did a test install and buttonbar works fine so It must be a JS conflict. Other wysiwygs work fine though.
The problem version is at http://www.camping-usa.com/forum/ - this isn't live or open to the public yet so you wont be able to sign up although I could create an account for anyone that wanted a closer look.
I figured it out... for some reason ButtonBar doesn't like my non-default theme. Switching to the default "Vanilla" theme makes it work. Hmm. I'm using public_vforg by the way.
Fixed! I was using a custom comment.php in my theme's design/views/post/comment.php. I copied the 2.0.18.1 version over from applications/vanilla/views/post/comment.php, inserted the code I needed to, and now it's working... almost. Now it works, but only if I click somewhere on the page. Not sure why that'd be...
@DirtyDog, hopefully that's what's wrong on your end too.
Upon further investigation, if the "Quote selection" plugin is enabled, the button bar works properly after I click somewhere on the page (and after doing the fix I mentioned above). If it's disabled, the button bar doesn't work at all.
I later found out that after disabling the WhosOnline plugin, that issue no longer occurs and I don't have to click in order for the ButtonBar to start working... it works right away.
After reverting that change, everything works perfectly together, even if the WhosOnline plugin is enabled -- however, the infinite loop issue with the WhosOnline plugin still exists, unfortunately. According to someone else, the infinite loop issue is probably being caused by the theme I (and others) are using (not sure if this is true).
So it's looking like this is a theme-related issue again. Hope I wasn't too confusing in my post.
Side note, @Tim, it'd be cool if the button bar was disabled (or better yet, hidden) when "previewing" a post.
Figured it out! In my theme's .tpl file, it had custom HTML inside of , but no {asset name="Foot"}. After adding {asset name="Foot"} in between the "Foot" div, everything seems to be working perfectly now (knock on wood).
For those interested, I modded my discussion.js file to hide the bar when previewing, and re-show it when the user clicks the "write" tab again by adding $(".ButtonBar").hide(); and $(".ButtonBar").show(); in (what looks to me like, and seems to be) the right positions in said discussion.js file.
I put the $(".ButtonBar").hide(); after line 166 (v2.0.18.1), directly underneath the following lines of code:
// Remove any old errors from the form
$(frm).find('div.Errors').remove();
if (json.FormSaved == false) {
$(frm).prepend(json.ErrorMessages);
json.ErrorMessages = null;
} else if (preview) {
$(frm).trigger('PreviewLoaded', [frm]);
$(parent).find('li.Active').removeClass('Active');
$(btn).parents('li').addClass('Active');
$(frm).find('#Form_Body').after(json.Data);
$(frm).find('#Form_Body').hide();
And I put the $(".ButtonBar").hide(); after line 24 (v2.0.18.1), directly underneath the following lines of code:
// Reveal the textarea and hide previews.
$('a.WriteButton, a.Cancel').livequery('click', function() {
if ($(this).hasClass('WriteButton')) {
var frm = $(this).parents('.MessageForm').find('form');
frm.trigger('WriteButtonClick', [frm]);
@Todd, et al, do you think there's a better way to do this or a better place to put the .hide and .show?
Comments
Vanilla Forums COO [GitHub, Twitter, About.me]
To change the format on all new discussions, THIS is the line you add (or change, see if it's not already there) to your config:
$Configuration['Garden']['InputFormatter'] = 'BBCode';
Vanilla Forums COO [GitHub, Twitter, About.me]
The problem version is at http://www.camping-usa.com/forum/ - this isn't live or open to the public yet so you wont be able to sign up although I could create an account for anyone that wanted a closer look.
@DirtyDog, hopefully that's what's wrong on your end too.
I later found out that after disabling the WhosOnline plugin, that issue no longer occurs and I don't have to click in order for the ButtonBar to start working... it works right away.
Now, a while back I modified the WhosOnline plugin JS file as explained here, to fix an infinite loop issue: http://vanillaforums.org/discussion/comment/127827#Comment_127827
After reverting that change, everything works perfectly together, even if the WhosOnline plugin is enabled -- however, the infinite loop issue with the WhosOnline plugin still exists, unfortunately. According to someone else, the infinite loop issue is probably being caused by the theme I (and others) are using (not sure if this is true).
So it's looking like this is a theme-related issue again. Hope I wasn't too confusing in my post.
Side note, @Tim, it'd be cool if the button bar was disabled (or better yet, hidden) when "previewing" a post.
, but no
{asset name="Foot"}
. After adding{asset name="Foot"}
in between the "Foot" div, everything seems to be working perfectly now (knock on wood).$(".ButtonBar").hide();
and$(".ButtonBar").show();
in (what looks to me like, and seems to be) the right positions in said discussion.js file.I put the
$(".ButtonBar").hide();
after line 166 (v2.0.18.1), directly underneath the following lines of code:// Remove any old errors from the form $(frm).find('div.Errors').remove(); if (json.FormSaved == false) { $(frm).prepend(json.ErrorMessages); json.ErrorMessages = null; } else if (preview) { $(frm).trigger('PreviewLoaded', [frm]); $(parent).find('li.Active').removeClass('Active'); $(btn).parents('li').addClass('Active'); $(frm).find('#Form_Body').after(json.Data); $(frm).find('#Form_Body').hide();
And I put the
$(".ButtonBar").hide();
after line 24 (v2.0.18.1), directly underneath the following lines of code:// Reveal the textarea and hide previews. $('a.WriteButton, a.Cancel').livequery('click', function() { if ($(this).hasClass('WriteButton')) { var frm = $(this).parents('.MessageForm').find('form'); frm.trigger('WriteButtonClick', [frm]);
@Todd, et al, do you think there's a better way to do this or a better place to put the .hide and .show?