News:

Wondering if this will always be free?  See why free is better.

Main Menu

Wrap Text Around Image

Started by 4fit?, January 31, 2007, 01:17:31 PM

Previous topic - Next topic

4fit?

Link to Mod

This mod was adapted from [UNKNOWN]'s code posted here and includes crappyday's adjustment to include a margin posted here.
Adjustments made by me were:

  • Changing what the modification file was looking for in Subs.php to be correct for 1.1.1
  • Adding an image to the BBC bar in Post.template.php.

This mod will add a button to the BBC buttons in Post.template.php.  The button will be placed immediately following the image button.  After clicking this button, the following code will be added to your post box:
[float=left][img][/img][/float]

Simply plug in the URL to the image between the image tags.  You can also change float=left to float=right depending on your needs.

A live example of this can be found HERE.

Here is an example screen print:


Files modified:

  • Post.template.php
  • Subs.php
  • Modifications.english.php
  • Button image added to images/bbc

I make no claims that this code is totally my own.  I simply packaged it up for 1.1.1 after making a few small tweaks and adding the button.

KGIII

* KGIII takes it on a test drive... ;)

Mmm... Sexy. Thanks. :)

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

RoarinRow


SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

KGIII

*giggles a little*

The images and text don't line up exactly right. *will wait for the next version too* But there are a lot of things you can do. I haven't figured out how to center the image and have text appear on both sides but, wow, so far so good. TinyPortal users should certainly install this.

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

RoarinRow

Quote from: KGIII on February 02, 2007, 01:21:57 AM
*giggles a little*

The images and text don't line up exactly right. *will wait for the next version too* But there are a lot of things you can do. I haven't figured out how to center the image and have text appear on both sides but, wow, so far so good. TinyPortal users should certainly install this.

I notice that too, but that's o.k. looks good for now   8)   I'll make articles and other blocks good with my TP site.

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

KGIII

He's got skills. Even if it is wrapping code. (By the way, he said he would look into it.) I have the utmost belief that it will be resolved. ;)

My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?

4fit?

lol - You guys are so hard to please. :)
I've just uploaded a new file.  Uninstall and delete the current one and install the new version and let me know if that handles it for ya.  It works fine on my test forum.

RoarinRow

Quote from: 4fit? on February 02, 2007, 01:24:46 PM
lol - You guys are so hard to please. :)
I've just uploaded a new file.  Uninstall and delete the current one and install the new version and let me know if that handles it for ya.  It works fine on my test forum.

I tried it on my test site and i can't get it too look like this:



The image is on the right, but the text is just pushing down the image, not to the left of it.


SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

4fit?

Quote from: RoarinRow on February 02, 2007, 01:44:20 PM
Quote from: 4fit? on February 02, 2007, 01:24:46 PM
lol - You guys are so hard to please. :)
I've just uploaded a new file.  Uninstall and delete the current one and install the new version and let me know if that handles it for ya.  It works fine on my test forum.

I tried it on my test site and i can't get it too look like this:



The image is on the right, but the text is just pushing down the image, not to the left of it.

Odd.  It works fine on my production site and test sites.  Can you post up everything you typed in there?

Using your exact content from your attachment, on my test site this:
[float=left][img]http://i7.photobucket.com/albums/y267/taycon9601/av.jpg[/img][/float]test text wrap aksjdfkd alkdjf alkdjf lkjw woie  lkdjfe l;kjw

produced this:

4fit?

#9
After looking into it a little further, it is my guess that you are using something like this:
TTTTTTTT t t t  t   T TTTTTTTTTT  T T T T T T TTTTTTT[float=right][img]http://i7.photobucket.com/albums/y267/taycon9601/av.jpg[/img][/float]

That would produce what you are seeing because the float tag is appearing after the text you are trying to wrap around.  You need to place the float tag before the text you want to float around it. 

So, you should use something like:
[float=right][img]http://i7.photobucket.com/albums/y267/taycon9601/av.jpg[/img][/float]TTTTTTTT t t t  t   T TTTTTTTTTT  T T T T T T TTTTTTT

RoarinRow

Quote from: 4fit? on February 02, 2007, 03:14:11 PM
After looking into it a little further, it is my guess that you are using something like this:
TTTTTTTT t t t  t   T TTTTTTTTTT  T T T T T T TTTTTTT[float=right][img]http://i7.photobucket.com/albums/y267/taycon9601/av.jpg[/img][/float]

That would produce what you are seeing because the float tag is appearing after the text you are trying to wrap around.  You need to place the float tag before the text you want to float around it. 

So, you should use something like:
[float=right][img]http://i7.photobucket.com/albums/y267/taycon9601/av.jpg[/img][/float]TTTTTTTT t t t  t   T TTTTTTTTTT  T T T T T T TTTTTTT

oh you're right.  I was thinking I'd put the code on how I wanted it to appear, thanks!

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

KGIII


My PC Support Forum
Please ask in-thread before PMing
                   SMF Help
                   Visit My Blog

How can we improve the support process?:
http://www.simplemachines.org/community/index.php?topic=163533.0

SMF vs. Godzilla? Who do you think will win?


SacmaliK


My Mods
Veoh Bbc Tag:here
Topic get Keywords:here
...

arba

Great mod ,just what I looking for .
I have one problem ,how I can add that code to non default theme ?? I install him and everything is fine with default theme but I can not see him in theme I using .
Thank you  :)

4fit?

Quote from: arba on February 10, 2007, 03:45:28 PM
Great mod ,just what I looking for .
I have one problem ,how I can add that code to non default theme ?? I install him and everything is fine with default theme but I can not see him in theme I using .
Thank you  :)
I'm away from my main PC fo for the weekend.  I will post up the modifications needed when i return on Monday.  But, you can open up the modification.xml file (or install.xml file) and perform the code changes manually.

growwl

will this mopd be updated for smf 1.1.2?
it won't install on my 1.1.2 at the moment

4fit?

Quote from: growwl on February 14, 2007, 06:17:13 AM
will this mopd be updated for smf 1.1.2?
it won't install on my 1.1.2 at the moment
Mod updated to work with 1.1.2.

growwl

thx for the work, but still i get an error that says "The package you tried to upload either is not a valid package or has become corrupted." when trying tio install it.

smf 1.1.2 and tinyportal 0.9.7
any help on this?

4fit?

Quote from: growwl on February 14, 2007, 03:20:34 PM
thx for the work, but still i get an error that says "The package you tried to upload either is not a valid package or has become corrupted." when trying tio install it.

smf 1.1.2 and tinyportal 0.9.7
any help on this?
Odd.  Give it a shot now.

Advertisement: