Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4253
Latest: Ineedsmfhelp
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43242
Total Topics: 7516
Most Online Today: 107
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 85
Total: 85

Author Topic: Display gallery inside the forum page  (Read 4770 times)

0 Members and 1 Guest are viewing this topic.

Offline Bruno73

  • Member
  • *
  • Posts: 8
  • Up the Dragons!
    • View Profile
    • Dragonslairfans / ArcadeLifeStyle
Display gallery inside the forum page
« on: October 25, 2014, 12:35:06 am »
Hi,
Just got the Gallery Pro this morning  ;)
I would like to display pictures (most viewed, random, last uploaded...whatever) in my main forum page, on the bottom or top of the page for example.

To illustrate, I would like to have for example this 'Random Pictures' box :



...at the top or the bottom of my main forum page.

I've seen this many times on other boards. I've searched in the Gallery settings but cannot find any option to allow this?
Is this basic feature not included in the SFM Gallery Pro? Or do I miss something in the options?
How to proceed?
Thanks in advance for your help.

EDIT : find this topic (http://www.smfhacks.com/index.php/topic,5784.0.html). Seems to be what I need but can't access to the code link provided. Can you provide me the add on please? Oh, and would it work under  SMF 1.1.20 ? Thanks
« Last Edit: October 25, 2014, 11:33:19 am by Bruno73 »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16428
    • View Profile
Re: Display gallery inside the forum page
« Reply #1 on: October 26, 2014, 12:37:14 pm »
Two ways to do this.
You can modify the recent images on overall header to do random items
http://www.smfhacks.com/index.php/topic,163.0.html


Or I just updated the SSI addon/mod with a new function called ssi_galleryblock which supports random gallery items
Details: http://www.smfhacks.com/index.php/topic,145.0.html

ssi_galleryblock($title = '', $type = 'recent', $limit = 4)

$title - contains the title of the block pass text string
$type - contains the type supported are the following: recent,mostcomments,toprated,recentcomments,random
$limit  - number how many images/media items to show
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Bruno73

  • Member
  • *
  • Posts: 8
  • Up the Dragons!
    • View Profile
    • Dragonslairfans / ArcadeLifeStyle
Re: Display gallery inside the forum page
« Reply #2 on: October 26, 2014, 01:04:40 pm »
Thanks for your very fast reply!  :)

Just uploaded/installed the latest SSI addon/package   8)

Or I just updated the SSI addon/mod with a new function called ssi_galleryblock which supports random gallery items
Details: http://www.smfhacks.com/index.php/topic,145.0.html

ssi_galleryblock($title = '', $type = 'recent', $limit = 4)

$title - contains the title of the block pass text string
$type - contains the type supported are the following: recent,mostcomments,toprated,recentcomments,random
$limit  - number how many images/media items to show

...well, can you tell me in which file (and where in the code?) do I have to add this line please ? :

ssi_galleryblock($title = '', $type = 'recent', $limit = 4)

oh, and possibly and example ?

Thanks  :)

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16428
    • View Profile
Re: Display gallery inside the forum page
« Reply #3 on: October 26, 2014, 01:33:42 pm »
Would be in one of your template files where you want to appear.
If on all pages would be in index.template.php
Code: [Select]
global $boarddir;
require_once $boarddir . '/SSI.php';
ssi_galleryblock("Recent Images",'recent',4);

Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Bruno73

  • Member
  • *
  • Posts: 8
  • Up the Dragons!
    • View Profile
    • Dragonslairfans / ArcadeLifeStyle
Re: Display gallery inside the forum page
« Reply #4 on: October 26, 2014, 02:29:55 pm »
I would like to display them only for the 'home forum page', this url.
Which file to edit, and where to put the lines code?
Sorry but I'm not very familiar with such code  :-\

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16428
    • View Profile
Re: Display gallery inside the forum page
« Reply #5 on: October 26, 2014, 02:32:00 pm »
If only on that page that would be the boardindex.template file in the themes/default folder
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Bruno73

  • Member
  • *
  • Posts: 8
  • Up the Dragons!
    • View Profile
    • Dragonslairfans / ArcadeLifeStyle
Re: Display gallery inside the forum page
« Reply #6 on: October 26, 2014, 02:40:52 pm »
If only on that page that would be the boardindex.template file in the themes/default folder

Thanks, so anywhere in the boardindex.template file I put this code and it's done? ->

Code: [Select]
ssi_galleryblock("Recent Images",'recent',4);

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16428
    • View Profile
Re: Display gallery inside the forum page
« Reply #7 on: October 26, 2014, 02:48:38 pm »
Before
Code: [Select]
// Show some statistics next to the link tree if SP1 info is off.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Bruno73

  • Member
  • *
  • Posts: 8
  • Up the Dragons!
    • View Profile
    • Dragonslairfans / ArcadeLifeStyle
Re: Display gallery inside the forum page
« Reply #8 on: October 27, 2014, 04:07:37 pm »
It works fine, thanks again for your prompt & very fast support.  :)

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16428
    • View Profile
Re: Display gallery inside the forum page
« Reply #9 on: October 27, 2014, 05:19:02 pm »
Glad to help.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
5118 Views
Last post October 03, 2007, 09:32:32 am
by Rabain
1 Replies
4612 Views
Last post November 16, 2007, 08:02:41 pm
by SMFHacks
11 Replies
10296 Views
Last post August 06, 2014, 10:39:59 pm
by SMFHacks
1 Replies
4144 Views
Last post February 17, 2016, 10:53:14 pm
by SMFHacks
1 Replies
2743 Views
Last post July 15, 2018, 02:34:53 pm
by SMFHacks

+- Recent Topics

is it possible to add support for odysee.com by SMFHacks
March 13, 2024, 10:53:28 pm

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

User Gallery Feature: move / bulk move images by SMFHacks
January 30, 2024, 05:48:25 pm

In the future it may be for smf 2.1.x? by smithloo
January 30, 2024, 12:55:34 am

Powered by EzPortal