Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 11845
Latest: SamoanOnion
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 42481
Total Topics: 7409
Most Online Today: 33
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 36
Total: 36

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

0 Members and 1 Guest are viewing this topic.

Offline mickjav

  • Full Member
  • ***
  • Posts: 133
    • 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: 16112
    • 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: 133
    • 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: 133
    • 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: 16112
    • 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: 133
    • 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: 133
    • 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: 16112
    • 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: 133
    • 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: 16112
    • 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
9871 Views
Last post July 13, 2009, 07:38:10 pm
by Matth41
1 Replies
3787 Views
Last post June 08, 2010, 03:18:26 pm
by SMFHacks
4 Replies
4439 Views
Last post June 18, 2010, 09:18:00 am
by dvera
2 Replies
3660 Views
Last post November 01, 2010, 01:32:28 pm
by clothahump
9 Replies
919 Views
Last post August 23, 2022, 12:42:22 pm
by SMFHacks

+- Recent Topics

Delete old file by SMFHacks
October 05, 2022, 08:11:13 am

[Feature Request] Thumbnail on topic list by Shades
October 04, 2022, 11:40:26 am

Undefined index: class_ad_seller by SMFHacks
October 04, 2022, 09:33:36 am

"Custom title" badge by Hatshepsut
September 27, 2022, 10:11:27 pm

Category Selection by Anmer
September 18, 2022, 02:40:06 am

Setting a single free download. by Zaphod
September 12, 2022, 10:18:45 pm

Error message "Data too long for column 'ipaddress' at row 1" by SMFHacks
September 12, 2022, 08:49:02 am

SMF to SMF bridge via WP by SMFHacks
September 11, 2022, 09:44:30 am

Video player included by SMFHacks
September 06, 2022, 10:26:27 pm

Upload hangs / doesn't complete by SMFHacks
August 28, 2022, 08:36:21 am

Powered by EzPortal