News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Attachment List In Recent Posts

Started by dougiefresh, March 02, 2016, 04:54:11 PM

Previous topic - Next topic

dougiefresh

Link to Mod



ATTACHMENT LIST IN RECENT POSTS v1.7
By Dougiefresh -> Link to Mod



Introduction
This mod adds a simple list of attachments to any post that has attachments, if the user can view attachments in the board that the post is in.

Uninstalling Error for v1.0
If you have installed VERSION 1.0, you will have difficulty uninstalling this mod and I apologize for this!!!  Please replace your v1.0 mod with the attached mod in this post.  This will resolve the uninstall issue....

Related Discussion
o Show attachments (or links) in Recent Posts like templates.

Compatibility Notes
This mod was tested on SMF 2.0.11 and SMF 2.1 Beta 2, but should work on SMF 2.0 and up.  SMF 1.x is not and will not be supported. 

Translators
o Spanish Latin: Rock Lee [BC]

Changelog
The changelog has been removed and can be seen at XPtsp.com.

License
QuoteCopyright (c) 2016 - 2018, Douglas Orend
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS 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 COPYRIGHT HOLDER OR 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.

Antechinus

Nice one. Now wait for someone to ask if they can see the actual attachment directly in recent posts.

* Antechinus grabs his popcorn.

dougiefresh

Was planning on doing exactly that for mod submission, until I realized how much code I'd have to duplicate....  Figured it be better later on....

dougiefresh

Uploaded v1.1 - March 4th, 2016
o Added support for SMF 2.1 Beta 2.  No functionality change for SMF 2.0.x branch.
o Fixed broken uninstaller found in VERSION 1.0 mod.




@Everybody: If you have installed VERSION 1.0, you will have difficulty uninstalling this mod and I apologize for this!!!  Please replace your v1.0 mod with the attached revised mod.  This will resolve the uninstall issue....

aegersz

Error in Package Installation

1.   Replace   ./Themes/default/Recent.template.php   Test failed

you expected:

</ul>
</div>';
}
echo '
<span class="botslice clear"><span></span></span>
</div>';


BUT this is here instead (with a few lines on either end):

                if ($post['can_reply'] || $post['can_mark_notify'] || $post['can_delete'])
                        echo '
                                        </ul>
                                </div>';

                echo '
                                <span class="botslice clear"><span></span></span>
                        </div>';

        }

        echo '
                <div class="pagesection">
                        <span>', $txt['pages'], ': ', $context['page_index'], '</span>
                </div>
        </div>';
}


can you help me make this fix please ? or is my system over-modified and too much of a hassle ?
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

-Rock Lee-

Now we go one to not confuse lol @dougiefresh Great work indeed :D

index.spanish_latin.php and index.spanish_latin-utf8.php
$txt['airp_attachments'] = 'Archivo(s) Adjunto(s)';

Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

dougiefresh

Uploaded v1.2 - April 4th, 2016
o Added Spanish Latin translation by Rock Lee [BC].




@Rock Lee [BC]: Thank you for the translation!  It's been included in this version!

Rob Lightbody

Quote from: aegersz on April 04, 2016, 04:56:52 AM
Error in Package Installation

I have the same problem!   (on 2.0.11)

dougiefresh

Uploaded v1.3 - April 7th, 2016
o Fixed install operation in install_20x.xml for Recent.template.php that failed.




@The QE2 Story Forum and @aegersz: Thank you for reporting the installation error!  It has been fixed!

Rob Lightbody

Thanks - now installed and working!

aegersz

same here !

THANKS to you, too ... mine installed like a hand in a glove ((:))).
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Ninja ZX-10RR

Please check security reports. It's not "everyone can get admin" level of "bad", but still not nice. Me and a friend of mine found this issue while he was helping me to customize a couple of things for another area.
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

dougiefresh

Quote from: Ninja ZX-10RR on January 13, 2018, 11:16:17 PM
Please check security reports. It's not "everyone can get admin" level of "bad", but still not nice. Me and a friend of mine found this issue while he was helping me to customize a couple of things for another area.
And how do I do that?

Arantor

Security reports are sent to the SMF team and passed on to the mod author if they are found to be accurate. So many of the reports received are 'this mod is insecure because it broke my forum'.

For the record, and I can't even see the security report (not team, yo), but glancing at the code I'd assume the issue is 'unapproved attachments can be disclosed to non-approvers' but since the unapproved attachments should still be protected by the rest of the platform, it's probably not an immediate threat.
Holder of controversial views, all of which my own.


dougiefresh

Uploaded v1.4 - January 14th, 2018
o Fixed security report that allowed unapproved attachments to be listed.




@Ninja ZX-10RR:  Thank you for reporting this particular little "nasty".  I've fixed this issue for this version!

@Arantor:  Right on the money, bro!  Thanks!

Ninja ZX-10RR

Quote from: Arantor on January 14, 2018, 07:14:15 AM
Security reports are sent to the SMF team and passed on to the mod author if they are found to be accurate. So many of the reports received are 'this mod is insecure because it broke my forum'.
I could comment in a really nasty way guessing the reason would be because of the sender (which is not me, btw), but I'll let that pass ;D
Quote from: Arantor on January 14, 2018, 07:14:15 AM
For the record, and I can't even see the security report (not team, yo), but glancing at the code I'd assume the issue is 'unapproved attachments can be disclosed to non-approvers' but since the unapproved attachments should still be protected by the rest of the platform, it's probably not an immediate threat.
Yeah it was it, didn't feel like throwing it here in plain text regardless.
Quote from: dougiefresh on January 14, 2018, 08:40:43 PM
@Ninja ZX-10RR:  Thank you for reporting this particular little "nasty".  I've fixed this issue for this version!
Thank a former SMF dev, which will remain nameless as he does no longer post or login here ;) Glad you fixed it anyway, thank you too!
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

dougiefresh

Uploaded v1.5 - February 10th, 2018
o No functionality changes.
o Added LICENSE file to satisfy licensing requirements.
o Added translators to mod documentation file readme.txt.

Rob Lightbody

#17
Hi there,

This mod causes a problem with my forum - I've attached an image to illustrate.  It only happens for guests, and only after post 5.  All browsers.

I'm uninstalling it until there's a fix, but happy to try it again!

Cheers,

- Rob

dougiefresh

Yeah, that's a pretty big bug you found!  Let me look into it!

dougiefresh

Reproduced the error as a Guest on a clean 2.0.15 localhost forum.

Advertisement: