The Art Of Graphics
Please login or register.

Login with username, password and session length

News:

Welcome To Graphics Mayhem

collapse

Author Topic: Picture or Video scroller  (Read 217 times)

0 Members and 1 Guest are viewing this topic.

dobie

  • Proficient
  • Posts: 146
  • OS:
  • Windows Vista/Server 2008
  • Browser:
  • MS Internet Explorer 6.0
Picture or Video scroller
« on: August 23, 2009, 11:46:22 PM »
hi gang i would like to share this scroller i found it works perfect for left and right blocks for media gallery only you copy the code into your portal as a php

Code: [Select]
global $sourcedir, $user_info, $ID_MEMBER, $context, $txt, $galurl, $galurl2, $scripturl, $settings, $db_prefix;

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

   if(loadlanguage('MGallery') == false)
      loadLanguage('MGallery', 'english');
   $items = getMediaItems(0, 12, 'rand()');
   // $items = getMediaItems(0, 12, 'm.id_media DESC');

echo '';
echo '

     
   
Click title to go to gallery or image for small preview.

';
   foreach($items as $item)
      echo '
   
   
   ';

echo '


   

   ',$item['title'],'

     

     
   

   
';

this will scroll up ,down ,left and right .

dobs


SoLoGHoST

  • SMF MOD Expert!
  • SoLoGHoSt
  • Connoisseur
  • Posts: 2191
  • OS:
  • Windows Vista/Server 2008
  • Browser:
  • MS Internet Explorer 8.0
Re: Picture or Video scroller
« Reply #1 on: August 24, 2009, 12:39:44 AM »
Thanks for sharing dobie.

FYI: The only globals needed for this function to work are: $sourcedir, $txt, and $galurl.  You should delete all other globals in there as this is just a bunch of extra, useless garbage that never gets used in your function.
Just change what you have now to read like this instead:
Code: [Select]
global $sourcedir, $txt, $galurl;
And thanks again Dobie :thumbsup:
« Last Edit: August 24, 2009, 12:41:06 AM by SoLoGHoST »

 


Search



Latest Activity.

Site upgrade by spoogs
[Today at 07:28:35 PM]


Pixel Perfected for SMF 2 RC2 by live627
[Today at 06:57:48 PM]


POST DOWN FOR MAINTENANCE by IBRRORG
[Today at 03:22:02 PM]


X-mas icon [request] by spoogs
[December 17, 2009, 02:03:54 PM]


Bryce Update by DMHolt57
[December 16, 2009, 11:13:42 PM]


Wrong displayed messages through Editor by live627
[December 16, 2009, 11:01:04 PM]