Advertisement:

Author Topic: Dosya Eki İsimlerini Değiştirme [Attachment File Renamer]  (Read 8748 times)

Offline Ramboft

  • Semi-Newbie
  • *
  • Posts: 37
  • Gender: Male
Dosya Eki İsimlerini Değiştirme [Attachment File Renamer]

Dosya eklerinin isimlerini artık kolayca değiştirebileceksiniz.

Modifikasyon Hakkında Ayrıntılı Bilgi

Admin Paneli >> Dosya Eki ve Avatar >> Dosyalara Gözat kısmından dosya eklerini yönetebilirsiniz.

Resimler:

||

Quote

İsim:
    Attachment File Renamer
Kim Tarafından Oluşturuldu:
    ディン1031
Tip:
    Dosya Eki
İlk Defa Oluşturuldu:
    Ocak 13, 2007, 08:07:22 ÖS
Son Düzenleme:
    Mayıs 03, 2008, 08:52:54 ÖÖ
En Son Versiyon:
    1.1.2
Destekleyen Sürümler:
    1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5

Paketin adresi: http://custom.simplemachines.org/mods/index.php?mod=625

Manuel Kurulumu [Alıntı "SimpleMachines.Org"]:

Not: Önce ekte verdiğim AttachmentFileRenamer112_TÜRKÇE_TAM_PAKET.zip dosyasını indirip, admin panelinden yükleyiniz. Hata veren yerleri modifikasyonun adresinden, sağ bölmede yer alan forum sürümünüzü seçip Submit yapınız. Paket Türkçe'dir.

Ardından aşağıdan devam edin:

./Themes/default/Display.template.php, bul:

Code: [Select]
echo ' <a href="' . $attachment['href'] . '"><img src="' . $settings['images_url'] . '/icons/clip.gif" align="middle" alt="*" border="0" />&nbsp;' . $attachment['name'] . '</a> (', $attachment['size'], ($attachment['is_image'] ? ', ' . $attachment['real_width'] . 'x' . $attachment['real_height'] . ' - ' . $txt['attach_viewed'] : ' - ' . $txt['attach_downloaded']) . ' ' . $attachment['downloads'] . ' ' . $txt['attach_times'] . '.)<br />'; }
Sonrasına ekle:
Code: [Select]
if($message['can_rename_attachment']) echo ' <a href="'.$scripturl.'?action=attachrename;topic='.$context['current_topic'].'.0;msg='.$message['id'].';sesc=', $context['session_id'], '"><span class="smalltext">'.$txt['renameattach'].'</span></a><br />';
./Themes/default/ManageAttachments.template.php, bul:

Code: [Select]
</tr><tr class="windowbg2"> <td width="50%" align="right"><label for="attachmentThumbHeight">', $txt['attachmentThumbHeight'], '</label>:</td> <td><input type="text" name="attachmentThumbHeight" id="attachmentThumbHeight" value="', empty($modSettings['attachmentThumbHeight']) ? '0' : $modSettings['attachmentThumbHeight'], '" size="6" /></td>
Değiştir
Code: [Select]
  </tr><tr class="windowbg2"> <td width="50%" align="right"><label for="attachmentThumbHeight">', $txt['attachmentThumbHeight'], '</label>:</td> <td><input type="text" name="attachmentThumbHeight" id="attachmentThumbHeight" value="', empty($modSettings['attachmentThumbHeight']) ? '0' : $modSettings['attachmentThumbHeight'], '" size="6" /></td> </tr><tr class="windowbg2"> <td colspan="2"><hr /></td> </tr><tr class="windowbg2"> <td width="50%" align="right"><label for="attachmentCheckCensor">', $txt['attachmentCheckCensor'], ':</label></td> <td><input type="checkbox" name="attachmentCheckCensor" id="attachmentCheckCensor" value="1" class="check"', empty($modSettings['attachmentCheckCensor']) ? '' : ' checked="checked"', ' /></td>
Bul:
Code: [Select]
global $context, $settings, $options, $scripturl, $txt; echo '
Sonrasına ekle:
Code: [Select]
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[ var confirmthedelete = true; function returnConfirmSpecial() { if(confirmthedelete == true) { return confirm(\'', $txt['confirm_delete_attachments'], '\'); } else { return true; } } function setvaluefalse() { confirmthedelete = false; } function setvaluetrue() { confirmthedelete = true; } // ]]></script>
Bul:
Code: [Select]
<form action="', $scripturl, '?action=manageattachments;sort=', $context['sort_by'], $context['sort_direction'] == 'down' ? ';desc' : '', ';sa=remove" method="post" accept-charset="', $context['character_set'], '" onsubmit="return confirm(\'', $txt['confirm_delete_attachments'], '\');">
Değiştir:
Code: [Select]
<form action="', $scripturl, '?action=manageattachments;sort=', $context['sort_by'], $context['sort_direction'] == 'down' ? ';desc' : '', ';sa=remove" method="post" accept-charset="', $context['character_set'], '" onsubmit="return returnConfirmSpecial();">
Bul:
Code: [Select]
<td nowrap="nowrap"><a href="', $scripturl, '?action=manageattachments;sa=browse;', $context['browse_type'], ';sort=name', $context['sort_by'] == 'name' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['smf213'], $context['sort_by'] == 'name' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td>
Değiştir:
Code: [Select]
<td nowrap="nowrap"> <a href="', $scripturl, '?action=manageattachments;sa=browse;', $context['browse_type'], ';sort=name', $context['sort_by'] == 'name' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['smf213'], $context['sort_by'] == 'name' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a> <a href="', $scripturl, '?action=manageattachments;sa=browse;', $context['browse_type'], ';sort=realname', $context['sort_by'] == 'realname' && $context['sort_direction'] == 'up' ? ';desc' : '', '"><span class="smalltext">(', $txt['attachorginalname'], ')</span>' , $context['sort_by'] == 'realname' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a> </td>
Bul:
Code: [Select]
<input type="submit" name="remove_submit" value="', $txt['smf138'], '" />
Değiştir:
Code: [Select]
<input type="submit" name="rename" onclick="setvaluefalse();" value="', $txt['renameattachments'], '" />  <input type="submit" name="remove_submit" onclick="setvaluetrue();" value="', $txt['smf138'], '" />
Bul:
Code: [Select]
?>
Öncesine ekle:
Code: [Select]
function template_manage_rename() { global $context, $settings, $options, $scripturl, $txt; echo ' <form action="', $scripturl, '?action=attachrename2" method="post" accept-charset="', $context['character_set'], '"> <table border="0" align="center" cellspacing="1" cellpadding="4" class="bordercolor" width="100%"> <tr class="titlebg"> <td colspan="5">', $txt['attachment_manager_rename_files'], '</td> </tr>'; // shall we use the tabs? if (!empty($settings['use_tabs'])) { echo ' </table>'; echo ' <table cellpadding="0" cellspacing="0" border="0" style="margin-bottom: 1ex; margin-left: 10px;"> <tr> <td class="maintab_first">&nbsp;</td> <td class="maintab_back"><a href="', $scripturl, '?action=manageattachments;sa=browse">', $txt['attachment_manager_attachments'], '</a></td> <td class="maintab_back"><a href="', $scripturl, '?action=manageattachments;sa=browse;avatars">', $txt['attachment_manager_avatars'], '</a></td> <td class="maintab_back"><a href="', $scripturl, '?action=manageattachments;sa=browse;thumbs">', $txt['attachment_manager_thumbs'], '</a></td> <td class="maintab_last">&nbsp;</td> </tr> </table>'; echo ' <table border="0" align="center" cellspacing="1" cellpadding="4" class="bordercolor" width="100%">'; } // if not, use the old style else { echo ' <tr class="catbg"> <td colspan="5"> <a href="', $scripturl, '?action=manageattachments;sa=browse">', $txt['attachment_manager_attachments'], '</a>&nbsp;|&nbsp; <a href="', $scripturl, '?action=manageattachments;sa=browse;avatars">', $txt['attachment_manager_avatars'], '</a>&nbsp;|&nbsp; <a href="', $scripturl, '?action=manageattachments;sa=browse;thumbs">', $txt['attachment_manager_thumbs'], '</a> </td> </tr>'; } $alternate = false; foreach ($context['attachments'] as $attachment) { echo ' <tr class="', $alternate ? 'windowbg' : 'windowbg2', '"> <td align="center" colspan="5"> '.$txt['attachcurrentname'].': <i>'.(!empty($attachment['renamedfilename']) ? $attachment['renamedfilename'] : $txt['search_no_results']).'</i> '.$txt['attachrenameto'].' <input type="text" size="50" name="renameto['.$attachment['ID_ATTACH'].']" value="'.$attachment['renamedfilename'].'" /> </td> </tr>'; $alternate = !$alternate; } echo ' <tr class="', $alternate ? 'windowbg' : 'windowbg2', '"> <td align="center" colspan="5"> <input type="submit" name="save_submit" value="', $txt['renamesave'], '" /> <input type="hidden" name="sc" value="', $context['session_id'], '" /> </td> </tr> <tr class="catbg"> <td align="left" colspan="5" style="padding: 5px;">&nbsp;</td> </tr> </table> </form>'; } function template_manage_rename2_above() { global $context, $settings, $options, $scripturl, $txt; } function template_manage_rename2_below() { global $context, $settings, $options, $scripturl, $txt; } function template_main() { global $context, $settings, $options, $scripturl, $txt; echo ' <form action="', $scripturl, '?action=attachrename2;topic='.$context['topic'].'.0;msg='.$context['ID_MSG'].'" method="post" accept-charset="', $context['character_set'], '"> <table border="0" align="center" cellspacing="1" cellpadding="4" class="bordercolor" width="100%"> <tr class="titlebg"> <td colspan="5">', $txt['attachment_manager_rename_files'], '</td> </tr>'; $alternate = false; foreach ($context['attachments'] as $attachment) { echo ' <tr class="', $alternate ? 'windowbg' : 'windowbg2', '"> <td align="center" colspan="5"> '.$txt['attachcurrentname'].': <i>'.(!empty($attachment['renamedfilename']) ? $attachment['renamedfilename'] : $txt['search_no_results']).'</i> '.$txt['attachrenameto'].' <input type="text" size="50" name="renameto['.$attachment['ID_ATTACH'].']" value="'.$attachment['renamedfilename'].'" /> </td> </tr>'; $alternate = !$alternate; } echo ' <tr class="', $alternate ? 'windowbg' : 'windowbg2', '"> <td align="center" colspan="5"> <input type="submit" name="save_submit" value="', $txt['renamesave'], '" /> <input type="hidden" name="sc" value="', $context['session_id'], '" /> </td> </tr> <tr class="catbg"> <td align="left" colspan="5" style="padding: 5px;">&nbsp;</td> </tr> </table> </form>'; }
Editleme bitti. Tekrar söyleyeyim: Eğer pakedi yüklerken diğer dosyalarda hata alırsanız pakedin adresinde sağ bölmedeki kısımda kendi forum versiyonunuzu seçip, Submit yapınız. Gereken diğer tüm kodlamalar çıkacaktır. Paket Türkçe'dir.

Ayrıca bu benim TR leştirdiğim ve anlatımını yaptığım ilk modifikasyon hizmetidir :) . Ayrıca bu mod. verilmişse özür diliyorum.
« Last Edit: May 07, 2011, 09:07:20 AM by Ramboft »
The Future's Rambo!

Offline дTдKдИ

  • Semi-Newbie
  • *
  • Posts: 75
  • Gender: Male
    • RaDYo 42
Re: Dosya Eki İsimlerini Değiştirme [Attachment File Renamer]
« Reply #1 on: May 07, 2008, 03:49:47 AM »
Paylasim icin Tesekürler.. ;)

Offline Ramboft

  • Semi-Newbie
  • *
  • Posts: 37
  • Gender: Male
Re: Dosya Eki İsimlerini Değiştirme [Attachment File Renamer]
« Reply #2 on: May 07, 2008, 03:56:27 AM »
Bir şey değil. Devamı gelecek inşallah :)
The Future's Rambo!

Offline orcunakyol

  • Semi-Newbie
  • *
  • Posts: 47
  • Gender: Male
Re: Dosya Eki İsimlerini Değiştirme [Attachment File Renamer]
« Reply #3 on: June 22, 2010, 02:42:29 PM »
Dosyaların basına yada sonuna otomatıkolarak seçtiğimiz bir yazıyı eklemesi mumkun mu ?

Offline cemix

  • Semi-Newbie
  • *
  • Posts: 83
  • Gender: Male
Re: Dosya Eki İsimlerini Değiştirme [Attachment File Renamer]
« Reply #4 on: June 25, 2010, 08:06:40 PM »
Torrent sitesinde görmüştüm site adı koyuyordu .torrent dosyası isminin önüne yapılırsa olur neden olmasın ne yapacağını bil yeter.