TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,236
  • Total Topics: 21,353
  • Online today: 577
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 281
  • Total: 281

html block vs bbc code block question

Started by darkangel, March 08, 2012, 08:27:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

darkangel

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.

IchBin

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.


darkangel

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.

IchBin

Oh, well I don't have any idea about that mod. Sorry.

darkangel

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.

darkangel

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!

IchBin

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.

darkangel

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.

IchBin

hmm... I guess I need to do some testing. But I swear I fixed these issues. Let me get back to you.

darkangel

It might just be my own forums but I shall wait for just in case.

This website is proudly hosted on Crocweb Cloud Website Hosting.