summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2008-12-19 23:01:55 -0500
committerStarla Insigna <hatkirby@fourisland.com>2008-12-19 23:01:55 -0500
commit8920977261fb6c0fb5ad3e9be0bc07ff35b337cf (patch)
treef3fcd75e7e5b02c0152ac1f2c075e319f22be357
parent31ac283c5bae32c91629fa36adf71572597f2cd5 (diff)
downloadfourisland-8920977261fb6c0fb5ad3e9be0bc07ff35b337cf.tar.gz
fourisland-8920977261fb6c0fb5ad3e9be0bc07ff35b337cf.tar.bz2
fourisland-8920977261fb6c0fb5ad3e9be0bc07ff35b337cf.zip
Added [thumb] BBCode
The [thumb] bbcode takes the content and creates a thumbnail of it. The thumbnail fits perfectly inside the post bubble and is wrapped with a link to
the original image.
-rw-r--r--.hgignore1
-rwxr-xr-xincludes/bbcode.php1
-rwxr-xr-xthumb.php2
3 files changed, 3 insertions, 1 deletions
diff --git a/.hgignore b/.hgignore new file mode 100644 index 0000000..9747ba0 --- /dev/null +++ b/.hgignore
@@ -0,0 +1 @@
^images
diff --git a/includes/bbcode.php b/includes/bbcode.php index 3cae84c..4dbb933 100755 --- a/includes/bbcode.php +++ b/includes/bbcode.php
@@ -51,6 +51,7 @@ class BBCode
51 $this->bbcodes2['bquote'] = '<P><DIV CLASS="autosize"><DIV CLASS="bubble"><DIV CLASS="bquote"><BLOCKQUOTE><DIV>{CONTENT}</DIV></BLOCKQUOTE></DIV><CITE><STRONG>{PARAM}</STRONG></CITE></DIV></DIV><DIV CLASS="cleardiv"></DIV>'; 51 $this->bbcodes2['bquote'] = '<P><DIV CLASS="autosize"><DIV CLASS="bubble"><DIV CLASS="bquote"><BLOCKQUOTE><DIV>{CONTENT}</DIV></BLOCKQUOTE></DIV><CITE><STRONG>{PARAM}</STRONG></CITE></DIV></DIV><DIV CLASS="cleardiv"></DIV>';
52 $this->bbcodes2['abbr'] = '<ABBR TITLE="{PARAM}">{CONTENT}</ABBR>'; 52 $this->bbcodes2['abbr'] = '<ABBR TITLE="{PARAM}">{CONTENT}</ABBR>';
53 $this->bbcodes['hidden'] = '<SPAN STYLE="display: none">{CONTENT}</SPAN>'; 53 $this->bbcodes['hidden'] = '<SPAN STYLE="display: none">{CONTENT}</SPAN>';
54 $this->bbcodes['thumb'] = '<A HREF="/images/{CONTENT}"><IMG SRC="http://fourisland.com/thumb.php?file=images/{CONTENT}&mode=scale&by=521&side=0" /></A>';
54 55
55 $this->init = true; 56 $this->init = true;
56 } 57 }
diff --git a/thumb.php b/thumb.php index ba9c645..efd1f8f 100755 --- a/thumb.php +++ b/thumb.php
@@ -133,7 +133,7 @@ switch ($_GET['mode'])
133 } 133 }
134 default: 134 default:
135 $string = 'An error was encountered.'; 135 $string = 'An error was encountered.';
136 $im2 = imagecreatefrompng("images/blue.png"); 136 $im2 = imagecreatefrompng("theme/images/blue.PNG");
137 $im = imagecreate(200,30); 137 $im = imagecreate(200,30);
138 $b = imagecopyresized($im,$im2,0,0,0,0,400,400,1,1); 138 $b = imagecopyresized($im,$im2,0,0,0,0,400,400,1,1);
139 $orange = imagecolorallocate($im, 220, 210, 60); 139 $orange = imagecolorallocate($im, 220, 210, 60);