WordPress.org

Ready to get started?Download WordPress

Forums

WP-United : phpBB WordPress Integration
WP-United breaking forum BBCode and smilies (8 posts)

  1. KOKOStern
    Member
    Posted 1 year ago #

    I've started messing around with posting on my forums and when I click a BBCode button or a smiley nothing happens.

    I started looking it up and found this thread:

    https://www.phpbb.com/customise/db/mod/advanced_bbcode_box_3/support/bbcodes_smilies_not_working_when_clicked_on-t_106486

    This guy has the exact same problem on and posted it there.

    This means WP-United is probably the cause, the question is why and what the hell is happening...

    http://wordpress.org/extend/plugins/wp-united/

  2. KOKOStern
    Member
    Posted 1 year ago #

    After a day of struggle, I've found the problem.

    In the MOD installation there's an error. You ask to replace a line in editor.js:

    document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px;">');

    With:

    document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px; background-color: #' + color + ;">');

    You forgot to add an apostrophe (') in front of the semicolon (;) at the end of the line before closing the round brackets.

    I'm sad to see such an unprofessional syntax error :(

    Sh*t happens though, correct it and get back on the horse, plugin does a pretty brave thing so it makes sense that there are errors here and there.

  3. Mike McKoy
    Member
    Posted 1 year ago #

    What is the exact code that is needed and what is the phsyical location of the file? I'm having this problem too and all forum traffic has stopped. Nobody can post.

    I too am disappointed. Please test things before telling such a large audience to upload a change. There are critical mistakes seen in almost every release.

  4. chelu2k
    Member
    Posted 11 months ago #

    Oh, many many thanks. I had the same problem and this post gave me the solution.
    I hope WP-United team test this kind of bugs in further version, because is a really great and useful MOD.

  5. Mark
    Member
    Posted 11 months ago #

    Same issue here. Any update on which editor.js file to make the correction in? There are more than one in similar phbb. Thanks.

  6. MadRiver
    Member
    Posted 10 months ago #

    it is the editor.js file associated to your theme.

    /forum/styles/prosilver/template/editor.js

    This solved part of the problem for me. However I wanted to use an advanced editor like TinyMCE so it is easier for my users to edit their posts.
    With Tiny editor turned off
    http://i747.photobucket.com/albums/xx117/derrick_young1/tiny-off_zpsa1ba8c19.jpg

    With tiny editor turned on
    http://i747.photobucket.com/albums/xx117/derrick_young1/tiny-on_zpsa7438c46.jpg

    What I am after and I get if I turn wp-united theme integration off
    http://i747.photobucket.com/albums/xx117/derrick_young1/want_zps7c4935ad.jpg

  7. msjulian
    Member
    Posted 10 months ago #

    Having the same issue.. can't insert images or add bbcode.

    Is this the correct line of code that need to be added?? I added it as shown and it still didn't work..

    document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px; background-color: #' + color + ;">');

  8. chwbcc
    Member
    Posted 9 months ago #

    Okay I had the same error and this is how I fixed it.

    1) Open the editor.js file found in the \styles\prosilver\template folder

    2) Goto line 390
    This is what you should see:

    document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px; background-color: #' + color + ;">');

    3) Change the code to this:

    document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px; background-color: #' + color + ';">');

    The old code was missing a ' to open the last part of the table tag.

    4) Save this file and upload it back in to the \styles\prosilver\template folder

    Hope this helps,

    ------------
    HOW IT WORKS:

    For those interested in learning more let me break it down so you can understand what is going on.

    If you break the code down into the open and close markers you can see really quick how the code is put together. We start with a document.write( command and then open a ' to start the code to create part of the table. we close the ' and add in the color tag which will be added by the script. So on and so forth this goes through the code, table code is in the ' ' marks and the script code is between the + + marks telling the browsers to add them all together.

    The problem in this code happens in the last section because the code hasn't been opened with the proper ' (see bold section). It has the + color + but it is missing the ' to open the last bit of code to finish rendering the table properly.

    BAD CODE
    document.write(
    '<td bgcolor="#'
    + color +
    '" style="width: '
    + width +
    'px; height: '
    + height +
    'px; background-color: #'
    + color +
    ;">' <--- Here is the problem
    );

    In the code below you can see what the correct code should look like when you break it apart the same way:

    GOOD CODE
    document.write(
    '<td bgcolor="#'
    + color +
    '" style="width: '
    + width +
    'px; height: '
    + height +
    'px; background-color: #'
    + color +
    ';">' <--- Here is the solution
    );

    Technically the code is a simple table column format that can be simplified to looks like this: (The "X" represent the code that will be added by the script running on the board.)

    document.write(

    <td bgcolor="#XXXXXX" style="width: XXXpx; height: XXXpx; background-color: #XXX;">

    ');

    The Bold sections below show you the parts of the code that will be generated by the script.

    document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px; background-color: #' + color + ';">');

    I hope this helps fix the problems for some of you and helps explains how and why this works for you budding coders out there.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.