To use this website completely, it is necessary to store cookies on your computer.
 

* Navigator

Expand - Collapse

* Statistic


  • *Total Posts: 16431
  • *Total Topics: 2522
  • *Online Today: 11
  • *Most Online: 292
(12. Nov 2016, 09:37:31)
  • *Users: 1
  • *Guests: 0
  • *Spiders: 0
  • *Total: 1

* Calendar

Mo
Tu
We
Th
Fr
Sa
Su
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

AEVA Gallery Block with options

Started by mikeymx5, 04. Jan 2010, 03:24:02

previous topic - next topic

0 Members and 0 Guests are viewing this topic.

mikeymx5

04. Jan 2010, 03:24:02
Here is a block for the new AEVA gallery that replaced MGallery.
You can change the options if you want it to show multiple blocks I prefer a single large preview block.

Code Select
global $sourcedir, $user_info, $ID_MEMBER, $context, $txt, $galurl, $galurl2, $scripturl, $settings, $db_prefix;
//  loadLanguage('Aeva');
//   @include_once($sourcedir . '/Aeva-Subs.php');
//   echo aeva_listItems(aeva_getMediaItems(0, 3, 'RAND()'), false, '', 1);


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

// Random=0 or Latest = 1
      $blocktype = 1;

// "thumb" or "preview"
      $blockimagetype = preview;

//      $blockFolder = $boarddir . '/Themes/default/aeva';
//      $blockItemsFile = $scrollerFolder . '/imageScrollerItems.xml';

// How many pictures
      $blockMaxItems = 1; 
      $blockoffset = 0;
// width of block in percent
      $boxwidth = 100;

if ($blocktype = 1 ) {
//Random
$items = aeva_getMediaItems($blockoffset, $blockMaxItems, 'rand()', true, array(), 'm.type = "image" AND a.access LIKE "%-1%" AND a.passwd=""');
}
else {
//Latest
$items = aeva_getMediaItems($blockoffset, $blockMaxItems, 'm.id_media DESC', true, array(), 'm.type = "image" AND a.access LIKE "%-1%" AND a.passwd=""');

}

echo '
    <div style="align: center;">
        <div class="smalltext" style="text-align: center;   width: 100% ;  margin-left: auto ;  margin-right: auto ;"></div>';

   foreach($items as $item)
      echo '
   <div class="smalltext" style="display: inline; padding: 5px;float:left;text-align:center; align:center; width: 100%;  margin-left: auto ;  margin-right: auto ;">
      <a href="',$galurl,'sa=item;id=',$item['id'],'">',$item['title'],'</a><br />
      <a href="',$galurl,'sa=media;id=',$item['id'],'" title="',$item['title'],'" class="hs  " onclick="return hs.expand(this);"><img alt="" src="',$galurl,'sa=media;id=',$item['id'],';',$blockimagetype,'" alt="" /></a><br />
      ',$txt['aeva_views'],' : ',$item['views'],'<br />
      ',$txt['aeva_posted_by'],' : <a href="',$scripturl,'?action=profile;u=',$item['poster_id'],'">',$item['poster_name'],'</a><br />
      ',$txt['aeva_in_album'],' : <a href="',$galurl,'sa=album;id=',$item['id_album'],'">',$item['album_name'],'</a>
      ',$item['is_new'] ? '<br /><img alt="" src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" border="0" />' : '','
   </div>';

echo '
<br style="clear:both;" />
</div>';

hartiberlin

#1
04. Jan 2010, 18:29:01
Can you please post a few demo links to
     
AEVA Gallery ?

Does it support picture slideshows via Adobe Flash ?

Many thanks.

rockyrails

#2
04. Jan 2010, 20:17:17
I inserted the code in php block and only saw the block title on frontpage, no images. Any help would be awesome (switched to Aeva Gallery) and would love to have the new images or even random images on frontpage.
cheers RockyRails

rockyrails

#3
05. Jan 2010, 05:42:50
Got it working (rebuilt all thumbs and preview files in AEVA - now I get an error message for each thumb or preview that loads when anyone hits the frontpage  :

http://www........../index.php?8: Use of undefined constant preview - assumed 'preview'File: /home3/......./public_html/........../Themes/default/PortaMx/PortaMx.template.php (portamx_below sub template - eval?)
Line: 15


Any help would be great - I love the gallery vertically using the thumbs

cheers

feline

#4
05. Jan 2010, 20:36:51
That is a undefined text string variable I think, but not from PortaMx...

Fel
Many are stubborn in relation to the path, a few in relation to the target.

neverhurry

#5
28. Jan 2010, 09:58:35
Quote from: rockyrails on 05. Jan 2010, 05:42:50
Got it working (rebuilt all thumbs and preview files in AEVA - now I get an error message for each thumb or preview that loads when anyone hits the frontpage  :

http://www........../index.php?8: Use of undefined constant preview - assumed 'preview'File: /home3/......./public_html/........../Themes/default/PortaMx/PortaMx.template.php (portamx_below sub template - eval?)
Line: 15


Any help would be great - I love the gallery vertically using the thumbs

cheers


I have aeva gallery installed, and did the rebuilt all thumbs and preview files in AEVA gallery, but it still shows no text, no images, no error info, just a title bar with empty content. Could you pls link a demo here? Thanks.

mikeymx5

#6
28. Jan 2010, 22:33:47
Code Select
global $sourcedir, $user_info, $ID_MEMBER, $context, $txt, $galurl, $galurl2, $scripturl, $settings, $db_prefix;
//  loadLanguage('Aeva');
//   @include_once($sourcedir . '/Aeva-Subs.php');
//   echo aeva_listItems(aeva_getMediaItems(0, 3, 'RAND()'), false, '', 1);


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

// Random=1 or Latest = 0
      $blocktype = 1;

// "thumb" or "preview"
      $blockimagetype = preview;

//      $blockFolder = $boarddir . '/Themes/default/aeva';
//      $blockItemsFile = $scrollerFolder . '/imageScrollerItems.xml';

// How many pictures
      $blockMaxItems = 1; 
      $blockoffset = 0;
// width of block in percent
      $boxwidth = 100;

if ($blocktype = 1 ) {
//Random
$items = aeva_getMediaItems($blockoffset, $blockMaxItems, 'rand()', true, array(), 'm.type = "image" AND a.access LIKE "%-1%" AND a.passwd=""');
}
else {
//Latest
$items = aeva_getMediaItems($blockoffset, $blockMaxItems, 'm.id_media DESC', true, array(), 'm.type = "image" AND a.access LIKE "%-1%" AND a.passwd=""');

}

echo '
    <div style="align: center;">
        <div class="smalltext" style="text-align: center;   width: 100% ;  margin-left: auto ;  margin-right: auto ;"></div>';

   foreach($items as $item)
      echo '
   <div class="smalltext" style="display: inline; padding: 5px;float:left;text-align:center; align:center; width: 100%;  margin-left: auto ;  margin-right: auto ;">
      <a href="',$galurl,'sa=item;id=',$item['id'],'">',$item['title'],'</a><br />
      <a href="',$galurl,'sa=media;id=',$item['id'],'" title="',$item['title'],'" class="hs  " onclick="return hs.expand(this);"><img alt="" src="',$galurl,'sa=media;id=',$item['id'],';',$blockimagetype,'" alt="" /></a><br />
      ',$txt['aeva_views'],' : ',$item['views'],'<br />
      ',$txt['aeva_posted_by'],' : <a href="',$scripturl,'?action=profile;u=',$item['poster_id'],'">',$item['poster_name'],'</a><br />
      ',$txt['aeva_in_album'],' : <a href="',$galurl,'sa=album;id=',$item['id_album'],'">',$item['album_name'],'</a>
      ',$item['is_new'] ? '<br /><img alt="" src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" border="0" />' : '','
   </div>';

echo '
<br style="clear:both;" />
</div>';


I changed a few things not sure if they are in the original post.
You can see a demo at HoustonMiataclub.com

neverhurry

#7
28. Jan 2010, 23:04:55
Thank you Mike, i tried again, no luck.  :-\

mikeymx5

#8
28. Jan 2010, 23:29:32
Whats your website maybe i can can get a better idea of the error

mikeymx5

#9
28. Jan 2010, 23:40:37
Also just to make sure you are not Using SMG Gallery with AEVA... for this to work you need to be using AEVA Gallery.

Try my original gallery block with options code from a later post. AEVA added back backward compatibility code so it should work but Im not 100% on that.

mikeymx5

#10
28. Jan 2010, 23:42:30
This code for SMF Gallery not AEVA Gallery
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');
// Random=0 or Latest = 1
      $blocktype = 1;
// "thumb" or "preview"
      $blockimagetype = preview;

// How many pictures
      $blockMaxItems = 1;
// offset the array dont change
      $blockoffset = 0;


if ($blocktype = 1 ) {
//Random
$items = getMediaItems($blockoffset, $blockMaxItems, 'rand()', true, array(), 'm.type = "image" AND a.access LIKE "%-1%" AND a.passwd=""');
}
else {
//Latest
$items = getMediaItems($blockoffset, $blockMaxItems, 'm.id_media DESC', true, array(), 'm.type = "image" AND a.access LIKE "%-1%" AND a.passwd=""');

}

echo '
    <div style="align: center;">
        <div class="smalltext" style="text-align: center;   width: 100% ;  margin-left: auto ;  margin-right: auto ;"></div>';

   foreach($items as $item)
      echo '
   <div class="smalltext" style="display: inline; padding: 5px;float:left;text-align:center; align:center; width: 100%;  margin-left: auto ;  margin-right: auto ;">
      <a href="',$galurl,'sa=item;id=',$item['id'],'">',$item['title'],'</a><br />
      <a href="',$galurl,'sa=item;id=',$item['id'],'"><img alt="" src="',$galurl,'sa=media;id=',$item['id'],';',$blockimagetype,'" alt="" /></a><br />
      ',$txt['mgallery_views'],' : ',$item['views'],'<br />
      ',$txt['mgallery_posted_by'],' : <a href="',$scripturl,'?action=profile;u=',$item['poster_id'],'">',$item['poster_name'],'</a><br />
      ',$txt['mgallery_in_album'],' : <a href="',$galurl,'sa=viewalbum;id=',$item['id_album'],'">',$item['album_name'],'</a>
      ',$item['is_new'] ? '<br /><img alt="" src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" border="0" />' : '','
   </div>';

echo '
<br style="clear:both;" />
</div>';

neverhurry

#11
29. Jan 2010, 17:57:21
Mike, i got another code from here:

https://www.portamx.com/topic_1376.msg8172.html#msg8172

and it works! Anyway, thank you so much!  :)

b4pjoe

#12
11. Apr 2010, 18:38:22
Quote from: mikeymx5 on 28. Jan 2010, 22:33:47
Code Select
global $sourcedir, $user_info, $ID_MEMBER, $context, $txt, $galurl, $galurl2, $scripturl, $settings, $db_prefix;
//  loadLanguage('Aeva');
//   @include_once($sourcedir . '/Aeva-Subs.php');
//   echo aeva_listItems(aeva_getMediaItems(0, 3, 'RAND()'), false, '', 1);


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

// Random=1 or Latest = 0
      $blocktype = 1;

// "thumb" or "preview"
      $blockimagetype = preview;

//      $blockFolder = $boarddir . '/Themes/default/aeva';
//      $blockItemsFile = $scrollerFolder . '/imageScrollerItems.xml';

// How many pictures
      $blockMaxItems = 1; 
      $blockoffset = 0;
// width of block in percent
      $boxwidth = 100;

if ($blocktype = 1 ) {
//Random
$items = aeva_getMediaItems($blockoffset, $blockMaxItems, 'rand()', true, array(), 'm.type = "image" AND a.access LIKE "%-1%" AND a.passwd=""');
}
else {
//Latest
$items = aeva_getMediaItems($blockoffset, $blockMaxItems, 'm.id_media DESC', true, array(), 'm.type = "image" AND a.access LIKE "%-1%" AND a.passwd=""');

}

echo '
    <div style="align: center;">
        <div class="smalltext" style="text-align: center;   width: 100% ;  margin-left: auto ;  margin-right: auto ;"></div>';

   foreach($items as $item)
      echo '
   <div class="smalltext" style="display: inline; padding: 5px;float:left;text-align:center; align:center; width: 100%;  margin-left: auto ;  margin-right: auto ;">
      <a href="',$galurl,'sa=item;id=',$item['id'],'">',$item['title'],'</a><br />
      <a href="',$galurl,'sa=media;id=',$item['id'],'" title="',$item['title'],'" class="hs  " onclick="return hs.expand(this);"><img alt="" src="',$galurl,'sa=media;id=',$item['id'],';',$blockimagetype,'" alt="" /></a><br />
      ',$txt['aeva_views'],' : ',$item['views'],'<br />
      ',$txt['aeva_posted_by'],' : <a href="',$scripturl,'?action=profile;u=',$item['poster_id'],'">',$item['poster_name'],'</a><br />
      ',$txt['aeva_in_album'],' : <a href="',$galurl,'sa=album;id=',$item['id_album'],'">',$item['album_name'],'</a>
      ',$item['is_new'] ? '<br /><img alt="" src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" border="0" />' : '','
   </div>';

echo '
<br style="clear:both;" />
</div>';


I changed a few things not sure if they are in the original post.
You can see a demo at HoustonMiataclub.com


Quote from: neverhurry on 28. Jan 2010, 09:58:35
I have aeva gallery installed, and did the rebuilt all thumbs and preview files in AEVA gallery, but it still shows no text, no images, no error info, just a title bar with empty content. Could you pls link a demo here? Thanks.


I get the same thing here. SMF 2.0 RC3 with AEVA 1.1b.....no text, no images, no error info, just a title bar with empty content. Any ideas?

b4pjoe

#13
11. Apr 2010, 20:57:16
Quote from: mikeymx5 on 28. Jan 2010, 22:33:47
I changed a few things not sure if they are in the original post.
You can see a demo at HoustonMiataclub.com


Tried changing

Code Select
//   @include_once($sourcedir . '/Aeva-Subs.php');
//   echo aeva_listItems(aeva_getMediaItems(0, 3, 'RAND()'), false, '', 1);


to

Code Select
   @include_once($sourcedir . '/Aeva-Subs.php');
   echo aeva_listItems(aeva_getMediaItems(0, 3, 'RAND()'), false, '', 1);


and I get thumbnails but would like just to have one random full size image. Also, is there a way to limit it to a certain gallery?

mikeymx5

#14
10. May 2010, 22:31:08
You see the problem with the code above is that it allows the random image block to show all pictures.. txt files, music files, and what ever else you have in the gallery.

My code just makes is more specific.

I did make a few updates, but I am no longer working on this as Im now working on a Java slide show style galleryblock.
Code Select
global $sourcedir, $user_info, $ID_MEMBER, $context, $txt, $galurl, $galurl2, $scripturl, $settings, $db_prefix;
//  loadLanguage('Aeva');
//   @include_once($sourcedir . '/Aeva-Subs.php');
//   echo aeva_listItems(aeva_getMediaItems(0, 3, 'RAND()'), false, '', 1);


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

// Random=1 or Latest = 0
      $blocktype = 1;

// "thumb" or "preview"
      $blockimagetype = thumb;

//      $blockFolder = $boarddir . '/Themes/default/aeva';
//      $blockItemsFile = $scrollerFolder . '/imageScrollerItems.xml';

// How many pictures
      $blockMaxItems = 6; 
      $blockoffset = 0;
// width height of pic block
      $boxwidth = 215;
      $boxheight = 215;

if ($blocktype = 1 ) {
//Random
$items = aeva_getMediaItems($blockoffset, $blockMaxItems, 'rand()', true, array(), 'm.type = "image" AND a.access LIKE "%-1%" AND a.passwd=""');
}
else {
//Latest
$items = aeva_getMediaItems($blockoffset, $blockMaxItems, 'm.id_media DESC', true, array(), 'm.type = "image" AND a.access LIKE "%-1%" AND a.passwd=""');

}

      echo '
   <div style="align:center;padding: 5px;margin-left: auto;margin-right: auto;">';

   foreach($items as $item)
      echo '
   <div class="smalltext" style="width:',$boxwidth,'px;height:',$boxheight,'px;align:center;padding: 5px;text-align:center;margin-left: auto;margin-right: auto;float:left;">
      <a href="',$galurl,'sa=item;id=',$item['id'],'">',$item['title'],'</a><br />
      <a href="',$galurl,'sa=media;id=',$item['id'],'" title="',$item['title'],'" class="hs  " onclick="return hs.expand(this);"><img alt="" src="',$galurl,'sa=media;id=',$item['id'],';',$blockimagetype,'" alt="" /></a><br />
      ',$txt['aeva_views'],' : ',$item['views'],'<br />
      ',$txt['aeva_posted_by'],' : <a href="',$scripturl,'?action=profile;u=',$item['poster_id'],'">',$item['poster_name'],'</a><br />
      ',$txt['aeva_in_album'],' : <a href="',$galurl,'sa=album;id=',$item['id_album'],'">',$item['album_name'],'</a>
      ',$item['is_new'] ? '<br /><img alt="" src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" border="0" />' : '','
   </div>';

echo '
<br style="clear:both;" />
</div>';