[MOD] Limited Post Edit Time / Süre Kısıtlamalı Edit

EftelyA

Yaşayan Forum Efsanesi
22 Kas 2007
9,097
59
EsEs
##############################################################
## MOD Title: Limited Post Edit Time
## MOD Author: acoolwelshbloke < [email protected] > (Paul Norman) https://tik.lat/UkSow
## MOD Description: With this MOD the admin is able to set through the boards configuaration, the time
## (in minutes) a user has to edit their post. Setting a value of '0', allows unlimited editing.
## (Moderators & Admins can always edit the post)
## MOD Version: 1.0.0
##
##
## Installation Level: Easy
## Installation Time: 10 Minutes
##
## Files To Edit: posting.php,
## admin/admin_board.php,
## language/lang_english/lang_main.php,
## language/lang_english/lang_admin.php,
## templates/subSilver/admin/board_config_body.tpl
##
## Included Files: (n/a)
##
## License: https://tik.lat/Sbpiy GNU General Public License v2
##############################################################
## For security purposes, please check: https://tik.lat/CJeGf
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at https://tik.lat/9dMQn
##############################################################
## Author Notes:
##
## THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY
## EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
## TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
## FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
## THE AUTHOR OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
## INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
## DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
## ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
## LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
## ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
##
##############################################################
## MOD History:
##
## ------------
## 01-01-2002 - 0.9.0 beta
## - Beta
##
## 01-01-2002 - 1.0.0 FINAL
## - Final
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL SORGUSU ]-------------------------------------------------
#
INSERT INTO phpbb_config (config_name, config_value) VALUES ('edit_time', '0')

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

#
#-----[ BUL ]------------------------------------------------
#
$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, u.user_sig_bbcode_uid' : '';

#
#-----[ TEKRAR BUL ]----------------------------------------
#
p.post_username,

#
#-----[ SONRASINA EKLE ]------------------------------------------
#
p.post_time,

#
#-----[ BUL ]------------------------------------------------
#
else if ( $mode != 'newtopic' && $post_info['topic_status'] == TOPIC_LOCKED && !$is_auth['auth_mod'])
{
message_die(GENERAL_MESSAGE, $lang['Topic_locked']);
}

#
#-----[ SONRASINA EKLE ]------------------------------------------
#
//
// BEGIN - Limited post edit time MOD
//
if ( $mode == 'editpost' && !$is_auth['auth_mod'] && $board_config['edit_time'] != '0' && !$submit)
{
$current_time = time();
$difference_sec = $current_time - $post_info['post_time'] ;
$difference_min = ($current_time - $post_info['post_time']) / 60;
if ($difference_min > $board_config['edit_time'] )
{
$message = sprintf($lang['edit_time_past'], $board_config['edit_time']) . '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
}
}

//
// END - Limited post edit time MOD
//

#
#-----[ AÇ ]------------------------------------------------
#
admin/admin_board.php

#
#-----[ BUL ]------------------------------------------------
#
"L_ENABLE_PRUNE" => $lang['Enable_prune'],

#
#-----[ SONRASINA EKLE ]------------------------------------------
#
"L_EDIT_TIME" => $lang['edit_time'],
"L_EDIT_TIME_EXPLAIN" => $lang['edit_time_explain'],

#
#-----[ BUL ]------------------------------------------------
#
"PRUNE_NO" => $prune_no,

#
#-----[ SONRASINA EKLE ]------------------------------------------
#
"EDIT_TIME" => $new['edit_time'],

#
#-----[ AÇ ]------------------------------------------------
#
language/lang_english/lang_admin.php

#
#-----[ BUL ]------------------------------------------------
#
//
// That's all Folks!

#
#-----[ ÖNCESİNE EKLE ]-----------------------------------------
#
//limited post edit time MOD
$lang['edit_time'] = 'Post Edit time';
$lang['edit_time_explain'] = 'The time (in minutes) a user has to edit their posts. Setting this value to 0, allows unlimited editing.';

#
#-----[ AÇ ]------------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ BUL ]------------------------------------------------
#
//
// That's all, Folks!

#
#-----[ ÖNCESİNE EKLE ]-----------------------------------------
#
//limited post edit time MOD
$lang['edit_time_past'] = 'You are only allowed to edit your post within the first <b>%d</b> minute(s) of it being submitted.';

#
#-----[ AÇ ]------------------------------------------------
#
templates/SubSilver/admin/board_config_body.tpl

#
#-----[ BUL ]------------------------------------------------
#
<td class="row2"><input type="radio" name="prune_enable" value="1" {PRUNE_YES} /> {L_YES}  <input type="radio" name="prune_enable" value="0" {PRUNE_NO} /> {L_NO}</td>
</tr>

#
#-----[ SONRASINA EKLE ]------------------------------------------
#
<tr>
<td class="row1">{L_EDIT_TIME}<br /><span class="gensmall">{L_EDIT_TIME_EXPLAIN}</span></td>
<td class="row2"><input type="text" size="4" maxlength="4" name="edit_time" value="{EDIT_TIME}" /></td>
</tr>

#
#-----[ TÜM DOSYALARI KAYDET VE KAPAT ]--------------------------------
#
# EoM
 

EftelyA

Yaşayan Forum Efsanesi
22 Kas 2007
9,097
59
EsEs
MOD Açıklaması: Bu mod sayesinde kullanıcılar mesajını gönderdikten sonra yönetim panelinden belirlenen süre dolana kadar mesajlarını değiştirebiliyor.Süre dolduktan sonra mesajlarında değişiklik yapamıyor.

Türkçe dil dosyası değişiklikleri için:


#
#-----[ AÇ ]------------------------------------------------
#
language/lang_turkish/lang_admin.php

#
#-----[ BUL ]------------------------------------------------
#
//
// That's all Folks!

#
#-----[ ÖNCESİNE EKLE ]-----------------------------------------
#
//limited post edit time MOD
$lang['edit_time'] = 'Mesaj düzenleme süresi';
$lang['edit_time_explain'] = 'Kullanıcının mesajlarını değiştirebileceği süre (dakika cinsinden). Bu değeri 0 olarak ayarlarsanız, düzenleme süresi limiti ortadan kalkacaktır.';

#
#-----[ AÇ ]------------------------------------------------
#
language/lang_turkish/lang_main.php

#
#-----[ BUL ]------------------------------------------------
#
//
// That's all, Folks!

#
#-----[ ÖNCESİNE EKLE ]-----------------------------------------
#
//limited post edit time MOD
$lang['edit_time_past'] = 'Sadece, mesajınızı gönderdikten sonraki <b>%d</b> dakika içerisinde onu yeniden düzenleyebilirsiniz.';
 
Ü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.