TinyPortal

Development => Support => Topic started by: darkangel on March 08, 2012, 08:27:27 PM

Title: html block vs bbc code block question
Post by: darkangel on March 08, 2012, 08:27:27 PM
In the previous versions of TP and SMF I was able to mix html within bbc block and it would leave it showing after saved for editing later...not so anymore....any html bracketed items disappear from the editing window but the block still appears correct in forum.

also:

for the bbc block all previously created blocks with this type of code still function like they should

[float=left]http://thefantasiesattic.net/attic/cpg/albums/userpics/10001/kludgecorner.png[/float]


Welcome to Kludge's Corner.

You will find many fascinating stories and tidbits here with a special area for your comments to be entered.



The entire area where the stories are written will be READ ONLY since they will be more like chapters. This will make it easier to follow the storyline with no interruptions.



Thank you for understanding and above all....ENJOY!

image © DA



but the editing portion is changed to the link between the float tags being removed. And now if I insert the float tags into a new block the tags show but no image. Using the img button does not good for it does not align the text correctly either.

http://thefantasiesattic.net/attic/index.php?board=350.0

that link is what the block looks like even though the link is no longer there to edit in the block....weird

Needless to say I have to go through ALL the blocks and fix things so when my other admins wander in there to there is no mass panic cause stuff goes awry when edited...

so I guess the questions are: 

1. IS bbc block strictly bbc code now, never to mix with html?

2. How to get the bbc block to recognize the float tag in it?

EDIT!!

I just found out that editing is no good....it still appears as is even with deleting the contents....I have to create NEW blocks to get rid of the old ones....must be something off somewhere.
Title: Re: html block vs bbc code block question
Post by: IchBin on March 08, 2012, 09:21:10 PM
As far as I know, HTML has never been allowed in BBC. The problem that you may be seeing, is probably because of the conversion process. I think I remember you or someone else reporting an error a couple of versions ago regarding the html_entity() function I put in to handle the languages better not allowing certain character sets. So I stripped those functions out because they didn't fix the job 100%.

Since those functions are no longer converting the HTML characters, BBC articles are stripping out any HTML. That part has always worked like that, it's just that you had not had to worry about it previously with HTML characters getting converted to entities.

Is the float tag a custom BBC mod you've added? I don't see a float option in the BBC editor.

Sorry if that doesn't make sense. It was a long road for me to learn all those things. lol So basically, yes TP will strip any HTML out of the BBC post if you convert it.

Title: Re: html block vs bbc code block question
Post by: darkangel on March 08, 2012, 11:19:28 PM
Quote from: IchBinâ,,¢ on March 08, 2012, 09:21:10 PM

Is the float tag a custom BBC mod you've added? I don't see a float option in the BBC editor.

Sorry if that doesn't make sense. It was a long road for me to learn all those things. lol  So basically, yes TP will strip any HTML out of the BBC post if you convert it.

it kinda sorta made sense...lol no problem just thought I did something wrong

about the float tags...they are from the flaot smf mod which worked prioe to the 2.0.2 upgrade

now it works in the forums but not the TP blocks, very handy little thing so that I can place an image and have the text right beside it vs under or above the image


Float BBCode v1.0 - NIBOGO

Author:
- NIBOGO

Features:
o Add the Float BBCode to wrap text around images.
o Add two new bbcode buttons: [float=right] & [float=left]
o Pretty Useful Writing Articles with images.


File Edits
./Sources/Subs.php
Find: [Select]

array(
'tag' => 'ftp',
'type' => 'unparsed_content',

Replace With: [Select]

array(
'tag' => 'float',
'type' => 'unparsed_equals',
'test' => '(left|right)\]',
'before' => '<div style="float: $1; margin: .5ex 1ex 1ex 1ex;">',
'after' => '</div>',
),
array(
'tag' => 'ftp',
'type' => 'unparsed_content',


./Sources/Subs-Editor.php
Find: [Select]

array(
'image' => 'right',
'code' => 'right',
'before' => '[right]',
'after' => '[/right]',
'description' => $txt['right_align']
),

Replace With: [Select]

array(
'image' => 'right',
'code' => 'right',
'before' => '[right]',
'after' => '[/right]',
'description' => $txt['right_align']
),
array(
'image' => 'floatleft',
'code' => 'floatleft',
'before' => '[float=left]',
'after' => '[/float]',
'description' => $txt['float_left']
),
array(
'image' => 'floatright',
'code' => 'floatright',
'before' => '[float=right]',
'after' => '[/float]',
'description' => $txt['float_right']
),


./Themes/default/languages/Modifications.english.php
Find (at the end of the file): [Select]

?>

Add Before: [Select]


$txt['float_right'] = 'Float Right';
$txt['float_left'] = 'Float Left';


./Themes/default/languages/Modifications.english-utf8.php
Find (at the end of the file): [Select]

?>

Add Before: [Select]


$txt['float_right'] = 'Float Right';
$txt['float_left'] = 'Float Left';

This operation isn't vital to the installation of this mod.
Title: Re: html block vs bbc code block question
Post by: IchBin on March 09, 2012, 07:36:48 PM
Oh, well I don't have any idea about that mod. Sorry.
Title: Re: html block vs bbc code block question
Post by: darkangel on March 09, 2012, 08:01:06 PM
That's alright, I just redid the majority of my blocks by recreating the info into a brand new block then getting rid of the old.

I will figure out something to do to be able to get the image floated right or left even if I have to make a table in composer to do it...lol

no matter about the things that went weird I still like the software.
Title: Re: html block vs bbc code block question
Post by: darkangel on March 24, 2012, 11:50:55 PM
Just an update to the problem.

I am stubborn....that is a fact...lol I so disliked having to redo so many block images and have been playing around.

I find that with this new upgrade(both smf and tp) that the html and bbc blocks do not play well together but the main thing was the float left-right coding mod---it works! as mysteriously as it did not want to now it behaves itself in tp blocks...go figure

I was also having a bit of trouble with changing font size/color/bold, just about whatever I wanted it to do it would not.

Well I found a way...trust me when I say that in the previous versions if you chose the text, clicked the font size/color/weight it would do it before or after you clicked to save the block it would appear as you wanted it to in either bbc or html blocks. After this upgrade it would not.

Now when you hilight the text and choose what to do to it the darn thing acts right but you save and it reverts to normal.

What i did was use that html button --even when in bbc code lock-- once in the html screen I can then hilight text click the bbc buttons to do what I want to it, go out of the html screen to normal and it appears right, then I hit save and YES it does what I wanted it to....weird to say the least,

Just thought to let you all know that it ma not be the right way and there may be a gremlin hiding in there but this method keeps me with what little sanity I have left.

with the float mod I click the float button then use the image button to place the image, then hit the html button to go inthere and resize it down, when going out of html mode it appears as it should....I am a happy sanity impaired person now...lol

Have a great weekend!
Title: Re: html block vs bbc code block question
Post by: IchBin on March 25, 2012, 04:25:44 AM
darkangel,

what you are describing is a bug that I have fixed in RC4. If you are having to toggle between wysiwyg and the regular editor to get your text/bbc to save properly, it sounds like your files did not get updated properly in your install/upgrade of TP.

I'd suggest you upload all the files from the TP package manually and replace the current ones on your site to test it again.
Title: Re: html block vs bbc code block question
Post by: darkangel on March 25, 2012, 06:42:32 AM
this may sound stupid but...

can that happen even after the files have been replaced manually---I have replaced them all from fresh once already...I mean just the  sources tp files and the default theme tp files, which could explain the float mod suddelnly deciding to work.

But I can try again i a few days to see if it works.
Title: Re: html block vs bbc code block question
Post by: IchBin on March 25, 2012, 06:43:49 AM
hmm... I guess I need to do some testing. But I swear I fixed these issues. Let me get back to you.
Title: Re: html block vs bbc code block question
Post by: darkangel on March 25, 2012, 08:00:42 AM
It might just be my own forums but I shall wait for just in case.
Title: Re: html block vs bbc code block question
Post by: IchBin on March 26, 2012, 01:01:26 AM
Yeah.... it looks like I only fixed articles. I swear I fixed blocks too. :( Should be in the final release coming along soon I hope. Will fix it when I get some more time.
Title: Re: html block vs bbc code block question
Post by: darkangel on March 26, 2012, 01:53:09 AM
no problem, my going back and forth is fine and don't beat yourself up, after all it is not like you are laying about the house just watching tv -- you have a life to deal with.
Title: Re: html block vs bbc code block question
Post by: G6Cad on March 26, 2012, 05:58:57 AM
Quoteafter all it is not like you are laying about the house just watching tv

Are we really sure about this? Have anyone seen IchBin at work  O0  :2funny:
Title: Re: html block vs bbc code block question
Post by: IchBin on March 26, 2012, 04:27:25 PM
Hey now! lol
Title: Re: html block vs bbc code block question
Post by: darkangel on April 20, 2012, 01:17:25 AM
me again with another question about the blocks and wysiwyg window in forum

with the fix you did we can somewhat fix (edit) html blocks but I have noticed that they are still not as before.

BEFORE: we would enter html code into the posting window or block and we would see when preview is clicked the actual table or whatever as it is intended to be.

NOW: we either enter code with toggle or not but when preview we see the coding NOT the post/block as intended (unless we hit post then it shows up in window).

sometimes also we need to enter  tags in order to see a table as we want it to appear in post but when editing...no table, like before I could edit the info to strike thru or delete a table entry.

Title: Re: html block vs bbc code block question
Post by: IchBin on April 20, 2012, 04:10:14 AM
Don't know what the problem is darkangel. I have no problems putting html into my wysiwyg editor and having it show me when I toggle between the different modes. I can only think that maybe a mod or something is conflicting with the editor on your site or something.
Title: Re: html block vs bbc code block question
Post by: darkangel on April 20, 2012, 05:52:51 AM
like everything else it is not site specific. this is happening with all the 2.0.2 forums we have whether test or not

I can live with it...lol