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: 282
  • Total: 282

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 1 Guest are viewing this topic.

Freddy

Actually, which script are you using ?  I see there are two floating around.  You could try this :


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

echo '<div style="width: 100%; overflow: hidden;">';

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

echo'</div>';


I can't test it as I don't have Aeva installed at the moment.

Stroopy

I tried to use this one but it won't do anything.
// 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

Freddy

Try the code I just gave and let me know how you get on.

Cya tomorrow, late here...

Stroopy

When I try your code:
$start = 0;
$max_number_of_pics = 5;
$sort = 'm.log_last_access_time';

echo '<div style="width: 100%; overflow: hidden;">';

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

echo'</div>';


I only seem to get 3 pictures under each other, not next to each other and also it adds:
PE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
On top of the page for some reason.

All I really want is just a block showing the 3 or 4 latest files added to the gallery.
I had a nice one working for SMF Media Gallery but the script doesn't work for Aeva Media.

I added a image to this post to show what I mean.

Renegd98

Change the number at the end of the echo aeva_listItems to 3... or however many columns you want.

If you want 3 side by side then change it to 3....  and change the max number to pull to match

if you want 4 then make it 4 and max to 4...etc.. you get the picture

Blue Steel

People should newver just copy / paste code without at least reading the docs/ comments and checking the settings..

like i've stated prior to this...

you need to edit at least these settings

only of you want to read from ALL albums .. If you want to read from a single or stated multiple albums then this setting MUST BE CHANGED TO false

$aeva_all_albums = true;           // all albums .. true or false

this one you have to replace the number in the brackets.. ie: the 1 .. with the albums you want it to get the content from seperated by , ..

IF you want to get from ALL albums .. you need to have this set to array()  ie: nothing in the brackets [ red]

$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()


Stroopy

Alright now I'm using this code and it works great.
$start = 0;
$max_number_of_pics = 3;
$sort = 'm.time_added DESC';

echo '<div style="width: 100%; overflow: hidden;">';

global $sourcedir;
require_once($sourcedir . '/Aeva-Subs.php');   
echo aeva_listItems(aeva_getMediaItems($start, $max_number_of_pics,$sort, 'm.id_media'), true, '', 3);

echo'</div>';


But now it shows this message at the top of my website:
PE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Any idea what's up with that?

IchBin

Are you saying that after you used this code snippet you suddenly have that text at the top of your page? Link?

Stroopy

Yeah, when I active the block the code is in that text comes up.
I don't have the block active at the moment because it messes up the layout.


This website is proudly hosted on Crocweb Cloud Website Hosting.