Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 11838
Latest: Paul7788
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 42415
Total Topics: 7393
Most Online Today: 52
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 64
Total: 64

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

0 Members and 1 Guest are viewing this topic.

Offline mickjav

  • Full Member
  • ***
  • Posts: 132
    • 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: 16084
    • 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: 132
    • 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: 132
    • 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: 16084
    • 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: 132
    • 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: 132
    • 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: 16084
    • 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: 132
    • 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: 16084
    • 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
9812 Views
Last post July 13, 2009, 07:38:10 pm
by Matth41
1 Replies
3732 Views
Last post June 08, 2010, 03:18:26 pm
by SMFHacks
4 Replies
4356 Views
Last post June 18, 2010, 09:18:00 am
by dvera
2 Replies
3615 Views
Last post November 01, 2010, 01:32:28 pm
by clothahump
3 Replies
403 Views
Last post March 29, 2022, 08:23:38 pm
by SMFHacks

+- Recent Topics

Quick moderation checkboxes in search result? by SMFHacks
August 08, 2022, 10:37:03 am

Setting a single free download. by Zaphod
August 07, 2022, 10:39:26 am

Contact Page Mod Not Working by SMFHacks
August 05, 2022, 12:19:43 pm

Issues with new Newsletter Pro installation by SMFHacks
August 05, 2022, 07:15:18 am

SMFBlog Mod by Nicole
August 03, 2022, 09:46:22 pm

Contact Page by Nicole
August 03, 2022, 09:45:42 pm

trader + classifieds by Nicole
August 03, 2022, 05:05:17 pm

Category Permissions List by SMFHacks
July 30, 2022, 07:53:24 am

Some questions by mickjav
July 30, 2022, 03:31:07 am

prettyurls - TroubleShooting.wiki by SMFHacks
July 29, 2022, 12:27:28 pm

Powered by EzPortal