EzPortal - Portal Software for Forums

EzPortal - Made to Fit Your SMF Forum - Glad You Found Us!
+- +-

UserBox

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

+- Recent Posts

New built in translations for six langauges! by EzPortal
March 26, 2024, 11:15:32 pm

Smiley missing in shoutbox 2.1.4 by hustreamload
July 26, 2023, 08:14:02 am

Re: Theme Select Box question? by Shades
March 15, 2023, 06:49:49 pm

Re: Theme Select Box question? by Shades
March 09, 2023, 02:09:24 pm

Re: Theme Select Box question? by Shades
March 09, 2023, 01:55:53 pm

Re: Theme Select Box question? by EzPortal
March 09, 2023, 01:47:42 pm

Re: Theme Select Box question? by Shades
March 09, 2023, 01:34:07 pm

Re: Theme Select Box question? by EzPortal
March 09, 2023, 12:20:17 pm

+- HTML Menu


Sample HTML Block Usage - You May Custom Code it, as needed!

Recent Topics ezBlock

New built in translations for six langauges! by EzPortal
March 26, 2024, 11:15:32 pm

Smiley missing in shoutbox 2.1.4 by hustreamload
July 26, 2023, 08:14:02 am

Theme Select Box question? by Shades
March 15, 2023, 06:49:49 pm

Where is the facebook button color? by EzPortal
February 28, 2023, 06:45:09 pm

Display on Mobile - SMF 2.1.3 and EZ 5.5.2 by BugginIn
December 29, 2022, 04:07:13 pm

Blocks Help by Riggs1973
November 20, 2022, 12:59:30 pm

Surface ol lite theme release Free! by Steffen K.
November 18, 2022, 03:57:24 am

Undefined index: href by EzPortal
October 04, 2022, 08:49:59 pm

SMF-ezportal_column_5.cache): failed to open stream: No such file or directory by EzPortal
June 04, 2022, 11:40:13 am

Arcade block error: failed to open stream: No such file or directory by Shades
May 20, 2022, 02:47:13 pm

Author Topic: random media images  (Read 15946 times)

0 Members and 1 Guest are viewing this topic.

Offline Nickhead

  • Posts: 18
  • Karma: 0
random media images
« on: April 25, 2010, 03:05:23 pm »
so im trying to add the block.  i copied the text in the downloaded zip file, pasted to the new html block, and all i get is code, i put it in the php block, i get syntax error... which areas need editing so this works on my site?

<?xml version="1.0"?>
<!DOCTYPE block-info SYSTEM "http://www.ezportal.com/xml/block-info">
<block-info xmlns="http://www.ezportal.com/xml/block-info" xmlns:ezportal="http://www.ezportal.com/">
<id>chadon:mediagallery</id>
<title>Media Gallery randon photos</title>
<version>1.1</version>
<blocktype>php</blocktype>
<forumversion>SMF 1.1x 2.x</forumversion>
<author>Chadon</author>
<website>http://www.ozinart.com/index.php?action=contact</website>
<editable>1</editable>
<can_cache>1</can_cache>
<parameter1>
   <type>string</type>
   <required>1</required>
   <default>4</default>
   <title>Number of images</title>
   <order>1</order>
</parameter1>


<blockdata><![CDATA[global $sourcedir, $context, $txt, $galurl, $scripturl, $settings;

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

if (loadlanguage('MGallery') == false)
  loadLanguage('MGallery', 'english');

$items = getMediaItems(0, $parameter1, 'RAND()');


foreach ($items as $item)
  echo '
          <div class="smalltext" style="text-align: center; line-height: 1.4em; border: 1px

#000000 solid; padding: 5px;">
      <a href="',$galurl,'sa=item;id=',$item['id'],'"><img

src="',$galurl,'sa=media;id=',$item['id'],';thumb" alt="',$item['title'],'" /></a>
      </div>
';]]></blockdata>

</block-info>

Offline EzPortal

  • Administrator
  • *****
  • Posts: 1299
  • Karma: 67
Re: random media images
« Reply #1 on: April 25, 2010, 03:08:29 pm »
ezBlocks are installed like packages in smf.
Go to ezBlock Manager -> Then Download ezBlocks tab to upload the file.
Like ezPortal? Support me at https://www.patreon.com/vbgamer45/

Offline Nickhead

  • Posts: 18
  • Karma: 0
Re: random media images
« Reply #2 on: April 25, 2010, 03:16:13 pm »
sweet, now tell me this, i am not using the smf gallery, im using the large aeva mod, with media tab.  so when i enable the block, its blank, im assuming the code strings are incorrect?

here is a quick list of my installed mods.


Offline EzPortal

  • Administrator
  • *****
  • Posts: 1299
  • Karma: 67
Re: random media images
« Reply #3 on: April 25, 2010, 03:18:47 pm »
Not sure smf media gallery was renamed avea so I think that block should still work. Not sure the status of the avea mod I think the author left to work on other projects.
Like ezPortal? Support me at https://www.patreon.com/vbgamer45/

Offline Nickhead

  • Posts: 18
  • Karma: 0
Re: random media images
« Reply #4 on: April 25, 2010, 04:27:24 pm »
in that code then, what would need changed, say, the url, to make this compatible, or is it more complicated than that?

for example, my media section is http://ozinart.com/index.php?action=media

whereas, the xml file provided, lists MGallery in several places...

Offline EzPortal

  • Administrator
  • *****
  • Posts: 1299
  • Karma: 67
Re: random media images
« Reply #5 on: April 25, 2010, 04:34:26 pm »
I didn't write that ezBlock I would try contacting the author chadon and see if he has an update
Like ezPortal? Support me at https://www.patreon.com/vbgamer45/

Offline Nickhead

  • Posts: 18
  • Karma: 0
Re: random media images
« Reply #6 on: April 25, 2010, 04:42:34 pm »
gotcha, thanks

 

Related Topics

  Subject / Started by Replies Last post
6 Replies
9499 Views
Last post December 07, 2008, 09:08:35 pm
by onrope
4 Replies
11146 Views
Last post May 06, 2009, 03:47:07 pm
by Yahmez
3 Replies
12406 Views
Last post July 08, 2012, 04:50:55 am
by bsd2000
4 Replies
5786 Views
Last post March 09, 2010, 04:30:09 am
by Wegg
5 Replies
11541 Views
Last post January 22, 2022, 10:38:04 am
by EzPortal

+-SMF Gallery

Quick Menu


Powered by EzPortal