1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

Forum template tweaks

This commit is contained in:
Cameron
2013-04-18 18:25:20 -07:00
parent f9c03aa015
commit 1d25a01eac
3 changed files with 46 additions and 25 deletions

View File

@@ -62,6 +62,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
*/
function sc_post()
{
// return print_a($this->postInfo['post_entry'],true);
$emote = (isset($this->postInfo['post_options']['no_emote']) ? ',emotes_off' : '');
return e107::getParser()->toHTML($this->postInfo['post_entry'], true, 'USER_BODY'.$emote, 'class:'.$this->postInfo['user_class']);
}
@@ -92,7 +93,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
$images = array();
$attachArray = e107::getArrayStorage()->read($this->postInfo['post_attachments']);
$attachArray = e107::unserialize($this->postInfo['post_attachments']);
foreach($attachArray as $type=>$vals)
{
@@ -111,11 +112,21 @@ class plugin_forum_view_shortcodes extends e_shortcode
case 'img': //Always use thumb to hide the hash.
$thumb = $tp->thumbUrl($baseDir.$file,'x=1',true);
$full = $tp->thumbUrl($baseDir.$file,'w=1000&x=1', true);
// return $baseDir.$file;
if(file_exists($baseDir.$file))
{
$thumb = $tp->thumbUrl($baseDir.$file,'x=1',true);
$full = $tp->thumbUrl($baseDir.$file,'w=1000&x=1', true);
$inc = (vartrue($parm['modal'])) ? "data-toggle='modal' data-target='#".$parm['modal']."' " : "";
$images[] = "<a {$inc} rel='external' href='{$full}'><img class='thumbnail' src='{$thumb}' alt='' /></a>";
}
elseif(ADMIN)
{
$images[] = "Missing File: ".$baseDir.$file;
}
$inc = (vartrue($parm['modal'])) ? "data-toggle='modal' data-target='#".$parm['modal']."' " : "";
$images[] = "<a {$inc} rel='external' href='{$full}'><img class='thumbnail' src='{$thumb}' alt='' /></a>";
break;
}