RGZ Gaming Forum


 
AcasaUltimele imaginiCăutareÎnregistrareConectare

Distribuiţi|

[Tutorial]Avatare in Top Five

Vezi subiectul anterior Vezi subiectul urmator In jos
AutorMesaj
Muffy
Membru
Muffy

Rank: Membru
Status:
Posturi : 265
Reputatie : 6
Data de Inscriere : 29/07/2014
[Tutorial]Avatare in Top Five   Empty

               
               


Inlocuieste cu :

Code:
                 
                   
                   


[Tutorial]Avatare in Top Five   C1HFd
MesajSubiect: [Tutorial]Avatare in Top Five [Tutorial]Avatare in Top Five   EmptyVin Aug 08, 2014 1:34 pm

Acest snippet permite MODificarii Top Five sa arate avatarul celui care a scris in subiect.

Deschideti includes/top_five.php

Cauta :
Code:
global $auth, $cache, $user, $db, $phpbb_root_path, $phpEx, $template;


Adauga dupa :
Code:
if (!function_exists('get_user_avatar'))
    {   
        include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
    }


Cauta :
Code:
'SELECT'   => 'u.user_id, u.username, u.user_colour, t.topic_title, t.forum_id, t.topic_last_post_id, t.topic_last_post_time, t.topic_last_poster_name',


Inlocuieste cu :
Code:
'SELECT'   => 'u.user_id, u.username, u.user_colour, u.user_avatar, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height, t.topic_title, t.forum_id, t.topic_last_post_id, t.topic_last_post_time, t.topic_last_poster_name',


Cauta :
Code:
$is_guest = $row['user_id'] != ANONYMOUS ? false : true;

Adauga dupa :
Code:
$user_avatar = ($row['user_avatar']) ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], ($row['user_avatar_width'] > $row['user_avatar_height']) ? 25 : (25 / $row['user_avatar_height']) * $row['user_avatar_width'], ($row['user_avatar_height'] > $row['user_avatar_width']) ? 25 : (25 / $row['user_avatar_width']) * $row['user_avatar_height']) : '';


Cauta :
Code:
'TOPIC_TITLE'    => $user->lang['IN'] . ' ' . $topic_title));


Inlocuieste cu :

Code:
'TOPIC_TITLE'    => '' . $user_avatar . '' . ' ' . $user->lang['IN'] . ' ' . $topic_title));


STERGE :
Code:
      // cache this data for ever, cache is purged when adding or deleting users
      $cache->put('_top_five_newest_users', $newest_users);


Cauta :
Code:
SELECT user_id, username, user_colour, user_regdate


Inlocuieste cu :
Code:
SELECT user_id, user_avatar, user_avatar_type, user_avatar_width, user_avatar_height,  username, user_colour, user_regdate


Cauta :
Code:
         $newest_users[$row['user_id']] = array(
            'user_id'            => $row['user_id'],
            'username'            => $row['username'],
              'user_colour'         => $row['user_colour'],
                'user_regdate'         => $row['user_regdate'],


Adauga dupa :

Code:
            'user_avatar'      => $row['user_avatar'],
            'user_avatar_type'   => $row['user_avatar_type'],
            'user_avatar_width'   => $row['user_avatar_width'],
            'user_avatar_height'   => $row['user_avatar_height'],


Cauta :
Code:
         'REG_DATE'         => $user->format_date($row['user_regdate']),
         'USERNAME_FULL'      => $username_string)


Adauga inainte :
Code:
          'USER_AVATAR'      => get_user_avatar($data['user_avatar'], $data['user_avatar_type'], $data['user_avatar_width'], $data['user_avatar_height']),
            'USER_AVATAR_THUMB'   => ($row['user_avatar']) ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], ($row['user_avatar_width'] > $row['user_avatar_height']) ? 25 : (25 / $row['user_avatar_height']) * $row['user_avatar_width'], ($row['user_avatar_height'] > $row['user_avatar_width']) ? 25 : (25 / $row['user_avatar_width']) * $row['user_avatar_height']) : '[Tutorial]Avatare in Top Five   Qg3Pd',


Cauta :
Code:
SELECT user_id, username, user_colour, user_posts


Inlocuieste cu :

Code:
SELECT user_id, user_avatar, user_avatar_type, user_avatar_width, user_avatar_height, username, user_colour, user_posts


Cauta :
Code:
         $user_posts[$row['user_id']] = array(
            'user_id'      => $row['user_id'],
                'username'      => $row['username'],
                'user_colour'   => $row['user_colour'],
            'user_posts'    => $row['user_posts'],


Adauga dupa :
Code:
            'user_avatar'      => $row['user_avatar'],
            'user_avatar_type'   => $row['user_avatar_type'],
            'user_avatar_width'   => $row['user_avatar_width'],
            'user_avatar_height'   => $row['user_avatar_height'],


Cauta :

Code:
         'S_SEARCH_ACTION'   => append_sid("{$phpbb_root_path}search.$phpEx", 'author_id=' . $row['user_id'] . '&sr=posts'),
         'POSTS'          => $row['user_posts'],
         'USERNAME_FULL'      => $username_string)


Adauga inainte :
Code:
         'USER_AVATAR'      => get_user_avatar($data['user_avatar'], $data['user_avatar_type'], $data['user_avatar_width'], $data['user_avatar_height']),
            'USER_AVATAR_THUMB'   => ($row['user_avatar']) ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], ($row['user_avatar_width'] > $row['user_avatar_height']) ? 25 : (25 / $row['user_avatar_height']) * $row['user_avatar_width'], ($row['user_avatar_height'] > $row['user_avatar_width']) ? 25 : (25 / $row['user_avatar_width']) * $row['user_avatar_height']) : '[Tutorial]Avatare in Top Five   Qg3Pd',


Deschideti top_five_body.html

Cauta :
Code:
               
{top_five_topic.NO_TOPIC_TITLE}{top_five_topic.TOPIC_TITLE}
  {top_five_topic.USERNAME_FULL}  {top_five_topic.LAST_TOPIC_TIME}
{top_five_active.USERNAME_FULL}
  {L_POSTS}: {top_five_active.POSTS}
{top_five_newest.USERNAME_FULL}
  {L_JOINED}: {top_five_newest.REG_DATE}
{top_five_topic.NO_TOPIC_TITLE}{top_five_topic.TOPIC_TITLE}
{top_five_topic.USERNAME_FULL} {top_five_topic.LAST_TOPIC_TIME}
{top_five_active.USER_AVATAR} {top_five_active.USER_AVATAR_THUMB}{top_five_active.USERNAME_FULL}
{L_POSTS}: {top_five_active.POSTS}
{top_five_newest.USER_AVATAR} {top_five_newest.USER_AVATAR_THUMB}{top_five_newest.USERNAME_FULL}
{L_JOINED}: {top_five_newest.REG_DATE}
Sus In jos

[Tutorial]Avatare in Top Five

Vezi subiectul anterior Vezi subiectul urmator Sus

Subiecte similare

-
t Adaugare avatare la Ajax Chat
t [Tutorial-Rgz]Half-Life Model Viewer + tutorial utilizare!
t Tutorial Photoshop Cs6-Tutorial Incepatori || Basic
t [TUTORIAL] MC 1.4.1
t [RGZ-TUTORIAL]
Pagina 1 din 1

Permisiunile acestui forum:Nu puteti raspunde la subiectele acestui forum
RGZ Gaming Forum  :: »[RGZ] Zona IT & Web :: Resurse, stiinta si tehnologie :: Platforme WEB :: PHPBB3 :: Tutoriale-