Browse Source

bbcode: two new bbcode elements (style, class) for CSS

pull/422/head
Michael Vogel 10 years ago
parent
commit
bed99674d2
  1. 6
      include/bbcode.php
  2. 7
      view/theme/diabook/style-profile.css
  3. 2
      view/theme/diabook/style.css

6
include/bbcode.php

@ -224,6 +224,12 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
// Check for list text
$Text = str_replace("[*]", "<li>", $Text);
// Check for style sheet commands
$Text = preg_replace("(\[style=(.*?)\](.*?)\[\/style\])ism","<span style=\"$1;\">$2</span>",$Text);
// Check for CSS classes
$Text = preg_replace("(\[class=(.*?)\](.*?)\[\/class\])ism","<span class=\"$1\">$2</span>",$Text);
// handle nested lists
$endlessloop = 0;

7
view/theme/diabook/style-profile.css

@ -2549,4 +2549,9 @@ list-style-type: disc;
#photos-upload-newalbum-div {
float: left;
width: 175px;
}
}
.item-image-preview {
float: left;
margin-right: 10px;
}

2
view/theme/diabook/style.css

@ -2906,4 +2906,4 @@ list-style-type: disc;
#photos-upload-newalbum-div {
float: left;
width: 175px;
}
}

Loading…
Cancel
Save