PHPost | Soporte, Descargas y Tutoriales de Risus Nova
COMPLEMENTOS Opciones de Autor del Posts (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 Opciones de Autor del Posts (Act) (/tema-Complementos-Terminados-Opciones-de-Autor-del-Posts-Act)



Opciones de Autor del Posts (Act) - Chctrpgo - 09-13-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]
 
[img]Registrate o inicia tu sesión para ver este contenido[/img]



Ejecutar esta consulta
 
Código PHP:
ALTER TABLE `p_posts`
ADD `post_rangs1int(1NOT NULL DEFAULT '0',
ADD `post_rangs2int(1NOT NULL DEFAULT '0',
ADD `post_rangs3int(1NOT NULL DEFAULT '0',
ADD `post_rangs4int(1NOT NULL DEFAULT '0',
ADD `post_rangs5int(1NOT NULL DEFAULT '0',
ADD `post_rangs6int(1NOT NULL DEFAULT '0',
ADD `post_rangs7int(1NOT NULL DEFAULT '0',
ADD `post_rangs8int(1NOT NULL DEFAULT '0',
ADD `post_rangs9int(1NOT NULL DEFAULT '0',
ADD `post_rangs10int(1NOT NULL DEFAULT '0',
ADD `post_prangs1int(1NOT NULL DEFAULT '0',
ADD `post_prangs2int(1NOT NULL DEFAULT '0',
ADD `post_prangs3int(1NOT NULL DEFAULT '0',
ADD `post_prangs4int(1NOT NULL DEFAULT '0',
ADD `post_prangs5int(1NOT NULL DEFAULT '0',
ADD `post_prangs6int(1NOT NULL DEFAULT '0',
ADD `post_prangs7int(1NOT NULL DEFAULT '0',
ADD `post_prangs8int(1NOT NULL DEFAULT '0',
ADD `post_prangs9int(1NOT NULL DEFAULT '0',
ADD `post_prangs10int(1NOT NULL DEFAULT '0'


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

Buscar:
 
Código PHP:
$postData['block_comments'] = empty($_POST['sin_comentarios']) ? 1


Debajo agregar:
 
Código PHP:
$postData['rangs1'] = empty($_POST['rang1']) ? 1;
        
$postData['rangs2'] = empty($_POST['rang2']) ? 1;
        
$postData['rangs3'] = empty($_POST['rang3']) ? 1;
        
$postData['rangs4'] = empty($_POST['rang4']) ? 1;
        
$postData['rangs5'] = empty($_POST['rang5']) ? 1;
        
$postData['rangs6'] = empty($_POST['rang6']) ? 1;
        
$postData['rangs7'] = empty($_POST['rang7']) ? 1;
        
$postData['rangs8'] = empty($_POST['rang8']) ? 1;
        
$postData['rangs9'] = empty($_POST['rang9']) ? 1;
        
$postData['rangs10'] = empty($_POST['rang10']) ? 1;
        
$postData['prangs1'] = empty($_POST['prang1']) ? 1;
        
$postData['prangs2'] = empty($_POST['prang2']) ? 1;
        
$postData['prangs3'] = empty($_POST['prang3']) ? 1;
        
$postData['prangs4'] = empty($_POST['prang4']) ? 1;
        
$postData['prangs5'] = empty($_POST['prang5']) ? 1;
        
$postData['prangs6'] = empty($_POST['prang6']) ? 1;
        
$postData['prangs7'] = empty($_POST['prang7']) ? 1;
        
$postData['prangs8'] = empty($_POST['prang8']) ? 1;
        
$postData['prangs9'] = empty($_POST['prang9']) ? 1;
        
$postData['prangs10'] = empty($_POST['prang10']) ? 1


Buscar:
 
Código PHP:
post_block_comments


Al lado agregar:
 
Código PHP:
post_rangs1post_rangs2post_rangs3post_rangs4post_rangs5post_rangs6post_rangs7post_rangs8post_rangs9post_rangs10post_prangs1post_prangs2post_prangs3post_prangs4post_prangs5post_prangs6post_prangs7post_prangs8post_prangs9post_prangs10


Buscar:
 
Código PHP:
'\', \''.(int)$postData['block_comments']. 

 
Al lado agregar:
 
Código PHP:
'\', \''.(int)$postData['rangs1'].'\', \''.(int)$postData['rangs2'].'\', \''.(int)$postData['rangs3'].'\', \''.(int)$postData['rangs4'].'\', \''.(int)$postData['rangs5'].'\', \''.(int)$postData['rangs6'].'\', \''.(int)$postData['rangs7'].'\', \''.(int)$postData['rangs8'].'\', \''.(int)$postData['rangs9'].'\', \''.(int)$postData['rangs10'].'\', \''.(int)$postData['prangs1'].'\', \''.(int)$postData['prangs2'].'\', \''.(int)$postData['prangs3'].'\', \''.(int)$postData['prangs4'].'\', \''.(int)$postData['prangs5'].'\', \''.(int)$postData['prangs6'].'\', \''.(int)$postData['prangs7'].'\', \''.(int)$postData['prangs8'].'\', \''.(int)$postData['prangs9'].'\', \''.(int)$postData['prangs10']. 

 
Buscar:
 
Código PHP:
$postData['block_comments'] = empty($_POST['sin_comentarios']) ? 1

 
Debajo agregar:
 
Código PHP:
$postData['rangs1'] = empty($_POST['rang1']) ? 1;
        
$postData['rangs2'] = empty($_POST['rang2']) ? 1;
        
$postData['rangs3'] = empty($_POST['rang3']) ? 1;
        
$postData['rangs4'] = empty($_POST['rang4']) ? 1;
        
$postData['rangs5'] = empty($_POST['rang5']) ? 1;
        
$postData['rangs6'] = empty($_POST['rang6']) ? 1;
        
$postData['rangs7'] = empty($_POST['rang7']) ? 1;
        
$postData['rangs8'] = empty($_POST['rang8']) ? 1;
        
$postData['rangs9'] = empty($_POST['rang9']) ? 1;
        
$postData['rangs10'] = empty($_POST['rang10']) ? 1;
        
$postData['prangs1'] = empty($_POST['prang1']) ? 1;
        
$postData['prangs2'] = empty($_POST['prang2']) ? 1;
        
$postData['prangs3'] = empty($_POST['prang3']) ? 1;
        
$postData['prangs4'] = empty($_POST['prang4']) ? 1;
        
$postData['prangs5'] = empty($_POST['prang5']) ? 1;
        
$postData['prangs6'] = empty($_POST['prang6']) ? 1;
        
$postData['prangs7'] = empty($_POST['prang7']) ? 1;
        
$postData['prangs8'] = empty($_POST['prang8']) ? 1;
        
$postData['prangs9'] = empty($_POST['prang9']) ? 1;
        
$postData['prangs10'] = empty($_POST['prang10']) ? 1
 
 
Buscar:
 
Código PHP:
'\', post_block_comments = \''.$postData['block_comments']. 

 
 Al lado agregar:
 
Código PHP:
'\', post_rangs1 = \''.$postData['rangs1'].'\', post_rangs2 = \''.$postData['rangs2'].'\', post_rangs3 = \''.$postData['rangs3'].'\', post_rangs4 = \''.$postData['rangs4'].'\', post_rangs5 = \''.$postData['rangs5'].'\', post_rangs6 = \''.$postData['rangs6'].'\', post_rangs7 = \''.$postData['rangs7'].'\', post_rangs8 = \''.$postData['rangs8'].'\', post_rangs9 = \''.$postData['rangs9'].'\', post_rangs10 = \''.$postData['rangs10'].'\', post_prangs1 = \''.$postData['prangs1'].'\', post_prangs2 = \''.$postData['prangs2'].'\', post_prangs3 = \''.$postData['prangs3'].'\', post_prangs4 = \''.$postData['prangs4'].'\', post_prangs5 = \''.$postData['prangs5'].'\', post_prangs6 = \''.$postData['prangs6'].'\', post_prangs7 = \''.$postData['prangs7'].'\', post_prangs8 = \''.$postData['prangs8'].'\', post_prangs9 = \''.$postData['prangs9'].'\', post_prangs10 = \''.$postData['prangs10']. 

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

Buscar:
 
Código PHP:
$this->settings['js'] = $this->settings['tema']['t_url'].'/js'

 
Debajo agregar:
 
Código PHP:
$this->settings['rangs'] = $this->getRangosper(); 

 
Buscar:
 
Código PHP:
/*
        getCategorias()
    */
    
function getCategorias()
    {
        
// CONSULTA
        
$query db_exec(array(__FILE____LINE__), 'query''SELECT cid, c_orden, c_nombre, c_seo, c_img FROM p_categorias ORDER BY c_orden');
        
// GUARDAMOS
        
$categorias result_array($query);
        
//
        
return $categorias;
    } 

 
Debajo agregar:
 
Código PHP:
/*
        getRangosper()
    */
    
function getRangosper()
    {
        
// CONSULTA
        
$query db_exec(array(__FILE____LINE__), 'query''SELECT r.rango_id, r.r_name, r.r_color FROM u_rangos AS r WHERE r.rango_id >2 ORDER BY r.rango_id ASC');
        
// GUARDAMOS
        
$rangs result_array($query);
        
//
        
return $rangs;
    } 

 
En m.posts_content.tpl --> themes --> default --> templates --> modules --> m.posts_content.tpl

Buscar:    
 
Código PHP:
<span>
                                
                                {
$tsPost.post_body}
                            
                            </
span

 
Reemplazar por:
 
Código PHP:
{if ($tsPost.post_prangs1==|| $tsPost.post_prangs2==|| $tsPost.post_prangs3==||
        
$tsPost.post_prangs4==|| $tsPost.post_prangs5==|| $tsPost.post_prangs6==||
        
$tsPost.post_prangs7==|| $tsPost.post_prangs8==|| $tsPost.post_prangs9==||
        
$tsPost.post_prangs10==1) & $tsUser->is_member=='false'}
        <
br>
        <
div class="emptyData">
        
Para poder comentar necesitas estar <a title="Registrate!" onclick="registro_load_form(); return false" href="">Registrado.</aO ya tienes usuario? <a title="Identificarme" href="javascript:open_login_box()">Logueate!</a>
        </
div>{else}
        {if 
$tsPost.post_prangs1==$tsUser->info.user_rango == $tsAutor.user_id != $tsUser->uid $tsUser->is_member ||
        
$tsPost.post_prangs2==$tsUser->info.user_rango == $tsAutor.user_id != $tsUser->uid ||
        
$tsPost.post_prangs3==$tsUser->info.user_rango == $tsAutor.user_id != $tsUser->uid ||
        
$tsPost.post_prangs4==$tsUser->info.user_rango == $tsAutor.user_id != $tsUser->uid ||
        
$tsPost.post_prangs5==$tsUser->info.user_rango == $tsAutor.user_id != $tsUser->uid ||
        
$tsPost.post_prangs6==$tsUser->info.user_rango == $tsAutor.user_id != $tsUser->uid ||
        
$tsPost.post_prangs7==$tsUser->info.user_rango == $tsAutor.user_id != $tsUser->uid ||
        
$tsPost.post_prangs8==$tsUser->info.user_rango == 10 $tsAutor.user_id != $tsUser->uid ||
        
$tsPost.post_prangs9==$tsUser->info.user_rango == 11 $tsAutor.user_id != $tsUser->uid ||
        
$tsPost.post_prangs10==$tsUser->info.user_rango == 12 $tsAutor.user_id != $tsUser->uid}
        <
div class="alert alert-info">
            <
strong>El autor del post ha decidido no permitir ver el post a usuarios con tu rango.</strong>
        </
div>
        {else}
        <
div class="relato-p">                         
            <
span>
                                
                {
$tsPost.post_body}
                            
            </
span>
        </
div>
        {/if}
        {/if} 

 
En m.posts_comments_form.tpl --> themes --> default --> templates --> modules --> m.posts_comments_form.tpl

Buscar:
 
Código PHP:
<div id="procesando"><div id="post"></div></div

 
Arriba agregar:
 
Código PHP:
{if $tsPost.post_rangs1==$tsUser->info.user_rango == $tsAutor.user_id != $tsUser->uid ||
$tsPost.post_rangs2==$tsUser->info.user_rango == $tsAutor.user_id != $tsUser->uid  ||
$tsPost.post_rangs3==$tsUser->info.user_rango == $tsAutor.user_id != $tsUser->uid  ||
$tsPost.post_rangs4==$tsUser->info.user_rango == $tsAutor.user_id != $tsUser->uid  ||
$tsPost.post_rangs5==$tsUser->info.user_rango == $tsAutor.user_id != $tsUser->uid  ||
$tsPost.post_rangs6==$tsUser->info.user_rango == $tsAutor.user_id != $tsUser->uid  ||
$tsPost.post_rangs7==$tsUser->info.user_rango == $tsAutor.user_id != $tsUser->uid  ||
$tsPost.post_rangs8==$tsUser->info.user_rango == 10 $tsAutor.user_id != $tsUser->uid ||
$tsPost.post_rangs9==$tsUser->info.user_rango == 11 $tsAutor.user_id != $tsUser->uid ||
$tsPost.post_rangs10==$tsUser->info.user_rango == 12 $tsAutor.user_id != $tsUser->uid}
<
div class="emptyData" style="margin-bottom:5px;">
El Autor del Posts ha decidido no permitir comentarios con tu rango.
</
div>
{else} 

 
Al final en el último:
 
Código PHP:
</div


Agregar:
 
Código PHP:
{/if} 

 
En m.agregar_form.tpl --> themes --> default --> templates --> modules --> m.agregar_form.tpl

Buscar:
 
Código PHP:
</ul

 
Arriba agregar:
 
Código PHP:
{include file='modules/m.opciones_users.tpl'

 
 
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: Vellenger