Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Tronlar

Mod Videos Completo (Act-Fix 1.3)

Recommended Posts

Hola a [email protected], os dejo el mod de videos actualizado a 1.3 y fixeado, lo he probado en el tema default de risus pero tiene que funcionar en cualquier tema, lo que cambia es el diseño, más tarde lo dejo adaptado al diseño de la V5 y V6.

 

Ver Demo

 

f_0c985ff1214c.png

 

f_a433f9fe766c.png

 

f_cbcce70561dc.png

 

f_2b0296f41b58.png

 

f_4f483d4e7994.png

 

Ejecutar estas consultas

 

CREATE TABLE IF NOT EXISTS `v_videos` (
  `vid_id` int(11) NOT NULL AUTO_INCREMENT,
  `vid_title` varchar(40) NOT NULL,
  `vid_date` int(10) NOT NULL,
  `vid_description` text NOT NULL,
  `vid_url` varchar(200) NOT NULL,
  `vid_user` int(11) NOT NULL,
  `vid_closed` int(1) NOT NULL DEFAULT '0',
  `vid_visitas` int(1) NOT NULL DEFAULT '0',
  `vid_votos_pos` int(3) NOT NULL DEFAULT '0',
  `vid_votos_neg` int(3) NOT NULL DEFAULT '0',
  `vid_status` int(1) NOT NULL DEFAULT '0',
  `vid_last` int(1) NOT NULL DEFAULT '0',
  `vid_hits` int(11) NOT NULL DEFAULT '0',
  `vid_ip` varchar(15) NOT NULL DEFAULT '0',
  PRIMARY KEY (`vid_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
CREATE TABLE IF NOT EXISTS `v_comentarios` (
  `cid` int(11) NOT NULL AUTO_INCREMENT,
  `c_vid_id` int(11) NOT NULL,
  `c_user` int(11) NOT NULL,
  `c_date` int(10) NOT NULL,
  `c_body` text NOT NULL,
  `c_ip` varchar(15) NOT NULL,
    PRIMARY KEY (`cid`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
CREATE TABLE IF NOT EXISTS `v_votos` (
  `vid` int(11) NOT NULL AUTO_INCREMENT,
  `v_vid_id` int(11) NOT NULL,
  `v_user` int(11) NOT NULL,
  `v_type` int(1) NOT NULL,
  `v_date` int(11) NOT NULL,
  PRIMARY KEY (`vid`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
ALTER TABLE `w_medallas` ADD  `m_cond_video` INT( 11 ) NOT NULL;
ALTER TABLE `w_medallas` ADD  `m_cond_video` INT( 11 ) NOT NULL;
ALTER TABLE `w_stats` ADD `stats_video_comments` INT NOT NULL;
ALTER TABLE `w_stats` ADD `stats_video_comments` INT NOT NULL;

 

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

function GetAdminStats()
    {
        $num = db_exec('fetch_assoc', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT 
        (SELECT count(foto_id) FROM f_fotos WHERE f_status = \'2\') as fotos_eliminadas, 
        (SELECT count(foto_id) FROM f_fotos WHERE f_status = \'1\') as fotos_ocultas, 
        (SELECT count(foto_id) FROM f_fotos WHERE f_status = \'0\') as fotos_visibles, 
        (SELECT count(post_id) FROM p_posts WHERE post_status = \'0\') as posts_visibles, 
        (SELECT count(post_id) FROM p_posts WHERE post_status = \'1\') as posts_ocultos, 
        (SELECT count(post_id) FROM p_posts  WHERE post_status = \'2\') as posts_eliminados, 
        (SELECT count(post_id) FROM p_posts  WHERE post_status = \'3\') as posts_revision, 
        (SELECT count(cid) FROM p_comentarios WHERE c_status = \'0\') as comentarios_posts_visibles, 
        (SELECT count(cid) FROM p_comentarios WHERE c_status = \'1\') as comentarios_posts_ocultos, 
        (SELECT count(user_id) FROM u_miembros WHERE user_activo = \'1\') as usuarios_activos, 
        (SELECT count(user_id) FROM u_miembros WHERE user_activo = \'0\' ) as usuarios_inactivos, 
        (SELECT count(user_id) FROM u_miembros WHERE user_baneado = \'1\' ) as usuarios_baneados, 
        (SELECT count(cid) FROM f_comentarios) as comentarios_fotos_total, 
        (SELECT count(follow_id) FROM u_follows WHERE f_type  = \'1\' ) AS usuarios_follows,
        (SELECT count(follow_id) FROM u_follows WHERE f_type  = \'2\' ) AS posts_follows,
        (SELECT count(follow_id) FROM u_follows WHERE f_type  = \'3\' ) AS posts_compartidos,
        (SELECT count(fav_id) FROM p_favoritos) AS posts_favoritos,  
        (SELECT count(mr_id) FROM u_respuestas) AS usuarios_respuestas,
        (SELECT count(mp_id) FROM u_mensajes) AS mensajes_total, 
        (SELECT count(mp_id) FROM u_mensajes WHERE mp_del_to = \'1\') AS mensajes_de_eliminados,
        (SELECT count(mp_id) FROM u_mensajes WHERE mp_del_from = \'1\') AS mensajes_para_eliminados,
        (SELECT count(bid) FROM p_borradores) AS posts_borradores,
        (SELECT count(bid) FROM u_bloqueos) AS usuarios_bloqueados, 
        (SELECT count(bid) FROM u_bloqueos) AS usuarios_bloqueados,
        (SELECT count(medal_id) FROM w_medallas WHERE m_type = \'1\') AS medallas_usuarios,
        (SELECT count(medal_id) FROM w_medallas WHERE m_type = \'2\') AS medallas_posts,
        (SELECT count(medal_id) FROM w_medallas WHERE m_type = \'3\') AS medallas_fotos,
        (SELECT count(id) FROM w_medallas_assign) AS medallas_asignadas, 
        (SELECT count(aid) FROM w_afiliados WHERE a_active = \'1\') AS afiliados_activos, 
        (SELECT count(aid) FROM w_afiliados WHERE a_active = \'0\') AS afiliados_inactivos,
        (SELECT count(pub_id) FROM u_muro) AS muro_estados, 
        (SELECT count(cid) FROM u_muro_comentarios) AS muro_comentarios
        '));

        $num['usuarios_total'] = $num['usuarios_activos'] + $num['usuarios_inactivos'] +
            $num['usuarios_baneados'];
        $num['seguidos_total'] = $num['posts_follows'] + $num['usuarios_follows'];
        $num['muro_total'] = $num['muro_estados'] + $num['muro_comentarios'];
        $num['afiliados_total'] = $num['afiliados_activos'] + $num['afiliados_inactivos'];
        $num['posts_total'] = $num['posts_visibles'] + $num['posts_ocultos'] + $num['posts_eliminados'];
        $num['comentarios_posts_total'] = $num['comentarios_posts_visibles'] + $num['comentarios_posts_ocultos'];
        $num['medallas_total'] = $num['medallas_usuarios'] + $num['medallas_posts'] + $num['medallas_fotos'];
        $num['fotos_total'] = $num['fotos_visibles'] + $num['fotos_ocultas'] + $num['fotos_eliminadas'];

 

Reemplazar por:

function GetAdminStats()
    {
        $num = db_exec('fetch_assoc', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT 
        (SELECT count(foto_id) FROM f_fotos WHERE f_status = \'2\') as fotos_eliminadas, 
        (SELECT count(foto_id) FROM f_fotos WHERE f_status = \'1\') as fotos_ocultas, 
        (SELECT count(foto_id) FROM f_fotos WHERE f_status = \'0\') as fotos_visibles,
 (SELECT count(vid_id) FROM v_videos WHERE vid_status = \'2\') as videos_eliminados,
 (SELECT count(vid_id) FROM v_videos WHERE vid_status = \'1\') as videos_ocultos,
 (SELECT count(vid_id) FROM v_videos WHERE vid_status = \'0\') as videos_visibles,
        (SELECT count(post_id) FROM p_posts WHERE post_status = \'0\') as posts_visibles, 
        (SELECT count(post_id) FROM p_posts WHERE post_status = \'1\') as posts_ocultos, 
        (SELECT count(post_id) FROM p_posts  WHERE post_status = \'2\') as posts_eliminados, 
        (SELECT count(post_id) FROM p_posts  WHERE post_status = \'3\') as posts_revision, 
        (SELECT count(cid) FROM p_comentarios WHERE c_status = \'0\') as comentarios_posts_visibles, 
        (SELECT count(cid) FROM p_comentarios WHERE c_status = \'1\') as comentarios_posts_ocultos, 
        (SELECT count(user_id) FROM u_miembros WHERE user_activo = \'1\') as usuarios_activos, 
        (SELECT count(user_id) FROM u_miembros WHERE user_activo = \'0\' ) as usuarios_inactivos, 
        (SELECT count(user_id) FROM u_miembros WHERE user_baneado = \'1\' ) as usuarios_baneados, 
        (SELECT count(cid) FROM f_comentarios) as comentarios_fotos_total,
 (SELECT count(cid) FROM v_comentarios) as comentarios_videos_total,
        (SELECT count(follow_id) FROM u_follows WHERE f_type  = \'1\' ) AS usuarios_follows,
        (SELECT count(follow_id) FROM u_follows WHERE f_type  = \'2\' ) AS posts_follows,
        (SELECT count(follow_id) FROM u_follows WHERE f_type  = \'3\' ) AS posts_compartidos,
        (SELECT count(fav_id) FROM p_favoritos) AS posts_favoritos,  
        (SELECT count(mr_id) FROM u_respuestas) AS usuarios_respuestas,
        (SELECT count(mp_id) FROM u_mensajes) AS mensajes_total, 
        (SELECT count(mp_id) FROM u_mensajes WHERE mp_del_to = \'1\') AS mensajes_de_eliminados,
        (SELECT count(mp_id) FROM u_mensajes WHERE mp_del_from = \'1\') AS mensajes_para_eliminados,
        (SELECT count(bid) FROM p_borradores) AS posts_borradores,
        (SELECT count(bid) FROM u_bloqueos) AS usuarios_bloqueados, 
        (SELECT count(bid) FROM u_bloqueos) AS usuarios_bloqueados,
        (SELECT count(medal_id) FROM w_medallas WHERE m_type = \'1\') AS medallas_usuarios,
 (SELECT count(medal_id) FROM w_medallas WHERE m_type = \'2\') AS medallas_posts,
 (SELECT count(medal_id) FROM w_medallas WHERE m_type = \'3\') AS medallas_fotos,
 (SELECT count(medal_id) FROM w_medallas WHERE m_type = \'4\') AS medallas_videos,
 (SELECT count(id) FROM w_medallas_assign) AS medallas_asignadas,
 (SELECT count(aid) FROM w_afiliados WHERE a_active = \'1\') AS afiliados_activos,
 (SELECT count(aid) FROM w_afiliados WHERE a_active = \'0\') AS afiliados_inactivos,
 (SELECT count(pub_id) FROM u_muro) AS muro_estados,
 (SELECT count(cid) FROM u_muro_comentarios) AS muro_comentarios
        '));

        $num['usuarios_total'] = $num['usuarios_activos'] + $num['usuarios_inactivos'] +
            $num['usuarios_baneados'];
        $num['seguidos_total'] = $num['posts_follows'] + $num['usuarios_follows'];
        $num['muro_total'] = $num['muro_estados'] + $num['muro_comentarios'];
        $num['afiliados_total'] = $num['afiliados_activos'] + $num['afiliados_inactivos'];
        $num['posts_total'] = $num['posts_visibles'] + $num['posts_ocultos'] + $num['posts_eliminados'];
        $num['comentarios_posts_total'] = $num['comentarios_posts_visibles'] + $num['comentarios_posts_ocultos'];
 $num['medallas_total'] = $num['medallas_usuarios'] + $num['medallas_posts'] + $num['medallas_videos'] + $num['medallas_fotos'];
 $num['fotos_total'] = $num['fotos_visibles'] + $num['fotos_ocultas'] + $num['fotos_eliminadas'];
 $num['videos_total'] = $num['videos_visibles'] + $num['videos_ocultos'] + $num['videos_eliminados'];

 

En c.moderacion.php --> inc --> class --> c.moderacion.php
 
Buscar:

case 'mps':
                $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT r.*, m.mp_id, m.mp_to, m.mp_from, m.mp_subject, m.mp_preview, m.mp_date FROM w_denuncias AS r LEFT JOIN u_mensajes AS m ON r.obj_id = m.mp_id WHERE d_type = 2 GROUP BY r.obj_id ORDER BY r.d_date DESC');
                $data = result_array($query);
                
                break;

Debajo agregar:

case 'videos':
               $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT r.*, SUM(d_total) AS total, v.vid_id, v.vid_title, v.vid_status, u.user_id, u.user_name FROM w_denuncias AS r LEFT JOIN v_videos AS v ON r.obj_id = v.vid_id LEFT JOIN u_miembros AS u ON v.vid_user = u.user_id WHERE d_type = \'5\' &amp;&amp; v.vid_status < 2 GROUP BY r.obj_id ORDER BY total DESC, r.d_date DESC');
               $data = result_array($query);

               break;

Buscar:

case 'users':
                $d_type = 3;
                $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT user_id, user_name FROM u_miembros WHERE user_id = ' .
                    $obj . ' LIMIT 1');
                break;

Debajo agregar:

case 'videos':
               $d_type = 5;
               $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT v.vid_id, v.vid_title, v.vid_status, u.user_name FROM v_videos AS v LEFT JOIN u_miembros AS u ON v.vid_user = u.user_id WHERE v.vid_id = ' .
                   $obj . ' LIMIT 1');
               break;

Buscar:

$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT f.foto_id, f.f_title, f.f_user, f.f_date, f.f_ip, u.user_name FROM f_fotos AS f LEFT JOIN u_miembros AS u ON f.f_user = u.user_id WHERE ' .
            ($tipo == 1 ? 'f.f_ip ' . $met . '' : 'f.f_title ' . $met .
            ' OR f.f_description ' . $met));
        $data['fotos'] = result_array($query);
        $data['f_total'] = count($data['fotos']);
        
        //

Debajo agregar:

$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT v.vid_id, v.vid_title, v.vid_user, v.vid_date, v.vid_ip, u.user_name FROM v_videos AS f LEFT JOIN u_miembros AS u ON v.vid_user = u.user_id WHERE ' .
            ($tipo == 1 ? 'v.vid_ip ' . $met . '' : 'v.vid_title ' . $met .
            ' OR v.vid_description ' . $met));
        $data['videos'] = result_array($query);
        $data['v_total'] = count($data['videos']);

Buscar:

//
        $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT u.user_id, u.user_name, f.* , c.* FROM f_comentarios AS c LEFT JOIN u_miembros AS u ON u.user_id = c.c_user LEFT JOIN f_fotos AS f ON f.foto_id = c.c_foto_id WHERE ' .
            ($tipo == 1 ? 'c.c_ip ' . $met . '' : 'c.c_user ' . $met . ' OR c.c_body ' . $met));
        $data['f_comentarios'] = result_array($query);
        
        $data['c_f_total'] = count($data['f_comentarios']);
        //

Debajo agregar:

$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT u.user_id, u.user_name, v.* , c.* FROM v_comentarios AS c LEFT JOIN u_miembros AS u ON u.user_id = c.c_user LEFT JOIN v_videos AS f ON v.vid_id = c.c_video_id WHERE ' .
            ($tipo == 1 ? 'c.c_ip ' . $met . '' : 'c.c_user ' . $met . ' OR c.c_body ' . $met));
        $data['v_comentarios'] = result_array($query);
        $data['c_v_total'] = count($data['v_comentarios']);
        //

Buscar:

/**
     * @name deletePost($pid)
     * @access public
     * @param int
     * @return string
     */

Arriba agregar:

function rebootVideo($vid)
    {
        global $tsUser;
        if ($tsUser->is_admod)
        {

            $rows = db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT obj_id FROM w_denuncias WHERE obj_id = \'' .
                (int)$mid . '\' AND `d_type` = \'5\''));
            if ($rows && $tsUser->is_admod)
            {
                $canview = true;
            }
            //BORRAMOS LA DENUNCIA
            if (db_exec(array(__FILE__, __LINE__), 'query', 'DELETE FROM `w_denuncias` WHERE `obj_id` = \'' . (int)$vid . '\' AND `d_type` = \'5\''))
            {
                db_exec(array(__FILE__, __LINE__), 'query', 'UPDATE `v_videos` SET vid_status= \'0\' WHERE `vid_id` = \'' . (int)
                    $vid . '\'');
                return '1: Denuncia eliminada';
            } else
                return '0: No se pudo eliminar la denuncia';
        } else
            return '0: No contin&uacute;e por aqu&iacute;.';
   }

Buscar:

/**
     * @name setSticky
     * @access public
     * @param $post_id
     * @return string
     * @info Pone sticky un post
     */

Arriba agregar:

public function deleteVideo($vid)
    {
        global $tsCore, $tsMonitor, $tsUser;

        if ($tsUser->is_admod)
        {

           // RAZON
    $razon = $tsCore->setSecure($_POST['razon']);
    $razon_desc = $tsCore->setSecure($_POST['razon_desc']);
    $razon_db = ($razon != 8) ? $razon : $razon_desc;
           //
           if (db_exec(array(__FILE__, __LINE__), 'query', 'UPDATE `v_videos` SET `vid_status` = \'2\' WHERE `vid_id` = \'' .
               $vid . '\''))
           {
               db_exec(array(__FILE__, __LINE__), 'query', 'UPDATE `w_stats` SET `stats_videos` = stats_videos - \'1\' WHERE `stats_no` = \'1\'');
               if ($data['vid_user'] != $tsUser->uid)
               {
                  // ENVIAR AVISO
                  $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT v.vid_user, v.vid_title, u.user_name FROM v_videos AS v LEFT JOIN u_miembros AS u ON v.vid_user = u.user_id WHERE v.vid_id = \'' .
                      (int)$vid . '\' LIMIT 1');
                  $data = db_exec('fetch_assoc', $query);

                  // RAZON
                  if (is_numeric($razon_db))
                  {
                      include (TS_EXTRA . 'datos.php');
                      $razon_db = $tsDenuncias['videos'][$razon_db];
                  }
                  // AVISO
                  $aviso = 'Hola <b>' . $data['user_name'] . "</b>\n\n Lamento contarte que tu video titulado <b>" .
                      $data['vid_title'] . "</b> ha sido eliminado.\n\n Causa: <b>" . $razon_db . "</b>\n\n Te recomendamos leer el <a href=\"" .
                      $tsCore->settings['url'] . "/pages/protocolo/\">Protocolo</a> para evitar futuras sanciones.\n\n Muchas gracias por entender!";
                  $status = $tsMonitor->setAviso($data['vid_user'], 'Video eliminado', $aviso, 1);
                  //
               }
               // ELIMINAR DENUNCIAS
               db_exec(array(__FILE__, __LINE__), 'query', 'DELETE FROM `w_denuncias` WHERE `obj_id` = \'' . $vid . '\' AND `d_type` = \'5\'');
               $this->setHistory('borrar', 'video', $vid);
               return '1: El video ha sido eliminado.';
            }
            //
            return '0: El video NO pudo ser eliminado.';
        } else
            return '0: No deberías continuar con esto.';

     }

Buscar:

}

    public function getPospelera()
    {

Arriba agregar:

elseif ($type == 'video')
       {
          // DATOS
          $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT `vid_id`, `vid_description`, `vid_title`, `vid_user` FROM `v_videos` WHERE `vid_id` = \'' .
             (int)$data . '\' LIMIT 1');
          $video = db_exec('fetch_assoc', $query);

          switch ($action)
          {
              case 'borrar':
                  // RAZON
                  $razon = $tsCore->setSecure($_POST['razon']);
                  $razon_desc = $tsCore->setSecure($_POST['razon_desc']);
                  $razon_db = ($razon != 8) ? $razon : $razon_desc;
                  // INSERTAR
                  db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO w_historial (`pofid`, `action`, `type`, `mod`, `reason`, `date`, `mod_ip`) VALUES (\'' .
                      (int)$video['vid_id'] . '\', \'2\', \'2\', \'' . $tsUser->uid . '\', \'' .
                      $tsCore->setSecure($razon_db) . '\', \'' . time() . '\', \'' .
                      $tsCore->setSecure($_SERVER['REMOTE_ADDR']) . '\')');
                  return true;
                  break;
            }
        }

Buscar:

public function getComentariosD()
    {

Arriba agregar:

public function getVipelera()
    {
        global $tsUser, $tsCore;
        //
        $max = 20; // MAXIMO A MOSTRAR
        $limit = $tsCore->setPageLimit($max, true);

       // PAGINAS
       $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(*) FROM v_videos AS v LEFT JOIN u_miembros AS u ON u.user_id = v.vid_user LEFT JOIN w_historial AS h ON h.pofid = v.vid_id WHERE h.type = \'2\' AND h.action = \'2\' AND v.vid_status = \'2\'');

       list($total) = db_exec('fetch_row', $query);

       $data['pages'] = $tsCore->pageIndex($tsCore->settings['url'] .
           "/moderacion/vipelera?", $_GET['s'], $total, $max);
       //

       $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT u.user_id, u.user_name, h.*, v.vid_id, v.vid_title, v.vid_user FROM v_videos AS v LEFT JOIN u_miembros AS u ON u.user_id = v.vid_user LEFT JOIN w_historial AS h ON h.pofid = v.vid_id WHERE h.type = \'2\' AND h.action = \'2\' AND v.vid_status = \'2\' LIMIT ' .
           $limit);
       // DENUNCIAS
       include ("../ext/datos.php");
       //
       while ($row = db_exec('fetch_assoc', $query))
       {
           $row['mod_name'] = $tsUser->getUserName($row['mod']);
           $row['reason'] = (is_numeric($row['reason'])) ? $tsDenuncias['videos'][$row['reason']] :
           $tsCore->setSecure($row['reason']);
       //
       $data['datos'][] = $row;
       }
      //
      return $data;
    }

En c.medals.php --> inc --> class --> c.medals.php
 
Buscar:

$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT u.user_id, u.user_name, a.*, p.post_id, p.post_title, c.c_nombre, c.c_seo, f.foto_id, f.f_title, w.* FROM w_medallas_assign AS a LEFT JOIN u_miembros AS u ON u.user_id = a.medal_for LEFT JOIN p_posts AS p ON p.post_id = a.medal_for LEFT JOIN p_categorias AS c ON c.cid = p.post_category LEFT JOIN f_fotos AS f ON f.foto_id = a.medal_for LEFT JOIN w_medallas AS w ON w.medal_id = a.medal_id ORDER BY a.medal_date DESC LIMIT '.$limit);
 $datos['asignaciones'] = result_array($query);

Reemplazar por:

$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT u.user_id, u.user_name, a.*, p.post_id, p.post_title, c.c_nombre, c.c_seo, f.foto_id, f.f_title, v.vid_id, v.vid_title, w.* FROM w_medallas_assign AS a LEFT JOIN u_miembros AS u ON u.user_id = a.medal_for LEFT JOIN p_posts AS p ON p.post_id = a.medal_for LEFT JOIN p_categorias AS c ON c.cid = p.post_category LEFT JOIN f_fotos AS f ON f.foto_id = a.medal_for LEFT JOIN v_videos AS v ON v.vid_id = a.medal_for LEFT JOIN w_medallas AS w ON w.medal_id = a.medal_id ORDER BY a.medal_date DESC LIMIT '.$limit);
 $datos['asignaciones'] = result_array($query);

Buscar:

public function editMedal(){
       global $tsCore;
     // DATOS
 $medalla = array(
 'titulo' => $tsCore->parseBadWords($_POST['med_title']),
 'descripcion' => $tsCore->parseBadWords($_POST['med_desc']),
 'imagen' => $_POST['med_img'],
 'tipo' => $_POST['med_type'],
 'cantidad' => $_POST['med_cant'],
 'cond_user' => $_POST['med_cond_user'],
 'cond_user_rango' => $_POST['med_cond_user_rango'],
 'cond_post' => $_POST['med_cond_post'],
 'cond_foto' => $_POST['med_cond_foto'],
 );
 
 if(empty($medalla['titulo']) || empty($medalla['descripcion'])) return 'Debe introducir t&iacute;tulo y descripci&oacute;n'; // No campos vacíos

 if(is_numeric($medalla['tipo']) && is_numeric($medalla['cond_user']) && is_numeric($medalla['cond_user_rango']) && is_numeric($medalla['cond_post']) && is_numeric($medalla['cond_foto'])){

 //COMPROBAMOS QUE NO EXISTA
 if($medalla['tipo'] == 1){
 if(db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT medal_id FROM `w_medallas` WHERE  `m_type` = \'1\' AND `m_cant` = \''.(int)$medalla['cantidad'].'\' AND  `m_cond_user` = \''.(int)$medalla['cond_user'].'\' AND  `m_cond_user_rango` = \''.(int)$medalla['cond_user_rango'].'\' AND medal_id != \''.(int)$_GET['mid'].'\''))) $continue = false; else $continue = true;
 }elseif($medalla['tipo'] == 2){
 if(db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT medal_id FROM w_medallas WHERE m_type = \'2\' && m_cant = \''.(int)$medalla['cantidad'].'\' && m_cond_post = \''.(int)$medalla['cond_post'].'\' AND medal_id != \''.(int)$_GET['mid'].'\''))) $continue = false; else $continue = true;
 }elseif($medalla['tipo'] == 3){
 if(db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT medal_id FROM w_medallas WHERE m_type = \'3\' && m_cant = \''.(int)$medalla['cantidad'].'\' && m_cond_post = \''.(int)$medalla['cond_foto'].'\' AND medal_id != \''.(int)$_GET['mid'].'\''))) $continue = false; else $continue = true;
 } 
 // ACTUALIZAR
        if($continue == true) {
 if(db_exec(array(__FILE__, __LINE__), 'query', 'UPDATE w_medallas SET m_title = \''.$tsCore->setSecure($medalla['titulo'], true).'\', m_description = \''.$tsCore->setSecure($medalla['descripcion'], true).'\', m_image = \''.$tsCore->setSecure($medalla['imagen'], true).'\', m_cant = \''.(int)$medalla['cantidad'].'\', m_type = \''.(int)$medalla['tipo'].'\', m_cond_user = \''.(int)$medalla['cond_user'].'\', m_cond_user_rango = \''.(int)$medalla['cond_user_rango'].'\', m_cond_post = \''.(int)$medalla['cond_post'].'\', m_cond_foto = \''.(int)$medalla['cond_foto'].'\' WHERE medal_id = \''.(int)$_GET['mid'].'\'')) return true;
 }else return 'Ya existe una medalla con esas caracter&iacute;sticas';
 }else return 'Introduzca valores num&eacute;ricos';
 }

Reemplazar por:

public function editMedal(){
       global $tsCore;
     // DATOS
 $medalla = array(
 'titulo' => $tsCore->parseBadWords($_POST['med_title']),
 'descripcion' => $tsCore->parseBadWords($_POST['med_desc']),
 'imagen' => $_POST['med_img'],
 'tipo' => $_POST['med_type'],
 'cantidad' => $_POST['med_cant'],
 'cond_user' => $_POST['med_cond_user'],
 'cond_user_rango' => $_POST['med_cond_user_rango'],
 'cond_post' => $_POST['med_cond_post'],
 'cond_foto' => $_POST['med_cond_foto'],
 'cond_video' => $_POST['med_cond_video'],
 );
 
 if(empty($medalla['titulo']) || empty($medalla['descripcion'])) return 'Debe introducir t&iacute;tulo y descripci&oacute;n'; // No campos vacíos

 if(is_numeric($medalla['tipo']) && is_numeric($medalla['cond_user']) && is_numeric($medalla['cond_user_rango']) && is_numeric($medalla['cond_post']) && is_numeric($medalla['cond_video']) && is_numeric($medalla['cond_foto'])){

 //COMPROBAMOS QUE NO EXISTA
 if($medalla['tipo'] == 1){
 if(db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT medal_id FROM `w_medallas` WHERE  `m_type` = \'1\' AND `m_cant` = \''.(int)$medalla['cantidad'].'\' AND  `m_cond_user` = \''.(int)$medalla['cond_user'].'\' AND  `m_cond_user_rango` = \''.(int)$medalla['cond_user_rango'].'\' AND medal_id != \''.(int)$_GET['mid'].'\''))) $continue = false; else $continue = true;
 }elseif($medalla['tipo'] == 2){
 if(db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT medal_id FROM w_medallas WHERE m_type = \'2\' && m_cant = \''.(int)$medalla['cantidad'].'\' && m_cond_post = \''.(int)$medalla['cond_post'].'\' AND medal_id != \''.(int)$_GET['mid'].'\''))) $continue = false; else $continue = true;
 }elseif($medalla['tipo'] == 3){
 if(db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT medal_id FROM w_medallas WHERE m_type = \'3\' && m_cant = \''.(int)$medalla['cantidad'].'\' && m_cond_post = \''.(int)$medalla['cond_foto'].'\' AND medal_id != \''.(int)$_GET['mid'].'\''))) $continue = false; else $continue = true;
 }elseif($medalla['tipo'] == 4){
 if(db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT medal_id FROM w_medallas WHERE m_type = \'4\' && m_cant = \''.(int)$medalla['cantidad'].'\' && m_cond_post \''.(int)$medalla['cond_video'].'\' AND medal_id != \''.(int)$_GET['mid'].'\''))) $continue = false; else $continue = true;
 } 
 // ACTUALIZAR
        if($continue == true) {
 if(db_exec(array(__FILE__, __LINE__), 'query', 'UPDATE w_medallas SET m_title = \''.$tsCore->setSecure($medalla['titulo'], true).'\', m_description = \''.$tsCore->setSecure($medalla['descripcion'], true).'\', m_image = \''.$tsCore->setSecure($medalla['imagen'], true).'\', m_cant = \''.(int)$medalla['cantidad'].'\', m_type = \''.(int)$medalla['tipo'].'\', m_cond_user = \''.(int)$medalla['cond_user'].'\', m_cond_user_rango = \''.(int)$medalla['cond_user_rango'].'\', m_cond_post = \''.(int)$medalla['cond_post'].'\', m_cond_video = \''.(int)$medalla['cond_video'].'\', m_cond_foto = \''.(int)$medalla['cond_foto'].'\' WHERE medal_id = \''.(int)$_GET['mid'].'\'')) return true;
 }else return 'Ya existe una medalla con esas caracter&iacute;sticas';
 }else return 'Introduzca valores num&eacute;ricos';
 }

Buscar:

public function adNewMedal(){
        global $tsUser, $tsCore;
 
 // DATOS
 $medalla = array(
 'titulo' => $tsCore->parseBadWords($_POST['med_title']),
 'descripcion' => $tsCore->parseBadWords($_POST['med_desc']),
 'imagen' => $_POST['med_img'],
 'tipo' => $_POST['med_type'],
 'cantidad' => $_POST['med_cant'],
 'cond_user' => $_POST['med_cond_user'],
 'cond_user_rango' => $_POST['med_cond_user_rango'],
 'cond_post' => $_POST['med_cond_post'],
 'cond_foto' => $_POST['med_cond_foto'],
 );
 
 if(empty($medalla['titulo']) || empty($medalla['descripcion'])) return 'Debe introducir t&iacute;tulo y descripci&oacute;n'; // No campos vacíos

 if(is_numeric($medalla['tipo']) && is_numeric($medalla['cond_user']) && is_numeric($medalla['cond_user_rango']) && is_numeric($medalla['cond_post']) && is_numeric($medalla['cond_foto'])){

 //COMPROBAMOS QUE NO EXISTA
 if($medalla['tipo'] == 1){
 if(db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT medal_id FROM  `w_medallas` WHERE  `m_type` = \'1\' AND `m_cant` = \''.(int)$medalla['cantidad'].'\' AND  `m_cond_user` = \''.(int)$medalla['cond_user'].'\' AND  `m_cond_user_rango` = \''.(int)$medalla['cond_user_rango'].'\''))) $continue = false; else $continue = true;
 }elseif($medalla['tipo'] == 2){
 if(db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT medal_id FROM w_medallas WHERE m_type = \'2\' && m_cant = \''.(int)$medalla['cantidad'].'\' && m_cond_post = \''.(int)$medalla['cond_post'].'\''))) $continue = false; else $continue = true;
 }elseif($medalla['tipo'] == 3){
 if(db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT medal_id FROM w_medallas WHERE m_type = \'3\' && m_cant = \''.(int)$medalla['cantidad'].'\' && m_cond_post = \''.(int)$medalla['cond_foto'].'\''))) $continue = false; else $continue = true;
 } 
 // INSERTAR
        if($continue == true) {
 if(db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO `w_medallas` (`m_autor`, `m_title`, `m_description`, `m_image`, `m_cant`, `m_type`, `m_cond_user`, `m_cond_user_rango`, `m_cond_post`, `m_cond_foto`, `m_date`) VALUES (\''.$tsUser->uid.'\', \''.$tsCore->setSecure($medalla['titulo'], true).'\', \''.$tsCore->setSecure($medalla['descripcion'], true).'\', \''.$tsCore->setSecure($medalla['imagen'], true).'\', \''.(int)$medalla['cantidad'].'\', \''.(int)$medalla['tipo'].'\', \''.(int)$medalla['cond_user'].'\',  \''.(int)$medalla['cond_user_rango'].'\', \''.(int)$medalla['cond_post'].'\', \''.(int)$medalla['cond_foto'].'\', \''.time().'\')')) return true;
        else return 'No se pudo insertar la medalla';
 }else return 'Ya existe una medalla con esas caracter&iacute;sticas';
 }else return 'Introduzca valores num&eacute;ricos';
 }

Reemplazar por:

public function adNewMedal(){
        global $tsUser, $tsCore;
 
 // DATOS
 $medalla = array(
 'titulo' => $tsCore->parseBadWords($_POST['med_title']),
 'descripcion' => $tsCore->parseBadWords($_POST['med_desc']),
 'imagen' => $_POST['med_img'],
 'tipo' => $_POST['med_type'],
 'cantidad' => $_POST['med_cant'],
 'cond_user' => $_POST['med_cond_user'],
 'cond_user_rango' => $_POST['med_cond_user_rango'],
 'cond_post' => $_POST['med_cond_post'],
 'cond_foto' => $_POST['med_cond_foto'],
 'cond_video' => $_POST['med_cond_video'],
 );
 
 if(empty($medalla['titulo']) || empty($medalla['descripcion'])) return 'Debe introducir t&iacute;tulo y descripci&oacute;n'; // No campos vacíos

 if(is_numeric($medalla['tipo']) && is_numeric($medalla['cond_user']) && is_numeric($medalla['cond_user_rango']) && is_numeric($medalla['cond_post']) && is_numeric($medalla['cond_post']) && is_numeric($medalla['cond_foto']) && is_numeric($medalla['cond_video'])){

 //COMPROBAMOS QUE NO EXISTA
 if($medalla['tipo'] == 1){
 if(db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT medal_id FROM  `w_medallas` WHERE  `m_type` = \'1\' AND `m_cant` = \''.(int)$medalla['cantidad'].'\' AND  `m_cond_user` = \''.(int)$medalla['cond_user'].'\' AND  `m_cond_user_rango` = \''.(int)$medalla['cond_user_rango'].'\''))) $continue = false; else $continue = true;
 }elseif($medalla['tipo'] == 2){
 if(db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT medal_id FROM w_medallas WHERE m_type = \'2\' && m_cant = \''.(int)$medalla['cantidad'].'\' && m_cond_post = \''.(int)$medalla['cond_post'].'\''))) $continue = false; else $continue = true;
 }elseif($medalla['tipo'] == 3){
 if(db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT medal_id FROM w_medallas WHERE m_type = \'3\' && m_cant = \''.(int)$medalla['cantidad'].'\' && m_cond_post = \''.(int)$medalla['cond_foto'].'\''))) $continue = false; else $continue = true;
 }elseif($medalla['tipo'] == 4){
        if(db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT medal_id FROM w_medallas WHERE m_type = \'4\' && m_cant = \''.(int)$medalla['cantidad'].'\' && m_cond_post \''.(int)$medalla['cond_video'].'\''))) $continue = false; else $continue = true;
 } 
 // INSERTAR
        if($continue == true) {
 if(db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO `w_medallas` (`m_autor`, `m_title`, `m_description`, `m_image`, `m_cant`, `m_type`, `m_cond_user`, `m_cond_user_rango`, `m_cond_post`, `m_cond_foto`, `m_cond_video`, `m_date`) VALUES (\''.$tsUser->uid.'\', \''.$tsCore->setSecure($medalla['titulo'], true).'\', \''.$tsCore->setSecure($medalla['descripcion'], true).'\', \''.$tsCore->setSecure($medalla['imagen'], true).'\', \''.(int)$medalla['cantidad'].'\', \''.(int)$medalla['tipo'].'\', \''.(int)$medalla['cond_user'].'\',  \''.(int)$medalla['cond_user_rango'].'\', \''.(int)$medalla['cond_post'].'\', \''.(int)$medalla['cond_foto'].'\', \''.(int)$medalla['cond_video'].'\', \''.time().'\')')) return true;
        else return 'No se pudo insertar la medalla';
 }else return 'Ya existe una medalla con esas caracter&iacute;sticas';
 }else return 'Introduzca valores num&eacute;ricos';
 }

Buscar:

public function AsignarMedalla(){
        global $tsUser, $tsCore;
 // DATOS
        $medalla = intval($_POST['mid']);
        $usuario = strtolower($_POST['m_usuario']);
 $post = intval($_POST['pid']);
 $foto = intval($_POST['fid']);
 $user_id = $tsUser->getUserID($usuario);
 
 if(!empty($medalla) && !empty($usuario) || !empty($post) || !empty($foto)){
 if($usuario){
 $yeltipo = 'AND m_type = \'1\'';
 }elseif($post){
 $yeltipo = 'AND m_type = \'2\'';
 }elseif($foto){
 $yeltipo = 'AND m_type = \'3\'';
 }
 if(db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT medal_id FROM w_medallas WHERE medal_id = \''.(int)$medalla.'\' '.$yeltipo.' LIMIT 1'))) {
     $_SERVER['REMOTE_ADDR'] = $_SERVER['X_FORWARDED_FOR'] ? $_SERVER['X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
        if(filter_var($_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP)) {
 
 if($usuario){
 if(db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT user_id FROM u_miembros WHERE LOWER(user_name) = \''.$tsCore->setSecure($usuario).'\' LIMIT 1'))) {
 if(!db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT id FROM w_medallas_assign WHERE medal_id = \''.(int)$medalla.'\' && medal_for = \''.(int)$user_id.'\' LIMIT 1'))) {
 if(db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO `w_medallas_assign` (`medal_id`, `medal_for`, `medal_date`, `medal_ip`) VALUES (\''.(int)$medalla.'\', \''.(int)$user_id.'\', \''.time().'\', \''.$_SERVER['REMOTE_ADDR'].'\')') or die (show_error('Error al ejecutar la consulta de la l&iacute;nea '.__LINE__.' de '.__FILE__.'.', 'db'))){
 if(db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO u_monitor (user_id, obj_uno, not_type, not_date) VALUES (\''.(int)$user_id.'\', \''.(int)$medalla.'\', \'15\', \''.time().'\')')){
 $continuar = true;
 }else return 'Ocurri&oacute; un error al notificar al usuario';
 }else return 'Ocurri&oacute; un error al asignar la medalla';
 }else return '0: El usuario ya tiene esa medalla';
 }else return '0: El usuario no existe';
 
        }elseif($post){
 if(db_exec('num_rows', $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT post_id, post_user FROM p_posts WHERE post_id = \''.(int)$post.'\' LIMIT 1'))){
 $datosdelpost = db_exec('fetch_assoc', $query);
        
     if(!db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT id FROM w_medallas_assign WHERE medal_id = \''.(int)$medalla.'\' && medal_for = \''.(int)$post.'\' LIMIT 1'))) {
 if(db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO `w_medallas_assign` (`medal_id`, `medal_for`, `medal_date`, `medal_ip`) VALUES (\''.(int)$medalla.'\', \''.(int)$post.'\', \''.time().'\', \''.$_SERVER['REMOTE_ADDR'].'\')') or die (show_error('Error al ejecutar la consulta de la l&iacute;nea '.__LINE__.' de '.__FILE__.'.', 'db'))){
        if(db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO u_monitor (user_id, obj_uno, obj_dos, not_type, not_date) VALUES (\''.(int)$datosdelpost['post_user'].'\', \''.(int)$medalla.'\', \''.(int)$post.'\', \'16\', \''.time().'\')')){
 $continuar = true;
 }else return 'Ocurri&oacute; un error al notificar al usuario';
 }else return 'Ocurri&oacute; un error al asignar la medalla';
 }else return '0: El post ya tiene esa medalla';
     }else return '0: El post no existe';
     
 }elseif($foto){
     if(db_exec('num_rows', $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT foto_id, f_user FROM f_fotos WHERE foto_id = \''.(int)$foto.'\' LIMIT 1'))) {
 $datosdelafoto = db_exec('fetch_assoc', $query);
        
     if(!db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT id FROM w_medallas_assign WHERE medal_id = \''.(int)$medalla.'\' && medal_for = \''.(int)$foto.'\' LIMIT 1'))) {
 if(db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO `w_medallas_assign` (`medal_id`, `medal_for`, `medal_date`, `medal_ip`) VALUES (\''.(int)$medalla.'\', \''.(int)$foto.'\', \''.time().'\', \''.$_SERVER['REMOTE_ADDR'].'\')') or die (show_error('Error al ejecutar la consulta de la l&iacute;nea '.__LINE__.' de '.__FILE__.'.', 'db'))){
        if(db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO u_monitor (user_id, obj_uno, obj_dos, not_type, not_date) VALUES (\''.(int)$datosdelafoto['f_user'].'\', \''.(int)$medalla.'\', \''.(int)$foto.'\', \'17\', \''.time().'\')')){
 $continuar = true;
 }else return 'Ocurri&oacute; un error al notificar al usuario';
 }else return 'Ocurri&oacute; un error al asignar la medalla';
 }else return '0: La foto ya tiene esa medalla';
     }else return '0: La foto no existe';
     
 }else{ return '0: No queda claro lo que quiere';}
 
 }else return '0: Su IP no se pudo validar';
 }else return '0: La medalla no puede ser asignada porque no existe o no corresponde a este tipo de asignaci&oacute;n.';
 }else return '0: Falta alg&uacute;n dato importante :R';
 
 if($continuar) { if(db_exec(array(__FILE__, __LINE__), 'query', 'UPDATE w_medallas SET m_total = m_total + 1 WHERE medal_id = \''.(int)$medalla.'\'')) return '1: Medalla asignada'; else return 'La medalla se asign&oacute;, pero hubo un problema y el contador no se alter&oacute;'; }else return 'Hubo problemas, chacho';
 }

Reemplazar por:

public function AsignarMedalla(){
        global $tsUser, $tsCore;
 // DATOS
        $medalla = intval($_POST['mid']);
        $usuario = strtolower($_POST['m_usuario']);
 $post = intval($_POST['pid']);
 $foto = intval($_POST['fid']);
 $video = intval($_POST['vid']);
        $user_id = $tsUser->getUserID($usuario);
 
 if(!empty($medalla) && !empty($usuario) || !empty($post) || !empty($foto)){
 if($usuario){
 $yeltipo = 'AND m_type = \'1\'';
 }elseif($post){
 $yeltipo = 'AND m_type = \'2\'';
 }elseif($foto){
 $yeltipo = 'AND m_type = \'3\'';
        }elseif($video){
        $yeltipo = 'AND m_type = \'4\'';
        }
 if(db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT medal_id FROM w_medallas WHERE medal_id = \''.(int)$medalla.'\' '.$yeltipo.' LIMIT 1'))) {
     $_SERVER['REMOTE_ADDR'] = $_SERVER['X_FORWARDED_FOR'] ? $_SERVER['X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
        if(filter_var($_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP)) {
 
 if($usuario){
 if(db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT user_id FROM u_miembros WHERE LOWER(user_name) = \''.$tsCore->setSecure($usuario).'\' LIMIT 1'))) {
 if(!db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT id FROM w_medallas_assign WHERE medal_id = \''.(int)$medalla.'\' && medal_for = \''.(int)$user_id.'\' LIMIT 1'))) {
 if(db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO `w_medallas_assign` (`medal_id`, `medal_for`, `medal_date`, `medal_ip`) VALUES (\''.(int)$medalla.'\', \''.(int)$user_id.'\', \''.time().'\', \''.$_SERVER['REMOTE_ADDR'].'\')') or die (show_error('Error al ejecutar la consulta de la l&iacute;nea '.__LINE__.' de '.__FILE__.'.', 'db'))){
 if(db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO u_monitor (user_id, obj_uno, not_type, not_date) VALUES (\''.(int)$user_id.'\', \''.(int)$medalla.'\', \'15\', \''.time().'\')')){
 $continuar = true;
 }else return 'Ocurri&oacute; un error al notificar al usuario';
 }else return 'Ocurri&oacute; un error al asignar la medalla';
 }else return '0: El usuario ya tiene esa medalla';
 }else return '0: El usuario no existe';
 
        }elseif($post){
 if(db_exec('num_rows', $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT post_id, post_user FROM p_posts WHERE post_id = \''.(int)$post.'\' LIMIT 1'))){
 $datosdelpost = db_exec('fetch_assoc', $query);
        
     if(!db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT id FROM w_medallas_assign WHERE medal_id = \''.(int)$medalla.'\' && medal_for = \''.(int)$post.'\' LIMIT 1'))) {
 if(db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO `w_medallas_assign` (`medal_id`, `medal_for`, `medal_date`, `medal_ip`) VALUES (\''.(int)$medalla.'\', \''.(int)$post.'\', \''.time().'\', \''.$_SERVER['REMOTE_ADDR'].'\')') or die (show_error('Error al ejecutar la consulta de la l&iacute;nea '.__LINE__.' de '.__FILE__.'.', 'db'))){
        if(db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO u_monitor (user_id, obj_uno, obj_dos, not_type, not_date) VALUES (\''.(int)$datosdelpost['post_user'].'\', \''.(int)$medalla.'\', \''.(int)$post.'\', \'16\', \''.time().'\')')){
 $continuar = true;
 }else return 'Ocurri&oacute; un error al notificar al usuario';
 }else return 'Ocurri&oacute; un error al asignar la medalla';
 }else return '0: El post ya tiene esa medalla';
     }else return '0: El post no existe';
     
 }elseif($foto){
     if(db_exec('num_rows', $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT foto_id, f_user FROM f_fotos WHERE foto_id = \''.(int)$foto.'\' LIMIT 1'))) {
 $datosdelafoto = db_exec('fetch_assoc', $query);
        
     if(!db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT id FROM w_medallas_assign WHERE medal_id = \''.(int)$medalla.'\' && medal_for = \''.(int)$foto.'\' LIMIT 1'))) {
 if(db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO `w_medallas_assign` (`medal_id`, `medal_for`, `medal_date`, `medal_ip`) VALUES (\''.(int)$medalla.'\', \''.(int)$foto.'\', \''.time().'\', \''.$_SERVER['REMOTE_ADDR'].'\')') or die (show_error('Error al ejecutar la consulta de la l&iacute;nea '.__LINE__.' de '.__FILE__.'.', 'db'))){
        if(db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO u_monitor (user_id, obj_uno, obj_dos, not_type, not_date) VALUES (\''.(int)$datosdelafoto['f_user'].'\', \''.(int)$medalla.'\', \''.(int)$foto.'\', \'17\', \''.time().'\')')){
 $continuar = true;
 }else return 'Ocurri&oacute; un error al notificar al usuario';
 }else return 'Ocurri&oacute; un error al asignar la medalla';
 }else return '0: La foto ya tiene esa medalla';
     }else return '0: La foto no existe';

     }elseif($video){
     if(!db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT vid_id, vid_user FROM v_videos WHERE vid_id = \''.(int)$video.'\' LIMIT 1'))) {
     $datosdelvideo = db_exec('fetch_assoc', $query);
 if(!db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT id FROM w_medallas_assign WHERE medal_id = \''.(int)$medalla.'\' && medal_for = \''.(int)$video.'\' LIMIT 1'))) {
     if(db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO `w_medallas_assign` (`medal_id`, `medal_for`, `medal_date`, `medal_ip`) VALUES (\''.(int)$medalla.'\', \''.(int)$video.'\', \''.time().'\', \''.$_SERVER['REMOTE_ADDR'].'\')') or die (show_error('Error al ejecutar la consulta de la l&iacute;nea '.__LINE__.' de '.__FILE__.'.', 'db'))){
 if(db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO u_monitor (user_id, obj_uno, obj_dos, not_type, not_date) VALUES (\''.(int)$datosdelvideo['vid_user'].'\', \''.(int)$medalla.'\', \''.(int)$video.'\', \'20\', \''.time().'\')')){
     $continuar = true;
     }else return 'Ocurri&oacute; un error al notificar al usuario';
     }else return 'Ocurri&oacute; un error al asignar la medalla';
     }else return '0: El video ya tiene esa medalla';
 }else return '0: El video no existe';
     }else{ return '0: No queda claro lo que quiere';}
     }else return '0: Su IP no se pudo validar';
 }else return '0: La medalla no puede ser asignada porque no existe o no corresponde a este tipo de asignaci&oacute;n.';
 }else return '0: Falta alg&uacute;n dato importante :R';
 
 if($continuar) { if(db_exec(array(__FILE__, __LINE__), 'query', 'UPDATE w_medallas SET m_total = m_total + 1 WHERE medal_id = \''.(int)$medalla.'\'')) return '1: Medalla asignada'; else return 'La medalla se asign&oacute;, pero hubo un problema y el contador no se alter&oacute;'; }else return 'Hubo problemas, chacho';
 }

En c.cuenta.php --> inc --> class --> c.cuenta.php
 
Buscar:

// REAL STATS
 $data['stats'] = db_exec('fetch_assoc', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT u.user_id, u.user_rango, u.user_puntos, u.user_posts, u.user_comentarios, u.user_seguidores, u.user_cache, r.r_name, r.r_color FROM u_miembros AS u LEFT JOIN u_rangos AS r ON  u.user_rango = r.rango_id WHERE u.user_id = \''.(int)$user_id.'\''));

Después de:

u.user_posts,

Agregar:

u.user_videos,

Buscar:

$q3 = db_exec('fetch_row', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(cid) AS c FROM p_comentarios WHERE c_user = \''.(int)$user_id.'\' && c_status = \'0\''));

Debajo agregar:

$q4 = db_exec('fetch_row', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(vid_id) AS v FROM v_videos WHERE vid_user = \''.(int)$user_id.'\' && vid_status = \'0\''));

Buscar:

$data['stats']['user_comentarios'] = $q3[0];

Debajo agregar:

$data['stats']['user_videos'] = $q4[0];

Buscar:

$q4 = db_exec('fetch_row', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(foto_id) AS f FROM f_fotos WHERE f_user = \''.(int)$user_id.'\' && f_status = \'0\''));
        $data['stats']['user_fotos'] = $q4[0];

Debajo agregar:

$q5 = db_exec('fetch_row', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(vid_id) AS v FROM v_videos WHERE vid_user = \''.(int)$user_id.'\' && vid_status = \'0\''));
     $data['stats']['user_videos'] = $q5[0];

Buscar:

// SIGUIENDO
        $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT f.follow_id, u.user_id, u.user_name FROM u_follows AS f LEFT JOIN u_miembros AS u ON f.f_id = u.user_id WHERE f.f_user = \''.(int)$user_id.'\' AND f.f_type = \'1\' && u.user_activo = \'1\' && u.user_baneado = \'0\' ORDER BY f.f_date DESC LIMIT 21');
        $data['sigd']['data'] = result_array($query);
        $data['sigd']['total'] = count($data['sigd']['data']);

Debajo agregar:

// ULTIMOS VIDEOS
     if(empty($_GET['pid'])){
         $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT vid_id, vid_title, vid_date, vid_url FROM v_videos WHERE vid_user = \''.(int)$user_id.'\' ORDER BY vid_date DESC LIMIT 10');
     $data['videos'] = result_array($query);
     $total = count($data['videos']);
     $data['videos_total'] = $total;
     if($total < 6){
     for($i = $total; $i <= 5; $i++){
     $data['videos'][$i] = NULL;
     }
     }
     }

Buscar:

/*
        loadPosts($user_id)
    */
    function loadPosts($user_id){
        global $tsUser;
        //
        $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT p.post_id, p.post_title, p.post_puntos, 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 p.post_date DESC LIMIT 18');
        $data['posts'] = result_array($query);
        $data['total'] = count($data['posts']);
        
        // USUARIO
        $data['username'] = $tsUser->getUserName($user_id);
        //
        return $data;
    }

Debajo agregar:

/*
 loadVideos($user_id)
    */
    function loadVideos($user_id){
     global $tsUser;
     //
     $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT v.vid_id, v.vid_title, v.vid_description, v.vid_url, v.vid_user FROM v_videos AS v WHERE v.vid_status = \'0\' AND v.vid_user = \''.(int)$user_id.'\' ORDER BY RAND() DESC LIMIT 10');
     $data['videos'] = result_array($query);
     $data['total'] = count($data['videos']);

     // USUARIO
     $data['username'] = $tsUser->getUserName($user_id);
     //
     return $data;
    }

En c.monitor.php --> inc --> class --> c.monitor.php
 
Buscar:

private function makeMonitor(){
        $this->monitor = array(
            1 => array('text' => 'agreg&oacute; a favoritos tu', 'ln_text' => 'post', 'css' => 'star'),
            2 => array('text' => array('coment&oacute; tu','_REP_ nuevos comentarios en tu'), 'ln_text' => 'post', 'css' => 'comment_post'),
            3 => array('text' => 'dej&oacute; _REP_ puntos en tu', 'ln_text' => 'post', 'css' => 'points'),
            4 => array('text' => 'te est&aacute; siguiendo', 'ln_text' => 'Seguir a este usuario', 'css' => 'follow'),
            5 => array('text' => 'cre&oacute; un nuevo', 'ln_text' => 'post', 'css' => 'post'),
            6 => array('text' => array('te recomienda un', '_REP_ usuarios te recomiendan un'), 'ln_text' => 'post', 'css' => 'share'),
            7 => array('text' => array('coment&oacute; en un', '_REP_ nuevos comentarios en el'), 'ln_text' => 'post', 'extra' => 'que sigues', 'css' => 'blue_ball'),
            8 => array('text' => array('vot&oacute; _REP_ tu', '_REP_ nuevos votos a tu'), 'ln_text' => 'comentario', 'css' => 'voto_'),
            9 => array('text' => array('respondi&oacute; tu', '_REP_ nuevas respuestas a tu'), 'ln_text' => 'comentario', 'css' => 'comment_resp'),
            10 => array('text' => 'subi&oacute; una nueva', 'ln_text' => 'foto', 'css' => 'photo'),
            11 => array('text' => array('coment&oacute; tu','_REP_ nuevos comentarios en tu'), 'ln_text' => 'foto', 'css' => 'photo'),
            12 => array('text' => 'public&oacute; en tu', 'ln_text' => 'muro', 'css' => 'wall_post'),
            13 => array('text' => array('coment&oacute; ', '_REP_ nuevos comentarios en'), 'ln_text' => 'publicaci&oacute;n', 'extra' => 'coment&oacute;', 'css' => 'w_comment'),
            14 => array('text' => array('le gusta tu', 'A _REP_ personas les gusta tu'), 'ln_text' => array('publicaci&oacute;n','comentario'), 'css' => 'w_like'),
 15 => array('text' => 'Recibiste una medalla', 'css' => 'medal'),
 16 => array('text' => 'Tu post recibi&oacute; una medalla', 'css' => 'medal'),
 17 => array('text' => 'Tu foto recibi&oacute; una medalla', 'css' => 'medal'),
        );
    }

Reemplazar por:

private function makeMonitor(){
        $this->monitor = array(
            1 => array('text' => 'agreg&oacute; a favoritos tu', 'ln_text' => 'post', 'css' => 'star'),
            2 => array('text' => array('coment&oacute; tu','_REP_ nuevos comentarios en tu'), 'ln_text' => 'post', 'css' => 'comment_post'),
            3 => array('text' => 'dej&oacute; _REP_ puntos en tu', 'ln_text' => 'post', 'css' => 'points'),
            4 => array('text' => 'te est&aacute; siguiendo', 'ln_text' => 'Seguir a este usuario', 'css' => 'follow'),
            5 => array('text' => 'cre&oacute; un nuevo', 'ln_text' => 'post', 'css' => 'post'),
            6 => array('text' => array('te recomienda un', '_REP_ usuarios te recomiendan un'), 'ln_text' => 'post', 'css' => 'share'),
            7 => array('text' => array('coment&oacute; en un', '_REP_ nuevos comentarios en el'), 'ln_text' => 'post', 'extra' => 'que sigues', 'css' => 'blue_ball'),
            8 => array('text' => array('vot&oacute; _REP_ tu', '_REP_ nuevos votos a tu'), 'ln_text' => 'comentario', 'css' => 'voto_'),
            9 => array('text' => array('respondi&oacute; tu', '_REP_ nuevas respuestas a tu'), 'ln_text' => 'comentario', 'css' => 'comment_resp'),
            10 => array('text' => 'subi&oacute; una nueva', 'ln_text' => 'foto', 'css' => 'photo'),
            11 => array('text' => array('coment&oacute; tu','_REP_ nuevos comentarios en tu'), 'ln_text' => 'foto', 'css' => 'photo'),
            12 => array('text' => 'public&oacute; en tu', 'ln_text' => 'muro', 'css' => 'wall_post'),
            13 => array('text' => array('coment&oacute; ', '_REP_ nuevos comentarios en'), 'ln_text' => 'publicaci&oacute;n', 'extra' => 'coment&oacute;', 'css' => 'w_comment'),
            14 => array('text' => array('le gusta tu', 'A _REP_ personas les gusta tu'), 'ln_text' => array('publicaci&oacute;n','comentario'), 'css' => 'w_like'),
 15 => array('text' => 'Recibiste una medalla', 'css' => 'medal'),
 16 => array('text' => 'Tu post recibi&oacute; una medalla', 'css' => 'medal'),
 17 => array('text' => 'Tu foto recibi&oacute; una medalla', 'css' => 'medal'),
 18 => array('text' => 'subi&oacute; el video', 'ln_text' => 'video', 'css' => 'video'),
 20 => array('text' => 'Tu video recibi&oacute; una medalla', 'css' => 'medal'),
         21 => array('text' => 'te recomienda el video', '_REP_ usuarios te recomiendan un', 'ln_text' => 'video', 'css' => 'share'),
        );
    }

Buscar:

function makeConsulta($data){
 # CON UN SWITCH ESCOGEMOS LA CONSULTA APROPIADA
 switch($data['not_type']){
 // EN ESTOS CASOS SE NECESITA LO MISMO
 // $nombredeusuario ********** tu $titulodelpost;
 case 1: 
 case 2: 
 case 3: 
 case 5: 
 case 6:
 case 7:
            case 8:
            case 9:
                return 'SELECT p.post_id, p.post_user, p.post_title, c.c_seo FROM p_posts AS p LEFT JOIN p_categorias AS c ON p.post_category = c.cid WHERE p.post_id = \''.(int)$data['obj_uno'].'\' LIMIT 1';
 break;
 // FOLLOW
 case 4:
                global $tsUser;
 // CHECAR SI YA LO SEGUIMOS
                $i_follow = $tsUser->iFollow($data['obj_user']);
                return array('follow' => $i_follow);
 break;
            // PUBLICO EN TU MURO
            case 12:
                return 'SELECT p.pub_id, u.user_name FROM u_muro AS p LEFT JOIN u_miembros AS u ON p.p_user_pub = u.user_id WHERE p.pub_id = \''.(int)$data['obj_uno'].'\' LIMIT 1';
            break;
            case 13:
                global $tsUser;
                // HAY MAS DE UNA NOTIFICACION DEL MISMO TIPO
                $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT p.pub_id, p.p_user, p.p_user_pub, u.user_name FROM u_muro AS p LEFT JOIN u_miembros AS u ON p.p_user = u.user_id WHERE p.pub_id = \''.(int)$data['obj_uno'].'\' LIMIT 1');
 $dato = db_exec('fetch_assoc', $query);
 
                //
                $dato['p_user_resp'] = $data['obj_user'];
                $dato['p_user_name'] = $dato['user_name']; // // DUEÑO DEL MURO
                $dato['user_name'] = $tsUser->getUserName($data['obj_user']); // QUIEN PUBLICO
                //
                return $dato;
            break;
            case 14:
                if($data['obj_dos'] == 2)
                    return 'SELECT pub_id AS obj_uno, c_body FROM u_muro_comentarios WHERE cid = \''.(int)$data['obj_uno'].'\'';
                else return array('value' => 'hack');
            break;
 case 15:
      return 'SELECT medal_id, m_title, m_image FROM w_medallas WHERE medal_id = \''.(int)$data['obj_uno'].'\' LIMIT 1';
 break;
 case 16:
                 return 'SELECT p.post_id, p.post_title, c.c_seo, m.medal_id, m.m_title, m.m_image, a.medal_for FROM w_medallas_assign AS a LEFT JOIN p_posts AS p ON p.post_id = a.medal_for LEFT JOIN p_categorias AS c ON c.cid = p.post_category LEFT JOIN w_medallas AS m ON m.medal_id = a.medal_id WHERE m.medal_id = \''.(int)$data['obj_uno'].'\' AND p.post_id = \''.(int)$data['obj_dos'].'\' LIMIT 1';
 break;
 case 17:
                 return 'SELECT f.foto_id, f.f_title, f.f_user, m.medal_id, m.m_title, m.m_image, a.medal_for, u.user_id, u.user_name FROM w_medallas_assign AS a LEFT JOIN f_fotos AS f ON f.foto_id = a.medal_for LEFT JOIN u_miembros AS u ON u.user_id = f.f_user LEFT JOIN w_medallas AS m ON m.medal_id = a.medal_id WHERE m.medal_id = \''.(int)$data['obj_uno'].'\' AND f.foto_id = \''.(int)$data['obj_dos'].'\' LIMIT 1';
            break;
 }
 }

Reemplazar por:

function makeConsulta($data){
 # CON UN SWITCH ESCOGEMOS LA CONSULTA APROPIADA
 switch($data['not_type']){
 // EN ESTOS CASOS SE NECESITA LO MISMO
 // $nombredeusuario ********** tu $titulodelpost;
 case 1: 
 case 2: 
 case 3: 
 case 5: 
 case 6:
 case 7:
            case 8:
            case 9:
                return 'SELECT p.post_id, p.post_user, p.post_title, c.c_seo FROM p_posts AS p LEFT JOIN p_categorias AS c ON p.post_category = c.cid WHERE p.post_id = \''.(int)$data['obj_uno'].'\' LIMIT 1';
 break;
            // COMIENZO NOTI VIDEOS
 case 21:
 case 18:
 return 'SELECT vid_title, vid_url, vid_id, vid_user, u.user_name, u.user_id FROM v_videos AS v LEFT JOIN u_miembros AS u ON v.vid_user = u.user_id WHERE vid_id = \''.(int)$data['obj_uno'].'\' LIMIT 1';
 break;
 case 19:
 return 'SELECT vid_title, vid_url, vid_id, vid_user, u.user_name, u.user_id FROM v_videos LEFT JOIN v_comentarios AS c ON c.cid LEFT JOIN u_miembros AS u ON vid_user = u.user_id WHERE vid_id = \''.(int)$data['obj_uno'].'\' LIMIT 1';
 break;
 case 22:
 return 'SELECT vid_title, vid_url, vid_id, vid_user, u.user_name, u.user_id FROM v_videos LEFT JOIN u_miembros AS u ON vid_user = u.user_id WHERE vid_id = \''.(int)$data['obj_uno'].'\' LIMIT 1';
 break;
           // FIN NOTI VIDEOS
           // FOLLOW
 case 4:
                global $tsUser;
 // CHECAR SI YA LO SEGUIMOS
                $i_follow = $tsUser->iFollow($data['obj_user']);
                return array('follow' => $i_follow);
 break;
            // PUBLICO EN TU MURO
            case 12:
                return 'SELECT p.pub_id, u.user_name FROM u_muro AS p LEFT JOIN u_miembros AS u ON p.p_user_pub = u.user_id WHERE p.pub_id = \''.(int)$data['obj_uno'].'\' LIMIT 1';
            break;
            case 13:
                global $tsUser;
                // HAY MAS DE UNA NOTIFICACION DEL MISMO TIPO
                $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT p.pub_id, p.p_user, p.p_user_pub, u.user_name FROM u_muro AS p LEFT JOIN u_miembros AS u ON p.p_user = u.user_id WHERE p.pub_id = \''.(int)$data['obj_uno'].'\' LIMIT 1');
 $dato = db_exec('fetch_assoc', $query);
 
                //
                $dato['p_user_resp'] = $data['obj_user'];
                $dato['p_user_name'] = $dato['user_name']; // // DUEÑO DEL MURO
                $dato['user_name'] = $tsUser->getUserName($data['obj_user']); // QUIEN PUBLICO
                //
                return $dato;
            break;
            case 14:
                if($data['obj_dos'] == 2)
                    return 'SELECT pub_id AS obj_uno, c_body FROM u_muro_comentarios WHERE cid = \''.(int)$data['obj_uno'].'\'';
                else return array('value' => 'hack');
            break;
 case 15:
      return 'SELECT medal_id, m_title, m_image FROM w_medallas WHERE medal_id = \''.(int)$data['obj_uno'].'\' LIMIT 1';
 break;
 case 16:
                 return 'SELECT p.post_id, p.post_title, c.c_seo, m.medal_id, m.m_title, m.m_image, a.medal_for FROM w_medallas_assign AS a LEFT JOIN p_posts AS p ON p.post_id = a.medal_for LEFT JOIN p_categorias AS c ON c.cid = p.post_category LEFT JOIN w_medallas AS m ON m.medal_id = a.medal_id WHERE m.medal_id = \''.(int)$data['obj_uno'].'\' AND p.post_id = \''.(int)$data['obj_dos'].'\' LIMIT 1';
 break;
 case 17:
                 return 'SELECT f.foto_id, f.f_title, f.f_user, m.medal_id, m.m_title, m.m_image, a.medal_for, u.user_id, u.user_name FROM w_medallas_assign AS a LEFT JOIN f_fotos AS f ON f.foto_id = a.medal_for LEFT JOIN u_miembros AS u ON u.user_id = f.f_user LEFT JOIN w_medallas AS m ON m.medal_id = a.medal_id WHERE m.medal_id = \''.(int)$data['obj_uno'].'\' AND f.foto_id = \''.(int)$data['obj_dos'].'\' LIMIT 1';
            break;
 case 20:
 return 'SELECT v.vid_id, v.vid_title, v.vid_user, m.medal_id, m.m_title, m.m_image, a.medal_for, u.user_id, u.user_name FROM w_medallas_assign AS a LEFT JOIN v_videos AS v ON v.vid_id = a.medal_for LEFT JOIN u_miembros AS u ON u.user_id = v.vid_user LEFT JOIN w_medallas AS m ON m.medal_id = a.medal_id WHERE m.medal_id = \''.(int)$data['obj_uno'].'\' AND v.vid_id = \''.(int)$data['obj_dos'].'\' LIMIT 1';
     break;
 }
 }

Buscar:

private function makeOracion($data){
        # GOBALES
        global $tsCore, $tsUser;
        # LOCALES
        $site_url = $tsCore->settings['url'];
        $no_type = $data['not_type'];
        $txt_extra = ($this->show_type == 1) ? '' : ' '.$this->monitor[$no_type]['ln_text'];
        $ln_text = $this->monitor[$no_type]['ln_text'];
        $ln_text = is_array($ln_text) ? $ln_text[$data['obj_dos']-1] : $ln_text;
        //
        $oracion['unread'] = ($this->show_type == 1) ? $data['not_menubar'] : $data['not_monitor'];
        $oracion['style'] = $this->monitor[$no_type]['css'];
        $oracion['date'] = $data['not_date'];
        $oracion['user'] = $data['usuario'];
        $oracion['avatar'] = $data['obj_user'].'_50.jpg';
        $oracion['total'] = $data['not_total'];
        # CON UN SWITCH ESCOGEMOS QUE ORACION CONSTRUIR
        switch($no_type){
            case 1:
            case 3:
            case 5:
                // 
                $oracion['text'] = $this->monitor[$no_type]['text'].$txt_extra;
                if($no_type == 3) $oracion['text'] = str_replace('_REP_', '<b>'.$data['obj_dos'].'</b>', $oracion['text']);
                $oracion['link'] = $site_url.'/posts/'.$data['c_seo'].'/'.$data['post_id'].'/'.$tsCore->setSEO($data['post_title']).'.html';
                $oracion['ltext'] = ($this->show_type == 1) ? $ln_text : $data['post_title'];
                $oracion['ltit'] = ($this->show_type == 1) ? $data['post_title'] : '';
            break;
            // FOLLOW
            case 4:
                $oracion['text'] = $this->monitor[$no_type]['text'];
                if($data['follow'] != true && $this->show_type == 2) {
                    $oracion['link'] = '#" onclick="notifica.follow(\'user\', '.$data['obj_user'].', notifica.userInMonitorHandle, this)';
                    $oracion['ltext'] = $this->monitor[$no_type]['ln_text'];    
                }
            break;
            // PUEDEN SER MAS DE UNO
            case 2:
            case 6:
            case 7:
            case 8:
            case 9:
                // CUANTOS
                $no_total = $data['not_total'];
                // MAS DE UNA ACCION
                if($no_total > 1) {
                    $text = $this->monitor[$no_type]['text'][1].$txt_extra;
                    $oracion['text'] = str_replace('_REP_', "<b>{$no_total}</b>", $text);
                }
                else $oracion['text'] = $this->monitor[$no_type]['text'][0].$txt_extra;
                // ¿ES MI POST?
                if($data['post_user'] == $tsUser->uid) {
                    $oracion['text'] = str_replace('te recomienda un', 'ha recomendado tu', $oracion['text']);
                }
                // ID COMMENT
                if($no_type == 8 || $no_type == 9){
                    $id_comment = '#div_cmnt_'.$data['obj_dos'];
                    // EXTRAS
                    if($no_type == 8){
                        $voto_type = ($data['obj_tres'] == 0) ? 'negativo' : 'positivo';
                        $oracion['text'] = str_replace('_REP_', '<b>'.$voto_type.'</b>', $oracion['text']);
                        $oracion['style'] = 'voto_'.$voto_type;
                    }
                }
                //
                $oracion['link'] = $site_url.'/posts/'.$data['c_seo'].'/'.$data['post_id'].'/'.$tsCore->setSEO($data['post_title']).'.html'.$id_comment;
                $oracion['ltext'] = ($this->show_type == 1) ? $ln_text : $data['post_title'];
                $oracion['ltit'] = ($this->show_type == 1) ? $data['post_title'] : '';
            break;
            // PUBLICACION EN MURO
            case 12:
                $oracion['text'] = $this->monitor[$no_type]['text'].$txt_extra;
                $oracion['link'] = $site_url.'/perfil/'.$tsUser->nick.'/'.$data['obj_uno'];
                $oracion['ltext'] = ($this->show_type == 1) ? $ln_text : $tsUser->nick;
                $oracion['ltit'] = ($this->show_type == 1) ? $tsUser->nick : '';
            break;
            case 13:
                // DE QUIEN?
                if($tsUser->uid == $data['p_user']) {
                    $de = ' tu';
                }
                elseif($data['p_user'] == $data['p_user_resp']) {
                    $de = ' su'; 
                }
                else {
                    $de = ' la publicaci&oacute;n de';
                    //$data['link'][1] = ($typeDos == 1) ?  array($array['p_user_name'], $array['p_user_name']) : $array['p_user_name'];   
                }
                // CUANTOS
                $no_total = $data['not_total'];
                if($no_total > 1) {
                    $text = $this->monitor[$no_type]['text'][1].$de.$txt_extra;
                    $oracion['text'] = str_replace('_REP_', '<b>'.$no_total.'</b>', $text);
                }
                else $oracion['text'] = $this->monitor[$no_type]['text'][0].$de.$txt_extra;
                //
                //$oracion['text'] = $this->monitor[$no_type]['text'].$de.$txt_extra;
                $oracion['link'] = $site_url.'/perfil/'.$data['p_user_name'].'/'.$data['pub_id'];
                $oracion['ltext'] = ($this->show_type == 1) ? $ln_text : $tsUser->nick;
                $oracion['ltit'] = ($this->show_type == 1) ? $tsUser->nick : '';
            break;
            case 14:
                // CUANTOS
                $no_total = $data['not_total'];
                // MAS DE UNA ACCION
                if($no_total > 1) {
                    $text = $this->monitor[$no_type]['text'][1].' '.$ln_text;
                    $oracion['text'] = str_replace('_REP_', '<b>'.$no_total.'</b>', $text);
                }
                else $oracion['text'] = $this->monitor[$no_type]['text'][0];
                //
                $oracion['text'] = ($this->show_type == 1) ? $oracion['text'] : $oracion['text'].' '.$ln_text;
                $oracion['link'] = $site_url.'/perfil/'.$tsUser->nick.'/'.$data['obj_uno'];
                $oracion['ltext'] = ($this->show_type == 1) ? $ln_text : substr($data['c_body'],0,20).'...';
                $oracion['ltit'] = ($this->show_type == 1) ? substr($data['c_body'],0,20).'...' : '';
            break;
 case 15:
                $oracion['text'] = 'Recibiste una nueva <span class="qtip" title="'.$data['m_title'].'"><b>medalla</b> <img src="'.$site_url.'/themes/default/images/icons/med/'.$data['m_image'].'_16.png"/></span>';
 break;
 case 16:
                $oracion['text'] = 'Tu <a href="'.$site_url.'/posts/'.$data['c_seo'].'/'.$data['post_id'].'/'.$tsCore->setSEO($data['post_title']).'.html" title="'.$data['post_title'].'"><b>post</b></a> tiene una nueva <span class="qtip" title="'.$data['m_title'].'"><b>medalla</b> <img src="'.$site_url.'/themes/default/images/icons/med/'.$data['m_image'].'_16.png"/></span>';
 break;
 case 17:
                $oracion['text'] = 'Tu <a href="'.$site_url.'/fotos/'.$data['user_name'].'/'.$data['foto_id'].'/'.$tsCore->setSEO($data['f_title']).'.html" title="'.$data['f_title'].'"><b>foto</b></a> tiene una nueva <span class="qtip" title="'.$data['m_title'].'"><b>medalla</b> <img src="'.$site_url.'/themes/default/images/icons/med/'.$data['m_image'].'_16.png"/></span>';
 break;
        }
        # RETORNAMOS
        return $oracion;
    }

Reemplazar por:

private function makeOracion($data){
        # GOBALES
        global $tsCore, $tsUser;
        # LOCALES
        $site_url = $tsCore->settings['url'];
        $no_type = $data['not_type'];
        $txt_extra = ($this->show_type == 1) ? '' : ' '.$this->monitor[$no_type]['ln_text'];
        $ln_text = $this->monitor[$no_type]['ln_text'];
        $ln_text = is_array($ln_text) ? $ln_text[$data['obj_dos']-1] : $ln_text;
        //
        $oracion['unread'] = ($this->show_type == 1) ? $data['not_menubar'] : $data['not_monitor'];
        $oracion['style'] = $this->monitor[$no_type]['css'];
        $oracion['date'] = $data['not_date'];
        $oracion['user'] = $data['usuario'];
        $oracion['avatar'] = $data['obj_user'].'_50.jpg';
        $oracion['total'] = $data['not_total'];
        # CON UN SWITCH ESCOGEMOS QUE ORACION CONSTRUIR
        switch($no_type){
            case 1:
            case 3:
            case 5:
                // 
                $oracion['text'] = $this->monitor[$no_type]['text'].$txt_extra;
                if($no_type == 3) $oracion['text'] = str_replace('_REP_', '<b>'.$data['obj_dos'].'</b>', $oracion['text']);
                $oracion['link'] = $site_url.'/posts/'.$data['c_seo'].'/'.$data['post_id'].'/'.$tsCore->setSEO($data['post_title']).'.html';
                $oracion['ltext'] = ($this->show_type == 1) ? $ln_text : $data['post_title'];
                $oracion['ltit'] = ($this->show_type == 1) ? $data['post_title'] : '';
            break;
            // FOLLOW
            case 4:
                $oracion['text'] = $this->monitor[$no_type]['text'];
                if($data['follow'] != true && $this->show_type == 2) {
                    $oracion['link'] = '#" onclick="notifica.follow(\'user\', '.$data['obj_user'].', notifica.userInMonitorHandle, this)';
                    $oracion['ltext'] = $this->monitor[$no_type]['ln_text'];    
                }
            break;
            // PUEDEN SER MAS DE UNO
            case 2:
            case 6:
            case 7:
            case 8:
            case 9:
                // CUANTOS
                $no_total = $data['not_total'];
                // MAS DE UNA ACCION
                if($no_total > 1) {
                    $text = $this->monitor[$no_type]['text'][1].$txt_extra;
                    $oracion['text'] = str_replace('_REP_', "<b>{$no_total}</b>", $text);
                }
                else $oracion['text'] = $this->monitor[$no_type]['text'][0].$txt_extra;
                // ¿ES MI POST?
                if($data['post_user'] == $tsUser->uid) {
                    $oracion['text'] = str_replace('te recomienda un', 'ha recomendado tu', $oracion['text']);
                }
                // ID COMMENT
                if($no_type == 8 || $no_type == 9){
                    $id_comment = '#div_cmnt_'.$data['obj_dos'];
                    // EXTRAS
                    if($no_type == 8){
                        $voto_type = ($data['obj_tres'] == 0) ? 'negativo' : 'positivo';
                        $oracion['text'] = str_replace('_REP_', '<b>'.$voto_type.'</b>', $oracion['text']);
                        $oracion['style'] = 'voto_'.$voto_type;
                    }
                }
                //
                $oracion['link'] = $site_url.'/posts/'.$data['c_seo'].'/'.$data['post_id'].'/'.$tsCore->setSEO($data['post_title']).'.html'.$id_comment;
                $oracion['ltext'] = ($this->show_type == 1) ? $ln_text : $data['post_title'];
                $oracion['ltit'] = ($this->show_type == 1) ? $data['post_title'] : '';
            break;
 // NOTI VIDEOS
 case 21:
 case 18:
    $oracion['text'] = $this->monitor[$no_type]['text'];
    $oracion['link'] = $site_url.'/videos/'.$data['user_name'].'/'.$data['vid_id'].'/'.$tsCore->setSEO($data['vid_title']).'.html';
    $oracion['ltext'] = $data['vid_title'];
    break;
    case 19:
 // CUANTOS
 $no_total = $data['not_total'];
 // MAS DE UNA ACCION
 if($no_total > 1) {
 $text = $this->monitor[$no_type]['text'][1].$txt_extra;
 $oracion['text'] = str_replace('_REP_', "<b>{$no_total}</b>", $text);
 }
 else $oracion['text'] = $this->monitor[$no_type]['text'][0].$txt_extra;
 //
 $oracion['link'] = $site_url.'/videos/'.$data['user_name'].'/'.$data['vid_id'].'/'.$tsCore->setSEO($data['vid_title']).'.html';
 $oracion['ltext'] = $data['vid_title'];
 break;
 case 22:
 $no_total = $data['not_total'];
 if($no_total > 1) {
 $text = $this->monitor[$no_type]['text'][1].$de.$txt_extra;
 $oracion['text'] = str_replace('_REP_', "<b>{$no_total}</b>", $text);
 }else $oracion['text'] = $this->monitor[$no_type]['text'][0].$txt_extra;
 $voto_type = ($data['obj_dos'] == 0) ? 'negativo' : 'positivo';
 $oracion['text'] = str_replace('_REP_', '<b>'.$voto_type.'</b>', $oracion['text']);
 $oracion['style'] = 'voto_'.$voto_type;
 $oracion['link'] = $site_url.'/videos/'.$data['user_name'].'/'.$data['vid_id'].'/'.$tsCore->setSEO($data['vid_title']).'.html';
 $oracion['ltext'] = ($this->show_type == 1) ? $ln_text : $data['vid_title'];
 $oracion['ltit'] = ($this->show_type == 1) ? $data['vid_title'] : '';
   break;
 // NOTI VIDEOS

            // PUBLICACION EN MURO
            case 12:
                $oracion['text'] = $this->monitor[$no_type]['text'].$txt_extra;
                $oracion['link'] = $site_url.'/perfil/'.$tsUser->nick.'/'.$data['obj_uno'];
                $oracion['ltext'] = ($this->show_type == 1) ? $ln_text : $tsUser->nick;
                $oracion['ltit'] = ($this->show_type == 1) ? $tsUser->nick : '';
            break;
            case 13:
                // DE QUIEN?
                if($tsUser->uid == $data['p_user']) {
                    $de = ' tu';
                }
                elseif($data['p_user'] == $data['p_user_resp']) {
                    $de = ' su'; 
                }
                else {
                    $de = ' la publicaci&oacute;n de';
                    //$data['link'][1] = ($typeDos == 1) ?  array($array['p_user_name'], $array['p_user_name']) : $array['p_user_name'];   
                }
                // CUANTOS
                $no_total = $data['not_total'];
                if($no_total > 1) {
                    $text = $this->monitor[$no_type]['text'][1].$de.$txt_extra;
                    $oracion['text'] = str_replace('_REP_', '<b>'.$no_total.'</b>', $text);
                }
                else $oracion['text'] = $this->monitor[$no_type]['text'][0].$de.$txt_extra;
                //
                //$oracion['text'] = $this->monitor[$no_type]['text'].$de.$txt_extra;
                $oracion['link'] = $site_url.'/perfil/'.$data['p_user_name'].'/'.$data['pub_id'];
                $oracion['ltext'] = ($this->show_type == 1) ? $ln_text : $tsUser->nick;
                $oracion['ltit'] = ($this->show_type == 1) ? $tsUser->nick : '';
            break;
            case 14:
                // CUANTOS
                $no_total = $data['not_total'];
                // MAS DE UNA ACCION
                if($no_total > 1) {
                    $text = $this->monitor[$no_type]['text'][1].' '.$ln_text;
                    $oracion['text'] = str_replace('_REP_', '<b>'.$no_total.'</b>', $text);
                }
                else $oracion['text'] = $this->monitor[$no_type]['text'][0];
                //
                $oracion['text'] = ($this->show_type == 1) ? $oracion['text'] : $oracion['text'].' '.$ln_text;
                $oracion['link'] = $site_url.'/perfil/'.$tsUser->nick.'/'.$data['obj_uno'];
                $oracion['ltext'] = ($this->show_type == 1) ? $ln_text : substr($data['c_body'],0,20).'...';
                $oracion['ltit'] = ($this->show_type == 1) ? substr($data['c_body'],0,20).'...' : '';
            break;
 case 15:
                $oracion['text'] = 'Recibiste una nueva <span class="qtip" title="'.$data['m_title'].'"><b>medalla</b> <img src="'.$site_url.'/themes/default/images/icons/med/'.$data['m_image'].'_16.png"/></span>';
 break;
 case 16:
                $oracion['text'] = 'Tu <a href="'.$site_url.'/posts/'.$data['c_seo'].'/'.$data['post_id'].'/'.$tsCore->setSEO($data['post_title']).'.html" title="'.$data['post_title'].'"><b>post</b></a> tiene una nueva <span class="qtip" title="'.$data['m_title'].'"><b>medalla</b> <img src="'.$site_url.'/themes/default/images/icons/med/'.$data['m_image'].'_16.png"/></span>';
 break;
 case 17:
                $oracion['text'] = 'Tu <a href="'.$site_url.'/fotos/'.$data['user_name'].'/'.$data['foto_id'].'/'.$tsCore->setSEO($data['f_title']).'.html" title="'.$data['f_title'].'"><b>foto</b></a> tiene una nueva <span class="qtip" title="'.$data['m_title'].'"><b>medalla</b> <img src="'.$site_url.'/themes/default/images/icons/med/'.$data['m_image'].'_16.png"/></span>';
 break;
 case 20:
     $oracion['text'] = 'Tu <a href="'.$site_url.'/videos/'.$data['user_name'].'/'.$data['vid_id'].'/'.$tsCore->setSEO($data['vid_title']).'.html" title="'.$data['vid_title'].'"><b>video</b></a> tiene una nueva <span class="qtip" title="'.$data['m_title'].'"><b>medalla</b> <img src="'.$site_url.'/themes/default/images/icons/med/'.$data['m_image'].'_16.png"/></span>';
            break;
        }
        # RETORNAMOS
        return $oracion;
    }

Buscar:

public function setSpam(){
 global $tsCore, $tsUser, $tsActividad;
 //
 $postid = $_POST['postid'];
        // TIENE SEGUIDORES?
 $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT follow_id FROM u_follows WHERE f_id = \''.$tsUser->uid.'\'  AND f_type = \'1\' LIMIT 1');
        $seguidores = db_exec('num_rows', $query);
        // YA LO HA RECOMENDADO?
 $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT follow_id FROM u_follows WHERE f_id = \''.(int)$postid.'\' AND f_user = \''.$tsUser->uid.'\' AND f_type = \'3\' LIMIT 1');
        $recomendado = db_exec('num_rows', $query);
        
        if($seguidores < 1) return '0-Debes tener al menos un seguidor';
        if($recomendado > 0) return '0-No puedes recomendar el mismo post m&aacute;s de una vez.'; 
 //
 $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT post_user FROM p_posts WHERE post_id = \''.(int)$postid.'\' LIMIT 1');
 $data = db_exec('fetch_assoc', $query);
 
 //
 if($tsUser->uid != $data['post_user']){
            // GUARDAMOS EN FOLLOWS PUES ES LA RECOMENDACION PARA SU SEGUIDORES! xD
 db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO u_follows (f_id, f_user, f_type, f_date) VALUES (\''.(int)$postid.'\', \''.$tsUser->uid.'\', \'3\', \''.time().'\') ');
 // NOTIFICAR
 if($this->setFollowNotificacion(6, 1, $tsUser->uid, $postid)) {
                $tsActividad->setActividad(4, $postid);
                return '1-La recomendaci&oacute;n fue enviada.';
 }
 } else return '0-No puedes recomendar tus posts.';
 }

Debajo agregar:

/**
 * @name recomVid
 * @access public
 * @param none
 * @return string
 * @info ESTA FUNCION ES PARA REALIZAR RECOMENDACIONES EN VIDEOS OKSI
    */
    public function recomVid(){
        global $tsCore, $tsUser, $tsActividad;
        //
        $videoid = $_POST['videoid'];
     // YA LO HA RECOMENDADO?
        $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT follow_id FROM u_follows WHERE f_id = \''.(int)$videoid.'\' AND f_user = \''.$tsUser->uid.'\' AND f_type = \'3\' LIMIT 1');
     $recomendado = db_exec('num_rows', $query);

     if($recomendado > 0) return '0-Ya haz recomendado este video.';
        //
        $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT vid_user FROM v_videos WHERE vid_id = \''.(int)$videoid.'\' LIMIT 1');
        $data = db_exec('fetch_assoc', $query);
 
        //
        if($tsUser->uid != $data['vid_user']){
    // GUARDAMOS EN FOLLOWS PUES ES LA RECOMENDACION PARA SU SEGUIDORES! xD
           db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO u_follows (f_id, f_user, f_type, f_date) VALUES (\''.(int)$videoid.'\', \''.$tsUser->uid.'\', \'3\', \''.time().'\') ');
           // NOTIFICAR
           if($this->setFollowNotificacion(21, 1, $tsUser->uid, $videoid)) {
    $tsActividad->setActividad(4, $postid);
    return '1-La recomendaci&oacute;n fue enviada.';
           }
       } else return '0-No puedes recomendar tus videos.';
    }

En c.tops.php --> inc --> class --> c.tops.php
 
Buscar:

/*
        getTopUsers()
    */
    function getTopUsers($fecha, $cat){
        //
        $data = $this->setTime($fecha);
        $category = empty($cat) ? '' : 'AND post_category = '.$cat;
 // PUNTOS
        $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT SUM(p.post_puntos) AS total, u.user_id, u.user_name FROM p_posts AS p LEFT JOIN u_miembros AS u ON p.post_user = u.user_id WHERE p.post_status = 0  AND p.post_date BETWEEN '.$data['start'].' AND '.$data['end'].' '.$category.' GROUP BY p.post_user ORDER BY total DESC LIMIT 10');
        $array['puntos'] = result_array($query);
        
        // SEGUIDORES
        $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(f.follow_id) AS total, u.user_id, u.user_name FROM u_follows AS f LEFT JOIN u_miembros AS u ON f.f_id = u.user_id WHERE f.f_type = 1 AND f.f_date BETWEEN '.$data['start'].' AND '.$data['end'].' GROUP BY f.f_id ORDER BY total DESC LIMIT 10');
        $array['seguidores'] = result_array($query);
        
 // MEDALLAS
        $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(m.medal_for) AS total, u.user_id, u.user_name, wm.medal_id FROM w_medallas_assign AS m LEFT JOIN u_miembros AS u ON m.medal_for = u.user_id LEFT JOIN w_medallas AS wm ON wm.medal_id = m.medal_id WHERE wm.m_type = \'1\' AND m.medal_date BETWEEN '.$data['start'].' AND '.$data['end'].' GROUP BY m.medal_for ORDER BY total DESC LIMIT 10');
        $array['medallas'] = result_array($query);
        
        //
        return $array;
    }

Debajo agregar:

/*
 getTopVideos()
    */
    function getTopVideos($fecha, $desc){
 //
 $data = $this->setTime($fecha);
 $desc = empty($desc) ? '' : 'AND vid_description = '.$desc;
     // VOTOS POSITIVOS
 $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT SUM(v.vid_votos_pos) AS total, u.user_id, u.user_name, vid_url, vid_user, vid_votos_pos, vid_title, vid_id FROM v_videos AS v LEFT JOIN u_miembros AS u ON v.vid_user = u.user_id WHERE v.vid_status = 0 AND v.vid_date BETWEEN '.$data['start'].' AND '.$data['end'].' '.$desc.' GROUP BY v.vid_user ORDER BY total DESC LIMIT 10');
 $array['votos_pos'] = result_array($query);

     // VOTOS NEGATIVOS
 $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT SUM(v.vid_votos_neg) AS total, u.user_id, u.user_name, vid_url, vid_user, vid_votos_neg, vid_title, vid_id FROM v_videos AS v LEFT JOIN u_miembros AS u ON v.vid_user = u.user_id WHERE v.vid_status = 0 AND v.vid_date BETWEEN '.$data['start'].' AND '.$data['end'].' '.$desc.' GROUP BY v.vid_user ORDER BY total DESC LIMIT 10');
 $array['votos_neg'] = result_array($query);

 // VISITAS
 $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT SUM(vid_visitas) AS total, u.user_id, u.user_name, vid_url, vid_user, vid_visitas, vid_title, vid_id FROM v_videos AS v LEFT JOIN u_miembros AS u ON v.vid_user = u.user_id WHERE v.vid_status = 0 AND v.vid_date BETWEEN '.$data['start'].' AND '.$data['end'].' '.$desc.' GROUP BY v.vid_user ORDER BY total DESC LIMIT 10');
 $array['visitas'] = result_array($query);

     // MEDALLAS
 $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(m.medal_for) AS total, u.user_id, u.user_name, vid_url, vid_user, vid_title, vid_id, wm.medal_id FROM w_medallas_assign AS m LEFT JOIN v_videos AS v ON m.medal_for = v.vid_id LEFT JOIN u_miembros AS u ON v.vid_user = u.user_id LEFT JOIN w_medallas AS wm ON wm.medal_id = m.medal_id WHERE wm.m_type = \'4\' AND m.medal_date BETWEEN '.$data['start'].' AND '.$data['end'].' GROUP BY m.medal_for ORDER BY total DESC LIMIT 10');
 $array['medallas'] = result_array($query);

 //
 return $array;
    }

Buscar:

/*
 getStats() : NADA QUE VER CON LA CLASE PERO BUENO PARA AHORRAR ESPACIO...
 : ESTADISTICAS DE LA WEB
 */
 function getStats(){
 global $tsCore;
 // OBTENEMOS LAS ESTADISTICAS
        $return = db_exec('fetch_assoc', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT stats_max_online, stats_max_time, stats_time, stats_time_cache, stats_miembros, stats_posts, stats_fotos, stats_comments, stats_foto_comments FROM w_stats WHERE stats_no = \'1\''));
        
        if($return['stats_time_cache'] < time()-($tsCore->settings['c_stats_cache']*60)){
        $q1 = db_exec('fetch_row', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(user_id) AS u FROM u_miembros WHERE user_activo = \'1\' && user_baneado = \'0\''));
 $q2 = db_exec('fetch_row', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(post_id) AS p FROM p_posts WHERE post_status = \'0\''));
        $q3 = db_exec('fetch_row', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(foto_id) AS f FROM f_fotos WHERE f_status = \'0\''));
        $q4 = db_exec('fetch_row', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(cid) AS c FROM p_comentarios WHERE c_status = \'0\''));
        $q5 = db_exec('fetch_row', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(cid) AS fc FROM f_comentarios'));
        
        $return['stats_miembros'] = $q1[0];
        $return['stats_posts'] = $q2[0];
        $return['stats_fotos'] = $q3[0];
        $return['stats_comments'] = $q4[0];
        $return['stats_foto_comments'] = $q5[0];
        $ndat = ', stats_time_cache = \''.time().'\', stats_miembros = \''.$return['stats_miembros'].'\', stats_posts = \''.$return['stats_posts'].'\', stats_fotos = \''.$return['stats_fotos'].'\', stats_comments = \''.$return['stats_comments'].'\', stats_foto_comments = \''.$return['stats_foto_comments'].'\'';
        }
        // PARA SABER SI ESTA ONLINE
 $is_online = (time() - ($tsCore->settings['c_last_active'] * 60));
 // USUARIOS ONLINE - COMPROBAMOS SI CONTAMOS A TODOS LOS USUARIOS O SOLO A REGISTRADOS
 if(empty($tsCore->settings['c_count_guests'])){
 $cueri = db_exec('fetch_row', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(user_id) AS u FROM `u_miembros` WHERE `user_lastactive` > \''.$is_online.'\''));
 }else{
        $cueri = db_exec('fetch_row', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(DISTINCT `session_ip`) AS s FROM `u_sessions` WHERE `session_time` > \''.$is_online.'\''));
 }
        
 $return['stats_online'] = $cueri[0];
        
        if($return['stats_online'] > $return['stats_max_online']) {
            $timen = ', stats_max_online = \''.$return['stats_online'].'\', stats_max_time = \''.time().'\'';
        }
            
        db_exec(array(__FILE__, __LINE__), 'query', 'UPDATE w_stats SET stats_time = \''.time().'\' '.$ndat.' '.$timen);
 //
 return $return;
 }

Reemplazar por:

/*
 getStats() : NADA QUE VER CON LA CLASE PERO BUENO PARA AHORRAR ESPACIO...
 : ESTADISTICAS DE LA WEB
 */
 function getStats(){
 global $tsCore;
 // OBTENEMOS LAS ESTADISTICAS
        $return = db_exec('fetch_assoc', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT stats_max_online, stats_max_time, stats_time, stats_time_cache, stats_miembros, stats_posts, stats_fotos, stats_comments, stats_foto_comments FROM w_stats WHERE stats_no = \'1\''));
        
        if($return['stats_time_cache'] < time()-($tsCore->settings['c_stats_cache']*60)){
        $q1 = db_exec('fetch_row', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(user_id) AS u FROM u_miembros WHERE user_activo = \'1\' && user_baneado = \'0\''));
 $q2 = db_exec('fetch_row', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(post_id) AS p FROM p_posts WHERE post_status = \'0\''));
        $q3 = db_exec('fetch_row', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(foto_id) AS f FROM f_fotos WHERE f_status = \'0\''));
        $q4 = db_exec('fetch_row', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(cid) AS c FROM p_comentarios WHERE c_status = \'0\''));
        $q5 = db_exec('fetch_row', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(cid) AS fc FROM f_comentarios'));
        $q6 = db_exec('fetch_row', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(vid_id) AS v FROM v_videos WHERE vid_status = \'0\''));
        $q7 = db_exec('fetch_row', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(cid) AS vc FROM v_comentarios'));
 
        $return['stats_miembros'] = $q1[0];
        $return['stats_posts'] = $q2[0];
        $return['stats_fotos'] = $q3[0];
        $return['stats_comments'] = $q4[0];
        $return['stats_foto_comments'] = $q5[0];
        $return['stats_videos'] = $q6[0];
        $return['stats_video_comments'] = $q7[0];

        $ndat = ', stats_time_cache = \''.time().'\', stats_miembros = \''.$return['stats_miembros'].'\', stats_posts = \''.$return['stats_posts'].'\', stats_fotos = \''.$return['stats_fotos'].'\' , stats_videos = \''.$return['stats_videos'].'\', stats_comments = \''.$return['stats_comments'].'\', stats_foto_comments = \''.$return['stats_foto_comments'].'\'';
        }
        // PARA SABER SI ESTA ONLINE
 $is_online = (time() - ($tsCore->settings['c_last_active'] * 60));
 // USUARIOS ONLINE - COMPROBAMOS SI CONTAMOS A TODOS LOS USUARIOS O SOLO A REGISTRADOS
 if(empty($tsCore->settings['c_count_guests'])){
 $cueri = db_exec('fetch_row', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(user_id) AS u FROM `u_miembros` WHERE `user_lastactive` > \''.$is_online.'\''));
 }else{
        $cueri = db_exec('fetch_row', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(DISTINCT `session_ip`) AS s FROM `u_sessions` WHERE `session_time` > \''.$is_online.'\''));
 }
        
 $return['stats_online'] = $cueri[0];
        
        if($return['stats_online'] > $return['stats_max_online']) {
            $timen = ', stats_max_online = \''.$return['stats_online'].'\', stats_max_time = \''.time().'\'';
        }
            
        db_exec(array(__FILE__, __LINE__), 'query', 'UPDATE w_stats SET stats_time = \''.time().'\' '.$ndat.' '.$timen);
 //
 return $return;
 }

En c.swat.php --> inc --> class --> c.swat.php
 
Buscar:

// MENSAJES
            case 'mensaje':

Arriba agregar:

case 'video':
            // ¿ES MI VIDEO O ESTÁ OCULTO?
          $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT `vid_id`, `vid_user`, `vid_status` FROM `v_videos` WHERE `vid_id` = \''.(int)$obj_id.'\' LIMIT 1') or die(mysql_error());
          $my_video = db_exec('fetch_assoc', $query);

            if(empty($my_video['vid_id'])) return '0: Este video no existe';
            if($my_video['vid_user'] == $tsUser->uid) return '0: No puedes denunciar tus propios videos.';
            if($my_video['vid_status'] == '1') return '0: No puedes denunciar videos ocultos.';
            // YA HA REPORTADO?
            $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT `did` FROM `w_denuncias` WHERE `obj_id` = \''.(int)$obj_id.'\' AND `d_user` = '.$tsUser->uid.' AND `d_type` = \'5\'');
            $denuncio = db_exec('num_rows', $query);

            if(!empty($denuncio)) return '0: Ya habías denunciado este video.';
            // CUANTAS DENUNCIAS LLEVA?
            $denuncias = db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT `did` FROM `w_denuncias` WHERE `obj_id` = \''.(int)$obj_id.'\''));
           // OCULTAMOS EL VIDEO SI YA LLEVA MÁS DE 3 DENUNCIAS
           if($denuncias >= 2){
               db_exec(array(__FILE__, __LINE__), 'query', 'UPDATE `v_videos` SET `vid_status` = \'1\' WHERE `vid_id` = \''.(int)$obj_id.'\'') or die(mysql_error());
               db_exec(array(__FILE__, __LINE__), 'query', 'UPDATE `w_stats` SET `stats_videos` = stats_videos - \'1\' WHERE `stats_no` = \'1\'');
           }
           // INSERTAR NUEVA DENUNCIA
           if(db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO `w_denuncias` (`obj_id`, `d_user`, `d_razon`, `d_extra`, `d_type`, `d_date`) VALUES (\''.(int)$obj_id.'\', \''.$tsUser->uid.'\', \''.$razon.'\', \''.$extras.'\', \'5\', \''.$date.'\')')){
               return '1: La denuncia fue enviada.';
           } else return '0: Error, inténtalo más tarde.';
    
           break;

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

function getNovemods()
    {
        $datos = db_exec('fetch_assoc', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT (SELECT count(post_id) FROM p_posts WHERE post_status = \'3\') as revposts, (SELECT count(cid) FROM p_comentarios WHERE c_status = \'1\' ) as revcomentarios, (SELECT count(DISTINCT obj_id) FROM w_denuncias WHERE d_type = \'1\') as repposts, (SELECT count(DISTINCT obj_id) FROM w_denuncias WHERE d_type = \'2\') as repmps, (SELECT count(DISTINCT obj_id) FROM w_denuncias WHERE d_type = \'3\') as repusers, (SELECT count(DISTINCT obj_id) FROM w_denuncias  WHERE d_type = \'4\') as repfotos, (SELECT count(susp_id) FROM u_suspension) as suspusers, (SELECT count(post_id) FROM p_posts WHERE post_status = \'2\') as pospelera, (SELECT count(foto_id) FROM f_fotos WHERE f_status = \'2\') as fospelera'));
 $datos['total'] = $datos['repposts'] + $datos['repfotos'] + $datos['repmps'] + $datos['repusers'] + $datos['revposts'] + $datos['revcomentarios'];
 return $datos;  
 }

Reemplazar por:

function getNovemods()
    {
        $datos = db_exec('fetch_assoc', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT (SELECT count(post_id) FROM p_posts WHERE post_status = \'3\') as revposts, (SELECT count(cid) FROM p_comentarios WHERE c_status = \'1\' ) as revcomentarios, (SELECT count(DISTINCT obj_id) FROM w_denuncias WHERE d_type = \'1\') as repposts, (SELECT count(DISTINCT obj_id) FROM w_denuncias WHERE d_type = \'2\') as repmps, (SELECT count(DISTINCT obj_id) FROM w_denuncias WHERE d_type = \'3\') as repusers, (SELECT count(DISTINCT obj_id) FROM w_denuncias  WHERE d_type = \'4\') as repfotos, (SELECT count(DISTINCT obj_id) FROM w_denuncias WHERE d_type = \'5\') as repvideos, (SELECT count(susp_id) FROM u_suspension) as suspusers, (SELECT count(post_id) FROM p_posts WHERE post_status = \'2\') as pospelera, (SELECT count(foto_id) FROM f_fotos WHERE f_status = \'2\') as fospelera, (SELECT count(vid_id) FROM v_videos WHERE vid_status = \'2\') as vispelera'));
 $datos['total'] = $datos['repposts'] + $datos['repfotos'] + $datos['repvideos'] + $datos['repmps'] + $datos['repusers'] + $datos['revposts'] + $datos['revcomentarios'];
 return $datos;  
 }

En admin.php --> inc --> php --> admin.php
 
Buscar:

//FOTOS
 } elseif($action == 'fotos'){
 if(!$act) {
 $smarty->assign("tsAdminFotos",$tsAdmin->GetAdminFotos());
 }

Debajo agregar:

//VIDEOS
    } elseif($action == 'videos'){
         if(!$act) {
         $smarty->assign("tsAdminVideos",$tsAdmin->GetAdminVideos());
         }

En moderacion.php --> inc --> php --> moderacion.php
 
Buscar:

// SUSPENSIONES
    elseif($action == 'banusers'){
        $smarty->assign("tsSuspendidos",$tsMod->getSuspendidos());
    }

Arriba agregar:

elseif($action == 'videos'){
      include('../ext/datos.php');
      if(empty($act)){
      $smarty->assign("tsReports",$tsMod->getDenuncias($action));
      $smarty->assign("tsDenuncias",$tsDenuncias[$action]);
    }elseif($act == 'info'){
      $smarty->assign("tsDenuncia",$tsMod->getDenuncia($action));
      $smarty->assign("tsDenuncias",$tsDenuncias[$action]);
    }elseif ($act == 'borrar'){
      $tsMod->deleteVideo($vid_);
      header('location: /moderacion/videos');
    }
    }

Buscar:

elseif($action == 'fopelera'){
        $smarty->assign("tsFopelera",$tsMod->getFopelera());
    }

Debajo agregar:

elseif($action == 'vipelera'){
        $smarty->assign("tsVipelera",$tsMod->getVipelera());
    }

En tops.php --> inc --> php --> tops.php
 
Buscar:

switch($action){
 case 'posts':
 $smarty->assign("tsTops",$tsTops->getTopPosts($fecha, $cat));
 break;
            case 'usuarios':
                $smarty->assign("tsTops",$tsTops->getTopUsers($fecha, $cat));
            break;
 }

Debajo agregar:

switch($action){
 case 'posts':
 $smarty->assign("tsTops",$tsTops->getTopPosts($fecha, $cat));
 break;
 case 'videos':
 $smarty->assign("tsTops",$tsTops->getTopVideos($fecha, $desc));
 break;
 case 'fotos':
 $smarty->assign("tsTops",$tsTops->getTopFotos($fecha, $desc));
 break;
     case 'usuarios':
 $smarty->assign("tsTops",$tsTops->getTopUsers($fecha, $cat));
     break;
        }

En ajax.admin.php --> inc --> php --> ajax --> ajax.admin.php
 
Buscar:

'admin-badwords-delete' => array('n' => 4, 'p' => ''),

Debajo agregar:

'admin-video-borrar' => array('n' => 4, 'p' => ''),
        'admin-video-setOpenClosed' => array('n' => 4, 'p' => ''),
        'admin-video-setShowHide' => array('n' => 4, 'p' => ''),

Buscar:

case 'admin-users-InActivo':

Arriba agregar:

case 'admin-video-borrar':
            //<---
     echo $tsAdmin->DelVideo();
     //--->
 break;
 case 'admin-video-setOpenClosed':
      //<---
      echo $tsAdmin->setOpenClosedVideo();
      //--->
 break;
 case 'admin-video-setShowHide':
      //<---
      echo $tsAdmin->setShowHideVideo();
      //--->
 break;

En ajax.denuncia.php --> inc --> php --> ajax --> ajax.denuncia.php

Buscar:

'denuncia-usuario' => array('n' => 2, 'p' => 'form'),

Debajo agregar:

'denuncia-video' => array('n' => 2, 'p' => 'form'),

Buscar:

case 'denuncia-mensaje':

Arriba agregar:

case 'denuncia-video':
 // CREAR DENUNCIA
 if($_POST['razon']){
 $tsAjax = 1;
 echo $tsSwat->setDenuncia($obj_id, 'video');
 // FORMULARIO DE DENUNCIA
 } else {
 // VARS
 $tsData = array(
 'obj_id' => $obj_id,
 'obj_title' => $tsCore->setSecure($_POST['obj_title']),
 'obj_user' => $tsCore->setSecure($_POST['obj_user']),
 );
 // DATOS
 include("../ext/datos.php");
 $smarty->assign("tsData",$tsData);
 $smarty->assign("tsDenuncias",$tsDenuncias['videos']);
 }
 break;

En ajax.moderacion.php --> inc --> php --> ajax --> ajax.moderacion.php
 
Buscar:

'moderacion-mps' => array('n' => 3, 'p' => 'main'),

Debajo agregar:

'moderacion-videos' => array('n' => 3, 'p' => 'main'),

Buscar:

case 'moderacion-fotos':

Arriba agregar:

case 'moderacion-videos':
 //<--
 $vid = (int)$_POST['vid'];
 // ACCIONES SECUNDARIAS
 switch($do){
     case 'reboot':
             $tsAjax = 1;
             echo $tsMod->rebootVideo($_POST['id']);
     break;
 case 'borrar':
 if($_POST['razon']){
             $tsAjax = 1;
             echo $tsMod->deleteVideo($vid);
 }else {
 include('../ext/datos.php');
 $tsPage = 'php_files/p.videos.mod';
 $smarty->assign("tsDenuncias",$tsDenuncias['videos']);
 }
        break;

En ajax.notificaciones.php inc --> php --> ajax --> ajax.notificaciones.php
 
Buscar:

case 'unfollow':
 // <--
 echo $tsMonitor->setUnFollow();
 // -->
 break;

Debajo agregar:

case 'videor':
 // <--
 echo $tsMonitor->recomVid();
 // -->
     break;

En ajax.perfil.php inc --> php --> ajax --> ajax.perfil.php
 
Buscar:

'perfil-posts' => array('n' => 0, 'p' => 'posts'),

Debajo agregar:

'perfil-videos' => array('n' => 0, 'p' => 'videos'),

Buscar:

case 'perfil-posts':
            //<---
            $smarty->assign("tsGeneral",$tsCuenta->loadPosts($user_id));
            //--->
        break;

Debajo agregar:

case 'perfil-videos':
      //<---
      $smarty->assign("tsGeneral",$tsCuenta->loadVideos($user_id));
     //--->
     break;

En datos.php --> inc --> ext --> datos.php
 
Buscar:

'fotos' => array(

Arriba agregar:

'videos' => array(
           '',
    'Ya está publicado',
    'Se hace Spam',
    'El video no anda',
    'Es racista o irrespetuosa',
    'Contiene información personal',
    'Contiene pedofilia',
    'Es gore o asquerosa',
    'Otra razón (especificar)'
      ),

En acciones.js --> themes --> default --> js --> acciones.js

Buscar:

spamPostHandle: function (r) {
 var x = r.split('-');
 if (x.length == 2) mydialog.alert('Notificaciones', x[1]);
 else mydialog.close();
 },

Debajo agregar:

VideoHandle: function (r) {
       var x = r.split('-');
       if (x.length == 2) mydialog.alert('Notificaciones', x[1]);
       else mydialog.close();
    },
 VideoHandle: function (r) {
       var x = r.split('-');
       if (x.length == 2) mydialog.alert('Notificaciones', x[1]);
       else mydialog.close();
    },

Buscar:

spam: function (id, cb) {
 this.ajax(Array('action=spam', 'postid='+id), cb);
 },

Debajo agregar:

videor: function (id, cb) {
 this.ajax(Array('action=videor', 'videoid='+id), cb);
 },

Buscar:

sharePost: function (id) {
 mydialog.show();
 mydialog.title('Recomendar');
 mydialog.body('¿Quieres recomendar este post a tus seguidores?');
 mydialog.buttons(true, true, 'Recomendar', 'notifica.spam('+id+', notifica.spamPostHandle)', true, true, true, 'Cancelar', 'close', true, false);
 mydialog.center();
 },

Debajo agregar:

shareVideo: function (id) {
 mydialog.show();
 mydialog.title('Recomendar');
 mydialog.body('¿Quieres recomendar este video a tus seguidores?');
 mydialog.buttons(true, true, 'Recomendar', 'notifica.videor('+id+', notifica.VideoHandle)', true, true, true, 'Cancelar', 'close', true, false);
 mydialog.center();
 },

Buscar:

case 'fotoid':
 if(global_data.fotoid!='')
 return r+global_data.fotoid;
 break;

Debajo agregar:

case 'videoid':
           if(global_data.videoid!='')
               return r+global_data.videoid;
           break;

En admin.js --> themes --> default --> js --> admin.js
 
Buscar:

medallas : {
     borrar:function(mid, gew){

Arriba agregar:

videos : {
borrar:function(vid, gew){
if(!gew){
mydialog.show();
mydialog.title('Borrar Video');
mydialog.body('&amp;#191;Quiere borrar este video permanentemente?');
mydialog.buttons(true, true, 'Sí', 'admin.videos.borrar(' + vid + ', 1)', true, false, true, 'No', 'close', true, true);
mydialog.center();
}else{
$('#loading').fadeIn(250);
$.post(global_data.url + '/admin-video-borrar.php', 'vid_id=' + vid, function(a){
mydialog.alert((a.charAt(0) == '0' ? 'Opps!' : 'Hecho'), a.substring(3), false);
mydialog.center();
success: $('#video_' + vid).fadeOut(); $('#loading').fadeOut(350);
});
}
},

setOpenClosed:function(vid){
$('#loading').fadeIn(250);
$.ajax({
type: 'POST',
url: global_data.url +'/admin-video-setOpenClosed.php',
data: 'vid=' + vid,
success: function(h){
switch(h.charAt(0)){
case '0': //Error
mydialog.alert('Error', h.substring(3));
break;
case '1':
//
$('#comments_video_' + vid).html('<font color="red">Cerrados</font>');
break;
case '2':
//
$('#comments_video_' + vid).html('<font color="green">Abiertos</font>');
break;
}
$('#loading').fadeOut(350);
}
});
},

setShowHide:function(vid){
$('#loading').fadeIn(250);
$.ajax({
type: 'POST',
url: global_data.url +'/admin-video-setShowHide.php',
data: 'vid=' + vid,
success: function(h){
switch(h.charAt(0)){
case '0': //Error
mydialog.alert('Error', h.substring(3));
break;
case '1':
//
$('#status_video_' + vid).html('<font color="purple">Oculto</font>');
break;
case '2':
//
$('#status_video_' + vid).html('<font color="green">Visible</font>');
break;
}
$('#loading').fadeOut(350);
}
});
},
},

 

En moderacion.js --> themes --> default --> js --> moderacion.js
 
Buscar:

users: {

Arriba agregar:

videos : {
// BORRAR
borrar:function(vid, redirect, aceptar){
if(!aceptar){
$.ajax({
type: 'POST',
url: global_data.url + '/moderacion-videos.php?do=borrar',
success: function(h){
mydialog.show();
mydialog.title('Borrar Video');
mydialog.body(h);
mydialog.buttons(true, true, 'Borrar', 'mod.videos.borrar(' + vid + ", '" + redirect + "', 1);", true, false, true, 'Cancelar', 'close', true, true);
$('#modalBody').css('padding', '20px 10px 0');
mydialog.center();
return;
}
});

} else {
mydialog.procesando_inicio('Eliminando...', 'Borrar Video');
var razon = $('#razon').val()
var razon_desc = $('input[name=razon_desc]').val();
$('#loading').fadeIn(250);
$.ajax({
type: 'POST',
url: global_data.url + '/moderacion-videos.php?do=borrar',
data: 'vid=' + vid + '&amp;razon=' + razon + '&amp;razon_desc=' + razon_desc,
success: function(h){
switch(h.charAt(0)){
case '0': //Error
mydialog.alert('Error', h.substring(3));
break;
case '1':
if(redirect == 'true') mod.redirect("/moderacion/videos", 1200);
else if(redirect == 'videos') {
mydialog.alert('Aviso', h.substring(3));
mod.redirect("/videos/", 2000);
}
else {
mydialog.close();
$('#report_' + vid).slideUp();
}
break;
}
$('#loading').fadeOut(350);
},
complete: function(){
mydialog.procesando_fin();
$('#loading').fadeOut(350);
}
});
}
},
},

 

En t.tops.tpl --> themes --> default --> templates --> t.tops.tpl
 
Buscar:

{elseif $tsAction == 'usuarios'}
                {include file='modules/m.top_users.tpl'}

Debajo agregar:

{elseif $tsAction == 'videos'}
     {include file='modules/m.top_videos.tpl'}

 

En p.denuncia.form.tpl --> themes --> default --> templates --> t.php_files --> p.denuncia.form.tpl
 
Buscar:

{elseif $tsAction == 'denuncia-mensaje'}

Arriba agregar:

{elseif $tsAction == 'denuncia-video'}
<div align="center" style="padding:10px 10px 0">
 <b>Denunciar video:</b><br />
 {$tsData.obj_title}<br /><br />
 <b>Razón de la denuncia:</b><br />
 <select name="razon">
 {foreach from=$tsDenuncias key=i item=denuncia}
     {if $denuncia}<option value="{$i}">{$denuncia}</option>{/if}
 {/foreach}
 </select><br />
 <b>Aclaración y comentarios:</b><br />
 <textarea tabindex="6" rows="5" cols="40" name="extras"><textarea><br />
 <span class="size9">Para atender tu caso rápidamente, adjunta pruebas de tu denuncia.<br /> (capturas de pantalla)</span>
</div>

 

En m.perfil_sidebar.tpl --> themes --> default --> templates --> modules --> m.perfil_sidebar.tpl
 
Buscar:

{if $tsInfo.visitas}
            <ul class="clearfix">
                                {foreach from=$tsInfo.visitas item=v}
            <li><a href="{$tsConfig.url}/perfil/{$v.user_name}" class="hovercard" uid="{$v.user_id}" style="display:inline-block;"><img src="{$tsConfig.url}/files/avatar/{$v.user_id}_50.jpg" class="vctip" title="{$v.date|hace:true}" width="32" height="32"/></a></li>
                                {/foreach}
            </ul>
                            {else}
                            <div class="emptyData">No tiene visitas</div>
                            {/if}
            </div>
 {/if}

Debajo agregar:

<div class="widget w-medallas clearfix">
      <div class="title-w clearfix">
    <h3>Videos</h3>
                    <span>{$tsInfo.stats.user_videos}</span>
      </div>
                      <ul class="clearfix">
 {foreach from=$tsGeneral.videos item=v key=i}
 {if $v.vid_id}<a href="{$tsConfig.url}/videos/{$tsInfo.nick}/{$v.vid_id}/{$v.vid_title|seo}.html">
 <img class=qtip title="{$v.vid_title}" src="http://img.youtube.com/vi/{$v.vid_url}/1.jpg" width="50" height="50">{else}
 <li><div class="foto"></div></li>{/if}
 {/foreach}
 </ul>
 </div>

En m.perfil_headinfo.tpl --> themes --> default --> templates --> modules --> m.perfil_headinfo.tpl
 
Buscar:

<li><a href="#" onclick="perfil.load_tab('medallas', this); return false">Medallas</a></li>

Debajo agregar:

<li><a href="#" onclick="perfil.load_tab('videos', this); return false">Videos</a></li>

Buscar:

<li>
                <strong>{$tsInfo.stats.user_fotos}</strong>
                <span>Fotos</span>
                </li>

Debajo agregar:

<li style="float: right;">
                                    <strong>{$tsInfo.stats.user_videos}</strong>
                                    <span>Videos</span>
                                </li>

En main_header.tpl --> themes --> default --> templates --> sections --> main_header.tpl
 
Buscar:

fotoid:'{$tsFoto.foto_id}',

Debajo agregar:

videoid:'{$tsVideo.vid_id}',

En head_menu.tpl --> themes --> default --> templates --> sections --> head_menu.tpl
 
Buscar:

{if $tsConfig.c_fotos_private == '1' && !$tsUser->is_member}{else} 
                <li class="tabbed {if $tsPage == 'fotos'}here{/if}" id="tabbedfotos">
                    <a title="Ir a Fotos" onclick="menu('fotos', this.href); return false;" href="{$tsConfig.url}/fotos/">Fotos <img alt="Drop Down" src="{$tsConfig.tema.t_url}/images/arrowdown.png"></a>
                </li> 
 {/if}

Debajo agregar:

<li class="tabbed {if $tsPage == 'videos'}here{/if}" id="tabbedvideos">
                    <a title="Ir a Videos" onclick="menu('videos', this.href); return false;" href="{$tsConfig.url}/videos/">Videos <img alt="Drop Down" src="{$tsConfig.tema.t_url}/images/arrowdown.png"></a>
                </li> 

En head_submenu.tpl --> themes --> default --> templates --> sections --> head_submenu.tpl
 
Buscar:

<div id="subMenuTops" class="subMenu {if $tsPage == 'tops'}here{/if}">

Arriba agregar:

<div id="subMenuVideos" class="subMenu {if $tsPage == 'videos'}here{/if}">
                <ul class="floatL tabsMenu">
                    <li{if $tsAction == '' && $tsAction != 'agregar' && $tsAction != 'album' && $tsAction != 'favoritas' || $tsAction == 'ver'} class="here"{/if}><a href="{$tsConfig.url}/videos/">Inicio</a></li>
                    {if $tsAction == 'album' && $tsVUser.0 != $tsUser->uid}<li class="here"><a href="{$tsConfig.url}/videos/{$tsVUser.1}">&Aacute;lbum de {$tsVUser.1}</a></li>{/if}
                    {if $tsUser->is_admod}<li{if $tsAction == 'agregar'} class="here"{/if}><a href="{$tsConfig.url}/videos/agregar/">Agregar Video</a></li>{/if}
                   {if $tsUser->is_member} <li{if $tsAction == 'album' && $tsVUser.0 == $tsUser->uid} class="here"{/if}><a href="{$tsConfig.url}/videos/album/{$tsUser->nick}">Mis Videos</a></li>{/if}
                    <li><a href="{$tsConfig.url}/buscadorv/">Buscador</a></li>
               </ul>
                <div class="clearBoth"></div>
            </div>

En t.admin.tpl --> themes --> default --> templates --> t.admin.tpl
 
Buscar:

{elseif $tsAction == 'afs'}
                            {include file='admin_mods/m.admin_afiliados.tpl'}

Arriba agregar:

{elseif $tsAction == 'videos'}
                                {include file='admin_mods/m.admin_videos.tpl'}

En t.moderacion.tpl --> themes --> default --> templates --> t.moderacion.tpl
   
Buscar:

{elseif $tsAction == 'fotos'}
                            {include file='admin_mods/m.mod_report_fotos.tpl'}

Debajo agregar:

{elseif $tsAction == 'videos'}
                                {include file='admin_mods/m.mod_report_videos.tpl'}

Buscar:

{elseif $tsAction == 'fopelera'}
                                {if $tsUser->is_admod || $tsUser->permisos.morf}{include file='admin_mods/m.mod_papelera_fotos.tpl'}{/if}

Debajo agregar:

{elseif $tsAction == 'vipelera'}
                                {if $tsUser->is_admod}{include file='admin_mods/m.mod_papelera_videos.tpl'}{/if}

En m.admin_sidemenu.tpl --> themes --> default --> templates --> admin_mods --> m.admin_sidemenu.tpl
 
Buscar:

<li id="a_cats"><span class="cat-title"><a href="{$tsConfig.url}/admin/cats">Categor&iacute;as</a></span></li>

Debajo agregar:

<li id="a_film"><span class="cat-title"><a href="{$tsConfig.url}/admin/videos">Todos los Videos</a></span></li>

En m.mod_sidemenu.tpl --> themes --> default --> templates --> admin_mods --> m.mod_sidemenu.tpl
 

Buscar:

<li id="a_users"><span class="cat-title"><a onclick="$('#a_users').addClass('active');" href="{$tsConfig.url}/moderacion/users">Usuarios <span class="cadGe cadGe_{if $tsConfig.novemods.repusers > 15}red{elseif $tsConfig.novemods.repusers > 5}purple{else}green{/if}">{$tsConfig.novemods.repusers}</span></a></span></li>

Debajo agregar:

<li id="a_film"><span class="cat-title"><a onclick="$('#a_film').addClass('active');" href="{$tsConfig.url}/moderacion/videos">Videos <span class="cadGe cadGe_{if $tsConfig.novemods.repvideos > 15}red{elseif $tsConfig.novemods.repvideos > 5}purple{else}green{/if}">{$tsConfig.novemods.repvideos}</span></a></span></li>

Buscar:

{if $tsUser->is_admod || $tsUser->permisos.morf}<li id="a_fopelera"><span class="cat-title"><a onclick="$('#a_fopelera').addClass('active');" href="{$tsConfig.url}/moderacion/fopelera">Fotos eliminadas <span class="cadGe cadGe_{if $tsConfig.novemods.fospelera > 15}red{elseif $tsConfig.novemods.fospelera > 5}purple{else}green{/if}">{$tsConfig.novemods.fospelera}</span></a></span></li>{/if}

Debajo agregar:

{if $tsUser->is_admod}<li id="a_vipelera"><span class="cat-title"><a onclick="$('#a_vipelera').addClass('active');" href="{$tsConfig.url}/moderacion/vipelera">Videos eliminados <span class="cadGe cadGe_{if $tsConfig.novemods.vispelera > 15}red{elseif $tsConfig.novemods.vispelera > 5}purple{else}green{/if}">{$tsConfig.novemods.vispelera}</span></a></span></li>{/if}

En admin.css --> themes --> default --> css --> admin.css
 
Buscar:

li#a_badwords {background-image: url(../images/icons/stop.png);}

Debajo agregar:

li#a_film {background-image: url(../images/film.png);}

En moderacion.css --> themes --> default --> css --> moderacion.css
 
Buscar:

li#a_revposts {background-image: url(../images/icons/exclamation.png);}

Debajo agregar:

li#a_vipelera {background-image: url(../images/film.png);}
li#a_film {background-image: url(../images/film.png);}

En .htaccess

Buscar:

# ADMIN

Arriba agregar:

# VIDEOS
RewriteRule ^videos/([A-Za-z0-9_-]+).php$ inc/php/videos.php?action=$1 [QSA,L]
RewriteRule ^videos/album/([A-Za-z0-9_-]+)$ inc/php/videos.php?action=album&user=$1 [QSA,L]
RewriteRule ^videos/album/([A-Za-z0-9_-]+)/([0-9]+)$ inc/php/videos.php?action=album&user=$1&page=$2 [QSA,L]
RewriteRule ^videos/([A-Za-z0-9_-]+)/([0-9]+)/([A-Za-z0-9_-]+).html$ inc/php/videos.php?action=ver&user=$1&vid=$2 [QSA,L]
RewriteRule ^admin/videos/([A-Za-z0-9_-]+)/([0-9]+)$ inc/php/admin.php?action=videos&act=$1&vid=$2 [QSA,L]
RewriteRule ^videos/([A-Za-z0-9_-]+)/([0-9]+)$ inc/php/videos.php?action=$1&id=$2 [QSA,L]

 

Y subir esta carpeta

https://mega.nz/file/hBIyCRKQ#l8OQEmYQDAvyk-0vTXRt5l2XsFi0Fz0EPLVNXBUTYnw

 

Creditos: Nico y Aperpen

 

 

 

 

Edited by Tronlar
Añadido Imagen
  • Like 2
  • Thanks 4

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By Tronlar
      Hola, os dejo el tema V6 Dark actualizado y corregido con los errores que se han publicado y otros que he encontrado.
      Al final de la instalación ejecutar y subir las consultas que están en el archivo, y para que funcione el chat tiene que ir a https://www.tuweb.com/installchat/index.php y darle en instalar.
       
      Demo
      https://pruev6.lucky-forum.com/
       
      Demo 2
      https://v621pruebas.lucky-forum.com/
       
       

       
       
      Descargar
       
      Mega
      https://mega.nz/file/xMJhHAyJ#9aeI3Hyt-d...gipH3C3Ofw
       
    • By Tronlar
      Hola a [email protected], os dejo el tema identi actualizado y fixeado a la versión 1.3
       
      Demo
       

       
      En c.cuenta.php --> inc --> class --> c.cuenta.php
                     
      Buscar:
      if($data['p_configs']['hits'] == 0){
      Arriba agregan:
      $data['pais'] = array('icon' => strtolower($data['user_pais']),'name' => $tsPaises[$data['user_pais']]);
      Buscar:
      , r.r_name,
      Reemplazar por:
      , r.r_name, r.r_image,   
      En c.posts.php --> inc --> class --> c.posts.php
                 
      Buscar:
      /* lalala */
      Arriba agregar:
      /* Top Categorias*/ function topcat(){ global $tsUser, $tsCore; $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT c.cid, c.c_nombre,c.c_seo, c.c_img, COUNT(p.post_id) AS total, p.post_category FROM p_categorias AS c LEFT JOIN p_posts AS p ON p.post_category = c.cid WHERE post_status = 0 GROUP BY c.c_nombre ORDER BY c.c_nombre ASC'); $data = result_array($query); return $data; }
      Buscar:
      // ACTUALES $total = explode(',',$data['pages']['limit']); $data['total'] = ($total[0]) + count($data['data']); // return $data; }
      Debajo agregar:
      //TAGS RELEVANTES function getTags() { $limit_tags = 15; $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT p.post_tags FROM p_posts AS p LEFT JOIN u_miembros AS u ON p.post_user = u.user_id WHERE p.post_status = \'0\' && u.user_activo = \'1\' && u.user_baneado = \'0\' ORDER BY RAND() LIMIT '.$limit_tags); $data = result_array($query); // foreach($data as $i => $val) { $tags = explode(',', $val['post_tags']); $data[$i]['name'] = $tags[rand(0, count($tags))]; $data[$i]['size'] = rand(1,5); } return $data; }  
      En posts.php --> inc --> php --> posts.php
       
      Buscar:
      // DO <= PARA EL MENU $smarty->assign("tsDo",$_GET['do']);
      Debajo agregar:
      $smarty->assign("tsTopcat",$tsPosts->topcat());
      Buscar:
      $smarty->assign("tsStats",$tsTops->getStats());
      Debajo agregar:
      // TAGS RELEVANTES $smarty->assign("tsTags",$tsPosts->getTags());  
       
       
      Instalación de las comunidades
                 
      Editar solo los archivos de la carpeta inc y ejecutar las consultas de las comunidades, lo demás ya lo tiene instalado, también dejo los archivos ya editados de esa carpeta de la última versión de Risus (1.3), solo tendrías que subir la carpeta y ejecutar las consultas y ya lo tienes instalado.
      Si tu web esta funcionando y tienes mods instalados no puedes sustituir los archivos por la carpeta que dejo, tienes que instalarlo manualmente, si la sustituyes y tienes mods instalado o modificaciones te van a dejar de funcionar, tendrías que volver a instalar esas modificaciones.
           
        
      Tutorial Instalación carpeta inc comunidades Identi 1.3
      https://mega.nz/file/MEJgQD6S#otA_iirrgDVuTPv4Ss0LAyNd-WrMuvuIvrf_ZaawF2g
       
      Carpeta inc archivos comunidades
      https://mega.nz/file/RURSFJLR#3eazqgCv73P2jCNpeOwwtn01qANLkKkcrBJnPl2B6fw
       
      Archivos de la carpeta inc ya editados (Versión 1.3)
      https://mega.nz/file/0MZASTyA#gY2HMN4-k9B-yqU3yuJtvZnQ8rLFeBZuyWJfuVXodJM
       
      Tema Identi (Act/Fix 1.3), se instala con el nombre de identi
      https://mega.nz/file/lNgC3SDA#yca7OyGaCFuxVUCYp_USl0zksNVELHdoZKo-ZRxldD8
       
       
      Demo
       
       
       
       
       
       
       
       
       
       
       
       
       
    • By Tronlar
      Hola a [email protected],os dejo como hacer funcionar el sistema de captcha en las V5,V6,lo acabo de probar y funciona bien.
       
       
      Ejecutar esta consulta:
      ALTER TABLE `w_configuracion` ADD `pkey` VARCHAR(55) NOT NULL AFTER `offline_message`, ADD `skey` VARCHAR(55) NOT NULL AFTER `pkey`;  
      En c.admin.php --> inc/class/c.admin.php
       
      Buscar:
      'newr' => empty($_POST['newr']) ? 0 : 1);
      Cambiar por:
      'newr' => empty($_POST['newr']) ? 0 : 1, 'pkey' => $tsCore->setSecure($_POST['pkey']), 'skey' => $tsCore->setSecure($_POST['skey']),  
       
      Buscar:
      '\', `offline_message` = \'' . $c['offline_message'] .  
      Añadir al lado:
      '\', `pkey` = \'' . $c['pkey'] . '\', `skey` = \'' . $c['skey'] .
      Tiene que quedar así:
      '\', `offline_message` = \'' . $c['offline_message'] . '\', `pkey` = \'' . $c['pkey'] . '\', `skey` = \'' . $c['skey'] .  
       

      En c.registro.php --> inc/class/c.registro.php
       
      Buscar:
      'user_captacha_challenge' => $_POST['recaptcha_challenge_field'], 'user_captacha_response' => $_POST['recaptcha_response_field'],  
      Cambiar por:
      'user_captcha' => $_POST['g-recaptcha-response'],  
      Buscar:
      'captacha' => 'El código es incorrecto'
      Cambiar por:
      'captcha' => 'Validación incorrecta',  
       
      Buscar:
      // CAPTACHA require(TS_EXTRA . 'recaptchalib.php'); $robot = recaptcha_check_answer(RC_PIK,$_SERVER["REMOTE_ADDR"],$tsData['user_captacha_challenge'],$tsData['user_captacha_response']); if(!$robot->is_valid) return 'recaptcha: El código es incorrecto.';

      Cambiar por:        
      /** reCAPTCHA **/ $recaptcha = 'https://www.google.com/recaptcha/api/siteverify?secret=' . $tsCore->settings['skey'] . '&response=' . $tsData['user_captcha'] . '&remoteip=' . $tsCore->getIP(); // Obtener respuesta $response = file_get_contents($recaptcha); // Extraer resultado $ext1 = explode('"success":', $response); $ext2 = explode(',', $ext1[1]); // Comprobar resultado $valid = trim($ext2[0]); // Devolver respuesta si es incorrecta if ($valid == 'false') { return 'recaptcha: No hemos podido validar tu humanidad'; }  
       
      registro.js --> default/js/registro.js
      registro.js --> V6/js/registro.js
       
      Buscar:
      /* reCAPTCHA */ case 'recaptcha_challenge_field': return true; break; case 'recaptcha_response_field': //Si ya paso por aca y no hubieron cambios, devuelvo el mismo status if(!force_check && this.datos[campo] === value && this.datos['recaptcha_challenge_field'] == $('#RegistroForm .pasoDos #recaptcha_challenge_field').val()) if(this.datos_status[campo]=='empty') return no_empty ? this.show_status(el, this.datos_status[campo], this.datos_text[campo]) : this.hide_status(el, this.datos_status[campo], this.datos_text[campo]); else return this.show_status(el, this.datos_status[campo], this.datos_text[campo]); //Almaceno el dato this.datos[campo] = value; this.datos['recaptcha_challenge_field'] = $('#RegistroForm .pasoDos #recaptcha_challenge_field').val(); //!empty if(empty(value)){ var status = 'empty'; var text = 'El campo es requerido'; if(no_empty) return this.show_status(el, status, text); else return this.hide_status(el, status, text); } return registro.show_status(el, 'ok', 'OK'); break; } },  

      Cambiar por:    
      /* reCAPTCHA */ case 'g-recaptcha-response': this.datos[campo] = value; //!empty if (!value) { return this.show_status($('#RegistroForm .g-recaptcha'), 'empty', 'Demuestra que eres humano'); } return registro.show_status($('#RegistroForm .g-recaptcha'), 'ok', 'OK'); break; } },  
       
      Buscar:
      case 'recaptcha': //reCAPTCHA registro.change_paso(2, true); registro.show_status($('#RegistroForm #recaptcha_response_field'), 'error', h.substring(strpos(h, ':')+2)); break;
         
      Cambiar por:
      case 'recaptcha': //reCAPTCHA registro.change_paso(2, true); registro.show_status($('#RegistroForm .g-recaptcha'), 'error', h.substring(strpos(h, ':') + 2)); break;

      t.registro.tpl --> default/templates/t.registro.tpl
      t.registro.tpl --> V6/templates/t.registro.tpl    
          
       Buscar:
      <div class="form-line"> <label for="recaptcha_response_field">Ingresa el código de la imagen</label> <div id="recaptcha_ajax"> <div id="recaptcha_image"></div> <input type="text" id="recaptcha_response_field" name="recaptcha_response_field" /> </div> <div class="help recaptcha" id="nubex"><span id="puy"></span><span><em></em></span></div> </div>  

      Cambiar por:
      <div class="form-line"> <label>Confirme humanidad:</label> <div class="g-recaptcha" data-sitekey="{$tsConfig.pkey}"></div> <div class="help"><span><em></em></span></div> </div>
         
      Buscar:
      <script type="text/javascript"> // $.getScript("{$tsConfig.js}/registro.js{literal}", function(){ //Seteo el pais seleccionado //registro.datos['pais']='MX'; //registro.datos_status['pais']='ok'; //registro.datos_text['pais']='OK'; // registro.change_paso(1); //Genero el autocomplete de la ciudad /*$('#RegistroForm .pasoDos #ciudad').autocomplete('/registro-geo.php', { minChars: 2, width: 298 }).result(function(event, data, formatted){ registro.datos['ciudad_id'] = (data) ? data[1] : ''; registro.datos['ciudad_text'] = (data) ? data[0].toLowerCase() : ''; if(data) $('#RegistroForm .pasoDos #terminos').focus(); });*/ mydialog.procesando_fin(); }); //Load recaptcha $.getScript("http://www.google.com/recaptcha/api/js/recaptcha_ajax.js", function(){ Recaptcha.create('6LcXvL0SAAAAAPJkBrro96lnXGZ56TBRExEmVM3L', 'recaptcha_ajax', { theme:'custom', lang:'es', tabindex:'13', custom_theme_widget: 'recaptcha_ajax', callback: function(){ $('#recaptcha_response_field').blur(function(){ registro.blur(this); }).focus(function(){ registro.focus(this); }).attr('title', 'Ingrese el código de la imagen'); } }); }); </script>

      Cambiar por:       
      <script type="text/javascript"> // $.getScript("{$tsConfig.js}/registro.js{literal}", function(){ //Seteo el pais seleccionado //registro.datos['pais']='MX'; //registro.datos_status['pais']='ok'; //registro.datos_text['pais']='OK'; // registro.change_paso(1); //Genero el autocomplete de la ciudad /*$('#RegistroForm .pasoDos #ciudad').autocomplete('/registro-geo.php', { minChars: 2, width: 298 }).result(function(event, data, formatted){ registro.datos['ciudad_id'] = (data) ? data[1] : ''; registro.datos['ciudad_text'] = (data) ? data[0].toLowerCase() : ''; if(data) $('#RegistroForm .pasoDos #terminos').focus(); });*/ mydialog.procesando_fin(); }); </script> <script src="https://www.google.com/recaptcha/api.js" async defer></script> <script type="text/javascript"> $.getScript("{$tsConfig.js}/registro.js{literal}", function(){ registro.change_paso(1); mydialog.procesando_fin(); }); </script>

       m.admin_configs.tpl     --> default/templates/admin_mods/m.admin_configs.tpl            
       m.admin_configs.tpl     --> V6/templates/admin_mods/m.admin_configs.tpl    
              
      Buscar:   
      <dl> <dt><label for="ai_xat">Xat ID:</label><br /><span>Por defecto puedes agregar un chat de <a href="http://xat.com">Xat</a> para tu web, solo crea tu grupo he ingresa el nombre.</span></dt> <dd><input type="text" id="ai_xat" name="xat" maxlength="20" value="{$tsConfig.xat_id}" /> </dd> </dl> <hr />  

      Añadir debajo:
      <dl> <dt> <label for="pkey">reCaptcha pública</label> <br /><span>Clave pública de <a href="https://www.google.com/recaptcha/admin">reCatpcha</a>.</span> </dt> <dd> <input type="text" id="pkey" name="pkey" value="{$tsConfig.pkey}" /> </dd> </dl> <dl> <dt> <label for="skey">reCaptcha secreta</label> <br /><span>Clave privada de <a href="https://www.google.com/recaptcha/admin">reCatpcha</a>.</span> </dt> <dd> <input type="text" id="skey" name="skey" value="{$tsConfig.skey}" /> </dd> </dl> <hr />  
       
       
      Y con eso ya la tienen funcionando,saludos.


       
       
       
       
       

              
           
       
    • By Miguel92
      Bueno estamos aquí reunidos para realizar una actualización del registro jajaja
       
      este es el registro que actualizaremos
       
      Para realizar estos cambios debes descargar el archivo, está subido a MEGA
      Registro-recaptchav2-2018.rar
       
      Luego hacer estos pasos
      1 - Buscar en templates/sections/head_menu.tpl estas líneas
                      <li class="tabbed registrate">                     <a title="Registrate!" onclick="registro_load_form(); return false" href=""><b>Registrate!</b></a>                 </li>
      y la deben reemplazar por
                      <li class="tabbed registrate">                     <a title="Registrate!" href="{$tsConfig.url}/registro/"><b>Registrate!</b></a>                 </li>  
      2 - Al tener 2 archivos registro.css y registro.min.css el script automáticamente usará el registro.css, si quieren usar el minificado solo deben cambiar el nombre o agregarlo al fichero de t.registro.tpl, pero en ese caso estaría usando los 2 archivos del registro por lo que deben eliminar "registro.css"
       
      3 - de hecho es eso solo, no hay más pasos que esperabas jajaja solo mira el tutorial si quieres! pd: Si quieres ver una demo del registro, solo mira el video!
       
      Nota personal: Tal vez los videos sean una porquería, pero lo que me interesa es que sepan como hacerlo sin importar la calidad de los videos, lo cual es solo para explicar de una manera mejor y porque mi pc es una mierda jajaja al ser all-in-one no se le puede hacer mucho, ni siquiera se puede agregar algo a la placa!
       
      Ver video tutorial
      las pestañas que se ven casi al final del video es que estaba buscando nuevos diseños para el formulario lastimosamente no encontré así que le mande fruta jajajaja, los inputs de radio use los mismos que tengo en la versión de mozzfire
    • By Miguel92
      Es es el Mod original por @Vellenger
       
      1 - Para las visitas en inc/class/c.posts.php buscamos:
              // AGREGAMOS A VISITADOS... PORTAL         if($tsCore->settings['c_allow_portal']){ y arriba agregaremos
          /* Actualizado 25/04/2018 */     $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(id) as total FROM w_visitas');     $data = db_exec('fetch_assoc', $query);        $time = time() - 1440*60;         if($data['total']>100){             db_exec(array(__FILE__, __LINE__), 'query', 'DELETE FROM w_visitas WHERE  date < \''.$time.'\' ');         }     /* Actualizado 25/04/2018 */  
      2 - Para las sesiones en inc/class/c.user.php buscamos:
              // Establecemos la cookie         $this->set_cookie('sid', $this->ID, $this->sess_expiration); y debajo pegamos
              /* Actualizado 25/04/2018 */         $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(session_user_id) as total FROM u_sessions');         $data = db_exec('fetch_assoc', $query);             if($data['total']>100){                 $time = time() - 1440*60;                 db_exec(array(__FILE__, __LINE__), 'query', 'DELETE FROM u_sessions WHERE  session_time < \''.$time.'\' ');             }         /* Actualizado 25/04/2018 */  
      Si ya estaba pido disculpas, porque no lo he visto!
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Patrocinador



  • ×