SimplePortal
Customization => Blocks and Modifications => Block Requests => Topic started by: roomeat on December 30, 2009, 01:37:56 AM
-
Hey guys.
I have updated my test site to use Aeva Media (Replaces SMF Gallery and Aeva) but the gallery block no longer works.
Could someone make a new one.. or alter the existing to work with Aeva Media.
:) :)
-
Aeva Media is now Alpha Version... But I modify the function ;)
Open the file sources/PortalBlocks.php
Search:
if (file_exists($sourcedir . '/MGallery.php'))
$mod = 'smf_media_gallery';
Add After:
elseif (file_exists($sourcedir . '/Aeva-Gallery.php'))
$mod = 'aeva_media_gallery';
Search:
elseif ($mod == 'smf_gallery')
{
if (loadLanguage('Gallery', '', false) === false)
Add Before:
elseif ($mod == 'aeva_media_gallery')
{
require_once($sourcedir . '/Aeva-Subs.php');
aeva_loadSettings();
if (loadLanguage('Aeva', '', false) === false)
loadLanguage('Aeva', 'english', false);
$items = aeva_getMediaItems(0, $limit, $type ? 'RAND()' : 'm.id_media DESC');
}
Search:
elseif ($mod == 'smf_gallery')
{
echo '
<a href="', $scripturl, '?action=gallery;sa=view;id=', $item['id'], '">', $item['title'], '</a><br />
Add Before:
if ($mod == 'aeva_media_gallery')
{
echo '
<a href="', $galurl, 'sa=item;id=', $item['id'], '">', $item['title'], '</a><br />
<a href="', $galurl, 'sa=item;id=', $item['id'], '"><img src="', $galurl, 'sa=media;id=', $item['id'], ';thumb" 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" />' : '';
}
Test in my site with Aeva Media 1.0 Alpha 2 and work ;)
-
Cool.. Thank You :)
Had to do a little searching as my PortalBlocks.php is not quite the same as yours for some reason.. but got it working anyhow :)
-
Had to do a little searching as my PortalBlocks.php is not quite the same as yours for some reason
mmmm...I test with SMF 1.1.11
You use 2.0 RC2..
-
Ahhh yes.. I am using 2.0 RC2
Well the code changes work for me anyhow :D :D
-
Add After:
elseif (file_exists($sourcedir . '/Aeva-Gallery.php'))
$mod = 'aeva_media_gallery'
This should be:
Add After:
elseif (file_exists($sourcedir . '/Aeva-Gallery.php'))
$mod = 'aeva_media_gallery';
(Please note the ";" at the end)
Darknico: your modification works like a charm on SMF 2.0 RC2 and SP 2.3.1! :applause:
-
(Please note the ";" at the end)
Ooops!! :-[
I correct the post ;)
Darknico: your modification works like a charm on SMF 2.0 RC2 and SP 2.3.1! :applause:
hehe :nervous-happy:
-
Darn I almost had it sorted.
Can someone please make it easier for those of us on 2.0 to adapt this edit for our forums.
-
I'm displaying a PHP block with this...
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, 4, 'RAND()'), false, '', 1);
Don't ask me what it does. I copied code from a couple of people in a thread at smf-media.com (http://smf-media.com/community/index.php?topic=1511.0), and lucked into something that works for now. :)
-
Hey tfs thanks for the reply.
I had a look at the link which was a big help.
There is now a gallery on my portal.
8) 8)
-
No need for all those globals. :)
-
Hi, I'm new and my English is not very good.
Where to perform this modification to include AEVA block?
-
Make a new PHP block and insert the following code:
function show_aeva_media_block()
{
global $sourcedir;
// Load the language file
loadLanguage('Aeva');
// Grab the file.
if (file_exists($sourcedir . '/Aeva-Subs.php'))
require_once($sourcedir . '/Aeva-Subs.php');
// If it doesn't exist, tell them this and stop running.
else
{
echo '<b>You don\'t have Aeva installed! Unable to continue!</b>';
return;
}
// Use aeva functions to show the media.
echo aeva_listItems(aeva_getMediaItems(0, 4, 'RAND()'), false, '', 1);
}
// Run the function.;
show_aeva_media_block();
-
Very thanks ccbtimewiz tomorrow i ll try
Good ;D 8)
-
Make a new PHP block and insert the following code:
function show_aeva_media_block()
{
global $sourcedir;
// Load the language file
loadLanguage('Aeva');
// Grab the file.
if (file_exists($sourcedir . '/Aeva-Subs.php'))
require_once($sourcedir . '/Aeva-Subs.php');
// If it doesn't exist, tell them this and stop running.
else
{
echo '<b>You don\'t have Aeva installed! Unable to continue!</b>';
return;
}
// Use aeva functions to show the media.
echo aeva_listItems(aeva_getMediaItems(0, 4, 'RAND()'), false, '', 1);
}
// Run the function.;
show_aeva_media_block();
I have figured out I can change the
echo aeva_listItems(aeva_getMediaItems(0, 4, 'RAND()'), false, '', 1);
from 4 to whatever number of items I wish to display however I would like it to show new addtions to the gallery. I suppose I need to change "RAND" to something else? what does the false mean out of curiosity.
Also, a bit picky but the images appear left aligned instead of centered in the block, can I change that?
-
Also, a bit picky but the images appear left aligned instead of centered in the block, can I change that?/quote]
Oh yeah, i've been trying to figure this out for awhile now. Please ;)
-
I have figured out I can change the
echo aeva_listItems(aeva_getMediaItems(0, 4, 'RAND()'), false, '', 1);
from 4 to whatever number of items I wish to display however I would like it to show new addtions to the gallery. I suppose I need to change "RAND" to something else? what does the false mean out of curiosity.
Also, a bit picky but the images appear left aligned instead of centered in the block, can I change that?
... change the '1' at the end of that line to a '0' and it will display horizontally as well.
Using this as a base, I am going to try to throw some javascript in and have it show up like a proper slideshow with arrows on either side to view more pics in a nice flowing manner.. maybe 4 at a time.
Maybe an option to click random or recent.
Hmph... another project to add on the list.
UD
-
I changed the 1 to a 0 and nothing happened. Still left aligned and yes, i did refresh :P
-
I changed the 1 to a 0 and nothing happened. Still left aligned and yes, i did refresh :P
Oops, my apologies.. Also change false to true.
Like this:
$per_row = "4";
$images = aeva_listItems(aeva_getMediaItems(0, $per_row, 'RAND()'), true, '', 0);
UD
-
I changed the 1 to a 0 and nothing happened. Still left aligned and yes, i did refresh :P
Oops, my apologies.. Also change false to true.
Like this:
$per_row = "4";
$images = aeva_listItems(aeva_getMediaItems(0, $per_row, 'RAND()'), true, '', 0);
UD
Hmmmmm - that code looks different than what is provided above and using the above code and changing false to true, does nothing still.
Until i can get it the way i want ( "1" most recent media image centered ), i changed it to 2 images and had to expand the size of all blocks to 250 wide and it looks good now though i would prefer to keep my blocks at 200. At 200, it created a bottom scroll bar with two images.
-
I get issues with permissions, as admin the pictures don show for some reason...
using the following code...
function show_aeva_media_block()
{
global $sourcedir;
// Load the language file
loadLanguage('Aeva');
// Grab the file.
if (file_exists($sourcedir . '/Aeva-Subs.php'))
require_once($sourcedir . '/Aeva-Subs.php');
// If it doesn't exist, tell them this and stop running.
else
{
echo '<b>You don\'t have Aeva installed! Unable to continue!</b>';
return;
}
// Use aeva functions to show the media.
echo aeva_listItems(aeva_getMediaItems(0, 4, 'RAND()'), false, '', 1);
}
// Run the function.;
show_aeva_media_block();
-
Hmmmmm - that code looks different than what is provided above and using the above code and changing false to true, does nothing still.
Until i can get it the way i want ( "1" most recent media image centered ), i changed it to 2 images and had to expand the size of all blocks to 250 wide and it looks good now though i would prefer to keep my blocks at 200. At 200, it created a bottom scroll bar with two images.
It works for me.
Here is the whole code block that is set to 4 random pics:
function show_aeva_media_block()
{
global $sourcedir;
// Set amount visible
$visible = "4";
// Load the language file
loadLanguage('Aeva');
// Grab the file.
if (file_exists($sourcedir . '/Aeva-Subs.php'))
require_once($sourcedir . '/Aeva-Subs.php');
// If it doesn't exist, tell them this and stop running.
else
{
echo '<b>You don\'t have Aeva installed! Unable to continue!</b>';
return;
}
// Use aeva functions to show the media.
$images = aeva_listItems(aeva_getMediaItems(0, $visible, 'RAND()'), true, '', 0);
$show = '<div id="aeva_pics" style="width: 100%;" overflow="visible">'. $images. '</div>';
echo $show;
return;
}
// show the contents
show_aeva_media_block();
UD
-
Just re-entered the script you just posted and changed the "4" to a "1" and it is left aligned again :(
-
Just re-entered the script you just posted and changed the "4" to a "1" and it is left aligned again :(
Why would you change it to 1??
That only shows 1 picture. The purpose of what was written there was to show a few (4 in the example) in a horizontal view as opposed to wiz's original post which shows them vertically.
UD
-
What i wanted from this block script was to show the most recent image (1) centered in a block. If i use 2 or 4, i have to increase the size of all portal blocks from 200 to 250 because it creates a bottom scrollbar. Go easy on me as i'm just learning.
-
What i wanted from this block script was to show the most recent image (1) centered in a block. If i use 2 or 4, i have to increase the size of all portal blocks from 200 to 250 because it creates a bottom scrollbar. Go easy on me as i'm just learning.
Just add a center tag.
Try this...
function show_aeva_media_block()
{
global $sourcedir;
// Set amount visible
$visible = "4";
// Load the language file
loadLanguage('Aeva');
// Grab the file.
if (file_exists($sourcedir . '/Aeva-Subs.php'))
require_once($sourcedir . '/Aeva-Subs.php');
// If it doesn't exist, tell them this and stop running.
else
{
echo '<b>You don\'t have Aeva installed! Unable to continue!</b>';
return;
}
// Use aeva functions to show the media.
$images = aeva_listItems(aeva_getMediaItems(0, $visible, 'RAND()'), true, '', 0);
$show = '<div id="aeva_pics" style="width: 100%;" overflow="visible"><center>'. $images. '</center></div>';
echo $show;
return;
}
// show the contents
show_aeva_media_block();
But change the 4 to a 1 or 2 if that's all you want.
UD
-
You the man :applause:
Thanks
-
Better:
function show_aeva_media_block()
{
global $sourcedir;
// Set amount visible
$visible = 4;
// Load the language file
loadLanguage('Aeva');
// Grab the file.
if (file_exists($sourcedir . '/Aeva-Subs.php'))
require_once($sourcedir . '/Aeva-Subs.php');
// If it doesn't exist, tell them this and stop running.
else
{
echo '<b>You don\'t have Aeva installed! Unable to continue!</b>';
return;
}
// Use aeva functions to show the media.
$images = aeva_listItems(aeva_getMediaItems(0, $visible, 'RAND()'), true, '', 0);
echo '
<div id="aeva_pics" style="width: 100%;" overflow="visible">
<div align="center">'. $images. '</div>
</div>';
}
show_aeva_media_block();
-
:applause: and you too CCB
-
Your mileage may vary. With the code listed below it brought my site to a complete crawl. I would recommend paying attention to performance after enabling it. Page load times during peak hours was between 5-10 seconds. Up from an average of .05 seconds. I monitored this from the status.php
loadLanguage('Aeva');
@include_once($sourcedir . '/Aeva-Subs.php');
echo aeva_listItems(aeva_getMediaItems(0, 1, 'RAND()'), false, '', 1);
-
Did the version I rewrote work better in your environment?
-
I hope that Simple Portal have this by default in their next release. :thumbsup:
-
How can I get the thumbs to display horizontally? I like the vertical display for my columns, but in the forums I wanted to list a few horizontally across the top. Everything I've tried just displays them vertically :(
I also want to display from a specified folder. Usually there is an 'array' code I can put the album number in there..
Thank you!
-
The vertical code is working great. Thanks for the help.
How can I get it to display just the most recent images?
Thanks,
Robert
-
Did the version I rewrote work better in your environment?
Not really. The performance problem was in the SQL query that is part of AEVA Media. Since the release of Version 1 came out I installed it just a few days ago. Nao calls this function out in his release notes of AEVA Media Version 1 final and he addressed this performance issue. The performance is much better with that release.
-
Can a certain album be specified with that code above?
-
Now with the oficial release of Aeva Media v1.0 Final (not more alpha or beta). I hope that we can have now a Aeva Mod for the Simple Portal or we can wait until the developers add this feature to support Aeva Media in the next release of Simple Portal.
-
Can someone help me modify the block code attached below? I want it to display items horizontally rather than vertically. I don't know if it means a new code or a modification of the one I have.
-
Hey Folks,
Not sure if i should start a new thread but i'm having issues with the Aeva 1.0 and the gallery block.
I used the code at the start of this thread and still no luck.
See here http://www.ontarioclimbing.com/forum/index.php (http://www.ontarioclimbing.com/forum/index.php)
Any help???
-
Ok! Getting closer! Applied the solutions above and they worked but i'm getting a missing picture icon and when i click on the missing picture i get a 406 Not Acceptable error (see attachment).
Any ideas?
Here is web address to my site.
http://www.ontarioclimbing.com/forum/index.php?www (http://www.ontarioclimbing.com/forum/index.php?www)
-
I have put together a neat little slide-show package that will display Aeva photos and/or SMF forum photos (image attachments) in a portal block.
CLICK HERE (http://askusaquestion.net/index.php/topic,904.0.html) to view the relevant thread. You might have to login/register to download files.
Specific settings for what you want displayed are done in the block itself and also the settings.php file of the package provided in that thread.
UD
-
Hey Underdog!
Any way this can be tweaked for folks running SMF 1.1.11?
It won't load on my site... :(
-
Hey Underdog!
Any way this can be tweaked for folks running SMF 1.1.11?
It won't load on my site... :(
That version will not work with SMF 1.1.11 ... I will have to add another function to read the db for the recent/random image attachments and update the install file. I will do it some time this week and when I finish I will post a reply in that thread and update the attached install package from the first post.
UD
-
Thank for this hack, it works very well. But I want to display items vertically. How to?
-saosangmo
-
Thank for this hack, it works very well. But I want to display items vertically. How to?
-saosangmo
Look here: http://simpleportal.net/index.php?topic=4198.msg27750#msg27750
but change the 0 to a 1
-
thank for your support. it works very well.
-saosangmo
-
thanks for all your work underdog. Looking forward to the 1.1.11 version! :)
-
thanks for all your work underdog. Looking forward to the 1.1.11 version! :)
You're very welcome.
The thread has been updated with the new version.
I also added random display for forum photos.
UD
-
Ok! Getting closer! Applied the solutions above and they worked but i'm getting a missing picture icon and when i click on the missing picture i get a 406 Not Acceptable error (see attachment).
Any ideas?
Here is web address to my site.
http://www.ontarioclimbing.com/forum/index.php?www (http://www.ontarioclimbing.com/forum/index.php?www)
Is the gallery's folder writable?
-
For SMF Media Gallery there is a really neat block code to use for your portal. Anyone willing to port this to Aeva Media?
Original post here http://simpleportal.net/index.php?topic=1654.msg12017;topicseen#msg12017
global $sourcedir, $context, $txt, $galurl, $scripturl, $settings;
if(!file_exists($sourcedir . '/Subs-MGallery.php'))
{
echo $txt['sp-mgallery_error'];
return false;
}
$parameters[1] = 0;
$limit = empty($parameters[0]) ? 1 : (int) $parameters[0];
$type = empty($parameters[1]) ? 'm.id_media DESC' : 'RAND()';
require_once($sourcedir . '/Subs-MGallery.php');
loadMGal_Settings();
loadLanguage('MGallery', sp_languageSelect('MGallery'));
$items = getMediaItems(0, $limit, $type);
echo '
<hr />
<div style="text-align: center; line-height: 1.4em;">The Latest Gallery Submission</div>
<hr />
<table style="border: 0; margin: 0 auto;">';
foreach ($items as $item)
echo '
<tr>
<td>
<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'], '">', $item['title'], '</a><br />
<a href="', $galurl, 'sa=item;id=', $item['id'], '"><img src="', $galurl, 'sa=media;id=', $item['id'], ';preview" 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=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>
</td> </tr>';
echo '
</table>';
$parameters[1] = 1;
$limit = empty($parameters[0]) ? 5 : (int) $parameters[0];
$type = empty($parameters[1]) ? 'm.id_media DESC' : 'RAND()';
require_once($sourcedir . '/Subs-MGallery.php');
loadMGal_Settings();
loadLanguage('MGallery', sp_languageSelect('MGallery'));
$items = getMediaItems(0, $limit, $type);
echo '
<hr />
<div style="text-align: center; line-height: 1.4em;">A selection of Random Images from the Gallery</div>
<hr />
<table style="border: 0; margin: 0 auto;">
<tr style="width:150px; height:150px;">';
foreach ($items as $item)
echo '
<td>
<div class="smalltext" style="text-align: center; line-height: 1.4em; border: 1px #000000 solid; padding: 5px;width:125px;height:160px;">
<a href="', $galurl, 'sa=item;id=', $item['id'], '">', $item['title'], '</a><br />
<a href="', $galurl, 'sa=item;id=', $item['id'], '"><img src="', $galurl, 'sa=media;id=', $item['id'], ';thumb" 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=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>
</td>';
echo '
</tr>
</table>';
$parameters[1] = 1;
$limit = empty($parameters[0]) ? 5 : (int) $parameters[0];
$type = empty($parameters[1]) ? 'm.id_media DESC' : 'RAND()';
require_once($sourcedir . '/Subs-MGallery.php');
loadMGal_Settings();
loadLanguage('MGallery', sp_languageSelect('MGallery'));
$items = getMediaItems(0, $limit, $type);
echo '
<table style="border: 0; margin: 0 auto;">
<tr style="width:150px; height:150px;">';
foreach ($items as $item)
echo '
<td>
<div class="smalltext" style="text-align: center; line-height: 1.4em; border: 1px #000000 solid; padding: 5px;width:125px;height:160px;">
<a href="', $galurl, 'sa=item;id=', $item['id'], '">', $item['title'], '</a><br />
<a href="', $galurl, 'sa=item;id=', $item['id'], '"><img src="', $galurl, 'sa=media;id=', $item['id'], ';thumb" 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=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>
</td>';
echo '
</tr>
</table>';
$parameters[1] = 1;
$limit = empty($parameters[0]) ? 5 : (int) $parameters[0];
$type = empty($parameters[1]) ? 'm.id_media DESC' : 'RAND()';
require_once($sourcedir . '/Subs-MGallery.php');
loadMGal_Settings();
loadLanguage('MGallery', sp_languageSelect('MGallery'));
$items = getMediaItems(0, $limit, $type);
echo '
<table style="border: 0; margin: 0 auto;">
<tr>';
foreach ($items as $item)
echo '
<td style="width:150; height:150;">
<div class="smalltext" style="text-align: center; line-height: 1.4em; border: 1px #000000 solid; padding: 5px;width:125px;height:160px;">
<a href="', $galurl, 'sa=item;id=', $item['id'], '">', $item['title'], '</a><br />
<a href="', $galurl, 'sa=item;id=', $item['id'], '"><img src="', $galurl, 'sa=media;id=', $item['id'], ';thumb" 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=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>
</td>';
echo '
</tr>
</table>';
-
What does that block code supposed to do and look?
-
What does that block code supposed to do and look?
It show the latest image (large) on top and then 15 random images below
http://www.monsters-mansion.com/testsmf2/
-
Try this:
global $sourcedir;
require_once($sourcedir . '/Aeva-Subs.php');
echo '<h2>Latest Image</h2>';
echo preg_replace('~;thumb" width="\d+" height="\d+~', '" width="500', str_replace('"><tr>', '" cellspacing="8" style="width: 100%;"><tr>', aeva_listItems(aeva_getMediaItems(0, 1, 'm.id_media DESC'), false, '', 1)));
echo '<h2>Random Images</h2>';
echo aeva_listItems(aeva_getMediaItems(0, 12, 'RAND()'), false, '', 4);
-
PERFECT!!! Thank you very much!
http://monsters-mansion.com/index.php
-
You're welcome. ;)
-
Nice block code...
-
How to show the 3 latest image (small) in row, with title and autor name only ?
-
This would do it:
global $sourcedir;
require_once($sourcedir . '/Aeva-Subs.php');
echo aeva_listItems(aeva_getMediaItems(0, 3, 'm.id_media'), false, '', 3);
Though, I don't have the time to make it hide the details other than title and author. You may want to ask that from the author of the mod.
-
thank you
-
This would do it:
It displays the first images, not the latest...
-
I have put together a neat little slide-show package that will display Aeva photos and/or SMF forum photos (image attachments) in a portal block.
CLICK HERE (http://askusaquestion.net/index.php/topic,904.0.html) to view the relevant thread. You might have to login/register to download files.
Specific settings for what you want displayed are done in the block itself and also the settings.php file of the package provided in that thread.
UD
hey underdog, ur code is great! like the slideshow...
can u do something like this with it?
http://spaceforaname.com/gallery-customized.html (http://spaceforaname.com/gallery-customized.html)
cheers!
-
I have put together a neat little slide-show package that will display Aeva photos and/or SMF forum photos (image attachments) in a portal block.
CLICK HERE (http://askusaquestion.net/index.php/topic,904.0.html) to view the relevant thread. You might have to login/register to download files.
Specific settings for what you want displayed are done in the block itself and also the settings.php file of the package provided in that thread.
UD
hey underdog, ur code is great! like the slideshow...
can u do something like this with it?
http://spaceforaname.com/gallery-customized.html (http://spaceforaname.com/gallery-customized.html)
cheers!
The settings.php file from the package I put together will allow you to edit how the slideshow looks so one can choose a view with 1 large photo and several thumbnails such as the one in the link you provided.
-
wow! really.....Bad that i'm not PHP fluent...But I'll give it my best try
thanks!
-
ok, after a bit of struggling with PHP, :( I'm stuck! all i was able to do with it was speed up the show... can anyone help me with this...i have attached a pic of what i get,
it says to define number of columns etc in the php, changing that doesn't make anything happen...btw I'm now refering to the help sites
if any of you could help with this it would be great!
cheers!
-
ok, after a bit of struggling with PHP, :( I'm stuck! all i was able to do with it was speed up the show... can anyone help me with this...i have attached a pic of what i get,
it says to define number of columns etc in the php, changing that doesn't make anything happen...btw I'm now refering to the help sites
if any of you could help with this it would be great!
cheers!
Hmm... At the bottom of that settings.php file there is a list of globals that needs to be either omitted or remark tags placed around it.
Even after testing this myself, any changes made here do not seem to take effect... This is something I will have to fix and then I will release a new version. Thank you for discovering this issue.
For now, admins will have to use it as is (no thumbnails display).
UD
-
Thanks underdog,
Hope it will be some time around soon :)
-
I leave the code with an image at a time but random
function show_aeva_media_block()
{
global $sourcedir;
// Set amount visible
$visible = 1;
// Load the language file
loadLanguage('Aeva');
// Grab the file.
if (file_exists($sourcedir . '/Aeva-Subs.php'))
require_once($sourcedir . '/Aeva-Subs.php');
// If it doesn't exist, tell them this and stop running.
else
{
echo '<b>You don\'t have Aeva installed! Unable to continue!</b>';
return;
}
// Use aeva functions to show the media.
$images = aeva_listItems(aeva_getMediaItems(0, $visible, 'RAND()'), true, '', 1, false, '', 1);
echo '
<div id="aeva_pics" style="width: 100%;" overflow="visible">
<div align="center">'. $images. '</div>
</div>';
}
show_aeva_media_block();
I hope you learn
-
Is it possible to exclude a particular album to display random?
-
Try this:
global $sourcedir;
require_once($sourcedir . '/Aeva-Subs.php');
echo '<h2>Latest Image</h2>';
echo preg_replace('~;thumb" width="\d+" height="\d+~', '" width="500', str_replace('"><tr>', '" cellspacing="8" style="width: 100%;"><tr>', aeva_listItems(aeva_getMediaItems(0, 1, 'm.id_media DESC'), false, '', 1)));
echo '<h2>Random Images</h2>';
echo aeva_listItems(aeva_getMediaItems(0, 12, 'RAND()'), false, '', 4);
This code works great. Just wondering though if there is a way to limit it to one specific album instead of it grabbing images from all albums?
-
Is it possible to exclude a particular album to display random?
What I need is to display 8 or 10 images but of a particular album, that is just there. Any ideas?
Thanks!
-
I have put together a neat little slide-show package that will display Aeva photos and/or SMF forum photos (image attachments) in a portal block.
CLICK HERE (http://askusaquestion.net/index.php/topic,904.0.html) to view the relevant thread. You might have to login/register to download files.
Specific settings for what you want displayed are done in the block itself and also the settings.php file of the package provided in that thread.
UD
Thanks for the mod underdog.. but I am having some troubles.
I downloaded and installed the mod, added the code to a php block and when I try to preview it all I get is a error.
Parse error: syntax error, unexpected T_STRING in /var/www/vhosts/ozsportsbikes.com/httpdocs/Sources/PortalBlocks.php(3332) : eval()'d code on line 61
Any ideas what I have done wrong?
-
OH.. And line 3332 contains this:
eval($content);
-
oops.. its looking at line 61.. so that line is:
void sp_quickSearch()
// !!!
-
Nothing. For more, changing the code, do not use a single album that I choose :'(
Help Me please :angel:
-
Any idea to remove remark posted by xxxx in album xxxx.
I just want the picture appear in the list
-
Thanks for the mod underdog.. but I am having some troubles.
I downloaded and installed the mod, added the code to a php block and when I try to preview it all I get is a error.
Parse error: syntax error, unexpected T_STRING in /var/www/vhosts/ozsportsbikes.com/httpdocs/Sources/PortalBlocks.php(3332) : eval()'d code on line 61
Any ideas what I have done wrong?
Make sure you are adding a PHP block (not HTML) and that it is the proper one for your SMF version.
-
Have checked and it is correct.. but still those errors.
SMF2.0 RC3
-
Have checked and it is correct.. but still those errors.
SMF2.0 RC3
I have just tested this on a smf 2 rc3 install and it works fine with no errors in the smf log. I can't seem to duplicate your errors.
It does need to be edited for w3c compliance., which I will do for the next version release.
-
I need to pick the album I want to display images from. How can I do that?
-
Hello. How can I display the images ordered by latest comments?
-
Unfortunately Underdog's gallery mod is not available as his site is now down. Does anyone have it they can send me?
Thanks!
-
Im using the aeva mod/custom code from this site - forgot where but if you search you will find it. It might be an old thread but it does work... Im using it!
Vertical block:
http://outdoorclubjapan.com/index.php?page=introduction
-
I was hoping to find a vertical scrolling gallery block.... it sounded like that is what Underdog's code was. I tried using the SCROLLING code around here somewhere with a number of the gallery codes around here but nothing has worked thus far.
-
I tried one a while back but deleted it ... I just checked, and the one Im using now is the standard gallery block in SP.
-
There are two versions of Aeva Media block available.
One I use which is static and shows images at Random
OR
One which scrolls which is used by the folks at Pixel Mansion.
As an FYI Underdog has had a few problems with his hosts ( who doesn't).
-
There are two versions of Aeva Media block available.
One I use which is static and shows images at Random
OR
One which scrolls which is used by the folks at Pixel Mansion.
As an FYI Underdog has had a few problems with his hosts ( who doesn't).
Um... where do I find the scrolling one?
8)
-
This works... it was posted on Simple Portal but from ...another place.
I tested an original copy and it works.
http://simpleportal.net/index.php?topic=6575.msg44705#msg44705
-
This works... it was posted on Simple Portal but from ...another place.
I tested an original copy and it works.
http://simpleportal.net/index.php?topic=6575.msg44705#msg44705
What would be PERFECT if it worked right. Unfortunately it scrolls 2 or 3 images down... then resets and SNAPS back to the top and scrolls down 2 or 3 images then SNAPS BACK to the top.
:(
EDIT: Nevermind... it's now working... strange.
Anyway... stupid question time...
Does including "scrollers" like this slow down a server/browser/anything?
I ask because I have two other scrolling blocks.
EDIT: THANKS by the way ... I appreciate the help!
-
Depends on your hosting account quality.
When I use too many things the server starts to restrict scripts so the site slows down. Worst case is when it cuts them off and the site goes down. Sometime I get a message from SMF at similar times saying it couldnt connect to the database.
So try it and see - if your site goes too slow or uses too many resources and stops ... cut back.
Never good to have too much running I think. And these days people using smart phones so could impact them too.
-
Between you and I...
... I don't care about smart phone users. :)
Forums are for computers. ;)
But yeah... I get your drift.
-
Well now poo...
I just updated to the 2.x version of Aeva media...
...now my static block shows a scroll bar... the reason? The 2.x version includes a pop up when you hover over the name of the file... that pop up is being seen as part of the block so it adds a scroll bar because the block isn't long enough by the size of the pop up...
Any way to disable the pop up so it doesn't create a scroll bar...
I noticed it does the same thing for the scrolling block too... but after a second or so the scroll bar goes away.
-
Welp,
I just tried every block code in this thread and they ALL do it... vertical or horizontal.
I am attaching two photos to show what is happening.
The 2nd photo shows the POPUP box that appears... it is blank normally until you hover over an image.
-
On my site the scroll bars disappear once it starts moving.
You have to also remember that aeva media is technically obsolete. It is not being updated.
I guess eventually someone will build a new gallery when smf 3.0 comes out in, well, maybe 2 years, maybe less.
Maybe Menalto gallery 3 will be integrated/bridged - it is much better.
-
I've asked this question before but managed a work-around without having to get the answer.
Can someone please post the code to set a block a SPECIFIC length. I could fix this issue by simply forcing the block to be 50px or so larger than it is by default. There has GOT to be a way to set blocks a specific length... right?
Any/all help is appreciated.
:)
-
can you set the block size with the height style i.e wrap your block with something like
<div style="height: 100px;">
blocky stuff goes here
</div>
-
That works for an HTML block... but these are PHP blocks... is there a PHP equivalent?
-
That works for an HTML block... but these are PHP blocks... is there a PHP equivalent?
FrizzleFried,
While using php, just echo the necessary html.
ie. same as example above
echo '<div style="height: 100px;">
block content goes here
</div>';
-
Wonder has anyone used any other media manager since this one does not work on 2.0.7 tried and it fails install.
Thanks
-
Are you talking about the portal block or the aeva media mod itself?
-
Hi there,
I am able to adapt most items to the portal, but would like to be able to use the
aeva media mod or any other mod that would show media in a forum like this one..
-
Your reply did not answer my question.
-
Your reply did not answer my question.
Hi There,
LOL I thought I did ?
Maybe I am not understanding what you are asking ;D
I do not know of a block for AEVA ?
I was able to install Aeva by getting another DL, and it installed.
But now I have no idea how to use the Aeva , as SMF says very little in the way of directions in using it.
You are referring to a Aeva block ?
No idea what that is .
USFA
-
For aeva media ( mod) related support you shold be asking at www.simplemachines.org
As with the block the search function will help.
-
There is a problem getting support for AEVA media -- its author is no longer supporting it, at least not at simplemachines.org, and probably not supporting it anywhere else, as he is busy working on WEDGE (a fork of SMF), and has reportedly incorporated AEVA functionality into WEDGE.
Your best bet may be to search at this site for some AEVA custom blocks, pick them apart to see how they are done, and decide which features you want to use as you develop your own custom block.
-
For aeva media ( mod) related support you shold be asking at www.simplemachines.org
As with the block the search function will help.
Hi there, you are right I should be asking over there. But being the developer ended support 2 years ago, I thought maybe someone here had the same issues.
I removed Aeva and went with another similar option, thanks You !
-
USFA -- I hope that will work well for you. Getting support for AEVA can, indeed, be a problem.