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

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

SMF-ezportal_column_5.cache): failed to open stream: No such file or directory by Shades
June 04, 2022, 11:29:37 am

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

Re: ezPortal 5.5 by EzPortal
May 20, 2022, 09:59:30 am

Re: ezPortal 5.5 by tigez
May 20, 2022, 08:46:15 am

Re: Undefined index: href by Shades
May 16, 2022, 02:58:21 pm

Re: Image/Attachment display issue by Shades
May 16, 2022, 02:28:35 pm

Re: Undefined index: href by Shades
May 16, 2022, 02:27:16 pm

+- HTML Menu


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

Recent Topics ezBlock

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

ezPortal 5.5 by EzPortal
May 20, 2022, 09:59:30 am

Undefined index: href by Shades
May 16, 2022, 02:58:21 pm

Image/Attachment display issue by Shades
May 16, 2022, 02:28:35 pm

Can't delete custom actions by Shades
April 13, 2022, 12:53:28 pm

Newest Member ezblock by Shades
March 23, 2022, 12:48:32 pm

Random Download Block by Shades
March 22, 2022, 10:37:47 am

BBC Pages by EzPortal
March 21, 2022, 10:36:41 pm

Recent Topics Blocks are different from left side to right side by Shades
March 21, 2022, 02:42:38 pm

Author Topic: random media images  (Read 14916 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: 1289
  • 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: 1289
  • 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: 1289
  • 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
8287 Views
Last post December 07, 2008, 09:08:35 pm
by onrope
4 Replies
10131 Views
Last post May 06, 2009, 03:47:07 pm
by Yahmez
3 Replies
11064 Views
Last post July 08, 2012, 04:50:55 am
by bsd2000
4 Replies
4718 Views
Last post March 09, 2010, 04:30:09 am
by Wegg
5 Replies
3664 Views
Last post January 22, 2022, 10:38:04 am
by EzPortal

+-SMF Gallery

Quick Menu


Powered by EzPortal