Herhangi bir kodu sadece adminlere gösterin

Eklentiler ile ilgili gelişmeler. Yeni modlar, güncellemeler.

Herhangi bir kodu sadece adminlere gösterin

İleti Sergeant Orion 19.05.2006, 10:27

Kod: Tümünü seç
###############################################
##   Hack Title:   Admin Only View
##   Hack Version:   1.0.0
##   Author:      Majorflam <majorflam@blueyonder.co.uk>
##   Description:  This hack allows you to place switches between code in any tpl file. When the
##                 page is generated, only administrators may see the code that is between the switches.
##
##
##
##   Compatibility:   2.0.6 - 2.0.10
##
##   Installation Level: Easy
##   Installation Time: 1 minute
##   Files To Edit: <2>
##       
##      includes/page_header.php 
##      templates/subSilver/**file_you_want_to_place_swicth_in**.tpl
##
##   Included Files: <none>
##
##   History:
##      Version 1.0.0: First Release 
##
##   Author Notes:
##      N.B. Please back-up all files related to this Mod, before attempting any edits.
##
##   Support:        http://www.majormod.com/viewforum.php?f=8
##   Copyright:      ©2004 Admin Only View Mod 1.0.0 - Majorflam
##
###############################################
##   You downloaded this hack from phpBBHacks.com, the #1 source for phpBB related downloads.
##   You may also visit http://www.phpbbhacks.com/forums for support.
###############################################
##
###############################################
##   This hack is released under the GPL License.
##   This hack can be freely used, but not distributed, without permission.
##   Intellectual Property is retained by the hack author(s) listed above.   
###############################################

adminler için
[syntax="php"]#
#-----[ AÇ ]------------------------------------------
#

includes/page_header.php

#
#-----[ BUL ]------------------------------------------
#

$template->assign_block_vars('switch_user_logged_in', array());

#
#-----[ SONRASINA EKLE ]------------------------------------------
#

// Admin Only View Mod
if ( $userdata['user_level'] == ADMIN )
{
$template->assign_block_vars('switch_admin_view_only', array());
}
// Admin Only View Mod

#
#-----[ AÇ ]------------------------------------------
#
#
# templates/subSilver/**file_you_want_to_place_swicth_in**.tpl

#
#-----[ BUL ]------------------------------------------
#
# Sadece adminlere görünmesini istediğiniz kod

#
#-----[ KODUN ÖNCESİNE EKLE ]------------------------------------------
#

<!-- BEGIN switch_admin_view_only -->

#
#-----[ KODUN SONRASINA EKLE ]------------------------------------------
#

<!-- END switch_admin_view_only -->


#
#-----[ KAYDET KAPAT ]--------------------------
#
#End [/syntax]

Modlar içinde, add by tecNo

[syntax="php"]#
#-----[ AÇ ]------------------------------------------
#

includes/page_header.php

#
#-----[ BUL ]------------------------------------------
#

// Admin Only View Mod
if ( $userdata['user_level'] == ADMIN )
{
$template->assign_block_vars('switch_admin_view_only', array());
}
// Admin Only View Mod

#
#-----[ SONRASINA EKLE ]------------------------------------------
#

// Mod Only View Mod add by tecNo [+]
if ( $userdata['user_level'] == MOD )
{
$template->assign_block_vars('switch_mod_view_only', array());
}
// Mod Only View Mod add by tecNo [-]

#
#-----[ AÇ ]------------------------------------------
#
#
# templates/subSilver/**file_you_want_to_place_swicth_in**.tpl

#
#-----[ BUL ]------------------------------------------
#
# Sadece modlara görünmesini istediğiniz kod

#
#-----[ KODUN ÖNCESİNE EKLE ]------------------------------------------
#

<!-- BEGIN switch_mod_view_only -->

#
#-----[ KODUN SONRASINA EKLE ]------------------------------------------
#

<!-- END switch_mod_view_only -->


#
#-----[ KAYDET KAPAT ]--------------------------
#
#End [/syntax]
Hail to the doat, baby!
Kullanıcı avatarı
Sergeant Orion
Üye
Üye
 
İleti: 588
Kayıt: 26.11.2005, 20:44
Konum: İstanbul

Duyurular & Güncellemeler



Kimler çevrimiçi

Bu forumu görüntüleyenler: Kayıtlı kullanıcı yok ve 0 misafir

cron