Advertisement:

Author Topic: Random Image block on homepage  (Read 899 times)

Offline jakes_t

  • Semi-Newbie
  • *
  • Posts: 30
Random Image block on homepage
« 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.

Offline br360

  • Lead Support Specialist
  • SMF Hero
  • *
  • Posts: 2,207
    • GenXcommunity
Re: Random Image block on homepage
« Reply #1 on: March 11, 2018, 05:23:59 PM »
That mod is still available on their site

http://www.smfpersonal.net/mods-b6.0/

Offline jakes_t

  • Semi-Newbie
  • *
  • Posts: 30
Re: Random Image block on homepage
« Reply #2 on: March 11, 2018, 06:41:57 PM »
Thanks for that, I went through their site but somehow missed it. Appreciate your help :)

Offline br360

  • Lead Support Specialist
  • SMF Hero
  • *
  • Posts: 2,207
    • GenXcommunity
Re: Random Image block on homepage
« Reply #3 on: March 11, 2018, 06:51:13 PM »
You’re welcome  :)

Offline jakes_t

  • Semi-Newbie
  • *
  • Posts: 30
Re: Random Image block on homepage
« Reply #4 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.

Offline br360

  • Lead Support Specialist
  • SMF Hero
  • *
  • Posts: 2,207
    • GenXcommunity
Re: Random Image block on homepage
« Reply #5 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


Offline doug_ips

  • Jr. Member
  • **
  • Posts: 141
    • generalcartalk.com
Re: Random Image block on homepage
« Reply #6 on: March 12, 2018, 02:03:50 AM »
This would be an easy mod to develop.
It's fast, it's furious, it's generalcartalk.com

Check out my mods

Offline jakes_t

  • Semi-Newbie
  • *
  • Posts: 30
Re: Random Image block on homepage
« Reply #7 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.

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.

Offline doug_ips

  • Jr. Member
  • **
  • Posts: 141
    • generalcartalk.com
Re: Random Image block on homepage
« Reply #8 on: March 13, 2018, 07:56:46 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
It's fast, it's furious, it's generalcartalk.com

Check out my mods

Offline jakes_t

  • Semi-Newbie
  • *
  • Posts: 30
Re: Random Image block on homepage
« Reply #9 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 ?

Offline doug_ips

  • Jr. Member
  • **
  • Posts: 141
    • generalcartalk.com
Re: Random Image block on homepage
« Reply #10 on: March 14, 2018, 10:27:22 AM »
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.
It's fast, it's furious, it's generalcartalk.com

Check out my mods

Offline jakes_t

  • Semi-Newbie
  • *
  • Posts: 30
Re: Random Image block on homepage
« Reply #11 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..