[MOD] Display User's Template Next to Posts in viewtopic.php

EftelyA

Yaşayan Forum Efsanesi
22 Kas 2007
9,097
59
EsEs
bu mod mesajlarda avatarın altında (tabi ayarınıza göre üstündede olabilir) kullanıcı stilini gösterir. birden fazla tema kullanan siteler için yararlı olabilir.





Kod:
##############################################################
## MOD Title: Display user's style in Viewtopic.php
## MOD Author: HaLo2FrEeEk < [email protected] > (Kirk Smith) http://claninfectionist.com/ 
## MOD Description: This mod will display the theme that a member is using under their avatar while viewing a topic.
## MOD Version: 1.0.1
## 
## Installation Level: Easy
## Installation Time: 5 Minutes
## Files To Edit: 2
##                  viewtopic.php
##                  templates/subSilver/viewtopic_body.tpl
## 
## Included Files: N/A
## 
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 
############################################################## 
## For security purposes, please check: http://www.phpbb.com/mods/ 
## for the latest version of this MOD. Although MODs are checked 
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which 
## can be found at http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes: 
## 
## There is some customization that will need to be
## done in Viewtopic_body.tpl It is really up to you
## where you want it to be placed.
############################################################## 
## MOD History: 
## 
##   2007-02-24 - Version 1.0.0
##      - Release Version.
## 
##############################################################  
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

# 
#-----[ OPEN ]------------------------------------------ 
# 

viewtopic.php

#
#-----[ FIND ]------------------------------------------
# 

u.user_allowavatar, u.user_allowsmile,

#
#-----[ IN-LINE FIND ]------------------------------------------
#

u.user_allowsmile,

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#

u.user_style,

#
#-----[ FIND ]------------------------------------------
#

        $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
        $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

#
#-----[ AFTER, ADD ]------------------------------------------
#


        //Start Display user's theme Hack
        //by HaLo2FrEeEk (http://claninfectionist.com/)
        $poster_theme = mysql_query('SELECT template_name FROM ' . THEMES_TABLE . ' WHERE themes_id = \''.$postrow[$i]['user_style'].'\'');
        $poster_style = mysql_result($poster_theme, 0);

#
#-----[ FIND ]------------------------------------------
#

                'POSTER_JOINED' => $poster_joined,
                'POSTER_POSTS' => $poster_posts,

#
#-----[ AFTER, ADD ]------------------------------------------
#

                'POSTER_THEME' => $poster_style,

#
#-----[ OPEN ]------------------------------------------
#

templates/subSilver/viewtopic_body.tpl

#
#-----[ FIND ]------------------------------------------
#

{postrow.POSTER_FROM}</span><br /></td>

#
#-----[ IN-LINE FIND ]------------------------------------------
#

{postrow.POSTER_FROM}

#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#

Style: {postrow.POSTER_THEME}<br />
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
 
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.