مودهاي سودمند phpBB ( آپدیت هفتگی )

وضعیت
موضوع بسته شده است.

Hyper

Active Member
¤ عنوان : جلوگيري از ارسال پستهاي تكراري يا disable multiple replies
¤ نويسنده : emrag
¤ شرح : از ارسال پست تكراري در تاپيك ها كه معمولا بدليل اشكال در سرويس هاي اينترنت بوجود مي آيد ، جلوگيري ميكند
¤ نسخه : 1.0.4
¤ سطح : آسان
¤ زمان نصب : 10 دقيقه
¤ فايل هاي مورد نياز : 4 فايل
¤ فايل هاي افزودني : 0 فايل
¤ تاريخ :
¤ منبع : http://www.phpbbhacks.com

نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


کد:
# 
#-----[ SQL ]------------------------------------------ 
# 
# you can use db_update_multi.php file instead of this code ;)
#

ALTER TABLE phpbb_posts ADD enable_multiple_replies TINYINT(1) unsigned default 0

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

posting.php

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

		$select_sql = ( !$submit ) ? ", t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig" : ;

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

, p.enable_smilies

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

, p.enable_multiple_replies

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

if ( !$board_config[allow_smilies] )
{
	$smilies_on = 0;
}
else
{
	$smilies_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS[disable_smilies]) ) ? 0 : TRUE ) : ( ( $userdata[user_id] == ANONYMOUS ) ? $board_config[allow_smilies] : $userdata[user_allowsmile] );
}

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

	$multiple_replies_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS[disable_multiple_replies]) ) ? 0 : TRUE ) : ( ( $userdata[user_id] == ANONYMOUS ) ? 1 : 1 );

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

				submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("", "", $username), str_replace("", "", $subject), str_replace("", "", $message), str_replace("", "", $poll_title), $poll_options, $poll_length);

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

, $smilies_on

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

, $multiple_replies_on

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

		$preview_message = stripslashes(prepare_message(addslashes(unprepare_message($message)), $html_on, $bbcode_on, $smilies_on, $bbcode_uid));

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

, $smilies_on

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

, $multiple_replies_on

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

			$bbcode_on = ( $post_info[enable_bbcode] ) ? true : false;
			$smilies_on = ( $post_info[enable_smilies] ) ? true : false;

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

			$multiple_replies_on = ( $post_info[enable_multiple_replies] ) ? true : false;

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

//
// Notify checkbox - only show if user is logged in
//
if ( $userdata[session_logged_in] && $is_auth[auth_read] )
{
	if ( $mode != editpost || ( $mode == editpost && $post_info[poster_id] != ANONYMOUS ) )
	{
		$template->assign_block_vars(switch_notify_checkbox, array());
	}
}

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

//
// Multiple replies - only show if mode = newtopic or edit
//
if ( $userdata[session_logged_in] )
{
	if ( $mode == editpost && $post_data[first_post] || ( $mode == newtopic && $post_info[poster_id] != ANONYMOUS ) )
	{
		$template->assign_block_vars(switch_multiple_replies_checkbox, array());
	}
}


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

	L_DISABLE_HTML => $lang[Disable_HTML_post], 
	L_DISABLE_BBCODE => $lang[Disable_BBCode_post], 

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

	L_DISABLE_MULTIPLE_REPLIES => $lang[Disable_Multiple_Replies],

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

	S_BBCODE_CHECKED => ( !$bbcode_on ) ? checked="checked" : , 
	S_SMILIES_CHECKED => ( !$smilies_on ) ? checked="checked" : , 

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

	S_MULTIPLE_REPLIES_CHECKED => ( !$multiple_replies_on ) ? checked="checked" : , 

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

includes/functions_post.php

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

function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$multiple_replies_on, &$attach_sig, &$bbcode_uid, &$post_username, &$post_subject, &$post_message, &$poll_title, &$poll_options, &$poll_length)


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

, &$smilies_on

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

, &$multiple_replies_on

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

		//
		// Flood control
		//
		$where_sql = ($userdata[user_id] == ANONYMOUS) ? "poster_ip = $user_ip" : poster_id =  . $userdata[user_id];
		$sql = "SELECT MAX(post_time) AS last_post_time
			FROM " . POSTS_TABLE . "
			WHERE $where_sql";
		if ($result = $db->sql_query($sql))
		{
			if ($row = $db->sql_fetchrow($result))
			{
				if (intval($row[last_post_time]) > 0 && ($current_time - intval($row[last_post_time])) < intval($board_config[flood_interval]))
				{
					message_die(GENERAL_MESSAGE, $lang[Flood_Error]);
				}
			}
		}

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

	//
	// allow multiple replies control
	//
	if (($userdata[user_level] != ADMIN OR $userdata[user_level] != MOD))
	{

		if($mode != editpost)
		{
			$sql = "SELECT enable_multiple_replies, topic_id
				FROM " . POSTS_TABLE . "
				WHERE topic_id = $topic_id
				LIMIT 1";
			if ($result = $db->sql_query($sql))
			{
				while ($row = $db->sql_fetchrow($result))
				{
					if ($row[enable_multiple_replies] == 0)
					{
						message_die(GENERAL_MESSAGE, "&Uuml;zgünüz tekrar mesaj g&ouml;nderemezsiniz");
					}
				}
				$db->sql_freeresult($result);
			}
		}
	}

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

	$sql = ($mode != "editpost") ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ($topic_id, $forum_id, " . $userdata[user_id] . ", $post_username, $current_time, $user_ip, $bbcode_on, $html_on, $smilies_on, $attach_sig)" : "UPDATE " . POSTS_TABLE . " SET post_username = $post_username, enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . " WHERE post_id = $post_id";

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

, enable_sig

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

, enable_multiple_replies

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

, $attach_sig

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

, $multiple_replies_on

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

, enable_smilies = $smilies_on

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

, enable_multiple_replies = $multiple_replies_on

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

language/lang_english/lang_main.php

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

?>

#
#----[ BEFORE, ADD ]------------------------------------------ 
#

$lang[Disable_Multiple_Replies] = جلوگيري از ارسال پست تكراري : ;

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

templates/subsilver/posting_body.tpl

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

		  <!-- BEGIN switch_smilies_checkbox -->
		  <tr> 
			<td> 
			  <input type="checkbox" name="disable_smilies" {S_SMILIES_CHECKED} />
			</td>
			<td><span class="gen">{L_DISABLE_SMILIES}</span></td>
		  </tr>
		  <!-- END switch_smilies_checkbox -->

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

		  <!-- BEGIN switch_multiple_replies_checkbox -->
		  <tr> 
			<td> 
			  <input type="checkbox" name="disable_multiple_replies" {S_MULTIPLE_REPLIES_CHECKED} />
			</td>
			<td><span class="gen">{L_DISABLE_MULTIPLE_REPLIES}</span></td>
		  </tr>
		  <!-- END switch_multiple_replies_checkbox -->

#
#-----[ SAVE ALL FILES/CLOSE ]------------------------------------------ 
#
# EoM
 

Hyper

Active Member
¤ عنوان : نمايش آخرين تاريخ حضور كاربر
¤ نويسنده : Nivisec
¤ شرح : در ليست كاربران عضو تاريخ و ساعت آخرين حضور كاربر را نمايش ميدهد
¤ نسخه : 1.2
¤ سطح : آسان
¤ زمان نصب : 5 دقيقه
¤ فايل هاي مورد نياز : 2 فايل
¤ فايل هاي افزودني : 0 فايل
¤ تاريخ :
¤ منبع : http://www.phpbbhacks.com

نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


کد:
# 
#-----[ OPEN ]------------------------------------------ 
# 
memberlist.php

#
#-----[ FIND ]------------------------------------------ 
#
	L_POSTS => $lang[Posts], 

#
#-----[ AFTER, ADD ]------------------------------------------ 
#   Change Last Visited to your desired language.
#
	L_LAST_VISITED => Last Visited, 

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

#
#-----[ AFTER, ADD ]------------------------------------------ 
#   Change Never on the end of the $last_visit_time = (!empty....
#   line to your desired language.
#
		$visit_time_sql = "SELECT user_lastvisit
			FROM " . USERS_TABLE . "
			WHERE user_id = " . $user_id . "
			LIMIT 1";

		if (!$visit_time_result = $db->sql_query($visit_time_sql))
		{
			message_die(GENERAL_ERROR, Error getting user last visit time, , __LINE__, __FILE__, $visit_time_sql);
		}

		$visit_time_row = $db->sql_fetchrow($visit_time_result);
		$last_visit_time = (!empty($visit_time_row[user_lastvisit])) ? create_date($lang[DATE_FORMAT], $visit_time_row[user_lastvisit], $board_config[board_timezone]) : Never;

#
#-----[ FIND ]------------------------------------------ 
#
			YIM => $yim,

#
#-----[ AFTER, ADD ]------------------------------------------ 
#
			LAST_VISIT_TIME => $last_visit_time,

# 
#-----[ OPEN ]------------------------------------------ 
# 
templates/subSilver/memberlist_body.tpl

#
#-----[ FIND ]------------------------------------------ 
#
	  <th class="thTop" nowrap="nowrap">{L_JOINED}</th>

#
#-----[ AFTER, ADD ]------------------------------------------ 
#
	  <th class="thTop" nowrap="nowrap">{L_LAST_VISITED}</th>

#
#-----[ FIND ]------------------------------------------ 
#
	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gensmall">{memberrow.JOINED}</span></td>

#
#-----[ AFTER, ADD ]------------------------------------------ 
#
	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gensmall">{memberrow.LAST_VISIT_TIME}</span></td>

#
#-----[ FIND ]------------------------------------------ 
#   If you have added other columns to your member list, this
#   will look different.  Just change the colspan="#" part to
#   be one greater if it isnt 8.  (ie if it is 10, change it
#   to 11).
#
	  <td class="catbottom" colspan="8" height="28">&nbsp;</td>

#
#-----[ REPLACE WITH ]------------------------------------------ 
#
	  <td class="catbottom" colspan="9" height="28">&nbsp;</td>

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
#
#End
 

Hyper

Active Member
¤ عنوان : نمايش آخرين تاريخ حضور كاربر در مشخصات فردي
¤ نويسنده : Nivisec
¤ شرح : در صفحه مشخصات فردي كاربر تاريخ و ساعت آخرين حضور كاربر را نمايش ميدهد
¤ نسخه : 1.2
¤ سطح : آسان
¤ زمان نصب : 5 دقيقه
¤ فايل هاي مورد نياز : 3 فايل
¤ فايل هاي افزودني : 0 فايل
¤ تاريخ :
¤ منبع : http://www.phpbbhacks.com

نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


کد:
# 
#-----[ OPEN ]------------------------------------------ 
# 
includes/usercp_viewprofile.php

#
#-----[ FIND ]------------------------------------------ 
#
$posts_per_day = $profiledata[user_posts] / $memberdays;

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

//
// MOD: Add Last User Visit Date to User Profiles
//
$last_visit_time = (!empty($profiledata[user_lastvisit])) ? create_date($board_config[default_dateformat], $profiledata[user_lastvisit], $board_config[board_timezone]) : $lang[Never];
//
// MOD: -END-
//

#
#-----[ FIND ]------------------------------------------
#
	L_AVATAR => $lang[Avatar], 

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

//
// MOD: Add Last User Visit Date to User Profiles
//
	L_LAST_VISITED => $lang[Last_Visited],
//
// MOD: -END-
//

#
#-----[ FIND ]------------------------------------------
#
	YIM => $yim,

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

//
// MOD: Add Last User Visit Date to User Profiles
//
	LAST_VISIT_TIME => $last_visit_time,
//
// MOD: -END-
//

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/profile_view_body.tpl

#
#-----[ FIND ]------------------------------------------
#
		<tr> 
		  <td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_INTERESTS}:</span></td>
		  <td> <b><span class="gen">{INTERESTS}</span></b></td>
		</tr>

#
#-----[ AFTER, ADD ]------------------------------------------
#
		<tr>
		  <td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_LAST_VISITED}:</span></td>
		  <td> <b><span class="gen">{LAST_VISIT_TIME}</span></b></td>
		</tr>

# 
#-----[ OPEN ]------------------------------------------ 
# 
language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------ 
#
//
// Thats all, Folks!
// -------------------------------------------------

#
#-----[ BEFORE, ADD ]------------------------------------------
#

//
// MOD: Add Last User Visit Date to User Profiles
//
$lang[Last_Visited] =  آخرين حضور  ;
$lang[Never] =  هرگز ;
//
// MOD: -END-
//

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
#End
 

Hyper

Active Member
¤ عنوان : نمايش تعداد تاپيك ها و پست هاي جديد يا Number of new posts and topics on index.php
¤ شرح : تعداد تاپيك ها و پست هاي جديد را در مقابل هر انجمن نمايش ميدهد

نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


کد:
#
#-----[ OPEN ]-----
#

index.php

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

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

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

                     if( $userdata[session_logged_in] ) 
                     { 
                        $sql = "SELECT COUNT(post_id) as total 
                           FROM " . POSTS_TABLE . " 
                           WHERE post_time >= " . $userdata[user_lastvisit] . " 
                           AND forum_id = " . $forum_id; 
                        $result = $db->sql_query($sql); 
                        if( $result ) 
                        { 
                           $row = $db->sql_fetchrow($result); 
                           $number_new_posts =  $row[total]; 
                        } 
                     } 
                      
                     if ( $number_new_posts != "1" ) 
                     { 
                        $temp = $number_new_posts; 
                        $number_new_posts = "(" . $temp . " new posts)"; 
                     } 
                     else 
                     { 
                        $temp = $number_new_posts; 
                        $number_new_posts = "(" . $temp . " new post)"; 
                     } 

                     if( $userdata[session_logged_in] ) 
                     { 
                        $sql2 = "SELECT COUNT(topic_id) as total 
                           FROM " . TOPICS_TABLE . " 
                           WHERE topic_time >= " . $userdata[user_lastvisit] . " 
                           AND forum_id = " . $forum_id; 
                        $result2 = $db->sql_query($sql2); 
                        if( $result2 ) 
                        { 
                           $row2 = $db->sql_fetchrow($result2); 
                           $number_new_topics =  $row2[total]; 
                        } 
                     } 
                      
                     if ( $number_new_topics != "1" ) 
                     { 
                        $temp = $number_new_topics; 
                        $number_new_topics = "(" . $temp . " new topics)"; 
                     } 
                     else 
                     { 
                        $temp = $number_new_topics; 
                        $number_new_topics = "(" . $temp . " new topic)"; 
                     }
							
		     if( !$userdata[session_logged_in] ) 
		     {
		     	$number_new_topics = "(0 new topics)";
		        $number_new_posts = "(0 new posts)";
		     }

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

                        MODERATORS => $moderator_list,

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

                        NUM_NEW_TOPICS => $number_new_topic, 
                        NUM_NEW_POSTS => $number_new_posts,

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

templates/subSilver/index_body.tpl

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

   <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td>

#
#-----[ REPLACE WITH ]-----
#

   <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}<br>{catrow.forumrow.NUM_NEW_TOPICS}<br>{catrow.forumrow.NUM_NEW_POSTS}</span></td>

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
 

Hyper

Active Member
¤ عنوان : نمايش امضا كاربر يا View Profile Sig
¤ شرح : امضا كاربر را در پروفايل نمايش ميدهد

نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


کد:
# 
#-----[ OPEN ]------------------------------------------ 
# 
includes/usercp_viewprofile.php

# 
#-----[ FIND ]------------------------------------------ 
# 
$search = <a href=" . $temp_url . "> . $lang[Search_user_posts] . </a>;

# 
#-----[ AFTER, ADD ]------------------------------------
# 
$user_sig = ;
if ( $profiledata[user_attachsig] && $board_config[allow_sig] )
{
    include($phpbb_root_path . includes/bbcode..$phpEx);
    $user_sig = $profiledata[user_sig];
    $user_sig_bbcode_uid = $profiledata[user_sig_bbcode_uid];
	if ( $user_sig !=  )
    {
        if ( !$board_config[allow_html] && $profiledata[user_allowhtml] )
       	{
       		$user_sig = preg_replace(#(<)([/]?.*?)(>)#is, "&lt;\2&gt;", $user_sig);
       	}
    	if ( $board_config[allow_bbcode] && $user_sig_bbcode_uid !=  )
   		{
   			$user_sig = ( $board_config[allow_bbcode] ) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace(/:[0-9a-z:]+]/si, ], $user_sig);
   		}
   		$user_sig = make_clickable($user_sig);

        if (!$userdata[user_allowswearywords])
        {
            $orig_word = array();
            $replacement_word = array();
            obtain_word_list($orig_word, $replacement_word);
            $user_sig = preg_replace($orig_word, $replacement_word, $user_sig);
        }
        if ( $profiledata[user_allowsmile] )
        {
            $user_sig = smilies_pass($user_sig);
        }
        $user_sig = str_replace("
", "
<br />
", $user_sig);
    }
    $template->assign_block_vars(switch_user_sig_block, array());
}

# 
#-----[ FIND ]------------------------------------------ 
# 
INTERESTS => ( $profiledata[user_interests] ) ? $profiledata[user_interests] : &nbsp;,

# 
#-----[ AFTER, ADD ]------------------------------------
# 
	L_SIGNATURE => $lang[Signature],
    USER_SIG => $user_sig,

    
# 
#-----[ OPEN ]------------------------------------------ 
# 
templates/subSilver/profile_view_body.tpl

# 
#-----[ FIND ]------------------------------------------ 
# 
		<tr> 
		  <td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_INTERESTS}:</span></td>
		  <td> <b><span class="gen">{INTERESTS}</span></b></td>
		</tr>

# 
#-----[ AFTER, ADD ]------------------------------------
# 
        <!-- BEGIN switch_user_sig_block -->
		<tr> 
		  <td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_SIGNATURE}:&nbsp;</span></td>
		  <td> <span class="postbody">{USER_SIG}</span></td>
		</tr>
        <!-- END switch_user_sig_block -->
        
# 
#-----[ SAVE/CLOSE ALL FILES ]-------------------------- 
# 
# EoM
 

Hyper

Active Member
¤ عنوان : نمايش آواتار كاربر يا Welcome & Avatar On phpBB Index
¤ شرح : آواتار كاربر را به همراه پيام خوش آمد در صفحه اصلي نمايش ميدهد

نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...

کد:
## EasyMod 0.0.9 compliant
############################################################## 
## MOD Title: Welcome & Avatar On phpBB Index
## MOD Author: AbelaJohnB < [email protected] > (John B. Abela) http://www.JohnAbela.Com/ 
## MOD Description: This MOD will place a welcome your_name and your avatar
##   (if you have one) within the who is online section of the index page.
##   If you do not have an avatar, it will display the default whosonline.gif
##
## MOD Version: 3.0.3
##
## Installation Level: Easy
## Installation Time: ~10 minutes
## Files To Edit: 
##                   index.php
##                   includes/functions.php
##                   language/lang_english/lang_main.php
##                   templates/subSilver/index_body.tpl
## Included Files: n/a
############################################################## 
## 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 MODs not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes:
## Copyright © John B. Abela, < [email protected] >
##
## I do not support my MODs anywhere except http://www.phpBB.com/ or my own site,
## (in full or partial format). If you intend to take my work and add to it, you must retain my
## above Copyright and notify me of your actions via email.
##
## ~ John B. Abela - (aka: AbelaJohnB) http://www.johnabela.com/  - [email protected]
##   Stop By And Sign My Guestbook If You Feel Like It :)
##############################################################
## MOD History:
##
##   2003-07-05 - Version 3.0.3
##      - Added new function to get users template (might be useful for other mod authors!)
##      - Made EasyMod 0.0.9 Compliant, as best as I can tell.
##
##   2003-06-21 - Version 3.0.2
##      - Bug Fix: $profiledata != $userdata <sigh>
##
##   2003-06-17 - Version 3.0.1
##      - Updated for phpBB 2.0.5
##
##   2003-06-09 - Version 3.0.0
##      - Rewrote for phpBB2.0.4+
##
##   2002-05-12 - Version 1.0.0
##      - Initial Release
##############################################################
## MOD Localisation:
##
##  N/A
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

# 
#-----[ OPEN ]------------------------------------------ 
# 
index.php

# 
#-----[ FIND ]------------------------------------------ 
# 
	$template->set_filenames(array(
		body => index_body.tpl)
	);


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

    //
    // START MOD: Avatar On Index  - AbelaJohnB
    //
    $avatar_img = ;
    if ( $userdata[user_avatar_type] && $userdata[user_allowavatar] )
    {
        switch( $userdata[user_avatar_type] )
        {
            case USER_AVATAR_UPLOAD:
                $avatar_img = ( $board_config[allow_avatar_upload] ) ? <img src=" . $board_config[avatar_path] . / . $userdata[user_avatar] . " alt="" border="0" /> : ;
                break;
            case USER_AVATAR_REMOTE:
                $avatar_img = ( $board_config[allow_avatar_remote] ) ? <img src=" . $userdata[user_avatar] . " alt="" border="0" /> : ;
                break;
            case USER_AVATAR_GALLERY:
                $avatar_img = ( $board_config[allow_avatar_local] ) ? <img src=" . $board_config[avatar_gallery_path] . / . $userdata[user_avatar] . " alt="" border="0" /> : ;
                break;
        }
    }
    if ($avatar_img == )
    {
        //
        // Set up style
        //
        if ( !$board_config[override_user_style] )
        {
            if ( $userdata[user_id] != ANONYMOUS && $userdata[user_style] > 0 )
            {
                $template_name = get_template_name($board_config[default_style]);
                $avatar_img = <img src=". $phpbb_root_path . templates/ . $template_name . /images/whosonline.gif" >;
            }
        }
        else
        {
            $avatar_img = <img src="templates/subSilver/images/whosonline.gif" >;
        }
    }
    // Check For Anonymous User
    if ($userdata[user_id] != -1)
    {
        $name_link = <a href=" . append_sid("profile.$phpEx?mode=editprofile&amp;amp;" . $userdata[user_id]) . " /> . $userdata[username] . </a>;
    }
    else
    {
        $name_link = $lang[Guest];
    }
    //
    // END MOD: Avatar On Index  - AbelaJohnB
    //

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

FORUM_LOCKED_IMG => $images[forum_locked],


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

        //
        // START MOD: Avatar On Index  - AbelaJohnB
        //
        L_NAME_WELCOME => $lang[Welcome],
        U_NAME_LINK => $name_link,
        AVATAR_IMG => $avatar_img,
        //
        // END MOD: Avatar On Index  - AbelaJohnB
        //

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

includes/functions.php

# 
#-----[ FIND ]------------------------------------------ 
# 
function encode_ip($dotquad_ip)

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 

//
// START MOD: Avatar On Index  - AbelaJohnB
//
//
// Get Template Value
//
function get_template_name($style)
{
	global $db, $board_config, $template, $images, $phpbb_root_path;

	$sql = "SELECT template_name 
		FROM " . THEMES_TABLE . "
		WHERE themes_id = $style";
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(CRITICAL_ERROR, Could not query database for theme info);
	}

	if ( !($row = $db->sql_fetchrow($result)) )
	{
		message_die(CRITICAL_ERROR, "Could not get theme data for themes_id [$style]");
	}
	$template_name = $row[template_name] ;

	return $template_name;
}
//
// END MOD: Avatar On Index  - AbelaJohnB
//

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

language/lang_english/lang_main.php

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

$lang[Welcome_subject] = Welcome to %s Forums; // Welcome to my.com forums

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 

//
// START MOD: Avatar On Index  - AbelaJohnB
//
$lang[Welcome] = "خوش آمديد"; // Welcome
//
// END MOD: Avatar On Index  - AbelaJohnB
//

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

templates/subSilver/index_body.tpl

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

	<td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

<!--
	<td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
 -->
	<td class="row1" align="center" valign="middle" rowspan="2"><span class="mainmenu">{L_NAME_WELCOME}</span><BR /><span class="mainmenu">{U_NAME_LINK}</span><BR /><BR />{AVATAR_IMG}</td>


# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
 

Hyper

Active Member
¤ عنوان : نمايش رتبه كاربران در ليست اعضا يا Rank in memberlist
¤ شرح : رتبه كاربران به همراه Rank را در ليست اعضا نمايش ميدهد

نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...

کد:
############################################################## 
## MOD Title: Rank in memberlist
## MOD Author: netclectic < [email protected] > (Adrian Cockburn) http://www.netclectic.com 
## MOD Description: Adds users rank to memberlist 
## MOD Version: 1.0.2
## 
## Installation Level: easy
## Installation Time: 5 Minutes 
## Files To Edit: (2) memberlist.php, memberlist_body.tpl
## Included Files: n/a
############################################################## 
## 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 MODs not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/
############################################################## 
## MOD History:
##
##     2003-08-23  - Version 1.0.2
##          - Confirmed on 2.0.6
##
##     2003-01-01  - Version 1.0.1
##          - Fix problem with location of code added to memberlist.php
##
##     2002-01-01  - Version 1.0.0
##          - Original release
##
############################################################## 
## Author Notes: 
##  
##      Updated from old mod - original author unknown
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

# 
#-----[ OPEN ]------------------------------------------ 
#
memberlist.php

# 
#-----[ FIND ]------------------------------------------ 
#
L_ICQ => $lang[ICQ],

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
   // MOD RANK MEMBERLIST BEGIN 
   L_USER_RANK => $lang[Poster_rank], 
   // MOD RANK MEMBERLIST END 
 
# 
#-----[ FIND ]------------------------------------------ 
#
	default:
		$order_by = "user_regdate $sort_order LIMIT $start, " . $board_config[topics_per_page];
		break;
}
 
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
// MOD RANK MEMBERLIST BEGIN 
$sql = "SELECT * 
   FROM " . RANKS_TABLE . " 
   ORDER BY rank_special, rank_min"; 
if ( !($result = $db->sql_query($sql)) ) 
{ 
   message_die(GENERAL_ERROR, "Could not obtain ranks information.", , __LINE__, __FILE__, $sql); 
} 
$ranksrow = array(); 
while ( $row = $db->sql_fetchrow($result) ) 
{ 
   $ranksrow[] = $row; 
} 
$db->sql_freeresult($result); 
// MOD RANK MEMBERLIST END 
 
 
# 
#-----[ FIND ]------------------------------------------ 
#
$sql = "SELECT username, user_id, user_viewemail,

# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
, user_allowavatar

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

# 
#-----[ FIND ]------------------------------------------ 
#
$posts = ( $row[user_posts] ) ? $row[user_posts] : 0; 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
      // MOD RANK MEMBERLIST BEGIN 
      $user_rank = ; 
      $rank_image = ; 
      if ( $row[user_rank] ) 
      { 
         for($j = 0; $j < count($ranksrow); $j++) 
         { 
            if ( $row[user_rank] == $ranksrow[$j][rank_id] && $ranksrow[$j][rank_special] ) 
            { 
               $user_rank = $ranksrow[$j][rank_title]; 
               $rank_image = ( $ranksrow[$j][rank_image] ) ? <img src=" . $images[rank] . $ranksrow[$j][rank_image] . " alt=" . $poster_rank . " title=" . $poster_rank . " border="0" /><br /> : ; 
            } 
         } 
      } 
      else 
      { 
         for($j = 0; $j < count($ranksrow); $j++) 
         { 
            if ( $row[user_posts] >= $ranksrow[$j][rank_min] && !$ranksrow[$j][rank_special] ) 
            { 
               $user_rank = $ranksrow[$j][rank_title]; 
               $rank_image = ( $ranksrow[$j][rank_image] ) ? <img src=" . $images[rank] . $ranksrow[$j][rank_image] . " alt=" . $poster_rank . " title=" . $poster_rank . " border="0" /><br /> : ; 
            } 
         } 
      } 
      // MOD RANK MEMBERLIST END 
 
# 
#-----[ FIND ]------------------------------------------ 
#
JOINED => $joined, 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#          // MOD RANK MEMBERLIST BEGIN 
         USER_RANK => $user_rank, 
         USER_RANK_IMG => $rank_image, 
         // MOD RANK MEMBERLIST END 
 
# 
#-----[ OPEN ]------------------------------------------ 
#
templates/subSilver/memberlist_body.tpl 

# 
#-----[ FIND ]------------------------------------------ 
# 
<th class="thTop" nowrap="nowrap">{L_USERNAME}</th> 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
<th class="thTop" nowrap="nowrap">{L_USER_RANK}</th> 

# 
#-----[ FIND ]------------------------------------------ 
# 
<td class="{memberrow.ROW_CLASS}" align="center"><span class="gen"><a href="{memberrow.U_VIEWPROFILE}" class="gen">{memberrow.USERNAME}</a></span></td>

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
<td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gensmall">{memberrow.USER_RANK_IMG}{memberrow.USER_RANK}</span></td> 

# 
#-----[ FIND ]------------------------------------------ 
# 
# BEWARE! other memberlist mods may have changed this
#
<td class="catBottom" colspan="8" height="28">&nbsp;</td>

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 
<td class="catBottom" colspan="9" height="28">&nbsp;</td>

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
 

Hyper

Active Member
¤ عنوان : جداسازي فهرست هاي انجمن ها يا Split Categories On Index
¤ شرح : فهرست انجمن هاي موجود در صفحه اول را از هم جدا مي كند

نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


کد:
############################################################## 
## MOD Title: Split Categories On Index
## MOD Author: DanielT < [email protected] > (Daniel Taylor) http://www.danielt.com 
## MOD Description: Splits up the category areas on your index page
## MOD Version: 1.0.2
## 
## Installation Level: easy
## Installation Time: ~1 Minutes 
## Files To Edit: index_body.tpl
## Included Files: n/a
############################################################## 
## 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 MODs not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes: n/a
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/index_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline"> 
  <tr> 
   <th colspan="2" class="thCornerL" height="25" nowrap="nowrap">&nbsp;{L_FORUM}&nbsp;</th> 
   <th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th> 
   <th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_POSTS}&nbsp;</th> 
   <th class="thCornerR" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th> 
  </tr> 
  <!-- BEGIN catrow --> 
  <tr> 
   <td class="catLeft" colspan="2" height="28"><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td> 
   <td class="rowpic" colspan="3" align="right">&nbsp;</td> 
  </tr> 
  <!-- BEGIN forumrow --> 
  <tr> 
   <td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td> 
   <td class="row1" width="100%" height="50"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br /> 
     </span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br /> 
     </span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td> 
   <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOPICS}</span></td> 
   <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.POSTS}</span></td> 
   <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td> 
  </tr> 
  <!-- END forumrow --> 
  <!-- END catrow --> 
</table>
#
#-----[ REPLACE WITH ]------------------------------------
#
<!-- BEGIN catrow --> 
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline"> 
  <tr> 
   <th colspan="2" class="thCornerL" height="25" nowrap="nowrap">&nbsp;{L_FORUM}&nbsp;</th> 
   <th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th> 
   <th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_POSTS}&nbsp;</th> 
   <th class="thCornerR" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th> 
  </tr> 
  <tr> 
   <td class="catLeft" colspan="2" height="28"><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td> 
   <td class="rowpic" colspan="3" align="right">&nbsp;</td> 
  </tr> 
  <!-- BEGIN forumrow --> 
  <tr> 
   <td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td> 
   <td class="row1" width="100%" height="50"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br /> 
     </span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br /> 
     </span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td> 
   <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOPICS}</span></td> 
   <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.POSTS}</span></td> 
   <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td> 
  </tr> 
  <!-- END forumrow -->
  </table>
  <br /> 
  <!-- END catrow -->
#
#-----[ SAVE/CLOSE ALL FILES ]---------------------------
# EoM
 

Hyper

Active Member
¤ عنوان : افزودن شكلك در عنوان يا Smilies in Topic Titles
¤ شرح : امكان افزودن شكلك ها در عنوان تاپيك ها را فراهم ميكند

نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...

کد:
############################################################## 
## MOD Title: Smilies in Topic Titles 
## MOD Author: Suisse < [email protected] > (Florian Segginger) http://www.techno-revelation.com
## MOD Description: Shows smilies in topic titles 
## MOD Version: 1.0.0 
## 
## Installation Level: Easy
## Installation Time: 5 Minutes 
## Files To Edit: viewforum.php, viewtopic.php 
## Included Files: n/a 
############################################################## 
## 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 MODs not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes: 
##	If you want to disable certain smilies because they are too big or just plain ugly,
##	you have to put
##	$topic_title = str_replace("code for smiley","",$$topic_title);
##	just before
##	$topic_title = smilies_pass($topic_title);	
##	In viewforum.php
##	You obviously have to change code for smiley with the actual bbcode of the smiley
##	Example:
##		$topic_title = str_replace(":)","",$topic_title);
############################################################## 
## MOD History: 
## 
##   2004-04-4 - Version 1.0.0 
##      - This is the first release
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php 

#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . includes/page_header..$phpEx);

#
#-----[ AFTER, ADD ]------------------------------------
#
//Parse smilies to display topic title
$topic_title = smilies_pass($topic_title);

#
#-----[ OPEN ]------------------------------------------
#
viewforum.php

#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . common..$phpEx);

#
#-----[ AFTER, ADD ]------------------------------------
#
//Request the bbcode parsing php page, so we dont call an undefined function ;)
include($phpbb_root_path . includes/bbcode. .$phpEx);

#
#-----[ FIND ]------------------------------------------
#
$topic_title = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i][topic_title]) : $topic_rowset[$i][topic_title];

#
#-----[ AFTER, ADD ]------------------------------------
#
//Parse smilies to show the title
//This is where you would put the code to disable certain smilies
$topic_title = smilies_pass($topic_title);

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
 

Hyper

Active Member
¤ عنوان : پست هاي امروز / ديروز يا Today At/Yesterday At
¤ شرح : در مورد پست هاي امروز و ديروز بجاي تاريخ اين كلمات را جايگزين مي كند

نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


کد:
############################################################## 
## MOD Title: Today At/Yesterday At
## MOD Author: netclectic < [email protected] > (Adrian Cockburn) http://www.netclectic.com 
## MOD Description: Will show Today At if the post was posted today 
##                  Will show Yesterday At if the post was posted yesterday
##
## MOD Version: 1.3.1
## 
## Installation Level: easy
## Installation Time: 10 Minutes 
## Files To Edit: (6) page_header.php, index.php, search.php, viewforum.php, viewtopic.php, lang_main.php
## Included Files: n/a
############################################################## 
## 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 MODs not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/
############################################################## 
## Author Notes: 
##
##  Original Author: blulegend
##  Update by netclectic to work on 2.0.4 & 2.0.6
## 
############################################################## 
## MOD History:
##
##  2003-12-15 - v1.3.1
##      - no change: confirmed as 2.0.6 compatible
##  2003-06-10 - v1.3.0
##      - updated for 2.0.4
##
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

#
#-----[ OPEN ]------------------------------
# 
includes/page_header.php 

# 
#-----[ FIND ]------------------------------------------ 
#  
//
// Parse and show the overall header.
//

#
#-----[ BEFORE, ADD ]-----------------------------------
# 
//
// MOD - TODAY AT - BEGIN
// PARSE DATEFORMAT TO GET TIME FORMAT 
//
$time_reg = ([gh][[:punct:][:space:]]{1,2}[i][[:punct:][:space:]]{0,2}[a]?[[:punct:][:space:]]{0,2}[S]?);
eregi($time_reg, $board_config[default_dateformat], $regs);
$board_config[default_timeformat] = $regs[1];
unset($time_reg);
unset($regs);

//
// GET THE TIME TODAY AND YESTERDAY
//
$today_ary = explode(|, create_date(m|d|Y, time(),$board_config[board_timezone]));
$board_config[time_today] = gmmktime(0 - $board_config[board_timezone] - $board_config[dstime],0,0,$today_ary[0],$today_ary[1],$today_ary[2]);
$board_config[time_yesterday] = $board_config[time_today] - 86400;
unset($today_ary);
// MOD - TODAY AT - END

#
#-----[ OPEN ]------------------------------
# 
index.php 

#
#-----[ FIND ]-----------------------------------
# 
$last_post = $last_post_time . <br />;

#
#-----[ REPLACE WITH ]-----------------------------------
# 

								// OLD
								// $last_post = $last_post_time . <br />;
								//
                                // MOD - TODAY AT - BEGIN
								//
								if ( $board_config[time_today] < $forum_data[$j][post_time])
								{ 
									$last_post = sprintf($lang[Today_at], create_date($board_config[default_timeformat], $forum_data[$j][post_time], $board_config[board_timezone])) . <br />; 
								}
								else if ( $board_config[time_yesterday] < $forum_data[$j][post_time])
								{ 
									$last_post = sprintf($lang[Yesterday_at], create_date($board_config[default_timeformat], $forum_data[$j][post_time], $board_config[board_timezone])) . <br />; 
								}
								else
								{ 
									$last_post = $last_post_time . <br />; 
								} 
                                // MOD - TODAY AT - END

#
#-----[ OPEN ]------------------------------
# 
search.php

#
#-----[ FIND ]-----------------------------------
# 
$post_date = create_date($board_config[default_dateformat], $searchset[$i][post_time], $board_config[board_timezone]);

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

			//
            // MOD - TODAY AT - BEGIN
			//
			if ( $board_config[time_today] < $searchset[$i][post_time])
			{ 
				$post_date = sprintf($lang[Today_at], create_date($board_config[default_timeformat], $searchset[$i][post_time], $board_config[board_timezone])); 
			}
			else if ( $board_config[time_yesterday] < $searchset[$i][post_time])
			{ 
				$post_date = sprintf($lang[Yesterday_at], create_date($board_config[default_timeformat], $searchset[$i][post_time], $board_config[board_timezone])); 
			}
            // MOD - TODAY AT - END

#
#-----[ FIND ]-----------------------------------
# 
$last_post_time = create_date($board_config[default_dateformat], $searchset[$i][post_time], $board_config[board_timezone]);

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

				//
                // MOD - TODAY AT - BEGIN
				//
				if ( $board_config[time_today] < $searchset[$i][post_time])
				{ 
					$last_post_time = sprintf($lang[Today_at], create_date($board_config[default_timeformat], $searchset[$i][post_time], $board_config[board_timezone])); 
				}
				else if ( $board_config[time_yesterday] < $searchset[$i][post_time])
				{ 
					$last_post_time = sprintf($lang[Yesterday_at], create_date($board_config[default_timeformat], $searchset[$i][post_time], $board_config[board_timezone])); 
				}
                // MOD - TODAY AT - END

#
#-----[ OPEN ]------------------------------
# 
viewforum.php 

#
#-----[ FIND ]-----------------------------------
# 
$last_post_time = create_date($board_config[default_dateformat], $topic_rowset[$i][post_time], $board_config[board_timezone]);

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

		//
        // MOD - TODAY AT - BEGIN
		//
		if ( $board_config[time_today] < $topic_rowset[$i][post_time])
		{ 
			$last_post_time = sprintf($lang[Today_at], create_date($board_config[default_timeformat], $topic_rowset[$i][post_time], $board_config[board_timezone])); 
		}
		else if ( $board_config[time_yesterday] < $topic_rowset[$i][post_time])
		{ 
			$last_post_time = sprintf($lang[Yesterday_at], create_date($board_config[default_timeformat], $topic_rowset[$i][post_time], $board_config[board_timezone])); 
		}
        // MOD - TODAY AT - END

#
#-----[ OPEN ]------------------------------
# 
viewtopic.php 

#
#-----[ FIND ]-----------------------------------
# 
$post_date = create_date($board_config[default_dateformat], $postrow[$i][post_time], $board_config[board_timezone]);

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

	//
    // MOD - TODAY AT - BEGIN
	//
	if ( $board_config[time_today] < $postrow[$i][post_time])
	{ 
		$post_date = sprintf($lang[Today_at], create_date($board_config[default_timeformat], $postrow[$i][post_time], $board_config[board_timezone])); 
	}
	else if ( $board_config[time_yesterday] < $postrow[$i][post_time])
	{ 
		$post_date = sprintf($lang[Yesterday_at], create_date($board_config[default_timeformat], $postrow[$i][post_time], $board_config[board_timezone])); 
	}
    // MOD - TODAY AT - END

#
#-----[ OPEN ]------------------------------
# 
language/lang_english/lang_main.php 

#
#-----[ FIND ]-----------------------------------
# 
?>

#
#-----[ BEFORE, ADD ]-----------------------------------
# 

// MOD - TODAY AT - BEGIN
$lang[Today_at] = "Today at %s"; // %s is the time
$lang[Yesterday_at] = "Yesterday at %s"; // %s is the time
// MOD - TODAY AT - END

# 
#-----[ SAVE/CLOSE ALL FILES ]-----------------------------------
# EoM
 

Hyper

Active Member
¤ عنوان : شرح تاپيك يا Topic Description
¤ شرح : درزمان ارسال موضوعات يك فيلد شرح مي افزايد

نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


کد:
##############################################################
## MOD Title: Topic Description
## MOD Author: Morpheus2matrix < [email protected] > (Lebrun Thomas) http://morpheus.2037.biz
## MOD Description: This MOD allow you to add a little description of the topic that you have posted
## MOD Version: 1.0.5
## Installation Level: Easy
## Installation Time: 10 min
## Files to Edit: posting.php,
##                functions_post.php,
##                viewforum.php,
##                lang_main.php,
##                posting_body.tpl,
##                viewforum_body.tpl
############################################################## 
## 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 MODs not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/
############################################################## 
## Author Notes:
##
##		A big thanks to FX :p
##
##############################################################
## MOD History: 
##
##   0.9.0. - Initial BETA release
##   0.9.1. - Now the Topic Desciption field appear only for a new topic
##   0.9.5. - Rewriting with a correct MOD Template
##   1.0.0. - Set status to FINAL
##   1.0.1. - Topic description only appear if the fiels topic_desc is not empty : thanks to DevFool
##   1.0.2. - Fix a bug when preview your subject : thanks to GilGraf
##   1.0.3. - Fix bugs in the How-To
##   1.0.4. - Fix other bugs
##          - Use include_once instead of include in viewforum.php to prevent conflict with other MODs (Ptirhiik)
##   1.0.5. - Fix MOD-Template bugs
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ SQL ]------------------------------------------
# remplace phpbb_ by the prefix of your tables
ALTER TABLE phpbb_topics ADD topic_desc varchar(255) DEFAULT  AFTER topic_title;
#
#-----[ OPEN ]------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------
#
$select_sql = ( !$submit ) ? ", t.topic_title, p.enable_bbcode,
#
#-----[ IN-LINE FIND ]------------------------------------------
#
t.topic_title,
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
t.topic_desc,
#
#-----[ FIND ]------------------------------------------
#
$subject = ( !empty($HTTP_POST_VARS[subject]) ) ? trim($HTTP_POST_VARS[subject]) : ;
#
#-----[ AFTER, ADD ]------------------------------------------
#
$topic_desc = ( !empty($HTTP_POST_VARS[topic_desc]) ) ? trim($HTTP_POST_VARS[topic_desc]) : ;
#
#-----[ FIND ]------------------------------------------
#
prepare_post($mode, $post_data, $bbcode_on, $html_on, $smilies_on,
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$poll_length
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, $topic_desc
#
#-----[ FIND ]------------------------------------------
#
submit_post($mode, $post_data, $return_message, $return_meta, $forum_id,
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$poll_length
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, str_replace("", "", $topic_desc)
#
#-----[ FIND ]------------------------------------------------
#
   $message = ( !empty($HTTP_POST_VARS[message]) ) ? htmlspecialchars(trim(stripslashes($HTTP_POST_VARS[message]))) : ;
#
#-----[ AFTER, ADD ]------------------------------------------
#
   $topic_desc = ( !empty($HTTP_POST_VARS[topic_desc]) ) ? htmlspecialchars(trim(stripslashes($HTTP_POST_VARS[topic_desc]))) : ;

#
#-----[ FIND ]------------------------------------------
#
else if ( $mode == quote || $mode == editpost )
   {
      $subject = ( $post_data[first_post] ) ? $post_info[topic_title] : $post_info[post_subject];
      $message = $post_info[post_text];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$topic_desc = $post_info[topic_desc];
#
#-----[ FIND ]------------------------------------------
#
$template->assign_block_vars(switch_not_privmsg, array());
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Enable the Topic Description MOD only if this is a new post
// or if you edit the fist post of a topic
//
if ( $mode == newtopic || ( $mode == editpost && $post_data[first_post] ) )
{
   $template->assign_block_vars(topic_description, array());
}
#
#-----[ FIND ]------------------------------------------
#
L_STYLES_TIP => $lang[Styles_tip],
#
#-----[ AFTER, ADD ]------------------------------------------
#
L_TOPIC_DESCRIPTION => $lang[Topic_description],
#
#-----[ FIND ]------------------------------------------
#
U_REVIEW_TOPIC => ( $mode == reply ) ? append_sid("posting.$phpEx?mode=topicreview&amp;" . POST_TOPIC_URL . "=$topic_id") : ,
#
#-----[ AFTER, ADD ]------------------------------------------
#
TOPIC_DESCRIPTION => $topic_desc,
#
#-----[ OPEN ]------------------------------------------
#
includes/functions_post.php
#
#-----[ FIND ]------------------------------------------
#
function prepare_post(&$mode, &$post_data, &$bbcode_on, &$html_on,
#
#-----[ IN-LINE FIND ]------------------------------------------
#
&$poll_length
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, &$topic_desc
#
#-----[ FIND ]------------------------------------------
#
	$error_msg .= (!empty($error_msg)) ? <br /> . $lang[Empty_subject] : $lang[Empty_subject];
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Check Topic Desciption
if ( !empty($topic_desc) )
   {
      $topic_desc = htmlspecialchars(trim($topic_desc));
   }
#
#-----[ FIND ]------------------------------------------
#
function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id,
#
#-----[ IN-LINE FIND ]------------------------------------------
#
&$poll_length
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, &$topic_desc
#
#-----[ FIND ]------------------------------------------
#
$sql  = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title,
#
#-----[ IN-LINE FIND ]------------------------------------------
#
"INSERT INTO " . TOPICS_TABLE . " (topic_title,
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
topic_desc,
#
#-----[ IN-LINE FIND ]------------------------------------------
#
VALUES ($post_subject,
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
$topic_desc,
#
#-----[ IN-LINE FIND ]------------------------------------------
#
"UPDATE " . TOPICS_TABLE . " SET topic_title = $post_subject,
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
topic_desc = $topic_desc,
#
#-----[ OPEN ]------------------------------------------
#
viewforum.php
#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . common..$phpEx);
#
#-----[ AFTER, ADD ]------------------------------------------
#
include_once($phpbb_root_path . includes/bbcode..$phpEx);
#
#-----[ FIND ]------------------------------------------
#
L_AUTHOR => $lang[Author],
#
#-----[ AFTER, ADD ]------------------------------------------
#
L_DESCRIPTION => $lang[Description],
#
#-----[ FIND ]------------------------------------------
#
U_VIEW_TOPIC => $view_topic_url)
                );
#
#-----[ AFTER, ADD ]------------------------------------------
#
                if ( !empty($topic_rowset[$i][topic_desc]))
                {
                    $topic_desc = $topic_rowset[$i][topic_desc];
                    $template->assign_block_vars(topicrow.switch_topic_desc, array(
                               TOPIC_DESCRIPTION => smilies_pass($topic_desc))
                    );
                }
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang[A_critical_error]

#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang[Topic_description] = شرح ;
$lang[Description] = شرح موضوع ;

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/posting_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
     <td class="row1" width="22%"><span class="gen"><b>{L_SUBJECT}</b></span></td>
     <td class="row2" width="78%"> <span class="gen">
      <input type="text" name="subject" size="45" maxlength="60" style="width:450px" tabindex="2" class="post" value="{SUBJECT}" />
      </span> </td>
   </tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN topic_description -->
   <tr>
     <td class="row1" width="22%"><span class="gen"><b>{L_TOPIC_DESCRIPTION}</b></span></td>
     <td class="row2" width="78%"> <span class="gen">
      <input type="text" name="topic_desc" size="45" maxlength="60" style="width:450px" tabindex="2" class="post" value="{TOPIC_DESCRIPTION}" />
      </span> </td>
   </tr>
   <!-- END topic_description -->
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewforum_body.tpl
#
#-----[ FIND ]------------------------------------------
#
{topicrow.TOPIC_TITLE}</a></span><span class="gensmall">
#
#-----[ AFTER, ADD ]------------------------------------------
#
              <!-- BEGIN switch_topic_desc -->
              {L_DESCRIPTION} : {topicrow.switch_topic_desc.TOPIC_DESCRIPTION}<br />
              <!-- END switch_topic_desc -->
#
#-----[ SAVE/CLOSE ALL FILES ]----------------------------------------
#
# EoM
 

Hyper

Active Member
¤ عنوان : اطلاعات آخرين ارسال يا Last post info
¤ شرح : در پايين صفحه اول اطلاعاتي در مورد آخرين ارسال انجمن ها نمايش ميدهد

نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


کد:
############################################################## 
## MOD Title: Last post info
## MOD Author: fredol < [email protected] > (fredol) http://phpbb.lovewithsmg.com/
## MOD Description: Add "Last post made by user on date/time" in whos online stats 
## MOD Version: 1.0.5
## 
## Installation Level: Easy
## Installation Time: 1 Minute 
## Files To Edit:	index.php
##			templates/subSilver/index_body.tpl
##			language/lang_english/lang_main.php
## Included Files:	n/a 
############################################################## 
## 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 MODs not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes:
##	the Get Viewable Forums part was made by zparta on one of his MOD, so thanks man! ;)
############################################################## 
## MOD History: 
## 
##   2004-11-22 - Version 1.0.5
##	- Major speed improvements thanks to CADTutor, thanks again :)
##
##   2004-11-02 - Version 1.0.4 
##	- Got sid back in place ;) but still working with #post
##
##   2004-10-29 - Version 1.0.3 
##	- Removed getting $auth since it had already been done, should improve speed ;)
##	- Removed use of append_sid() to get #post working all the time
##
##   2004-09-03 - Version 1.0.2 
##	- Added post title, which is now the link
##	- Fix: now shows the name for guests when available (and if not then Anonymous)
##
##   2004-07-02 - Version 1.0.1 
##	- Fix: little bug if no post was made
##	- Fix: little bug if a guest (non-registered user) had made the last post
##
##   2004-06-30 - Version 1.0.0 
##	- Submitted to the MOD-DB (no changes were made)
##
##   2004-06-02 - Version 0.0.2 
##      - add link to the post (thanks CTCNetwork)
##
##   2004-06-02 - Version 0.0.1 
##      - first version
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

# 
#-----[ OPEN ]----- 
# 
index.php
# 
#-----[ FIND ]----- 
# 
	//
	// Start output of page
	//
# 
#-----[ BEFORE, ADD ]----- 
# 
	//BEGIN-MOD:Last post info
	// Get Viewable Forums - made by zparta 
	if ( function_exists(get_auth_keys) ) {
		$keys = array();
		$keys = get_auth_keys(Root);
		$auth_view_forum_sql = ;
		for ($i=0; $i < count($keys[id]); $i++)
		{
			if ($tree[type][ $keys[idx][$i] ] == POST_FORUM_URL)
			{
				$auth_view_forum_sql .= (($auth_view_forum_sql != ) ? ,  : ) . $tree[id][ $keys[idx][$i] ];
			}
		}
		$auth_view_forum_sql = ($auth_view_forum_sql ==  ? (0) : ( . $auth_view_forum_sql . )); 
	}
	else
	{
		$auth_view_forum_sql = ; 
		for($i = 0; $i < $total_categories; $i++) 
		{ 
			$cat_id = $category_rows[$i][cat_id]; 
			$display_forums = false;
			for($j = 0; $j < $total_forums; $j++)
			{
				if ( $is_auth_ary[$forum_data[$j][forum_id]][auth_view] && $forum_data[$j][cat_id] == $cat_id ) 
				{ 
					$display_forums = true; 
					$auth_view_forum_sql .= ($auth_view_forum_sql ==  ?  : ,  ) . $forum_data[$j][forum_id]; 
				} 
			} 
		} 
		$auth_view_forum_sql = ($auth_view_forum_sql ==  ? (0) : ( . $auth_view_forum_sql . )); 
	}
	$sql = "SELECT p.post_id, p.post_username, pt.post_subject, p.post_time, u.user_id, u.username, t.topic_title
		FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt, " . TOPICS_TABLE . " t
		WHERE p.forum_id IN " . $auth_view_forum_sql . " AND p.poster_id = u.user_id
		AND pt.post_id = p.post_id AND t.topic_id = p.topic_id
		ORDER BY p.post_time DESC LIMIT 1"; 

	if ( !($result = $db->sql_query($sql)) ) 
	{ 
		message_die(GENERAL_ERROR, Could not query last post informations, , __LINE__, __FILE__, $sql); 
	} 

	if ($row = $db->sql_fetchrowset($result)) 
	{ 
		$db->sql_freeresult($result);
		$append_sid = ( !empty($SID) && !preg_match(#sid=#, $url) ) ? $SID . & : ;
		if ($row[0][user_id]>-1)
		{
			$last_post_info = sprintf($lang[last_post_info], <a href="profile..$phpEx.?.$append_sid.mode=viewprofile& . POST_USERS_URL . = . $row[0][user_id] . ">, $row[0][username], </a>, create_date($board_config[default_dateformat], $row[0][post_time], $board_config[board_timezone]), <a href="viewtopic..$phpEx.?.$append_sid. POST_POST_URL . = . $row[0][post_id] . # . $row[0][post_id] . ">, ( (empty($row[0][post_subject])) ? Re:  . $row[0][topic_title] : $row[0][post_subject] ), </a>);
		}
		else
		{
			$last_post_info = sprintf($lang[last_post_info], , ( (empty($row[0][post_username])) ? $row[0][username] : $row[0][post_username] ), , create_date($board_config[default_dateformat], $row[0][post_time], $board_config[board_timezone]), <a href="viewtopic..$phpEx.?.$append_sid . POST_POST_URL . = . $row[0][post_id] . # . $row[0][post_id] . ">, ( (empty($row[0][post_subject])) ? Re:  . $row[0][topic_title] : $row[0][post_subject] ), </a>);
		}
	} 
	else
	{
		$last_post_info = ;
	}
	
	//END-MOD:Last post info

# 
#-----[ FIND ]----- 
# 
	$template->assign_vars(array(
		TOTAL_POSTS => sprintf($l_total_post_s, $total_posts),
		TOTAL_USERS => sprintf($l_total_user_s, $total_users),
# 
#-----[ BEFORE, ADD ]----- 
# 
	//MODIF-MOD:Last post info, add: LAST_POST
# 
#-----[ FIND ]----- 
#
		NEWEST_USER => sprintf($lang[Newest_user], <a href=" . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$newest_uid") . ">, $newest_user, </a>), 
# 
#-----[ AFTER, ADD ]----- 
# 
		LAST_POST => $last_post_info, 
# 
#-----[ OPEN ]----- 
# 
templates/subSilver/index_body.tpl
# 
#-----[ FIND ]----- 
# 
	<td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}</span>
# 
#-----[ IN-LINE FIND ]----- 
# 
	{TOTAL_POSTS}
# 
#-----[ IN-LINE AFTER, ADD ]----- 
# 
, {LAST_POST}
# 
#-----[ OPEN ]----- 
# 
language/lang_english/lang_main.php
# 
#-----[ FIND ]----- 
# 
$lang[Newest_user] = The newest registered user is <b>%s%s%s</b>; // a href, username, /a 
# 
#-----[ AFTER, ADD ]----- 
# 
$lang[last_post_info] = Last post by <b>%s%s%s</b> on %s: %s%s%s; // a href, usernname, /a, post_time, a href, subject/title, /a
# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
 

Hyper

Active Member
¤ عنوان : نمايش آيكون در كنار تاپيك يا Post Icons
¤ شرح : به تاپيك ارسالي كاربر يك آيكون اضافه ميكند


نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...

دريافت :
کد:
http://www.phpbbhacks.com/download/1861
 

Hyper

Active Member
¤ عنوان : پيام خوش آمد يا Welcome Panel On Index
¤ شرح : در ابتداي صفحه اول پام خوش آمد به همراه اطلاعاتي ديگر مي افزايد


نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...

دريافت :
کد:
http://www.phpbbhacks.com/download/3710
 

Hyper

Active Member
¤ عنوان : انتخاب لوگو توسط ادمين يا Forum Logo Selector MOD
¤ شرح : در صفحه كنترل فروم امكان انتخاب و تغيير لوگوي phpBB را فراهم ميكند


نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...

کد:
######################################################## 
## MOD Title:		Forum Logo Selector MOD
## MOD Version:		1.0.0
## MOD Author:		Mac (Y.C. LIN) < [email protected] > http://endless-tw.net
##
## MOD Description:	This mod allow admin to select a logo use in overall_header 
##			in the admin control panel from a list of images
## 
## Installation Level:	Easy 
## Installation Time:	3 Minutes 
##
## Files To Edit:	5
##	admin/admin_board.php
##	language/lang_english/lang_admin.php
##	includes/page_header.php
##	templates/subSilver/admin/board_config_body.tpl
##	templates/subSilver/overall_header.tpl
##
## Included Files: 	2
##	images/logo/subBlack.gif
##	images/logo/subSilver.gif
##
################################################################# 
## 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 MODs not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes:
## 	Tested on phpBB 2.0.6, however, should work on all phpBB 2.0.x versions
############################################################## 
## MOD History: 
##
##   2004-01-20 - Version 1.0.0
##      - Initial Release
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
##############################################################
# 
#-----[ SQL ]------------------------------------------ 
#
# Remember to change the table prefix used on your database
INSERT INTO `phpbb_config` VALUES (logo_image_path, images/logo);
INSERT INTO `phpbb_config` VALUES (logo_image, subSilver.gif);
INSERT INTO `phpbb_config` VALUES (logo_image_w, 200);
INSERT INTO `phpbb_config` VALUES (logo_image_h, 91);

# 
#-----[ OPEN ]------------------------------------------ 
# 
language/lang_english/lang_admin.php

# 
#-----[ FIND ]------------------------------------------ 
#
//
// Thats all Folks!
// -------------------------------------------------

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
// Logo Selector MOD
$lang[Logo_settings] = Logo Setting;
$lang[Logo_explain] = Here you can set the folder path to your forum logos, the logo to be used and its display height and width.;
$lang[Logo_path] = Logo Storage Path;
$lang[Logo_path_explain] = Path under your phpBB root dir, e.g. images/logo;
$lang[Logo] = Choose a Logo;
$lang[Logo_dimensions] = Logo Dimensions;
$lang[Logo_dimensions_explain] = (Height x Width in pixels) ;

# 
#-----[ OPEN ]------------------------------------------ 
#  
admin/admin_board.php

# 
#-----[ FIND ]------------------------------------------ 
# 
$style_select = style_select($new[default_style], default_style, "../templates");


# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
// Logo Selector MOD
// Get all images in the logo directory
$dir = @opendir($phpbb_root_path . $new[logo_image_path]);
$count = 0;
while( $file = @readdir($dir) )
{
	if( !@is_dir(phpbb_realpath($phpbb_root_path . $new[logo_image_path] . / . $file)) )
	{
		if( preg_match(/(.gif$|.png$|.jpg|.jpeg)$/is, $file) )
		{
			$logo[$count] = $file; 
			$count++;
		}
	}
}
@closedir($dir);
// Logo ListBox
$logo_list = "";
for( $i = 0; $i < count($logo); $i++ )
{
	if ($logo[$i] == $new[logo_image])
		$logo_list .= <option value=" . $logo[$i] . " selected="selected"> . $logo[$i] . </option>; 
	else 
		$logo_list .= <option value=" . $logo[$i] . "> . $logo[$i] . </option>;
}

$logo_image = $new[logo_image];
$logo_width = $new[logo_image_w];
$logo_height = $new[logo_image_h];

# 
#-----[ FIND ]------------------------------------------ 
# 
	"L_ADMIN" => $lang[Acc_Admin], 


# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
	// Logo Selector MOD
	"L_LOGO_SETTINGS" => $lang[Logo_settings],
	"L_LOGO_EXPLAIN" => $lang[Logo_explain],
	"L_LOGO_PATH" => $lang[Logo_path], 
	"L_LOGO_PATH_EXPLAIN" => $lang[Logo_path_explain],
	"L_LOGO" => $lang[Logo],
	"L_LOGO_DIMENSIONS" => $lang[Logo_dimensions],
	"L_LOGO_DIMENSIONS_EXPLAIN" => $lang[Logo_dimensions_explain],
	// Logo Selector MOD

# 
#-----[ FIND ]------------------------------------------ 
# 
	"TIMEZONE_SELECT" => $timezone_select,

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
	// Logo Selector MOD
	"LOGO_PATH" => $new[logo_image_path],
	"LOGO_IMAGE_DIR" => $phpbb_root_path . $new[logo_image_path], 
	"LOGO_LIST" => $logo_list,
	"LOGO_IMAGE" => ($logo_image) ? $phpbb_root_path . $board_config[logo_image_path] ./ . $logo_image : ,
	"LOGO_WIDTH" => $new[logo_image_w],
	"LOGO_HEIGHT" => $new[logo_image_h],
	// Logo Selector MOD

# 
#-----[ OPEN ]------------------------------------------ 
#  
includes/page_header.php

# 
#-----[ FIND ]------------------------------------------ 
# 
	SITE_DESCRIPTION => $board_config[site_desc],

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
	// Logo Selector MOD
	LOGO => ($board_config[logo_image]) ? $phpbb_root_path . $board_config[logo_image_path] ./ . $board_config[logo_image] : ,
	LOGO_WIDTH => $board_config[logo_image_w],
	LOGO_HEIGHT => $board_config[logo_image_h],
	// Logo Selector MOD

# 
#-----[ OPEN ]------------------------------------------ 
#  
templates/subSilver/admin/board_config_body.tpl

# 
#-----[ FIND ]------------------------------------------ 
# 
<p>{L_CONFIGURATION_EXPLAIN}</p>

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
<script language="javascript" type="text/javascript">
<!--
function update_logo(newlogo)
{
	document.logo_image.src = "{LOGO_IMAGE_DIR}/" + newlogo;
}
//-->
</script>

# 
#-----[ FIND ]------------------------------------------ 
# 
	<tr>
		<td class="row1">{L_ENABLE_PRUNE}</td>
		<td class="row2"><input type="radio" name="prune_enable" value="1" {PRUNE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="prune_enable" value="0" {PRUNE_NO} /> {L_NO}</td>
	</tr>

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
	<tr>
		<th class="thHead" colspan="2">{L_LOGO_SETTINGS}</th>
	</tr>
	<tr>
		<td class="row2" colspan="2"><span class="gensmall">{L_LOGO_EXPLAIN}</span></td>
	</tr>
	<tr> 
	  <td class="row1">{L_LOGO_PATH}<br /><span class="gensmall">{L_LOGO_PATH_EXPLAIN}</span></td>
	  <td class="row2"><input class="post" type="text" size="20" maxlength="255" name="logo_image_path" value="{LOGO_PATH}" /></td>
	</tr>
	<tr>
		<td class="row1">{L_LOGO_DIMENSIONS}<br /><span class="gensmall">{L_LOGO_DIMENSIONS_EXPLAIN}</span></td>
		<td class="row2"><input class="post" type="text" size="3" maxlength="4" name="logo_image_h" value="{LOGO_HEIGHT}" /> x <input class="post" type="text" size="3" maxlength="4" name="logo_image_w" value="{LOGO_WIDTH}"></td>
	</tr>
	<tr> 
	  <td class="row1">{L_LOGO}</td>
	  <td class="row2"><select name="logo_image" onchange="update_logo(this.options[selectedIndex].value);">{LOGO_LIST}</select> &nbsp; <img name="logo_image" src="{LOGO_IMAGE}" border="0" width="{LOGO_WIDTH}" height="{LOGO_HEIGHT}"/> &nbsp;</td>
	</tr>

# 
#-----[ OPEN ]------------------------------------------ 
# 
templates/subSilver/overall_header.tpl

# 
#-----[ FIND ]------------------------------------------ 
# 
				<td><a href="{U_INDEX}"><img src="templates/subSilver/images/logo_phpBB.gif" border="0" alt="{L_INDEX}" vspace="1" /></a></td>

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 
				<td><a href="{U_INDEX}"><img src="{LOGO}" width="{LOGO_WIDTH}" height="{LOGO_HEIGHT}" border="0" alt="{L_INDEX}" vspace="1" /></a></td>

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 

# EoM
 

Hyper

Active Member
¤ عنوان : يادداشت شخصي يا Personal Notes
¤ شرح : امكان افزودن يادداشت شخصي كاربران را فراهم ميكند


نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...

دريافت :
کد:
http://www.phpbbhacks.com/download/1524
 

Hyper

Active Member
¤ عنوان : شماره پست ها يا post numbers
¤ شرح : شماره هر پست به همراه لينك دسترسي مستقيم به آن را نمايش ميدهد


نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...

کد:
############################################################## 
## MOD Title: post numbers 
## MOD Author: emrag < [email protected] > (Emrah Türkmen)  www.canver.net
## MOD Description: with this hack all messages will have a number.
##		    in all topics this number will start from one (1)
##		    when you click this number you will see this messages direct link.
##		    now when you want to show any messages to your friend send this link
##		    He/she will go direct to your showed message.
##
##
## MOD Version: 1.0.2
## 
## Installation Level: Easy
## Installation Time : ~5 minutes 
## Files to Edit: viewtopic.php
##		  includes/page_header.php
##		  language/lang_english/lang_main.php
##		  templates/subsilver/viewtopic_body.tpl
##		  templates/subsilver/overall_header.tpl
##
## Ýncluded Files: n/a
############################################################## 
##
## Author Note: i saw this feature in invision power boards and adapt it to phpBB ;)
## 
##############################################################
##
## MOD History: 11.02.2005 - 1.0.0
##		- First release
##
##		11.02.2005 - 1.0.1
##		- added a forgotten line ;)
##
##		11.02.2005 - 1.0.2
##		- fixed a bug
##
##############################################################
##
## Before Adding This Hack To Your Forum, You Should Back Up All Files Related To This Hack  
##
############################################################## 
# 
#-----[ OPEN ]------------------------------------------ 
# 

viewtopic.php

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

//
// Okay, lets do the loop, yeah come on baby lets do the loop
// and it goes like this ...
//
for($i = 0; $i < $total_posts; $i++)
{

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

	$post_number = $i+$start;
	$post_number = $post_number+1;
	$post_id = $postrow[$i][post_id];

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

		POST_DATE => $post_date,
		POST_SUBJECT => $post_subject,
		MESSAGE => $message,

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

		POST_NUMBER => $post_number,
		POST_ID => $post_id,

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

		L_MINI_POST_ALT => $mini_post_alt,

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

		L_POST => $lang[Post],

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

includes/page_header.php

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

	SITENAME => $board_config[sitename],
	SITE_DESCRIPTION => $board_config[site_desc],

#
#----[ BEFORE, ADD ]------------------------------------------ 
# 

	SERVER_NAME => $board_config[server_name],
	SCRIPT_PATH => $board_config[script_path],
	PHPEX => $phpEx,
	POST_POST_URL => POST_POST_URL,
	COPY => $lang[Copy],

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

language/lang_english/lang_main.php

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

?>

#
#----[ BEFORE, ADD ]------------------------------------------ 
# 

$lang[Copy] = Copy this messages direct link;

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

templates/subsilver/viewtopic_body.tpl

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

				<td width="100%"><a href="{postrow.U_MINI_POST}"><img src="{postrow.MINI_POST_IMG}" width="12" height="9" alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" border="0" /></a><span class="postdetails">{L_POSTED}: {postrow.POST_DATE}<span class="gen">&nbsp;</span>&nbsp; &nbsp;{L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td>

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

<td width="100%">

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

<span class="postdetails"><b>{postrow.L_POST}: <a onclick="link_to_post({postrow.POST_ID}); return false;" href="#">#{postrow.POST_NUMBER}</a></b></span>&nbsp; &nbsp;

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

templates/subsilver/overall_header.tpl

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

-->
</style>

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

<script language="Javascript" type="text/javascript">
<!--
function link_to_post(pid)
{
	temp = prompt( "{COPY}", "http://" + "{SERVER_NAME}" + "{SCRIPT_PATH}" + "viewtopic" + "." + "{PHPEX}" + "?" + "{POST_POST_URL}" + "=" + pid + "#" + pid );

	return false;
}
-->
</script>

#
#-----[ SAVE ALL FILES/CLOSE ]------------------------------------------ 
#
# EoM
 

Hyper

Active Member
¤ عنوان : جستجوي پيشرفته كاربر يا Advanced User Search
¤ شرح : امكان جستجوي كاربران با مولفه هاي مختلف توسط ادمين را فراهم ميكند


نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...

دريافت :
کد:
http://www.phpbbhacks.com/download/3958
 

Hyper

Active Member
¤ عنوان : نمايش آخرين حضور كاربر يا Add Last User Visit Date to User Profiles
¤ شرح : تاريخ و ساعت آخرين حضور كاربر را در مشخصات فردي نمايش ميدهد


نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...

کد:
##############################################################
# Title: Add Last User Visit Date to User Profiles
# Author: Thoul  [email protected]  http://darkmods.sourceforge.net
# Description: Display the last time the user visited in their profile.
# Version: 1.0.0
#
# Installation Level: Easy
# Installation Time: 5 Minutes
# Files To Edit: includes/usercp_viewprofile.php,
#     templates/subSilver/profile_view_body.tpl,
#     language/lang_english/lang_main.php
# Included Files: none
############################################################## 
# Authors Notes:
# See the readme.txt file for notes, including install and upgrade instructions, 
# okay? Okay.
############################################################## 
# BEFORE ADDING THIS TO YOUR FORUM, YOU SHOULD BACK UP ALL RELATED FILES.
############################################################## 

# 
#-----[ OPEN ]------------------------------------------ 
# 
includes/usercp_viewprofile.php

#
#-----[ FIND ]------------------------------------------ 
#
$posts_per_day = $profiledata[user_posts] / $memberdays;

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

//
// MOD: Add Last User Visit Date to User Profiles
//
$last_visit_time = (!empty($profiledata[user_lastvisit])) ? create_date($board_config[default_dateformat], $profiledata[user_lastvisit], $board_config[board_timezone]) : $lang[Never];
//
// MOD: -END-
//

#
#-----[ FIND ]------------------------------------------
#
	L_AVATAR => $lang[Avatar], 

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

//
// MOD: Add Last User Visit Date to User Profiles
//
	L_LAST_VISITED => $lang[Last_Visited],
//
// MOD: -END-
//

#
#-----[ FIND ]------------------------------------------
#
	YIM => $yim,

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

//
// MOD: Add Last User Visit Date to User Profiles
//
	LAST_VISIT_TIME => $last_visit_time,
//
// MOD: -END-
//

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/profile_view_body.tpl

#
#-----[ FIND ]------------------------------------------
#
		<tr> 
		  <td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_INTERESTS}:</span></td>
		  <td> <b><span class="gen">{INTERESTS}</span></b></td>
		</tr>

#
#-----[ AFTER, ADD ]------------------------------------------
#
		<tr>
		  <td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_LAST_VISITED}:</span></td>
		  <td> <b><span class="gen">{LAST_VISIT_TIME}</span></b></td>
		</tr>

# 
#-----[ OPEN ]------------------------------------------ 
# 
language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------ 
#
//
// Thats all, Folks!
// -------------------------------------------------

#
#-----[ BEFORE, ADD ]------------------------------------------
#

//
// MOD: Add Last User Visit Date to User Profiles
//
$lang[Last_Visited] = Last Visited;
$lang[Never] = Never;
//
// MOD: -END-
//

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
#End
 

Hyper

Active Member
¤ عنوان : نمايش آخرين حضور كاربر يا Add Last User Visit Date to Members List
¤ شرح : تاريخ و ساعت آخرين حضور كاربر را در ليست اعضا نمايش ميدهد


نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...

کد:
$Id: last_visit_date.txt,v 1.2 2003/07/03 12:10:25 nivisec Exp $
############################################### 
##   Hack Title:   Add Last User Visit Date to Members List
##                 (A phpBB2 Quickie)
##   Author:       Nivisec ([email protected])
##                 http://www.nivisec.com
##   Description:  Adds a new field in the members list that displays the date
##                 that the user last visited on.  "Never" will be displayed if
##                 the user has never logged in.
##
##   Compatibility:   2.0.x
## 
##   Support:      http://www.phpbbhacks.com/forums 
##   Copyright:      ©2003 Billy Sauls
## 
############################################### 
# 
#-----[ OPEN ]------------------------------------------ 
# 
memberlist.php

#
#-----[ FIND ]------------------------------------------ 
#
	L_POSTS => $lang[Posts], 

#
#-----[ AFTER, ADD ]------------------------------------------ 
#   Change Last Visited to your desired language.
#
	L_LAST_VISITED => Last Visited, 

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

#
#-----[ AFTER, ADD ]------------------------------------------ 
#   Change Never on the end of the $last_visit_time = (!empty....
#   line to your desired language.
#
		$visit_time_sql = "SELECT user_lastvisit
			FROM " . USERS_TABLE . "
			WHERE user_id = " . $user_id . "
			LIMIT 1";

		if (!$visit_time_result = $db->sql_query($visit_time_sql))
		{
			message_die(GENERAL_ERROR, Error getting user last visit time, , __LINE__, __FILE__, $visit_time_sql);
		}

		$visit_time_row = $db->sql_fetchrow($visit_time_result);
		$last_visit_time = (!empty($visit_time_row[user_lastvisit])) ? create_date($lang[DATE_FORMAT], $visit_time_row[user_lastvisit], $board_config[board_timezone]) : Never;

#
#-----[ FIND ]------------------------------------------ 
#
			YIM => $yim,

#
#-----[ AFTER, ADD ]------------------------------------------ 
#
			LAST_VISIT_TIME => $last_visit_time,

# 
#-----[ OPEN ]------------------------------------------ 
# 
templates/subSilver/memberlist_body.tpl

#
#-----[ FIND ]------------------------------------------ 
#
	  <th class="thTop" nowrap="nowrap">{L_JOINED}</th>

#
#-----[ AFTER, ADD ]------------------------------------------ 
#
	  <th class="thTop" nowrap="nowrap">{L_LAST_VISITED}</th>

#
#-----[ FIND ]------------------------------------------ 
#
	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gensmall">{memberrow.JOINED}</span></td>

#
#-----[ AFTER, ADD ]------------------------------------------ 
#
	  <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gensmall">{memberrow.LAST_VISIT_TIME}</span></td>

#
#-----[ FIND ]------------------------------------------ 
#   If you have added other columns to your member list, this
#   will look different.  Just change the colspan="#" part to
#   be one greater if it isnt 8.  (ie if it is 10, change it
#   to 11).
#
	  <td class="catbottom" colspan="8" height="28">&nbsp;</td>

#
#-----[ REPLACE WITH ]------------------------------------------ 
#
	  <td class="catbottom" colspan="9" height="28">&nbsp;</td>

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
#
#End
 
وضعیت
موضوع بسته شده است.

جدیدترین ارسال ها

بالا