ارجو تعريب هذا المرفق
المشرف: alhitary
???? ????? ??? ??????
?????? ???? ????? ?????? ?????? ????? ??????
كود: تحديد الكل
##############################################################
## MOD Title: Current Activities Bar
## MOD Author: Zap < runemoennike@hotmail.com > (Rune A. Juel m?nnike) http://qbasic.tk/
## MOD Description: Adds a bar at top of every page, that admins can use to inform users of what's
## currently going on at the site. Admins can easily change/add new activities by clicking a link
## beside the activity that only admins can see. Every activity links to a page that admins
## decides.
## MOD Version: 1.0.0
##
## Installation Level: (Easy)
## Installation Time: 2 Minutes
##
## Files To Edit:
## ./includes/page_header.php
## ./templates/[your_template]overall_header.tpl
##
## Included Files:
## edit_activity.php
## activity.txt
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
## This mod uses one flat file, activities.txt, that it stores the entry in. If you wan't to use
## DB instead, you'll need the knowledge, and to edit the files ./includes/page_header.php and
## ./templates/[your_template]/edit_activity.php.
##
## I plan on adding javaScript for opening the editing window soon, so I can control the size.
##
## NOTE: If your server is a UNIX like, you need to CHMOD activities.txt 666, or you'll not
## be able to edit the activities.
##
## NOTE #2: Replace 'subSilver' with the name(s) of the dir that your template(s) reside in.
##
##############################################################
## MOD History:
##
## 2004-04-12 - Version 1.0.0
## - Release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ COPY ]------------------------------------------
#
copy activities.txt to mods/actibar/activities.txt
copy edit_activities.php to mods/actibar/edit_activities
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
//
// The following assigns all _common_ variables that may be used at any point
// in a template.
//
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// Generate Current Activities Bar HTML code
//
$nr = 0;
$acti_bar_html = '';
// NOTE: You need to change this line below if the file isn't placed in that path.
$handle=fopen("./mods/actibar/activities.txt","r");
while (!feof($handle))
{
list($msg,$link)=split('``',fgets($handle,1024));
$acti_bar_html .= ': <a href="'.$link.'">'.$msg.'</a>';
if ( $userdata['user_level'] == ADMIN )
{
$acti_bar_html .= '<a href="mods/actibar/edit_activity.php?nr='.$nr.'" target="_blank">[edit]</a>';
}
$acti_bar_html .= ' :';
$nr++;
}
fclose($handle);
#
#-----[ FIND ]------------------------------------------
#
'NAV_LINKS' => $nav_links_html)
#
#-----[ REPLACE WITH ]------------------------------------------
#
'NAV_LINKS' => $nav_links_html,
'ACTIVITIES' => $acti_bar_html)
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
// End of File <- You won't find this, but end of script.
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// You should at this at the place you want, in the template you want.
// Adding here will show it at top of everypage, below navigation bar and logo.
<center><span class="gensmall"><b>Current activities:</b>
{ACTIVITIES}
</span></center>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
الموجودون الآن
المتصفحون للمنتدى الآن: لا يوجد أعضاء مسجلين متصلين و 10 زوار