Warning: The author of this contribution does not provide support for it anymore.

WYSIWYM

Preview = N/A with bbcodes - WYSIWYM

Preview = N/A with bbcodes

New postby oip » Sun Aug 15, 2010 8:05 pm

Hi leviathan,

I like your mod. But when I added a youtube bbcode, for whatever reason, the preview was showing up as N/A. So I applied the change in functions_posting_wysiwym.php (wbbcode_replace) - and everything worked again.

But then I made another new bbcode - this one was for a spoiler tag:

Code: Select all
    <div style="margin:20px; margin-top:5px"><div class="quotetitle"><b>Spoiler:</b> <input type="button" value="Show" style="width:45px;font-size:10px;margin:0px;padding:0px;" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = '';        this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" /></div><div class="quotecontent"><div style="display: none;">{TEXT}</div></div></div>


And once again, the preview is back to saying N/A. What can I do to change this? Thanks!
User avatar
oip
Registered User
 
Posts: 10
Joined: Wed Aug 11, 2010 5:11 am

Re: Preview = N/A with bbcodes

New postby leviatan21 » Mon Aug 16, 2010 5:13 am

Hi oip :

Please try this new change :

Open :

Find :
Code: Select all
             'WBBCODE_REPLACE'   => str_replace(array ("n", "r", "t"), array ("", "", ""), strtolower($row['bbcode_tpl'])),


Replace, with :
Code: Select all
             'WBBCODE_REPLACE'    => str_replace(array ("\n", "\r", "\t", "'"), array ("", "", "", "\'"), strtolower($row['bbcode_tpl'])),

This will fix the preview error, but the spoiler button will not works on the preview, because this mod and your bbcode use JavaScript

Remember purge the board cache and refresh the browser cache :D
Excuse me for my poor English, I speak Spanish. | Image phpBB en Español
User avatar
leviatan21
Registered User
 
Posts: 2656
Joined: Fri Aug 10, 2007 7:22 am
Location: Buenos Aires, Argentina
Name: Gabriel

Re: Preview = N/A with bbcodes

New postby eS.veRTeX » Wed Sep 01, 2010 6:51 am

Hi,
i same problem is here.. but i am allready changed functions_posting_wysiwym.php
but not fix this
1.PNG


thank u.
eS.veRTeX
Registered User
 
Posts: 3
Joined: Mon May 03, 2010 6:54 am

Re: Preview = N/A with bbcodes

New postby leviatan21 » Tue Sep 07, 2010 4:50 pm

eS.veRTeX
Please open your own topic, and bring me information about your board.
Excuse me for my poor English, I speak Spanish. | Image phpBB en Español
User avatar
leviatan21
Registered User
 
Posts: 2656
Joined: Fri Aug 10, 2007 7:22 am
Location: Buenos Aires, Argentina
Name: Gabriel