News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Attachments in Topics

Started by Nibogo, December 11, 2009, 09:59:33 AM

Previous topic - Next topic

Jessica.

Testing Zone - SMF 2.0.7, default Curve
School & Chat - phpBB3, over 170 mods installed, official live forum

I use the latest version of Chrome

phpBB: Forum = a section; Board = whole site
SMF: Forum = whole site; Board = a section

BaghdadGhost

Great mod thanks


arabic translation, AFTER installing do the following


in your /Themes/yourtheme/languages/modification.arabic-utf8.php (or modification.arabic.php if you are just arabic no utf-8)

before

?>


add

// Attachments in Topic
$txt['attachments_in_topic'] = 'مرفقات';
$txt['attachment_in_topic'] = 'المرفق';
$txt['attachments_this_topic'] = 'مرفقات في هذا الموضوع';
$txt['attachments_size'] = 'الحجم';
$txt['attachment_dl'] = 'التحميلات';
$txt['attachment_go'] = 'الذهاب الى الموضوع';
$txt['attachment_none'] = 'لايوجد اي مرفقات في الموضوع';
$txt['attachment_download'] = 'تنزيل المرفقات';



now /Themes/Yourtheme/MessageIndex.template.php

find

// Attachments in Topic Mod - Add the icon and pop-up just if we have attachments in this topic
if (!empty($topic['attachments']))
    echo '
<a href="'.$scripturl.'?action=topicattach;topic='.$topic['id'].'" onclick="return reqWin(this.href,500,200);"><img src="', $settings['images_url'], '/icons/clip.gif" alt="'.$topic['attachments'].' ', $txt['attachments_in_topic'], '" title="'.$topic['attachments'] .' '.(($topic['attachments'] == '1') ? $txt['attachment_in_topic'] : $txt['attachments_in_topic']).'" border="0" style="float: right;margin-right: 35px;" /></a>';



replace with


// Attachments in Topic Mod - Add the icon and pop-up just if we have attachments in this topic
if (!empty($topic['attachments']))
    echo '
<a href="'.$scripturl.'?action=topicattach;topic='.$topic['id'].'" onclick="return reqWin(this.href,500,200);"><img src="', $settings['images_url'], '/icons/clip.gif" alt="'.$topic['attachments'].' ', $txt['attachments_in_topic'], '" title="'.$topic['attachments'] .' '.(($topic['attachments'] == '1') ? $txt['attachment_in_topic'] : $txt['attachments_in_topic']).'" border="0" style="float: left;margin-left: 35px;" /></a>';

         


ssboforum

Any update? It doesn't work with SMF 2.0.2.

BaghdadGhost

Quote from: ssboforum on June 27, 2012, 09:00:48 AM
Any update? It doesn't work with SMF 2.0.2.

it works perfectly on 2.0.2

just emulate and if you see errors during installation let me know. I might be able to help as it not that complicated.


ssboforum

You're right! I didn't know about emulation feature, then I found out the solution thanks to this page.

Is it possible to have the attachments listed not in a pop-up window, but in a block (i use tinyportal), showed on the right of the topic (in the topic page)?

So that if there are lots of attachments in a topic, you can open the topic and immediately see the list and download them, without surfing through lots of pages. 

ssboforum

Quote from: ssboforum on June 30, 2012, 09:42:38 AM
Is it possible to have the attachments listed not in a pop-up window, but in a block (i use tinyportal), showed on the right of the topic (in the topic page)?

Update: now it is possible, see here [nofollow].

Hondo

Hello,
what about a new version for SMF 2.06?
It is not possible to install automatically

margarett

Quote from: BaghdadGhost on June 28, 2012, 01:01:04 AM
Quote from: ssboforum on June 27, 2012, 09:00:48 AM
Any update? It doesn't work with SMF 2.0.2.

it works perfectly on 2.0.2

just emulate and if you see errors during installation let me know. I might be able to help as it not that complicated.
Same applies ;)
How can I install a mod that doesn't work in my SMF version?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Hondo

I have now installed it manually, quite simple

Advertisement: