Changeset 139

Show
Ignore:
Timestamp:
12/25/07 18:06:03 (5 years ago)
Author:
d0nut
Message:

here is the code of deviantart bbcode 1.1 - packagerelease was two weeks ago, sorry.

Location:
bbcode.deviantart
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • bbcode.deviantart/bbcodes.xml

    r55 r139  
    66                        <classname>DeviantArtBBCode</classname> 
    77                        <allowedchildren>none</allowedchildren> 
     8                        <attributes> 
     9                                <attribute name="0"> 
     10                                        <required>0</required> 
     11                                        <validationpattern>\d+x\d+</validationpattern> 
     12                                </attribute> 
     13                        </attributes> 
    814                        <sourcecode>1</sourcecode> 
    915                        <wysiwygicon>deviantartM.png</wysiwygicon> 
  • bbcode.deviantart/files/lib/data/message/bbcode/DeviantArtBBCode.class.php

    r78 r139  
    2222                // id as input 
    2323                        $id = intval($content); 
    24                 } else if(strpos($content, 'http://') == 0){ 
     24                } else if(strpos($content, 'http://') == 0 && preg_match('/-(\d+)$/', $content, $hits)){ 
    2525                // url as input 
    26                         preg_match('/-(\d+)$/', $content, $hits); 
    2726                        $id = intval($hits[1]); 
    28                 } else if(strpos($content, '<object') == 0){ 
     27                } else if(strpos($content, '<object') !== false){ 
    2928                // html as input 
    3029                        preg_match('/^<object width\="(\d+)" height\="(\d+)">.+value\="id\=(\d+)"/', $content, $hits); 
     
    3534                } else { 
    3635                        return; 
     36                } 
     37                 
     38                // overwrite width/height from attribute 
     39                if(isset($openingTag['attributes'][0])) { 
     40                        list($width,$height) = explode("x", $openingTag['attributes'][0]); 
    3741                } 
    3842                 
  • bbcode.deviantart/package.xml

    r119 r139  
    55                <packagename>deviantART BBCode</packagename> 
    66                <packageDescription><![CDATA[BBCode for deviantART Query]]></packageDescription> 
    7                 <version>1.0.1</version> 
     7                <version>1.1.0</version> 
    88                <date>DATE</date> 
    99                <plugin>com.woltlab.wcf.data.message.bbcode</plugin> 
     
    2929        </instructions> 
    3030         
     31        <instructions type="update" fromversion="1.0.1"> 
     32                <files>files.tar</files> 
     33                <bbcodes>bbcodes.xml</bbcodes> 
     34        </instructions> 
     35         
    3136        <instructions type="update" fromversion="1.0.0"> 
    3237                <files>files.tar</files> 
     38                <bbcodes>bbcodes.xml</bbcodes> 
    3339        </instructions> 
    3440</package>