.

ChctrpgoDiseños terminados Megady (Act 1.3)



10-22-2020, 09:25 PM #1
0
Debes agradecer para ver el contenido...
 
 

Ejecutar esta consulta
ALTER TABLE p_posts ADD post_imagen VARCHAR( 300 ) NOT NULL;
 
 
En c.posts.php --> inc --> class --> c.posts.php
 
Buscar:
'category' => intval($_POST['categoria']),
 
 
Debajo agregar:
'imagen' => $tsCore->setSecure($_POST['imagen']),
 
 
Buscar:
$postID = db_exec('insert_id');
 
 
En la consulta de arriba buscar:
, post_status
 
 
Agregar al lado:
, post_imagen

 
Al final de esa linea buscar:
? '\'3\'' : '\'0\'').')')) {
 
 
Cambiar por:
? '\'3\'' : '\'0\'').', \''.$postData['imagen'].'\')')) {
 
 
Buscar:
'category' => $_POST['categoria'],
 
 
Debajo agregar:
'imagen' => $tsCore->setSecure($_POST['imagen']),
 
 
Buscar:
, post_sticky = \''.$postData['sticky'].'\'
 
 
Agregar al lado:
, post_imagen = \''.$postData['imagen'].'\'



Buscar:
function getRelated($tags){
		global $tsCore, $tsUser;
		// ES UN ARRAT AHORA A UNA CADENA
		if(is_array($tags)) $tags = implode(", ",$tags);
		else str_replace('-',', ',$tags);
		//
		$query = db_exec(array(__FILE__, __LINE__), 'query', "SELECT DISTINCT p.post_id, p.post_title, p.post_category, p.post_private, c.c_seo, c.c_img FROM p_posts AS p LEFT JOIN p_categorias AS c ON c.cid = p.post_category WHERE MATCH (post_tags) AGAINST ('$tags' IN BOOLEAN MODE) AND p.post_status = 0 AND post_sticky = 0 ORDER BY rand() LIMIT 0,10");
		//
		$data = result_array($query);
		
		//
		return $data;
	}

 
En esa linea después de:
p.post_private,
 
 
Agregar:
p.post_imagen,
 
 
Al final antes de:
}
 
 
Agregar:
function lasDestacados(){
		global $tsCore, $tsUser;
		$time = time() - 3600*24;
        $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT p.post_id, p.post_user, p.post_category, p.post_title, p.post_date, p.post_puntos, p.post_comments, p.post_private, p.post_status, p.post_imagen, c.c_nombre, c.c_seo, c.c_img FROM p_posts AS p LEFT JOIN p_categorias AS c ON c.cid = p.post_category  WHERE p.post_status = \'0\'  AND p.post_date > \''.$time.'\'  LIMIT 15');
        $datos = result_array($query);
		return $datos;
	    }
		
		
		function Postautor($user_id){
		global $tsCore, $tsUser;
        $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT p.post_id,  p.post_user, p.post_title, p.post_category, p.post_status, p.post_date, p.post_imagen, c.cid, c.c_seo, c.c_img FROM p_posts AS p LEFT JOIN p_categorias AS c ON c.cid = p.post_category WHERE p.post_status = \'0\' AND p.post_user = \''.(int)$user_id.'\' ORDER BY RAND() DESC LIMIT 15');
        $datos = result_array($query);
		return $datos;
	    }

		
		function lasRand(){
		global $tsCore, $tsUser;
        $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT p.post_id, p.post_user, p.post_category, p.post_title, p.post_date, p.post_puntos, p.post_comments, p.post_private, p.post_status, p.post_imagen, c.c_nombre, c.c_seo, c.c_img FROM p_posts AS p LEFT JOIN p_categorias AS c ON c.cid = p.post_category WHERE p.post_status = 0  ORDER BY RAND() DESC LIMIT 6');
        $datos = result_array($query);
		return $datos;
	    }
 
 
Buscar:
/*********/
      $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT p.post_id, p.post_user, p.post_category, p.post_title, p.post_date, p.post_comments, p.post_puntos, p.post_private, p.post_sponsored, p.post_status, p.post_sticky, u.user_id, u.user_name, u.user_activo, u.user_baneado, c.c_nombre, c.c_seo, c.c_img FROM p_posts AS p LEFT JOIN u_miembros AS u ON p.post_user = u.user_id  '.($tsUser->is_admod && $tsCore->settings['c_see_mod'] == 1 ? '' : ' && u.user_activo = \'1\' && u.user_baneado = \'0\'').' LEFT JOIN p_categorias AS c ON c.cid = p.post_category WHERE '.($tsUser->is_admod && $tsCore->settings['c_see_mod'] == 1 ? 'p.post_id > 0' : 'p.post_status = \'0\' && u.user_activo = \'1\' && u.user_baneado = \'0\'').'  '.$c_where.' '.$s_where.' GROUP BY p.post_id ORDER BY '.$s_order.' DESC LIMIT '.$start);
      $lastPosts['data'] = result_array($query);
 

Después de:
p.post_id,

 
 
Agregar:
 p.post_hits, 
 
 
En posts.php --> inc --> php --> posts.php
 
Buscar:
// DATOS DEL AUTOR
    		$smarty->assign("tsAutor",$tsPosts->getAutor($tsPost['post_user']));
 
 
Debajo agregar:
// POSTS DEL AUTOR
            $smarty->assign("tsPostautor",$tsPosts->Postautor($tsPost['post_user']));
	// POSTS RAND
            $smarty->assign("tsRand",$tsPosts->lasRand());
 

Buscar:
$smarty->assign("tsDo",$_GET['do']);
 

Debajo agregar:
$smarty->assign("tsDestacados",$tsPosts->lasDestacados());
 
 


Descargar:

Mega
Debes agradecer para ver el contenido...
 
Google Drive
Debes agradecer para ver el contenido...
 
Mediafire
Debes agradecer para ver el contenido...


Creditos: Vellenger

Buscar
Responder




Salto de foro:



Usuarios navegando en este tema:
1 invitado(s)