Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4257
Latest: Alex998.
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 43295
Total Topics: 7523
Most Online Today: 186
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 183
Total: 183

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

0 Members and 1 Guest are viewing this topic.

Offline mickjav

  • Full Member
  • ***
  • Posts: 142
    • 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: 16452
    • 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: 142
    • 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: 142
    • 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: 16452
    • 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: 142
    • 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: 142
    • 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: 16452
    • 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: 142
    • 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: 16452
    • 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
11194 Views
Last post July 13, 2009, 07:38:10 pm
by Matth41
1 Replies
5052 Views
Last post June 08, 2010, 03:18:26 pm
by SMFHacks
4 Replies
6139 Views
Last post June 18, 2010, 09:18:00 am
by dvera
2 Replies
4865 Views
Last post November 01, 2010, 01:32:28 pm
by clothahump
9 Replies
2201 Views
Last post August 23, 2022, 12:42:22 pm
by SMFHacks

+- Recent Topics

Please Help! by SMFHacks
April 17, 2024, 08:04:55 am

Rate own images by fvlog19
April 11, 2024, 10:56:53 am

Tidy Child Boards on 2.1.4 by SMFHacks
April 04, 2024, 03:54:12 pm

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
March 30, 2024, 12:41:08 pm

Can't DROP 'id_member'; check that column/key exists Datei: by SMFHacks
March 30, 2024, 11:58:20 am

No thumbnails on new uploads by Tonyvic
March 29, 2024, 06:26:18 am

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

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

Powered by EzPortal