Exemplo n.º 1
0
function renderedContent($item)
{
    $renderedContent = stripslashes($item['content']);
    $renderedContent = parseLatexBBCode($renderedContent);
    $icount = count($item['images']);
    for ($i = 0; $i < $icount; $i++) {
        //print_r($item['sections'][$s]['images'][$i]);
        $html = '<img src="' . getMidsizeUrl($item['images'][$i]['url']) . '">';
        $code = '[image_' . $item['images'][$i]['id'] . ']';
        $renderedContent = str_replace($code, $html, $renderedContent);
    }
    $renderedContent = parseBBCode2HTML($renderedContent);
    return $renderedContent;
}
Exemplo n.º 2
0
                     $id = substr($_REQUEST['location'], 5);
                     $postcount = count($waka['posts']);
                     for ($p = 0; $p < $postcount; $p++) {
                         if ($waka['posts'][$p]['id'] == $id && userMayEdit($waka['users'][$_REQUEST['u']]['email'], $waka['posts'][$p]['users'])) {
                             $item =& $waka['posts'][$p];
                         }
                     }
                 }
             }
         }
         $fcount = count($item['images']);
         for ($f = 0; $f < $fcount; $f++) {
             if ($item['images'][$f]['id'] == $_REQUEST['iid']) {
                 unlink($item['images'][$f]['url']);
                 unlink(getThumbUrl($item['images'][$f]['url']));
                 unlink(getMidsizeUrl($item['images'][$f]['url']));
                 unlink(dirname($item['images'][$f]['url']));
                 array_splice($item['images'], $f, 1);
                 $item['dateImagesTouched'] = date("Y-m-d H:i:s");
             }
         }
     }
 }
 //echo $_REQUEST['location'];
 if ($waka['users'][$_REQUEST['u']]['type'] == 'editor' || $waka['users'][$_REQUEST['u']]['type'] == 'subscriber') {
     if (isset($_REQUEST['action']) && isset($_REQUEST['location']) && strpos($_REQUEST['location'], 'post') == 0) {
         $notify = false;
         /*
         if($_REQUEST['location']=="starter") $item=&$waka['starter'];
         			else if($_REQUEST['location']=="draft"){ 
         				$item=&$waka['drafts'][$_REQUEST['u']];