Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Mod Requests => Topic started by: jakes_t on March 11, 2018, 04:30:23 PM

Title: Random Image block on homepage
Post by: jakes_t on March 11, 2018, 04:30:23 PM
Hi
I would like a mod that displays a few random images from the attachment folder on the homepage in a block. I think this mod used to exist:?

https://www.simplemachines.org/community/index.php?topic=500874.msg3517180

But it's dead now I think. This mod would be nice to expose some of the forum content on your main page and encourage people to delve into the forum (when you click on an image it takes you to the appropriate thread.
Title: Re: Random Image block on homepage
Post by: br360 on March 11, 2018, 05:23:59 PM
That mod is still available on their site

http://www.smfpersonal.net/mods-b6.0/
Title: Re: Random Image block on homepage
Post by: jakes_t on March 11, 2018, 06:41:57 PM
Thanks for that, I went through their site but somehow missed it. Appreciate your help :)
Title: Re: Random Image block on homepage
Post by: br360 on March 11, 2018, 06:51:13 PM
You're welcome  :)
Title: Re: Random Image block on homepage
Post by: jakes_t on March 11, 2018, 07:41:21 PM
Installed it on a local copy of my live board and it's not quite what I expected unfortunately. Firstly it doesn't seem to load pictures from your attachment folder. I would have thought the logical option is to just present pictures from the attachment folder. It also obviously doesn't link to the thread where the picture came from.

Shame because it would have been a good way to expose some of your forum's content to the users and public.
Title: Re: Random Image block on homepage
Post by: br360 on March 11, 2018, 08:46:16 PM
If that mod won't do what you want, im pretty sure that one of the portal mods do what you are looking for in regards to posting random attachments on a section of the board you choose ( header block, footer, right side etc. )

Check the mod site for portals and test which one best helps accomplish what you want

Title: Re: Random Image block on homepage
Post by: Doug Heffernan on March 12, 2018, 02:03:50 AM
This would be an easy mod to develop.
Title: Re: Random Image block on homepage
Post by: jakes_t on March 12, 2018, 06:15:25 PM
I'll look at the portal mods and see what it's like but I would preferably not as I prefer a 'lighter' solution.

Quote from: doug_ips on March 12, 2018, 02:03:50 AM
This would be an easy mod to develop.

I believe so as well, wish I had more coding skills. Forums are waning in popularity nowadays so anything that makes a forum more enticing is a bonus. There's a wealth of knowledge and interesting posts buried in most forums, so any mod that highlights some of this would be cool.
Title: Re: Random Image block on homepage
Post by: Doug Heffernan on March 13, 2018, 07:56:46 AM
Quote from: jakes_t on March 12, 2018, 06:15:25 PM

Quote from: doug_ips on March 12, 2018, 02:03:50 AM
This would be an easy mod to develop.

I believe so as well, wish I had more coding skills. Forums are waning in popularity nowadays so anything that makes a forum more enticing is a bonus. There's a wealth of knowledge and interesting posts buried in most forums, so any mod that highlights some of this would be cool.

Did you mean something like I have at my forum? This is something that I coded quickly.

http://www.generalcartalk.com/index.php
Title: Re: Random Image block on homepage
Post by: jakes_t on March 13, 2018, 07:52:24 PM
Yep that's exactly it, I see that when you click on the picture it takes you to the relevant thread which awesome. Does the mod check grab the last few pics from the attachments directory and display it? It would be awesome if it can randomly select a few pics from that directory as a "lucky dip" every time you refresh the page  :)

On a side note, SMF 2.1 looks nice, you're using Curve2 on there ?
Title: Re: Random Image block on homepage
Post by: Doug Heffernan on March 14, 2018, 10:27:22 AM
Quote from: jakes_t on March 13, 2018, 07:52:24 PM
Yep that's exactly it, I see that when you click on the picture it takes you to the relevant thread which awesome. Does the mod check grab the last few pics from the attachments directory and display it? It would be awesome if it can randomly select a few pics from that directory as a "lucky dip" every time you refresh the page  :)

On a side note, SMF 2.1 looks nice, you're using Curve2 on there ?

It is not yet a mod. I have added the code and template directly to the php files. But yes, it selects the most recent attachments and it displays them at the board index. But that random dip can be added too.

Yes, I am using the default 2.1. theme. It is amazing imho.
Title: Re: Random Image block on homepage
Post by: jakes_t on April 08, 2018, 11:00:18 PM
Just to continue this a little bit, I found this mod from 2010,

http://custom.simplemachines.org/mods/index.php?mod=2523

It does the job but it's very rough, no options for thumb size, displays it on every single page instead of just the homepage but it might be a good base to start from..