+-

UserBox

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

Sponsored Links

+- Recent Posts

Re: Code being stripped in HTML block by negative_energy
February 06, 2012, 06:30:36 pm

Re: Code being stripped in HTML block by EzPortal
February 06, 2012, 06:25:25 pm

Re: Code being stripped in HTML block by negative_energy
February 06, 2012, 06:23:16 pm

Re: Flash EzBlock by negative_energy
February 06, 2012, 06:18:40 pm

Re: Code being stripped in HTML block by EzPortal
February 06, 2012, 06:08:49 pm

Code being stripped in HTML block by negative_energy
February 06, 2012, 06:01:55 pm

Re: EzPortal 0.5.1 and Russian encoding by Retrouser
February 04, 2012, 12:59:13 am

Re: Flash EzBlock by negative_energy
January 23, 2012, 12:56:04 am

Re: Flash EzBlock by EzPortal
January 22, 2012, 11:08:10 pm

Flash EzBlock by negative_energy
January 22, 2012, 05:29:23 pm

Author Topic: random media images  (Read 9778 times)

0 Members and 1 Guest are viewing this topic.

Offline Nickhead

  • Newbie
  • *
  • Posts: 18
  • Karma: 0
    • View Profile
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: 624
  • Karma: 42
    • View Profile
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.

Offline Nickhead

  • Newbie
  • *
  • Posts: 18
  • Karma: 0
    • View Profile
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: 624
  • Karma: 42
    • View Profile
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.

Offline Nickhead

  • Newbie
  • *
  • Posts: 18
  • Karma: 0
    • View Profile
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: 624
  • Karma: 42
    • View Profile
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

Offline Nickhead

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

 

Powered by EzPortal