Facebook 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4287
Latest: ArromGomwef
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43770
Total Topics: 7598
Most Online Today: 96
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 47
Total: 47

Author Topic: Random pictures Portal block  (Read 2150 times)

0 Members and 1 Guest are viewing this topic.

Offline mickjav

  • Full Member
  • ***
  • Posts: 144
    • View Profile
    • Database Dreams
Random pictures Portal block
« on: April 01, 2022, 04:00:51 pm »
https://www.smfhacks.com/index.php/topic,10195.0.html

I am using the above for my downloads and have been trying to use it for the gallery but can't seem to find the function needed to show random pictures like in gallery.

Mick

Home of Chart Tracker Elite, Apollo & DJ 2020, Coming soon The Librarian.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16664
    • View Profile
Re: Random pictures Portal block
« Reply #1 on: April 02, 2022, 11:13:11 pm »
This could do it
Code: [Select]
global $sourcedir, $gallerySettings, $txt, $smcFunc, $modSettings, $boardurl, $scripturl;

// Load the language files
if (loadlanguage('Gallery') == false)
loadLanguage('Gallery','english');

require_once($sourcedir . '/Gallery2.php');

// Load Main Gallery Settings Array
LoadGallerySettings();

Gallery_MainPageBlock('Random Pictures','random');
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/
Like Like x 1 View List

Offline mickjav

  • Full Member
  • ***
  • Posts: 144
    • View Profile
    • Database Dreams
Re: Random pictures Portal block
« Reply #2 on: April 04, 2022, 07:08:37 am »
Thank you ill try it soon as I get home from work

Home of Chart Tracker Elite, Apollo & DJ 2020, Coming soon The Librarian.

Offline mickjav

  • Full Member
  • ***
  • Posts: 144
    • View Profile
    • Database Dreams
Re: Random pictures Portal block
« Reply #3 on: April 04, 2022, 12:12:35 pm »
Sorry No Luck I've Attached a few images.

mick
« Last Edit: April 04, 2022, 03:34:41 pm by mickjav »

Home of Chart Tracker Elite, Apollo & DJ 2020, Coming soon The Librarian.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16664
    • View Profile
Re: Random pictures Portal block
« Reply #4 on: April 04, 2022, 01:55:11 pm »
Made one tweak
Code: [Select]

// Load the language files
if (loadlanguage('Gallery') == false)
loadLanguage('Gallery','english');

require_once($sourcedir . '/Gallery2.php');
        require_once($sourcedir . '/Subs-Gallery2.php');

// Load Main Gallery Settings Array
LoadGallerySettings();

Gallery_MainPageBlock('Random Pictures','random');
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 mickjav

  • Full Member
  • ***
  • Posts: 144
    • View Profile
    • Database Dreams
Re: Random pictures Portal block
« Reply #5 on: April 04, 2022, 03:34:13 pm »
Thankyou worked perfectly  ;D  ;D  Look under Map

https://www.databasedreams.co.uk/charts/index.php

All The Best Mick

Home of Chart Tracker Elite, Apollo & DJ 2020, Coming soon The Librarian.

Offline mickjav

  • Full Member
  • ***
  • Posts: 144
    • View Profile
    • Database Dreams
Re: Random pictures Portal block
« Reply #6 on: April 04, 2022, 04:25:15 pm »
Just tried viewing as A And got the attached error.

I have disabled Guests viewing it for now.
« Last Edit: April 05, 2022, 12:09:58 am by mickjav »

Home of Chart Tracker Elite, Apollo & DJ 2020, Coming soon The Librarian.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16664
    • View Profile
Re: Random pictures Portal block
« Reply #7 on: April 04, 2022, 07:23:49 pm »
Forgot the globals when copying the code

Code: [Select]

global $sourcedir, $gallerySettings, $txt, $smcFunc, $modSettings, $boardurl, $scripturl;

// Load the language files
if (loadlanguage('Gallery') == false)
loadLanguage('Gallery','english');

require_once($sourcedir . '/Gallery2.php');
        require_once($sourcedir . '/Subs-Gallery2.php');

// Load Main Gallery Settings Array
LoadGallerySettings();

Gallery_MainPageBlock('Random Pictures','random');

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 mickjav

  • Full Member
  • ***
  • Posts: 144
    • View Profile
    • Database Dreams
Re: Random pictures Portal block
« Reply #8 on: April 05, 2022, 12:13:34 am »
Did Notice That but thought it was OK I'll know from now on.  ;D

Thanks works perfectly.

All the best mick

Home of Chart Tracker Elite, Apollo & DJ 2020, Coming soon The Librarian.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16664
    • View Profile
Re: Random pictures Portal block
« Reply #9 on: April 05, 2022, 01:29:19 pm »
Glad we finally have that block working!
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
7 Replies
11815 Views
Last post July 13, 2009, 07:38:10 pm
by Matth41
1 Replies
5270 Views
Last post June 08, 2010, 03:18:26 pm
by SMFHacks
4 Replies
6531 Views
Last post June 18, 2010, 09:18:00 am
by dvera
2 Replies
5343 Views
Last post November 01, 2010, 01:32:28 pm
by clothahump
9 Replies
2895 Views
Last post August 23, 2022, 12:42:22 pm
by SMFHacks

+- Recent Topics

Search results items per page? by SMFHacks
April 18, 2025, 04:12:23 pm

Trying to access array offset on null by SMFHacks
April 09, 2025, 07:39:10 am

Suggestions and request by Senkusha
April 03, 2025, 02:30:43 pm

How does a member add a Classified Listing? by SMFHacks
March 28, 2025, 08:05:50 pm

Auto converting to webp or AVIF by [chrisB]
March 28, 2025, 01:46:00 pm

Thumbnail creation settings by SMFHacks
March 28, 2025, 12:42:51 pm

Cookie consent banner? by SMFHacks
March 26, 2025, 02:19:49 pm

Bulk Upload Frozen by SMFHacks
March 26, 2025, 07:58:13 am

Community suite buying question by SMFHacks
March 25, 2025, 11:26:20 am

Downloading with Zero Credits? by SMFHacks
March 23, 2025, 01:40:50 pm

Powered by EzPortal