wrap text around images

Started by bojzi, January 01, 2005, 08:14:28 AM

Previous topic - Next topic

[Unknown]

Find in Subs.php:

array(
'tag' => 'ftp',
'type' => 'unparsed_content',
'content' => '<a href="$1" target="_blank">$1</a>',
'validate' => '$data = strtr($data, array(\'<br />\' => \'\'));',
),


Add before it:

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


-[Unknown]

crappyday

I know it's been a while since anyone posted in this, but I just did this to my forum and we're using 1.1 RC2 still and to add the margin it took a little guessing between the two codes but if anyone is interested its:

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


chosenfool

#22
Quote from: crappyday on October 27, 2006, 05:23:16 AM
I know it's been a while since anyone posted in this, but I just did this to my forum and we're using 1.1 RC2 still and to add the margin it took a little guessing between the two codes but if anyone is interested its:

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


SWEET!
Thanks for the code update! i can confirm this works in 1.1RC3. :)

Edit:

and as of 12/11/06, it still works well with 1.1Final.
hxxp:www.chosenfool.com/forums/index.php [nonactive]

Sandmansa

This works in 1.1.4 as well.  But I have a question.  How do I go about adding a center function where the text wraps to the left and to the right of a centered image?

Fiery

Quote from: Sandmansa on April 20, 2008, 12:42:34 AM
This works in 1.1.4 as well.  But I have a question.  How do I go about adding a center function where the text wraps to the left and to the right of a centered image?

Do you always want the image centered?

Have you tried using the center BB code?

Rockas

I know this is an old topic but... anyone knows something similar for the 2.0 version of SMF?
thank you

Dragooon

Hello Rockas, did you ever get this solved? If not, then I believe the same piece of code would work for SMF 2.0 RC 1 as well.

thefley

#27
I loved this MOD!!!! now it will not work on 1.1.10.  after I moved forum...  I used this MOD almost every post..  can someone please update it!!!! PLEASE!!!!

and none of the package parse pages will open is so I can see to manually install it

http://custom.simplemachines.org/mods/index.php?mod=631

www.greatplainsriders.com

Arantor

Actually that mod should work just fine on 1.1.10 - just try installing it as usual (with backup first etc)

thefley

#29
Quote from: Arantor on September 05, 2009, 07:25:55 PM
Actually that mod should work just fine on 1.1.10 - just try installing it as usual (with backup first etc)
your right, I had an old ver of it saved.  but I still get an error.  tried all the parse sites and not one will open it so I know what file to mod manually

HERE IS THE ERROR

Installing this package will perform the following actions:  Type Action Description
1. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
2. Execute Modification ./Sources/Subs.php Test successful
3. Execute Modification ./Themes/default/Post.template.php Test failed
4. Extract File ./Themes/default/images/bbc/float.gif


http://dev.smfchat.com/parser/index.php

and a few older ones I have tried as well

www.greatplainsriders.com

Arantor

I just went to the mod site for the link above - http://custom.simplemachines.org/mods/index.php?mod=631 - selected 1.1.10 in the dropdown for version and hit Parse, and it gave me all the edits to apply without any fuss.

thefley

#31
thanks for all your help. but I still get the error.  I am on another computer trying it... here is what I get.


if you would not mind posting the code for the template I need to mod from above I would appreciate it.


Thanks, with your help, it helped me find the manual install off the site...


www.greatplainsriders.com

Tyrsson

Is this solved or do you still require assistance on this issue?
PM at your own risk, some I answer, if they are interesting, some I ignore.

thefley

it is solved for me! thanks it works great

www.greatplainsriders.com

naiTao


Arantor

Good to see it's working for people.

MultiformeIngegno

I think it's a REALLY USEFUL feature!! Why don't add it by default? :D
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Arantor

There are no plans to add this as a default feature, and it adds another five lines to the 1500 already in the bbcode system that the average forum user wouldn't really follow properly.

MultiformeIngegno

Just because they're 5 lines why don't add 'em? And I think that a really lot of users will like this feature!
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Arantor

Because it's 5 lines that are called MANY times.

parse_bbc is one of the heaviest functions in SMF. It's called every post, called every message listing (for the first post in every thread), amongst others. Every line added slows that down - IMO we need to cut back not add more there.

Advertisement: