diff --git a/serendipity_plugin_sidebarlogo/UTF-8/lang_de.inc.php b/serendipity_plugin_sidebarlogo/UTF-8/lang_de.inc.php new file mode 100644 index 00000000..6ac44f2c --- /dev/null +++ b/serendipity_plugin_sidebarlogo/UTF-8/lang_de.inc.php @@ -0,0 +1,54 @@ +Max Mustermann")'); +@define('PLUGIN_SIDEBARLOGO_CONTACTSTYLE', 'Kontaktstil'); +@define('PLUGIN_SIDEBARLOGO_CONTACTSTYLE_DESC', 'CSS-Stil, der für die Kontaktinformationen verwendet werden soll. Mit dem Zeichen "." beginnen, um eine CSS-ID zu spezifizieren, mit "#" beginnen, um eine Klasse zu spezifizieren oder alternativ einen Inline-Stil direkt eingeben'); +@define('PLUGIN_SIDEBARLOGO_COPYRIGHT', 'Copyright'); +@define('PLUGIN_SIDEBARLOGO_COPYRIGHT_DESC', 'Kleiner Text, der am besten für Copyright oder Rechtshinweise verwendet wird (Copyright-Symbol: "©")'); +@define('PLUGIN_SIDEBARLOGO_COPYRIGHTSTYLE', 'Copyrightstil'); +@define('PLUGIN_SIDEBARLOGO_COPYRIGHTSTYLE_DESC', 'CSS-Stil, der für das Copyright verwendet werden soll. Mit dem Zeichen "." beginnen, um eine CSS-ID zu spezifizieren, mit "#" beginnen, um eine Klasse zu spezifizieren oder alternativ einen Inline-Stil direkt eingeben'); +@define('PLUGIN_SIDEBARLOGO_DELIMITER', 'Trenner'); +@define('PLUGIN_SIDEBARLOGO_DELIMITERSTYLE', 'Trenner-Stil'); +@define('PLUGIN_SIDEBARLOGO_DELIMITERSTYLE_DESC', 'Stil für den Trenner. Der Trenner ist ein Element zur Textflusskontrolle. Es zwingt den Rest der Box bzw. der Seite, unter dem Bild weiterzugehen. Normalerweise muss dieser Stil nicht angepasst werden. Das ist nur nötig, wenn entsprechende Änderung am Bidlstil vorgenommen wurden.'); +@define('PLUGIN_SIDEBARLOGO_SEQUENCE', 'Sequenz'); +@define('PLUGIN_SIDEBARLOGO_SEQUENCE_DESC', 'Lege die Sequenz der Elemente von SideBar Logo fest und aktiviere bzw. deaktiviere sie (Standard ist: Bild, Beschreibung, Trenner).'); +?> \ No newline at end of file diff --git a/serendipity_plugin_sidebarlogo/lang_en.inc.php b/serendipity_plugin_sidebarlogo/lang_en.inc.php index dc2e0861..2330d98f 100644 --- a/serendipity_plugin_sidebarlogo/lang_en.inc.php +++ b/serendipity_plugin_sidebarlogo/lang_en.inc.php @@ -1,34 +1,53 @@ + * @version 0.4 + * @author Adam Krause (http://www.pigslipstick.com/), Oliver Gerlach (http://stumblingpilgrim.net/) * EN-Revision: Revision of lang_en.inc.php */ -@define('PLUGIN_SIDEBARLOGO_NAME', 'SideBar Logo 0.0.2'); -@define('PLUGIN_SIDEBARLOGO_DESC', 'Displays a panel containing your logo, site name, and other relevant informaion about your site.'); -@define('PLUGIN_SIDEBARLOGO_AUTH', 'Adam Krause'); +@define('PLUGIN_SIDEBARLOGO_NAME', 'SideBar Logo'); +@define('PLUGIN_SIDEBARLOGO_DESC', 'Displays a panel containing your logo with a description including all relevant information about your site (an about box).'); +@define('PLUGIN_SIDEBARLOGO_AUTH', 'Adam Krause & Oliver Gerlach'); +@define('PLUGIN_SIDEBARLOGO_GROUP_MOREOPTIONS', 'More Fields & Options'); +@define('PLUGIN_SIDEBARLOGO_GROUP_STYLES', 'Styling'); @define('PLUGIN_SIDEBARLOGO_TITLE', 'Title'); -@define('PLUGIN_SIDEBARLOGO_TITLE_DESC', 'The Text that displays in the SideBar Logo panel'); -@define('PLUGIN_SIDEBARLOGO_SITENAME', 'Name'); -@define('PLUGIN_SIDEBARLOGO_SITENAME_DESC', 'The name of your web site (Volkswagen of America)'); -@define('PLUGIN_SIDEBARLOGO_SITETAG', 'Tag Line'); -@define('PLUGIN_SIDEBARLOGO_SITETAG_DESC', 'A slogan or tag line (Autobahn for All)'); +@define('PLUGIN_SIDEBARLOGO_TITLE_DESC', 'Text for sidebar item title bar'); @define('PLUGIN_SIDEBARLOGO_IMAGE', 'Logo'); -@define('PLUGIN_SIDEBARLOGO_IMAGE_DESC', 'Select an image from your Serendipity Media Library'); +@define('PLUGIN_SIDEBARLOGO_IMAGE_DESC', 'image from media library to display in content section or leave blank for no image'); @define('PLUGIN_SIDEBARLOGO_IMAGEWIDTH', 'Image Width'); -@define('PLUGIN_SIDEBARLOGO_IMAGEWIDTH_DESC', 'Constrain logo width (leave blank for no constraint, 50px, or 200%)'); +@define('PLUGIN_SIDEBARLOGO_IMAGEWIDTH_DESC', 'display width of logo (use CSS definitions like 50px or 200% or leave blank for no constraint)'); @define('PLUGIN_SIDEBARLOGO_IMAGEHEIGHT', 'Image Height'); -@define('PLUGIN_SIDEBARLOGO_IMAGEHEIGHT_DESC', 'Constrain logo height (leave blank for no constraint, 50px or 200%)'); -@define('PLUGIN_SIDEBARLOGO_DESCRIPTION', 'Description'); -@define('PLUGIN_SIDEBARLOGO_DESCRIPTION_DESC', 'Describes the purpose of your site'); -@define('PLUGIN_SIDEBARLOGO_CONTACT', 'Contact'); -@define('PLUGIN_SIDEBARLOGO_CONTACT_DESC', 'An email address or mailto link ("Contact me: John")'); +@define('PLUGIN_SIDEBARLOGO_IMAGEHEIGHT_DESC', 'display height of logo (use CSS definitions like 50px or 200% or leave blank for no constraint)'); +@define('PLUGIN_SIDEBARLOGO_IMAGETEXT', 'Image Text'); +@define('PLUGIN_SIDEBARLOGO_IMAGETEXT_DESC', 'descriptive text for image (required)'); +@define('PLUGIN_SIDEBARLOGO_IMAGETEXT_MISSING', 'no description'); +@define('PLUGIN_SIDEBARLOGO_DESCRIPTION', 'Description text'); +@define('PLUGIN_SIDEBARLOGO_DESCRIPTION_DESC', 'Descriptive text for your blog or whatever you want to write. HTML can be used for further formatting.'); +@define('PLUGIN_SIDEBARLOGO_IMAGESTYLE', 'Image Style'); +@define('PLUGIN_SIDEBARLOGO_IMAGESTYLE_DESC', 'style to use for your logo. Start text with "." to provide a CSS id, with a "#" to provide a class or use inline styling directly'); +@define('PLUGIN_SIDEBARLOGO_DESCRIPTIONSTYLE', 'Description Style'); +@define('PLUGIN_SIDEBARLOGO_DESCRIPTIONSTYLE_DESC', 'style to use for your description. Start text with "." to provide a CSS id, with a "#" to provide a class, use direct styling or leave it blank to use default sidebar styling (recommended)'); +@define('PLUGIN_SIDEBARLOGO_DEFAULT_DESCRIPTION', 'Enter your text here'); +@define('PLUGIN_SIDEBARLOGO_SITENAME', 'Site Name'); +@define('PLUGIN_SIDEBARLOGO_SITENAME_DESC', 'The name of your web site (e.g. My New Blog)'); +@define('PLUGIN_SIDEBARLOGO_SITENAMESTYLE', 'Site Name Style'); +@define('PLUGIN_SIDEBARLOGO_SITENAMESTYLE_DESC', 'style to use for your site name. Start text with "." to provide a CSS id, with a "#" to provide a class or use inline styling directly'); +@define('PLUGIN_SIDEBARLOGO_SITETAG', 'Tag Line'); +@define('PLUGIN_SIDEBARLOGO_SITETAG_DESC', 'a slogan or tag line (e.g. Blogging for life)'); +@define('PLUGIN_SIDEBARLOGO_SITETAGSTYLE', 'Site Tag Style'); +@define('PLUGIN_SIDEBARLOGO_SITETAGSTYLE_DESC', 'style to use for your site tag. Start text with "." to provide a CSS id, with a "#" to provide a class or use inline styling directly'); +@define('PLUGIN_SIDEBARLOGO_CONTACT', 'Contact Information'); +@define('PLUGIN_SIDEBARLOGO_CONTACT_DESC', 'An email address or mailto link ("Contact me: John Doe")'); +@define('PLUGIN_SIDEBARLOGO_CONTACTSTYLE', 'Contact style'); +@define('PLUGIN_SIDEBARLOGO_CONTACTSTYLE_DESC', 'style to use for your contact information. Start text with "." to provide a CSS id, with a "#" to provide a class or use inline styling directly'); @define('PLUGIN_SIDEBARLOGO_COPYRIGHT', 'Copyright'); @define('PLUGIN_SIDEBARLOGO_COPYRIGHT_DESC', 'Tiny text, best used for copyright or legal statement (copyright symbol: "©")'); -@define('PLUGIN_SIDEBARLOGO_STYLE', 'Content Styling'); -@define('PLUGIN_SIDEBARLOGO_STYLE_DESC', 'Style your panel content (clear the field and save 2X to reload defaults)'); +@define('PLUGIN_SIDEBARLOGO_COPYRIGHTSTYLE', 'Copyright Style'); +@define('PLUGIN_SIDEBARLOGO_COPYRIGHTSTYLE_DESC', 'style to use for your contact information. Start text with "." to provide a CSS id, with a "#" to provide a class or use inline styling directly'); +@define('PLUGIN_SIDEBARLOGO_DELIMITER', 'Delimiter'); +@define('PLUGIN_SIDEBARLOGO_DELIMITERSTYLE', 'Delimiter Styling'); +@define('PLUGIN_SIDEBARLOGO_DELIMITERSTYLE_DESC', 'Styling for the delimiter. The delimiter is a text flow control elment. It forces the rest of the box or the page to continue below the logo. Normally you do not need to change this style. Only do if you change your image style as well.'); @define('PLUGIN_SIDEBARLOGO_SEQUENCE', 'Sequence'); -@define('PLUGIN_SIDEBARLOGO_SEQUENCE_DESC', 'Define the sequence of your SideBar Logo elements'); - +@define('PLUGIN_SIDEBARLOGO_SEQUENCE_DESC', 'Define the sequence of your SideBar Logo elements and enable or disable them (Default is logo, description, delimiter).'); +?> \ No newline at end of file diff --git a/serendipity_plugin_sidebarlogo/serendipity_plugin_sidebarlogo.php b/serendipity_plugin_sidebarlogo/serendipity_plugin_sidebarlogo.php index da56d991..e9ea06eb 100644 --- a/serendipity_plugin_sidebarlogo/serendipity_plugin_sidebarlogo.php +++ b/serendipity_plugin_sidebarlogo/serendipity_plugin_sidebarlogo.php @@ -1,7 +1,5 @@ -#sblsitename { - text-align: center; - font-size: 120%; - font-weight: bold; - text-decoration: none; -} -#sblsitetag { - text-align: center; - font-size: 105%; - font-weight: bold; - text-decoration: none; -} -#sblimage { - text-align: center; - border: 0px solid red; -} -#sbldescription { - text-align: justify; - font-size: 100%; - font-weight: normal; - text-decoration: none; -} -#sblcontact { - text-align: right; - font-size: 100%; - font-weight: normal; - text-decoration: none; -} -#sblcopyright { - text-align: right; - font-size: 80%; - font-weight: normal; - text-decoration: overline underline; -} -/*********** NOTES ************ -1. Suggest setting style attribute "display: none;" - on SideBar Logo elements that are left blank to - reduce empty space on the panel. -************ NOTES ***********/ - - -'); class serendipity_plugin_sidebarlogo extends serendipity_plugin { @@ -73,30 +25,56 @@ class serendipity_plugin_sidebarlogo extends serendipity_plugin $propbag->add('description', PLUGIN_SIDEBARLOGO_DESC); $propbag->add('stackable', true); $propbag->add('author', PLUGIN_SIDEBARLOGO_AUTH); - $propbag->add('version', '0.0.2'); + $propbag->add('version', '0.4'); $propbag->add('requirements', array('serendipity' => '0.9', 'smarty' => '2.6.7', 'php' => '4.1.0' )); $propbag->add('configuration', array('title', - 'sitename', - 'sitetag', 'image', 'imagewidth', 'imageheight', + 'imagetext', 'description', + 'imagestyle', + 'descriptionstyle', + 'sitename', + 'sitenamestyle', + 'sitetag', + 'sitetagstyle', 'contact', + 'contactstyle', 'copyright', - 'style', - 'sequence' + 'copyrightstyle', + 'sequence', )); + // sselect the appropriate groups in spartacus that match this plugin $propbag->add('groups', array('FRONTEND_FEATURES')); + // group config options. All options not in this list remain ungrouped and are visible always + $propbag->add('config_groups', array( + PLUGIN_SIDEBARLOGO_GROUP_MOREOPTIONS => array( + 'sitename', + 'sitetag', + 'contact', + 'copyright', + 'sequence' + ), + PLUGIN_SIDEBARLOGO_GROUP_STYLES => array( + 'imagestyle', + 'descriptionstyle', + 'sitenamestyle', + 'sitetagstyle', + 'contactstyle', + 'copyrightstyle', + ) + )); } function introspect_config_item($name, &$propbag) { - switch($name) { + switch($name) + { case 'title': $propbag->add('type', 'string'); @@ -105,20 +83,6 @@ class serendipity_plugin_sidebarlogo extends serendipity_plugin $propbag->add('default', 'My Logo'); break; - case 'sitename': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_SIDEBARLOGO_SITENAME); - $propbag->add('description', PLUGIN_SIDEBARLOGO_SITENAME_DESC); - $propbag->add('default', ''); - break; - - case 'sitetag': - $propbag->add('type', 'string'); - $propbag->add('name', PLUGIN_SIDEBARLOGO_SITETAG); - $propbag->add('description', PLUGIN_SIDEBARLOGO_SITETAG_DESC); - $propbag->add('default', ''); - break; - case 'image': $propbag->add('type', 'media'); $propbag->add('name', PLUGIN_SIDEBARLOGO_IMAGE); @@ -140,13 +104,62 @@ class serendipity_plugin_sidebarlogo extends serendipity_plugin $propbag->add('default', ''); break; + case 'imagetext': + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_SIDEBARLOGO_IMAGETEXT); + $propbag->add('description', PLUGIN_SIDEBARLOGO_IMAGETEXT_DESC); + $propbag->add('default', PLUGIN_SIDEBARLOGO_IMAGETEXT_MISSING); + break; + case 'description': $propbag->add('type', 'text'); $propbag->add('name', PLUGIN_SIDEBARLOGO_DESCRIPTION); $propbag->add('description', PLUGIN_SIDEBARLOGO_DESCRIPTION_DESC); + $propbag->add('default', PLUGIN_SIDEBARLOGO_DEFAULT_DESCRIPTION); + break; + + case 'imagestyle': + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_SIDEBARLOGO_IMAGESTYLE); + $propbag->add('description', PLUGIN_SIDEBARLOGO_IMAGESTYLE_DESC); + $propbag->add('default', '.serendipity_imageComment_left'); + break; + + case 'descriptionstyle': + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_SIDEBARLOGO_DESCRIPTIONSTYLE); + $propbag->add('description', PLUGIN_SIDEBARLOGO_DESCRIPTIONSTYLE_DESC); $propbag->add('default', ''); break; + case 'sitename': + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_SIDEBARLOGO_SITENAME); + $propbag->add('description', PLUGIN_SIDEBARLOGO_SITENAME_DESC); + $propbag->add('default', ''); + break; + + case 'sitenamestyle': + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_SIDEBARLOGO_SITENAMESTYLE); + $propbag->add('description', PLUGIN_SIDEBARLOGO_SITENAMESTYLE_DESC); + $propbag->add('default', 'text-align: center; font-size: 120%; font-weight: bold; text-decoration: none;'); + break; + + case 'sitetag': + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_SIDEBARLOGO_SITETAG); + $propbag->add('description', PLUGIN_SIDEBARLOGO_SITETAG_DESC); + $propbag->add('default', ''); + break; + + case 'sitetagstyle': + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_SIDEBARLOGO_SITETAGSTYLE); + $propbag->add('description', PLUGIN_SIDEBARLOGO_SITETAGSTYLE_DESC); + $propbag->add('default', 'text-align: center; font-size: 105%; font-weight: bold; text-decoration: none;'); + break; + case 'contact': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_SIDEBARLOGO_CONTACT); @@ -154,6 +167,13 @@ class serendipity_plugin_sidebarlogo extends serendipity_plugin $propbag->add('default', ''); break; + case 'contactstyle': + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_SIDEBARLOGO_CONTACTSTYLE); + $propbag->add('description', PLUGIN_SIDEBARLOGO_CONTACTSTYLE_DESC); + $propbag->add('default', 'text-align: right; font-size: 100%; font-weight: normal; text-decoration: none;'); + break; + case 'copyright': $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_SIDEBARLOGO_COPYRIGHT); @@ -161,11 +181,18 @@ class serendipity_plugin_sidebarlogo extends serendipity_plugin $propbag->add('default', ''); break; - case 'style': - $propbag->add('type', 'html'); - $propbag->add('name', PLUGIN_SIDEBARLOGO_STYLE); - $propbag->add('description', PLUGIN_SIDEBARLOGO_STYLE_DESC); - $propbag->add('default', PLUGIN_SIDEBARLOGO_STYLE_CODE); + case 'copyrightstyle': + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_SIDEBARLOGO_COPYRIGHTSTYLE); + $propbag->add('description', PLUGIN_SIDEBARLOGO_COPYRIGHTSTYLE_DESC); + $propbag->add('default', 'text-align: right; font-size: 80%; font-weight: normal; text-decoration: overline underline;'); + break; + + case 'delimiterstyle': + $propbag->add('type', 'string'); + $propbag->add('name', PLUGIN_SIDEBARLOGO_DELIMITERSTYLE); + $propbag->add('description', PLUGIN_SIDEBARLOGO_DELIMITERSTYLE_DESC); + $propbag->add('default', 'clear:left;'); break; case 'sequence': @@ -173,13 +200,16 @@ class serendipity_plugin_sidebarlogo extends serendipity_plugin $propbag->add('type', 'sequence'); $propbag->add('name', PLUGIN_SIDEBARLOGO_SEQUENCE); $propbag->add('description', PLUGIN_SIDEBARLOGO_SEQUENCE_DESC); + $propbag->add('checkable', true); $propbag->add('values', array('sitename' => array('display' => PLUGIN_SIDEBARLOGO_SITENAME), 'sitetag' => array('display' => PLUGIN_SIDEBARLOGO_SITETAG), 'image' => array('display' => PLUGIN_SIDEBARLOGO_IMAGE), 'description' => array('display' => PLUGIN_SIDEBARLOGO_DESCRIPTION), + 'delimiter' => array('display' => PLUGIN_SIDEBARLOGO_DELIMITER), 'contact' => array('display' => PLUGIN_SIDEBARLOGO_CONTACT), 'copyright' => array('display' => PLUGIN_SIDEBARLOGO_COPYRIGHT) )); + $propbag->add('default', 'image,description,delimiter'); break; default: @@ -192,58 +222,122 @@ class serendipity_plugin_sidebarlogo extends serendipity_plugin { global $serendipity; - $title = $this->get_config('title'); - $sitename = $this->get_config('sitename'); - $sitetag = $this->get_config('sitetag'); - $image = $this->get_config('image'); - $imagewidth = $this->get_config('imagewidth'); - $imageheight = $this->get_config('imageheight'); - $description = $this->get_config('description'); - $contact = $this->get_config('contact'); - $copyright = $this->get_config('copyright'); - $style = $this->get_config('style'); - $sequence = $this->get_config('sequence'); - $sequence = explode(",", $sequence); + $title = $this->get_config('title'); + $image = $this->get_config('image'); + $imagewidth = $this->get_config('imagewidth'); + $imageheight = $this->get_config('imageheight'); + $imagetext = $this->get_config('imagetext'); + $description = $this->get_config('description'); + $imagestyle = $this->get_config('imagestyle'); + $descriptionstyle = $this->get_config('descriptionstyle'); + $sitename = $this->get_config('sitename'); + $sitenamestyle = $this->get_config('sitenamestyle'); + $sitetag = $this->get_config('sitetag'); + $sitetagstyle = $this->get_config('sitetagstyle'); + $contact = $this->get_config('contact'); + $contactstyle = $this->get_config('contactstyle'); + $copyright = $this->get_config('copyright'); + $copyrightstyle = $this->get_config('copyrightstyle'); + $copyrightstyle = $this->get_config('delimiterstyle'); + $sequence = $this->get_config('sequence'); + + // prepare for output + $sequence = explode(",", $sequence); - if ($imagewidth != "") { - $iwidth = "width='$imagewidth'"; + if ($imagewidth != "") + { + $iwidth = "width='".$imagewidth."'"; } - if ($imageheight != "") { - $iheight = "height='$imageheight'"; + + if ($imageheight != "") + { + $iheight = "height='".$imageheight."'"; } + + $imagestyle = $this->generate_style_attribute($imagestyle); + $descriptionstyle = $this->generate_style_attribute($descriptionstyle); + $sitenamestyle = $this->generate_style_attribute($sitenamestyle); + $sitetagstyle = $this->generate_style_attribute($sitetagstyle); + $contactstyle = $this->generate_style_attribute($contactstyle); + $copyrightstyle = $this->generate_style_attribute($copyrightstyle); + $delimiterstyle = $this->generate_style_attribute($delimiterstyle); + + // output + foreach( $sequence as $val ) + { + switch( $val ) + { + case 'image': + if ($image != "") + echo "".$imagetext.""; + break; - echo $style; - echo "
"; - foreach($sequence as $val) { - switch($val) { - case 'sitename': - echo "
".$sitename."
"; - break; + case 'description': + if ( $descriptionstyle != "" ) + echo "
\n"; + + echo $description."\n"; + + if ( $descriptionstyle != "" ) + echo "
\n"; + break; - case 'sitetag': - echo "
".$sitetag."
"; - break; + case 'delimiter': + echo "
"; + break; - case 'image': - echo "
"; - break; + case 'sitename': + echo "
\n"; + echo $sitename."\n"; + echo "
\n"; + break; - case 'description': - echo "
".$description."
"; - break; + case 'sitetag': + echo "
\n"; + echo $sitetag."\n"; + echo "
\n"; + break; - case 'contact': - echo "
".$contact."
"; - break; + case 'contact': + echo "
\n"; + echo $contact."\n"; + echo "
\n"; + break; - case 'copyright': - echo "
".$copyright."
"; - break; - } + case 'copyright': + echo "
\n"; + echo $copyright."\n"; + echo "
\n"; + break; + } + } } - echo "
"; + /** + * @brief create a full HTML attribute from style information + * @param stylestring input string to parse for style information + * @return attribute containing the resulting attribute + * + * Depending on the input string this method either creates a style attribute, a class attribute or an id attribute. + * The choice is made on the first character of the input string. + * A leading '#' denotes an id while a leading '.' denotes a class and everything else is taken as inline CSS. + */ + function generate_style_attribute(&$stylestring) + { + if ( $stylestring != "" ) + { + if ( $stylestring[0] == "." ) + return "class='".substr($stylestring,1)."'"; + else if ( $stylestring[0] == "#" ) + return "id='".substr($stylestring,1)."'"; + else + return "style='".$stylestring."'"; + return ""; + } + else + return ""; } } /* vim: set sts=4 ts=4 expandtab : */ +?> \ No newline at end of file