[MOD] Otomatik başlık / Automatic Subject on Reply v1.0.0

EftelyA

Yaşayan Forum Efsanesi
22 Kas 2007
9,097
59
EsEs
Kod:
############################################################## 
## MOD Title: Automatic Subject on Reply
## MOD Author: drathbun < [email protected] > (Dave Rathbun)
## MOD Description: Simple mod to add a default subject on all post replies 
## MOD Version: 1.0.0
## 
## Installation Level: easy 
## Installation Time: 1 Minutes 
## Files To Edit: posting.php 
## Included Files: n/a 
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ 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/downloads/ 
############################################################## 
## Author Notes: 
## This very simple mod provides a default subject on all post replies
## It essentially duplicates the "Quote" function of a default subject.
## 2.0.4 compatible as written
## Installation Notes
## The "After, Add" operation is used in the mod notes because that's one of the
## available options. However, what you can really do is replace the line:
## $subject = '';
## with the "After, Add" code. The code will work if installed per these 
## instructions, so it should be compatible with any automatic mod installers. 
## But the reason for the mod instructions being written the way they are is 
## there are two instances of the line
##
## $subject = '';
##
## in the code. I had to provide enough lines to be specific. 
##
## 2.0.3 compatible with one additional edit, detailed here. You have to add the
## topic_title to the sql that retrieves the post info. In 2.0.4 this change has 
## already been made, and therefore is not included in the standard mod install 
## operations.
##
## OPEN posting.php
## FIND $sql = "SELECT f.*, t.topic_status
## IN-LINE AFTER, ADD , t.topic_title
##
## No language entries or template changes are required for this very simple mod.
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

# 
#-----[ AÇ ]------------------------------------------ 
# 
posting.php

# 
#-----[ BUL ]------------------------------------------ 
# 
        else if ( $mode == 'reply' )
        {
                $user_sig = ( $userdata['user_sig'] != '' ) ? $userdata['user_sig'] : '';

                $username = ( $userdata['session_logged_in'] ) ? $userdata['username'] : '';
                $subject = '';

# 
#-----[ SONRASINA EKLE ]------------------------------------------ 
# 
                // begin Automatic Subject on Reply mod
                $subject = $post_info['topic_title'];
                if ( !preg_match('/^Re:/', $subject) && strlen($subject) > 0)
                {
                        $subject = 'Re: ' . $subject;
                }
                // end Automatic Subject on Reply mod


# 
#-----[ DOSYAYI KAYDET/KAPAT ]------------------------------------------ 
# 
# EoM
 
Üst

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