PHPost | Soporte, Descargas y Tutoriales de Risus Nova
COMPLEMENTOS Anuncios V2 (Act) - Versión para impresión

+- PHPost | Soporte, Descargas y Tutoriales de Risus Nova (https://phpost.es)
+-- Foro: Risus 1.3 (https://phpost.es/foro-Risus-1-3)
+--- Foro: Complementos (https://phpost.es/foro-Complementos)
+---- Foro: Complementos Terminados (https://phpost.es/foro-Complementos-Terminados)
+---- Tema: COMPLEMENTOS Anuncios V2 (Act) (/tema-Complementos-Terminados-Anuncios-V2-Act)



Anuncios V2 (Act) - Chctrpgo - 09-14-2022

Capturas
[img]Registrate o inicia tu sesión para ver este contenido[/img]
 
[img]Registrate o inicia tu sesión para ver este contenido[/img]
 
[img]Registrate o inicia tu sesión para ver este contenido[/img]



Ejecutar esta consulta
Código PHP:
ALTER TABLE w_noticias ADD not_type int(1NOT NULL


En c.admin.php --> inc --> class --> c.admin.php

Buscar:
Código PHP:
$query db_exec(array(__FILE____LINE__), 'query''SELECT `not_id`, `not_body`, `not_date`, `not_active` FROM w_noticias WHERE not_id = \'' .
            (int)
$not_id '\' LIMIT 1'); 


Reemplazar por:
Código PHP:
$query db_exec(array(__FILE____LINE__), 'query''SELECT `not_id`, `not_body`, `not_date`, `not_active`, `not_type` FROM w_noticias WHERE not_id = \'' .
            (int)
$not_id '\' LIMIT 1'); 


Buscar:
Código PHP:
/*
    newNoticia()
    */
    
function newNoticia()
    {
        global 
$tsCore$tsUser;
        
//
        
$not_body $tsCore->setSecure($tsCore->parseBadWords(substr($_POST['not_body'],
            
0190)));
        
$not_active = empty($_POST['not_active']) ? 1;
        if (!empty(
$not_body))
        {
            if (
db_exec(array(__FILE____LINE__), 'query''INSERT INTO `w_noticias` (`not_body`, `not_autor`, `not_date`, `not_active`) VALUES (\'' .
                
$not_body '\', \'' $tsUser->uid '\', \'' time() . '\', \'' $not_active .
                
'\')'))
                return 
true;
        }
        
//
        
return false;
    }
    
/*
    editNoticia()
    */
    
function editNoticia()
    {
        global 
$tsCore$tsUser;
        
//
        
$not_id intval($_GET['nid']);
        
$not_body $tsCore->setSecure($tsCore->parseBadWords(substr($_POST['not_body'],
            
0190)));
        
$not_active = empty($_POST['not_active']) ? 1;
        
//
        
if (!empty($not_body))
        {
            if (
db_exec(array(__FILE____LINE__), 'query''UPDATE `w_noticias` SET `not_autor` = \'' $tsUser->uid '\', `not_body` = \'' .
                
$not_body '\', not_active = \'' $not_active '\' WHERE not_id = \'' . (int)
                
$not_id '\''))
                return 
true;
        }
    } 


Reemplazar por:
Código PHP:
/*
    newNoticia()
    */
    
function newNoticia()
    {
        global 
$tsCore$tsUser;
        
//
        
$not_body $tsCore->setSecure($tsCore->parseBadWords(substr($_POST['not_body'],
            
0190)));
        
$not_active = empty($_POST['not_active']) ? 1;
        
$not_type $tsCore->setSecure($_POST['not_type']) ? $_POST['not_type'];
        if (!empty(
$not_body))
        {
            if (
db_exec(array(__FILE____LINE__), 'query''INSERT INTO `w_noticias` (`not_body`, `not_autor`, `not_date`, `not_active`, `not_type`) VALUES (\'' .
                
$not_body '\', \'' $tsUser->uid '\', \'' time() . '\', \'' $not_active .
                
'\', \'' $not_type '\')'))
                return 
true;
        }
        
//
        
return false;
    }
    
/*
    editNoticia()
    */
    
function editNoticia()
    {
        global 
$tsCore$tsUser;
        
//
        
$not_id intval($_GET['nid']);
        
$not_body $tsCore->setSecure($tsCore->parseBadWords(substr($_POST['not_body'],
            
0190)));
        
$not_active = empty($_POST['not_active']) ? 1;
        
$not_type $tsCore->setSecure($_POST['not_type']);
        
//
        
if (!empty($not_body))
        {
            if (
db_exec(array(__FILE____LINE__), 'query''UPDATE `w_noticias` SET `not_autor` = \'' $tsUser->uid '\', `not_body` = \'' .
                
$not_body '\', not_active = \'' $not_active '\', not_type = \'' $not_type '\' WHERE not_id = \'' . (int)
                
$not_id '\''))
                return 
true;
        }
    } 


En c.core.php --> inc --> class --> c.core.php

Buscar:
Código PHP:
$query db_exec(array(__FILE____LINE__), 'query''SELECT not_body FROM w_noticias WHERE not_active = \'1\' ORDER by RAND()'); 


Reemplazar por:
Código PHP:
$query db_exec(array(__FILE____LINE__), 'query''SELECT not_body, not_type FROM w_noticias WHERE not_active = \'1\' ORDER by RAND()'); 


En estilo.css --> themes --> default --> estilo.css

Buscar:
Código PHP:
#mensaje-top{
    
clear:left;
    
width:100%!important;
    
height:24px;
    
line-height:200%;
    
background:#ffe13e url('images/mensajetopbg.gif') repeat-x bottom left;
    
text-align:center;
    
border-top:1px solid #ffe970;
    
display:block;



Reemplazar por:
Código PHP:
#mensaje-top {
  
clearleft;
  
width100% !important;
  
height48px;
  
text-aligncenter;
  
displayblock;




Y subir esta carpeta

Mega
http://Registrate o inicia tu sesión para ver este contenido

Google Drive
http://Registrate o inicia tu sesión para ver este contenido

Mediafire
http://Registrate o inicia tu sesión para ver este contenido

Uptobox
http://Registrate o inicia tu sesión para ver este contenido

4shared
http://Registrate o inicia tu sesión para ver este contenido




Creditos: Xtatter