TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 365
  • Total: 365

Recent/Random Aeva media slideshow php block (support and comments)

Started by BlueSteel, April 19, 2010, 02:34:53 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Blue Steel

I can't see anything wrong.. how many galleries do you have and how many entries in each..

also you are pulling from album number 16 with this setting

$aeva_albums = array(16); 

this number needs to be changed to the album number which you have and want to pull the items out of
eg:

$aeva_albums = array();

gets from ALL albums as the comment states

also i think that if your pulling from specific albums you also need to set

$aeva_in_album = false;

to

$aeva_in_album = true;


don't forget to set it back to false when getting from all abums


Shade

Thank you BlueSteel. o/ Was the thing about changing the array from:
$aeva_albums = array(16);

to:
$aeva_albums = array();
My fault. It really has the help on the comments.
Sorry but thank you. Now i need only to change a few things to adapt it to my needs but seeing how things are going will sure help a lot.

flyer222

Link to my site:http//www.ccoua.com/test
SMF version: SMF2.0RC3
TP version: tp1.09beta5
Theme name and version:Curve pro
Browser Name and Version: IE8
Mods installed:
1,TinyPortal 1.098
2,Aeva Media 1.1b
Related Error messages: Nothing happend when I use the 1st code below but then I use another bit of code the second timeand I get this message!

Fatal error: Call to undefined function: echoaeva_listitems() in /home/ccoua0/public_html/test/Sources/Load.php(2105) : eval()'d code(48) : eval()'d code on line 13

// Configurable Graphics block
//for use with TinyPortal 1.0 Beta5
// for use with Aeva multimedia mod for SMF
// by BlueSteel 18th April 2010
// @TinyPortal : http://www.tinyportal.net/index.php?topic=32504.0
// Scrolling Options - on/off direction, speed, delay
// Item display options Random/Newest, number of item to display,selectable albums

// Marquee script Variables

$marq_offon = 1;                        // 0=off 1=on
$marq_behavior = "scroll";         // what should marquee do "scroll"
$marq_direction = "up";            // "left" , "right" , "up", "down"
$marq_height = "200px";            // size of viewable block area
$marq_scrolldelay = 10;            // delay iteritions
$marq_scrollamount = 1;         // how many pixels to scroll block each iteration
$marq_onmouseover = "this.stop()"; // what to do on mouseover
$marq_onmouseout = "this.start()";  // what to do on mouseout

// Aeva script variables
// - Gets items : array aeva_getMediaItems(int start, int limit, string sort, bool all_albums, array albums, string custom)
$aeva_start = 0;                   // where item number to start at
$aeva_limit = 5;                  // maximum number of items to display
$aeva_sort = 'm.time_added DESC';  // sort see Aeva-Subs.php for values I use 'RAND()' or 'm.time_added DESC' DESC or ASC for sorting order
$aeva_all_albums = true;           // all albums .. true or false
$aeva_albums = array(1);            // for a single album put eg: array(10) for an array of albums eg: array(3,5,7) for all albums eg:array()
$aeva_custom ='m.id_media';        // aeva custom string// - Creates HTML for viewing items : string aeva_listItems(array items, bool in_album = false, string align, int per_line)
$aeva_in_album = false;            // unknown paramiter .. set to false by default for now 
$aeva_align = 'center';            // allign items 'left' 'center' 'right'
$aeva_per_line = 1;                // number of colums to display at once eg: 1 for single .. 3 for 3 items accross
global $sourcedir;   require_once($sourcedir . '/Aeva-Subs.php');

// -------------------------------------
// Don't edit anything below this line
// -------------------------------------

// Start marquee routine if set to do soif ($marq_offon == 1){ echo '<marquee behavior=',$marq_behavior,' direction=',$marq_direction,' height=',$marq_height,' scrolldelay=',$marq_scrolldelay,' scrollamount=',$marq_scrollamount,' onmouseover=',$marq_onmouseover,' onmouseout=',$marq_onmouseout,' >';}
// end marquee routine

// start actual block to be displayed    echo '<div style="width: 100% height:',$marq_height,'; overflow: hidden;">';    echo aeva_listItems(aeva_getMediaItems($aeva_start,$aeva_limit,$aeva_sort,$aeva_all_albums,$aeva_albums,$aeva_custom),$aeva_in_album,$aeva_align,$aeva_per_line);    echo '</div>';
// end actual block to be displayed

//start marquee routine   if ($marq_offon == 1){echo'</marquee>';}
//end scrolling routine


Second Bluesteel code used!

$start = 0;
$max_number_of_pics = 99;
$sort = 'm.log_last_access_time';

// Start Scrolling routine
echo '<marquee  behavior="scroll" direction="up" height="200px" scrolldelay=" 10" scrollamount=" 1" onmouseover="this.stop()" onmouseout="this.start()">';
                echo '<div style="width: 100%; overflow: hidden;">';

// end scrolling routine

global $sourcedir;
require_once($sourcedir . '/Aeva-Subs.php');   
echoaeva_listItems(aeva_getMediaItems($start, $max_number_of_pics,$sort, 'm.id_media'), false, '', 1);

//start scrolling routine
echo'</div></marquee>';
//end scrolling routine

Blue Steel

if your trying to pull out stuff from in selected albums

...
$aeva_albums = array(1);            // for a single album put eg: array(10) for an array of albums eg: array(3,5,7) for all albums eg:array()
...
$aeva_in_album = true;            // unknown paramiter .. set to false by default for now
...


if your trying to pull from all albums

...
$aeva_albums = array();            // for a single album put eg: array(10) for an array of albums eg: array(3,5,7) for all albums eg:array()
...
$aeva_in_album = false;            // unknown paramiter .. set to false by default for now
...




Joe B

Thanks a lot and this snippet works on  SMF 1.1.11  with TinyPortal v1.0 beta 4

Stroopy

I have the same problems as flyer222.
Anyone know how to fix that please?

Freddy

Try changing this line :

echoaeva_listItems(aeva_getMediaItems($start, $max_number_of_pics,$sort, 'm.id_media'), false, '', 1);

To :

echo aeva_listItems(aeva_getMediaItems($start, $max_number_of_pics,$sort, 'm.id_media'), false, '', 1);

Stroopy

Thanks that worked.
Now I was wondering is there also one that shows the last 5 images next to each other and doesn't slide?

I had one that worked fine but that was for SMF Media Gallery and doesn't seem to work on Aeva media.

The code I used was:
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, 4, 'm.id_media DESC');

echo '
<center><table>
<tr>
';
   foreach($items as $item)
      echo '

   <td valign="top">
   <div class="smalltext" style=" line-height: 1.4em; border: 1px #000000 solid; padding: 5px;">
     



      <center><a href="',$galurl,'sa=item;id=',$item['id'],'"><img alt="" src="',$galurl,'sa=media;id=',$item['id'],';thumb" alt="" /></a><br />

<center><a href="',$galurl,'sa=item;id=',$item['id'],'">',$item['title'],'</a><br />
     
      ',$item['is_new'] ? '<br /><img alt="" src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" border="0" />' : '','


   </div>
   </td>';

echo '
   </tr>
</table></center>';


Maybe you can tell me how to make it work for Aeva media?

Freddy

Try turning the marquee off and changing the other settings in the script in BlueSteele's script.

Basically you want to read the configuration area, it's all there.

This website is proudly hosted on Crocweb Cloud Website Hosting.