miniBB ®

miniBB

®
Support Forums
  
 · Start · Sign in · Register · Search · Statistics · File Bank · Manual ·
Specific miniBB Support Forums / Specific /  
 

CodeBB wrap text around images.

 
Author astass
Partaker
#1 · Posted: 8 Dec 2009 03:43Reply Quote
Must be made.

At another forum like this is done:
[float=left] "here the image set" [/float]

is only a snippet of code: <div style="float: {option};">{content}</div>

Perhaps the forum has been such a theme? If not. How can I do? I need help.

Author astass
Partaker
#2 · Posted: 8 Dec 2009 03:58Reply Quote
This is very convenient! How such simplicity, the tag will be? What price?

Author Paul
Lead Lead Developer
#3 · Posted: 8 Dec 2009 12:15Reply Quote
Just take a look at bb_codes.php of miniBB forums package, some codes like [quote] have similar syntax, you may copy/paste/modify them combining with [img] tag... it's really easy.

Author astass
Partaker
#4 · Posted: 8 Dec 2009 12:59Reply Quote
Paul:
Just take a look at bb_codes.php of miniBB forums package, some codes like [quote] have similar syntax, you may copy/paste/modify them combining with [img] tag... it's really easy.
I have my head on this broke. :) All my attempts to lead a syntax error. Although I tried very hard. And then, the code forum beautiful and correct. I still write code so I can not. : (Thanks for the advice. I will continue.

Author Paul
Lead Lead Developer
#5 · Posted: 9 Dec 2009 05:36Reply Quote
If you will spend more than a week for this, for $6 I'm ready to spend 15 minutes ;-)

Author astass
Partaker
#6 · Posted: 9 Dec 2009 06:11Reply Quote
Paul:
If you will spend more than a week for this, for $6 I'm ready to spend 15 minutes ;-)
I have already ordered this work: (. But another specialist for five dollars. Maybe you even after the module'll order another. Uzhno me a lot:)

Author Paul
Lead Lead Developer
#7 · Posted: 9 Dec 2009 06:13Reply Quote
Good luck :-)
(Still I doubt there are specialists which know miniBB better than it's author ;-)

Author astass
Partaker
#8 · Posted: 13 Dec 2009 08:35Reply Quote
find: bb_codes.php

/* local images - allowed for everybody */

Here we insert these lines:


/* tag flow <img src="img/logo1.gif" align="left"> */
$pattern[]='#\[float=(left|right)\](.*?)\[/float\]#is';
$replacement[]='<div style="float: \\1;">\\2</div>';

find: function deCodeBB($msg) {

Where you insert the following code:


$pattern[]="/<div class=\"float:left\"><img src=\"([^<> \n\r\[\]&]+?)\" alt=\"\" (title=\"\" )?style=\"float:left\" \/>/i";
$replacement[]="[float=left]\\1[/float]";

find:

$pattern[]="/<div style=\"text-align:(left|right|center)\">(.+?)<\/div>/is";
$replacement[]='[align\\1]\\2[/align]';

Paste the following code:


$pattern[] = '`<div style="float: (right|left);">(.*?)</div>`is';
$replacement[] = "[float=\\1]\\2[/float]\r\n";

The buttons are not difficult to put think

Author tom322
Active Member
#9 · Posted: 13 Dec 2009 10:54Reply Quote
If it works good, but it looks a little too complicated, probably a simpler solution is possible.

Specific miniBB Support Forums / Specific /
 CodeBB wrap text around images.
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message

BB code for the Bold StyleBB code for the Italic StyleBB Code for the PictureBB code for the URLUpload a File

  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Install the File and Picture Attachments add-on: extend your miniBB-forums, attaching images and files.