Código PHP:
Ver original
require_once './global.php'; class blog{ function mostrar(){ global $mybb,$db, $templates, $parser, $forum; //Esto lo agarre del foro, para que me agarre los saltos de linea automaticamente. $parser_options['allow_html'] = $forum['allowhtml']; $parser_options['allow_mycode'] = $forum['allowmycode']; $parser_options['allow_smilies'] = $forum['allowsmilies']; $parser_options['allow_imgcode'] = $forum['allowimgcode']; $parser_options['allow_videocode'] = $forum['allowvideocode']; $parser_options['me_username'] = $post['username']; $parser_options['filter_badwords'] = 1; $sql="SELECT pid, tid, subject, message FROM mybb_posts WHERE fid = '14' ORDER BY pid ASC"; $resultado = $db->query($sql); $g=1; while ($res=$db->fetch_array($resultado)){ $query = $db->simple_select("attachments", "*", "pid=".$res['pid']); $adjunto=$db->fetch_field($query, 'attachname'); $nombre_archivo=$mybb->settings['uploadspath']."/".$adjunto; $texto=$parser->parse_message($texto, $parser_options); $texto.="..."; } $cabecera=$this->cabecera(); return $html; } function cabecera(){ global $mybb, $templates; $usuario=$mybb->user['username']; if($mybb->user['uid']==0){ // $captcha=$this->mostrarcaptcha(); // eval('$registrofacil= "'.$templates->get('EC_registrofacil').'";'); }else{ } return $header; } } $blog=new blog; $datos=$blog->mostrar(); //output_page($datos,1); print($datos);