Author Topic

liu spider

Thursday 17 March 2005 6:54:53 pm

Comment42060

is_block overwrite support in object tags:
This is adopted from ezxml output handler. Without this support, the object tag is always displayed as "block" element, rather than inline (I need something like this: when I did not assign the align property, then it should be inline. Of course, I edit two tpl files to achieve this as well, in addition to this patch)

this is the patch:

Index: /home/scim/public_html/ez/extension/xmlarea/ezxmltext/handlers/output/xmlareaxmloutput.php
===================================================================
--- /home/scim/public_html/ez/extension/xmlarea/ezxmltext/handlers/output/xmlareaxmloutput.php  (revision 541)
+++ /home/scim/public_html/ez/extension/xmlarea/ezxmltext/handlers/output/xmlareaxmloutput.php  (working copy)
@@ -287,11 +287,24 @@
             $tagText2 = implode( '', $textElements );^M
 ^M
             $res->removeKey( 'classification' );^M
-            ^M
-            ^M
-            ^M
+^M
+                    // Check if the template overrides the block flow setting^M
+                    $isBlockTagOverride = 'true';^M
+                    if ( $tpl->hasVariable( 'is_block', 'xmltagns:ContentView' ) )^M
+                    {^M
+                        $isBlockTagOverride = $tpl->variable( 'is_block', 'xmltagns:ContentView' );^M
+                    }^M
+                    else if ( $tpl->hasVariable( 'is_block', 'xmltagns' ) )^M
+                    {^M
+                        $isBlockTagOverride = $tpl->variable( 'is_block', 'xmltagns' );^M
+                    }^M
+^M
+                    if ( $isBlockTagOverride == 'true' )^M
+                        $isBlockTag = true;^M
+                    else^M
+                        $isBlockTag = false;^M
             if (!$standalone)^M
-                return $tagText2;^M
+                 return $tagText2;^M
             else^M
                 return array( $tagText,^M
                               $tagText2 );^M

http://liucougar.scim-im.org
SCIM Input Method Platform
http://scim.sf.net
SJSD Online Editor
http://sf.net/projects/sjsd