]> git.mxchange.org Git - friendica.git/commitdiff
fix bbcode image size
authorFriendika <info@friendika.com>
Sun, 18 Sep 2011 07:16:18 +0000 (00:16 -0700)
committerFriendika <info@friendika.com>
Sun, 18 Sep 2011 07:16:18 +0000 (00:16 -0700)
boot.php
include/bbcode.php

index 07bde382814acd2d0ba8d0258200850e91bb06cf..e073aee688c0d5f06f2044ba1bf1c4559bada94d 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -7,7 +7,7 @@ require_once('include/text.php');
 require_once("include/pgettext.php");
 
 
-define ( 'FRIENDIKA_VERSION',      '2.2.1105' );
+define ( 'FRIENDIKA_VERSION',      '2.2.1106' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.21'    );
 define ( 'DB_UPDATE_VERSION',      1087      );
 
index 3886af37dc29fde761d3a1f055b4fc590486446d..3d6b907a68aeaa77aeaece3161f6c660e28c51ca 100644 (file)
@@ -113,6 +113,9 @@ function bbcode($Text,$preserve_nl = false) {
        // Check for [quote] text
        $Text = preg_replace("/\[quote\](.*?)\[\/quote\]/ism","$QuoteLayout", $Text);
          
+       // [img=widthxheight]image source[/img]
+       $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '<img src="$3" style="height:{$2}px; width:{$1}px;" >', $Text);
+
        // Images
        // [img]pathtoimage[/img]
        $Text = preg_replace("/\[img\](.*?)\[\/img\]/ism", '<img src="$1" alt="' . t('Image/photo') . '" />', $Text);
@@ -125,8 +128,6 @@ function bbcode($Text,$preserve_nl = false) {
 
        $Text = preg_replace("/\[iframe\](.*?)\[\/iframe\]/ism", '<iframe src="$1" width="425" height="350"><a href="$1">$1</a></iframe>', $Text);
          
-       // [img=widthxheight]image source[/img]
-       $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '<img src="$3" style="height:{$2}px; width:{$1}px;" >', $Text);
 
        if (get_pconfig(local_user(), 'oembed', 'use_for_youtube' )==1){
                // use oembed for youtube links