Advertisement:

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

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,756
  • Mod King
    • 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.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
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.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,192
  • 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,756
  • Mod King
    • 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....

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,756
  • Mod King
    • 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....

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,445
  • 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 ?
The configuration of my Linux VPS (SMF 2.0 with 140+ mods) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum)

Online Rock Lee

  • Native Language Support Specialist
  • SMF Hero
  • *
  • Posts: 1,895
  • Gender: Male
  • I also speak english :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 © 2018
Ayudas - Aportes - Tutoriales - Y mucho mas!!!


Ayudame via PayPal

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,756
  • Mod King
    • 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!

Offline The QE2 Story Forum

  • Charter Member
  • Jr. Member
  • *
  • Posts: 148
    • 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,756
  • Mod King
    • 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!

Offline The QE2 Story Forum

  • Charter Member
  • Jr. Member
  • *
  • Posts: 148
    • 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

  • SMF Hero
  • ******
  • Posts: 1,445
  • 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 ((:))).
The configuration of my Linux VPS (SMF 2.0 with 140+ mods) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum)

Offline Ninja ZX-10RR

  • SMF Hero
  • ******
  • Posts: 2,147
  • 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,756
  • Mod King
    • 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?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 69,304
    • StoryBB/StoryBB 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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,756
  • Mod King
    • 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!

Offline Ninja ZX-10RR

  • SMF Hero
  • ******
  • Posts: 2,147
  • 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

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,756
  • Mod King
    • XPtsp.com Community
Re: Attachment List In Recent Posts
« Reply #16 on: February 10, 2018, 10:37:47 PM »
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.

Offline The QE2 Story Forum

  • Charter Member
  • Jr. Member
  • *
  • Posts: 148
    • The QE2 Story
Re: Attachment List In Recent Posts
« Reply #17 on: March 30, 2018, 11:34:25 AM »
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
« Last Edit: March 30, 2018, 11:49:49 AM by The QE2 Story Forum »

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,756
  • Mod King
    • XPtsp.com Community
Re: Attachment List In Recent Posts
« Reply #18 on: March 30, 2018, 12:33:59 PM »
Yeah, that's a pretty big bug you found!  Let me look into it!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,756
  • Mod King
    • XPtsp.com Community
Re: Attachment List In Recent Posts
« Reply #19 on: April 03, 2018, 06:39:52 PM »
Reproduced the error as a Guest on a clean 2.0.15 localhost forum.