News:

Wondering if this will always be free?  See why free is better.

Main Menu

Random Image block on homepage

Started by jakes_t, March 11, 2018, 04:30:23 PM

Previous topic - Next topic

jakes_t

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.

br360


jakes_t

Thanks for that, I went through their site but somehow missed it. Appreciate your help :)

br360


jakes_t

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.

br360

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


Doug Heffernan

This would be an easy mod to develop.

jakes_t

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.

Doug Heffernan

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

jakes_t

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 ?

Doug Heffernan

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.

jakes_t

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..

Advertisement: