Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43261
Total Topics: 7519
Most Online Today: 297
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 285
Total: 285

Author Topic: Random pictures Portal block  (Read 1542 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: 16436
    • 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: 16436
    • 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: 16436
    • 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: 16436
    • 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
11163 Views
Last post July 13, 2009, 07:38:10 pm
by Matth41
1 Replies
5028 Views
Last post June 08, 2010, 03:18:26 pm
by SMFHacks
4 Replies
6070 Views
Last post June 18, 2010, 09:18:00 am
by dvera
2 Replies
4823 Views
Last post November 01, 2010, 01:32:28 pm
by clothahump
9 Replies
2138 Views
Last post August 23, 2022, 12:42:22 pm
by SMFHacks

+- Recent Topics

Problems SMF 2.0.19 > 2.1.4 SMF Gallery Pro - Recents Images to overall header by Michel68
Today at 08:27:36 am

No thumbnails on new uploads by Tonyvic
Today at 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

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

Powered by EzPortal