From bed99674d27626ac1f4f9145cda770b5f4de2476 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 2 Aug 2012 00:13:37 +0200 Subject: [PATCH] bbcode: two new bbcode elements (style, class) for CSS --- include/bbcode.php | 6 ++++++ view/theme/diabook/style-profile.css | 7 ++++++- view/theme/diabook/style.css | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/include/bbcode.php b/include/bbcode.php index 9ece3c3dec..d83cd35814 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -224,6 +224,12 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) { // Check for list text $Text = str_replace("[*]", "
  • ", $Text); + // Check for style sheet commands + $Text = preg_replace("(\[style=(.*?)\](.*?)\[\/style\])ism","$2",$Text); + + // Check for CSS classes + $Text = preg_replace("(\[class=(.*?)\](.*?)\[\/class\])ism","$2",$Text); + // handle nested lists $endlessloop = 0; diff --git a/view/theme/diabook/style-profile.css b/view/theme/diabook/style-profile.css index 63b2eb544a..927549fa33 100644 --- a/view/theme/diabook/style-profile.css +++ b/view/theme/diabook/style-profile.css @@ -2549,4 +2549,9 @@ list-style-type: disc; #photos-upload-newalbum-div { float: left; width: 175px; -} \ No newline at end of file +} + +.item-image-preview { + float: left; + margin-right: 10px; +} diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css index 68bfd5d3a9..286559b859 100644 --- a/view/theme/diabook/style.css +++ b/view/theme/diabook/style.css @@ -2906,4 +2906,4 @@ list-style-type: disc; #photos-upload-newalbum-div { float: left; width: 175px; -} \ No newline at end of file +}