miniBB ® 

miniBB

®
Support Forums
  
 | Start | 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:43 
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:58 
This is very convenient! How such simplicity, the tag will be? What price?

Author Paul
Lead Developer 
#3 | Posted: 8 Dec 2009 12:15 
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:59 
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 Developer 
#5 | Posted: 9 Dec 2009 05:36 
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:11 
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 Developer 
#7 | Posted: 9 Dec 2009 06:13 
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:35 
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:54 
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


  ?
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
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑