Advertisement:

Author Topic: Attachment List In Recent Posts  (Read 3755 times)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,504
    • XPtsp.com Community
Attachment List In Recent Posts
« on: March 02, 2016, 04:54:11 PM »
Link to Mod


ATTACHMENT LIST IN RECENT POSTS v1.4
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. 

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

License
Quote
Copyright (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.
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,136
  • Master of BBC Abuse
Re: Attachment List In Recent Posts
« Reply #1 on: March 03, 2016, 12:36:27 AM »
Nice one. Now wait for someone to ask if they can see the actual attachment directly in recent posts.

* Antechinus grabs his popcorn.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,504
    • XPtsp.com Community
Re: Attachment List In Recent Posts
« Reply #2 on: March 03, 2016, 10:03:59 AM »
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....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,504
    • XPtsp.com Community
Re: Attachment List In Recent Posts
« Reply #3 on: March 04, 2016, 08:57:35 PM »
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....
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,185
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: Attachment List In Recent Posts
« Reply #4 on: April 04, 2016, 04:56:52 AM »
Error in Package Installation

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

you expected:

Code: [Select]
</ul>
</div>';
}
echo '
<span class="botslice clear"><span></span></span>
</div>';

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

Code: [Select]
                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 ?
SMF 2.0: 135+ mods installed (the full list can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline Rock Lee

  • Sophist Member
  • *****
  • Posts: 1,211
  • Gender: Male
  • Digitalizando un nuevo mundo :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: Attachment List In Recent Posts
« Reply #5 on: April 04, 2016, 10:07:11 AM »
Now we go one to not confuse lol @dougiefresh Great work indeed :D

index.spanish_latin.php and index.spanish_latin-utf8.php
Code: [Select]
$txt['airp_attachments'] = 'Archivo(s) Adjunto(s)';
Regards!
¡Regresando como cual Fenix! ~ Bomber Code © 2017
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,504
    • XPtsp.com Community
Re: Attachment List In Recent Posts
« Reply #6 on: April 04, 2016, 04:04:00 PM »
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!
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline The QE2 Story Forum

  • Jr. Member
  • **
  • Posts: 101
    • The QE2 Story
Re: Attachment List In Recent Posts
« Reply #7 on: April 07, 2016, 01:46:41 PM »
Error in Package Installation

I have the same problem!   (on 2.0.11)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,504
    • XPtsp.com Community
Re: Attachment List In Recent Posts
« Reply #8 on: April 07, 2016, 06:21:42 PM »
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!
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline The QE2 Story Forum

  • Jr. Member
  • **
  • Posts: 101
    • The QE2 Story
Re: Attachment List In Recent Posts
« Reply #9 on: April 08, 2016, 05:05:30 AM »
Thanks - now installed and working!

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,185
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: Attachment List In Recent Posts
« Reply #10 on: April 11, 2016, 04:54:20 AM »
same here !

THANKS to you, too ... mine installed like a hand in a glove ((:))).
SMF 2.0: 135+ mods installed (the full list can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline Ninja ZX-10RR

  • SMF Hero
  • ******
  • Posts: 2,137
  • Gender: Male
  • Sniper Legends
    • Flavio93Zena on Facebook
    • Virtual Interactive Games Entertainment Forum
Re: Attachment List In Recent Posts
« Reply #11 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.
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

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,504
    • XPtsp.com Community
Re: Attachment List In Recent Posts
« Reply #12 on: January 14, 2018, 07:04:36 AM »
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?
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,361
    • Arantor on GitHub
Re: Attachment List In Recent Posts
« Reply #13 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'.

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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,504
    • XPtsp.com Community
Re: Attachment List In Recent Posts
« Reply #14 on: January 14, 2018, 08:40:43 PM »
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!
NOTICE:  My website is back up!

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline Ninja ZX-10RR

  • SMF Hero
  • ******
  • Posts: 2,137
  • Gender: Male
  • Sniper Legends
    • Flavio93Zena on Facebook
    • Virtual Interactive Games Entertainment Forum
Re: Attachment List In Recent Posts
« Reply #15 on: January 20, 2018, 09:08:39 PM »
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
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.
@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