News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

General support topic for Aeva Media (Latest release: July 28, 2010)

Started by Nao 尚, October 14, 2007, 04:28:15 PM

Previous topic - Next topic

TheListener

Quote from: EOSHD on March 31, 2012, 04:46:20 PM
Quote from: larsenroed on March 30, 2012, 05:13:36 AM
If i paste the vimeo url https://vimeo.com/38948271 it just writes it as a link and if i remove the s to http:// it says "Sorry. There was an error encountered when loading this video".

SMF 2.0.2 and Aeva 7.2.

Youtube works just fine.

This is a major bug.

When I switch to the 'New' Vimeo on their site, it kills my embeds. Switching back to 'old Vimeo' and the embeds are fine. The embed code used by Aeva is old. It is using the depreciated Flash code when it should be using the new iFrame code.

PLEASE FIX

The mods author is no longer supporting the mod.


AMWebby

Quote from: bobi on September 30, 2011, 10:47:14 PM
I found the solution. To call the function I use:

if (allowedto('mgallery_access'))
{
global $sourcedir;
   loadLanguage('Aeva');
   require_once($sourcedir . '/Aeva-Subs.php'); 
   echo '<div id="aeva_pics" style="width: 100%;" overflow="visible">
         <div align="center">'. aeva_listItems(aeva_getMediaItems(0, 5, 'RAND()'), true, '', 0, false, 1). '</div>
      </div>';
}


and I slightly modified the function aeva_listitems into aeva-subs.php (look for $bubu and $linktoalbum);

function aeva_listItems($items, $in_album = false, $align = '', $per_line = 0, $can_moderate = false, $bubu)
{
global $scripturl, $txt, $galurl, $settings, $context, $amSettings, $modSettings, $sourcedir, $user_info;
static $in_page = 0;

if (empty($items))
return;

aeva_addHeaders();
$urlmore = isset($context['aeva_urlmore']) ? $context['aeva_urlmore'] : '';
$user_is_known = !empty($context['current_action']) && $context['current_action'] == 'profile';
$main_user = $in_album && !empty($context['aeva_album']['owner']['id']) ? (int) $context['aeva_album']['owner']['id'] : 0;
$mtl = !empty($amSettings['max_title_length']) && is_numeric($amSettings['max_title_length']) ? $amSettings['max_title_length'] : 30;
$icourl = '
<img alt="" width="10" height="10" src="' . $settings['images_aeva'] . '/';
$new_icon = '<img alt="" src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" border="0" />';
// If we're in an external embed, we might not have all the space we would like...
$per_line = $per_line > 0 ? $per_line : (!empty($amSettings['num_items_per_line' . ($per_line === -1 ? '_ext' : '')]) ?
max(1, $amSettings['num_items_per_line' . ($per_line === -1 ? '_ext' : '')]) : ($per_line === -1 ? 3 : 5));
$ico = !empty($amSettings['icons_only']);
$first = reset($items);
$can_moderate &= isset($_REQUEST['action']) && $_REQUEST['action'] == 'media';
$can_moderate_here = aeva_allowedTo('moderate');
$re = '
<table class="pics smalltext" width="' . (count($items) == 1 ? max(120, $first['w_thumb'] + 12) . '"' : '100%" cellspacing="8"') . (!empty($align) ? ' align="' . $align . '"' : '') . '>';

$cnt = 0;
$ex_album_id = 0;

foreach ($items as $i)
{
// If you don't want to allow item previewing via Highslide on album pages, replace the following line with: $is_image = false;
$is_image = $i['type'] == 'image' || ($i['type'] == 'embed' && preg_match('/\.(?:jpe?g?|gif|png|bmp)/i', $i['embed_url']));
$is_embed = !$is_image && $i['type'] == 'embed' && !empty($modSettings['aeva_enable']);
if ($is_embed)
{
if (!function_exists('aeva_main'))
include($sourcedir . '/Aeva-Embed.php');
$match = preg_replace(array('~\[url=([^]]+)]([^[]+)\[/url]~', '~\[url]([^[]+)\[/url]~'), array('<a href="$1">$2</a>', '<a href="$1"></a>'), $i['embed_url']);
$match = substr(strtolower($match), 0, 4) === 'http' ? '<a href="' . $match . '">Test</a>' : $match;
$match = aeva_main($match);
preg_match('~"(\d+)", "(\d+)"~', $match, $siz);
if (empty($siz))
preg_match('~width="(\d+)(?:px)?" height="(\d+)(?:px)?"~', $match, $siz);
$is_embed = !empty($siz);
}

$in_page++;
$inside_caption = !$amSettings['use_lightbox'] ? '' : ($is_image || $is_embed ? ($is_image ? '
<div class="highslide-caption">' : ($is_embed ? '
<div class="highslide-maincontent" style="width: ' . $siz[1] . 'px; height: ' . ($siz[2]+42) . 'px; overflow: visible !important">
' . trim($match) : '')) . '
<div style="float: right">' . ($i['has_preview'] ? '
<a class="aelink hs" href="' . ($i['type'] == 'embed' ? $i['embed_url'] : $galurl . 'sa=media;in=' . $i['id']) . '" onclick="return hss(' . $in_page . ', this);">' . $txt['aeva_zoom'] . '</a> <span style="font-weight: bold; font-size: 1.2em;">&oplus;</span>' : '') . '
<a class="aelink" href="' . $galurl . 'sa=item;in=' . $i['id'] . $urlmore . '">' . $txt['aeva_gotolink'] . '</a>' . (!empty($i['comments']) ? '
<img alt="" src="' . $settings['images_aeva'] . '/comment.gif" /> ' . $i['comments'] : '') . '
</div>
' . $i['title'] . (empty($i['desc']) ? '' : '
<div class="smalltext mg_desc">
' . aeva_cutString($i['desc'], 300, true, 50, true, true) . '
</div>') . '
</div>' : '');

if ($cnt % $per_line == 0)
$re .= '<tr>';
$title = empty($i['title']) ? '&hellip;' : (strlen($i['title']) < $mtl ? $i['title'] : aeva_cutString($i['title'], $mtl));
if (!empty($bubu))

$linktoalbum = $galurl . 'sa=album;in=' . $i['id_album'] . $urlmore . '"' . ($i['album_name'] != $i['title'] ? ' title="' . preg_replace('/&amp;(#[0-9]+|[a-zA-Z]+);/', '&$1;', htmlspecialchars($i['title'])) . '"' : '') . '>' . $i['album_name'];
} else {
$linktoalbum = $galurl . 'sa=item;in=' . $i['id'] . $urlmore . '"' . ($title != $i['title'] ? ' title="' . preg_replace('/&amp;(#[0-9]+|[a-zA-Z]+);/', '&$1;', htmlspecialchars($i['title'])) . '"' : '') . '>' . $title;
}
if ($ex_album_id != $i['id_album'])
$album_name = empty($i['album_name']) ? '&hellip;' : (strlen($i['album_name']) < $mtl ? $i['album_name'] : aeva_cutString($i['album_name'], $mtl));
$ex_album_id = $i['id_album'];

$check = $can_moderate && ($i['poster_id'] == $user_info['id'] || $can_moderate_here) ? '<div class="aeva_quickmod"><input type="checkbox" name="mod_item[' . $i['id'] . ']" /></div>' : '';
if (empty($bubu))
{
$dest_link = $is_image && $i['type'] == 'embed' && !$i['has_preview'] ? $i['embed_url'] : $galurl . 'sa=' . ($is_image ? 'media' : 'item') . ';in=' . $i['id'] . ($is_image ? ';preview' : '');
} else {
$dest_link = $is_image && $i['type'] == 'embed' && !$i['has_preview'] ? $i['embed_url'] : $galurl . 'sa=item;in=' . $i['id'];
}
$re .= '
<td class="windowbg' . ($i['approved'] ? '' : ' unapp') . '" align="center">' . $check . ($i['is_new'] ? '
' . $new_icon : '') . '
<div style="margin: auto; width: ' . ($amSettings['max_thumb_width'] + 10) . 'px"><a href="' . $linktoalbum . '</a></div>
<div class="aep" style="width: ' . $i['w_thumb'] . 'px; height: ' . $i['h_thumb'] . 'px; background: url(' . $i['thumb_url'] . ') 0 0;' . (strpos($i['thumb_url'], 'generic_images') !== false ? ' box-shadow: none' : '') . '"><a href="'
. $dest_link . '"' . (($is_image || $is_embed) && $amSettings['use_lightbox'] ?
' id="hsm' . $in_page . '" class="hs" onclick="' . ($is_image ? 'return hs.expand(this, slideOptions)' :
'mediaOptions[\'width\'] = ' . $siz[1] . '; return hs.htmlExpand(this, mediaOptions)') . ';"' : '')
. '>&nbsp;</a>' . $inside_caption . '</div>';
if ($ico) // Icons only?
$re .= $icourl . 'graph.gif" title="' . $txt['aeva_views'] . '" />&nbsp;' . $i['views'] .
(!empty($i['comments']) ? $icourl . 'comment.gif" title="' . $txt['aeva_comments'] . '" />&nbsp;' . $i['comments'] . (!empty($i['new_comments']) ? ' (' . $new_icon . '&nbsp;' . $i['new_comments'] . ')' : '') : '') .
(!empty($i['new_comments']) ? '(' . $new_icon . '&nbsp;' . $i['new_comments'] . ')' : '') .
(!empty($i['voters']) ? $icourl . 'star.gif" title="' . $txt['aeva_rating'] . '" />&nbsp;' . $i['rating'] : '') . '<br />';
else
if (empty($bubu))
{
$re .= $icourl . 'graph.gif" />&nbsp;' . $txt['aeva_views'] . ':&nbsp;' . $i['views'] . '<br />'.
(!empty($i['comments']) ? $icourl . 'comment.gif" />&nbsp;' . $txt['aeva_comments'] . ':&nbsp;' . $i['comments'] . (!empty($i['new_comments']) ? ' (' . $new_icon . '&nbsp;' . $i['new_comments'] . ')' : '') . '<br />' : '') .
(!empty($i['voters']) ? $icourl . 'star.gif" />&nbsp;' . $txt['aeva_rating'] . ':&nbsp;' . $i['rating'] . '<br />' : '');

$re .= ($user_is_known || $main_user == $i['poster_id'] ? '' : ($ico ? $icourl . 'person.gif" title="' . $txt['aeva_posted_by'] . '" />&nbsp;' : '
' . $txt['aeva_posted_by'] . ' ') . aeva_profile($i['poster_id'], $i['poster_name']) . '<br />') . $icourl . 'clock.gif" title="" /> ' . $i['time'] . (!$in_album ? '<br />
' . $txt['aeva_in_album'] . ' ' . ($i['hidden_album'] ? $album_name : '<a href="' . $galurl . 'sa=album;in=' . $i['id_album'] . '">' . $album_name . '</a>') : '') . '
</td>';
}
if (++$cnt % $per_line == 0)
$re .= '</tr>';
}

if ($cnt % $per_line != 0)
$re .= '</tr>';

return $re . '</table>';
}


Hope this help!
I've successfully set this up on my board at http://www.amoc.org/forum/ and the random gallery of images shows but the highslide function doesn't work. It starts to call Highslide but it just never activates it. Any idea why?

Edit: I've noticed the link for the Highslide call is missing the final ":preview" but I can't see why?

simondale

Quote from: EOSHD on March 31, 2012, 04:46:20 PM
Quote from: larsenroed on March 30, 2012, 05:13:36 AM
If i paste the vimeo url <LINK REMOVED>/38948271 it just writes it as a link and if i remove the s to <LINK REMOVED> it says "Sorry. There was an error encountered when loading this video".

SMF 2.0.2 and Aeva 7.2.

Youtube works just fine.

This is a major bug.

When I switch to the 'New' Vimeo on their site, it kills my embeds. Switching back to 'old Vimeo' and the embeds are fine. The embed code used by Aeva is old. It is using the depreciated Flash code when it should be using the new iFrame code.

PLEASE FIX

We are seeing the same problem on <LINK REMOVED>  I've modified sources/Aeva-sites.php to be as follows:


array(
'id' => 'vimeo',
'pattern' => '<LINK REMOVED>(?:www\.|player\.)?vimeo\<LINK REMOVED>/(?:video/)?(\d{1,12})',
'movie' => '<LINK REMOVED>/flash/moogaloop/5.0.5/moogaloop.swf?v=5.0.5&clip_id=$2&server=<LINK REMOVED>&fullscreen=1&show_title=1&show_byline=1&show_portrait=0&color=01AAEA',
'size' => array(640, 360),
'fix-html-pattern' => '<iframe src="<LINK REMOVED>/video/(\d{1,12})[^<>]*?>.*?title=0&amp;byline=0&amp;portrait=0" width="500" height="281" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>',
'fix-html-url' => '<LINK REMOVED>/$1',
'lookup-title' => true,
'lookup-title-skip' => true,
),



Which I hoped would make AEVA use the new Vimeo iFrame code but it didn't change anything.  Evidently this is not the file that controls the embedding!

I tried hacking around in sources/Subs-Aeva-Sites.php also, but I couldn't even break the embedding...whatever I did makes no difference to the embedding code used so I'm obviously in the wrong file. 

sources/Aeva-embed.php might be the right file but my programming skills, or rather lack of programming skills, are not up to the task.

Has anyone found the file that actually controls the embedding and found a fix?  I'd really appreciate any help anyone can offer on this!

Many thanks

Simon

AMWebby

Solved! You need to replace this line, in bobi's additions to Aeva-subs.php:


$dest_link = $is_image && $i['type'] == 'embed' && !$i['has_preview'] ? $i['embed_url'] : $galurl . 'sa=item;in=' . $i['id'];


with this,

$dest_link = $is_image && $i['type'] == 'embed' && !$i['has_preview'] ? $i['embed_url'] : $galurl . 'sa=media;in=' . $i['id'] . ';preview';


You should note you also need to replace the following in the addition to BoardIndex.template.php

if (allowedto('mgallery_access'))


with

if (allowedto('aeva_access'))


I'm now attempting to use this to insert the gallery preview in a Joomla web page, can anyone help?

DMR123


Ken.

Quote from: Viperdan on April 14, 2012, 03:50:12 PM
When I install the mod, nothing happens

After installing it did you turn it on?
Admin>Aeva Media>Settings>Enable Gallery (Master setting)>Yes
"If you don't have a stack of failures in your shop, you aren't trying hard enough". --Richard Raffin.


punjabilokvirsa

I don't think this supports replacing with iframes. If it does, please let me know. I need to fix the vimeo regex to replace with their newer "iframe" approach. Thanks.

Rust

I am running this plug in on a 2.0.2 board presently.  I have "Max Embedding Per Post" set to 12 now, but whenever there is more than four, I am seeing the "(Embedding disabled, limit reached)" message starting with the fifth video.

Any ideas on what I should try?  Thank you. :)

Bobn


TheListener


Bobn

Quote from: Old Fossil on April 21, 2012, 11:50:38 PM
Quote from: Bobn on April 21, 2012, 11:47:29 PM
Can anyone tell my why my thumbnails wont show?

What do you mean by thumbnails?

When an image is uploaded in the galley the thumbnails wont show

JMantis

Sorry if this is the wrong place to ask as the problem may not lie with Aeva in this case but I installed Aeva yesterday and it works fine, however when Youtube links are posted, the videos are embedded twice for some reason. This probably has to do with the fact that I once had a different mod installed to embed videos but that one has long since been uninstalled.

Does anyone know how to solve this problem, or perhaps know which file to edit?

Thanks in advance!


TheListener

Have you made sure the previouis mod was completely uninstalled?

MESWEB


TheListener

Quote from: MESWEB on April 22, 2012, 07:18:56 PM
How to disable logo "YouTube" - Watch on Youtube?

AFAIK this is not a Aeva setting more from the Youtube end.

JMantis

Quote from: Old Fossil on April 22, 2012, 07:18:38 PM
Have you made sure the previouis mod was completely uninstalled?

Yes, I first uninstalled the Youtube bb code mod through the packages list, then selected to be removed and even made sure it was not in the actual directory anymore.

However I'm afraid this previous mod might have left some code behind that's causing the videos to be embedded twice. I tested this because if I use the new shortened Youtube url, it works correctly.

I've already had a look at the post.php and Sub-Post.php files but I'm pretty much a coding newbie so I have no idea where to look or how to fix it.

MESWEB

Quote from: Old Fossil on April 22, 2012, 07:21:31 PM
Quote from: MESWEB on April 22, 2012, 07:18:56 PM
How to disable logo "YouTube" - Watch on Youtube?

AFAIK this is not a Aeva setting more from the Youtube end.

I mean the php code. Unless you add this code param value = autohide or some other code to link.
QuoteHow to Remove YouTube's Logo from Embedded Videos & Players

So, although this is not a default option within the embed code box on YouTube videos, this can be done quite simply by adding the following to the end of a YouTube embed URL:

?modestbranding=1

So for example, the standard iFrame embed code you would get for a video like the one above would be:

<iframe width="560" height="349" src="http://www.youtube.com/embed/VIDEOID" frameborder="0" allowfullscreen></iframe>

In this case, you merely need to add "?modestbranding=1″ to the end of the src= tag like so:

... src="http://www.youtube.com/embed/VIDEOID?modestbranding=1" ...

You would do the same, adding "?modestbranding=1" to each instance of the YouTube player URL for the old embed code -> like this:

<object width="560" height="349">
<param name="movie" value="http://www.youtube.com/v/VIDEOID?modestbranding=1&amp;version=3&amp;hl=en_US"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="http://www.youtube.com/v/VIDEOID?modestbranding=1&amp;version=3&amp;hl=en_US" type="application/x-shockwave-flash" width="560" height="349" allowscriptaccess="always" allowfullscreen="true"></embed>
</object>

Issues, Tips & WorkArounds:

This only works if you use it as the first parameter after the video id.  IE – it can not be added after any other parameters or it will break and the logo will reappear when the video starts.  To illustrate what I mean, you can NOT do something like this:

... src="http://www.youtube.com/embed/VIDEOID?hd=1&amp;modestbranding=1" ...

The modestbranding parameter needs to come first.

Additionally, this will not work with a few of the other embed player parameters like "showinfo" which can be used to set whether or not the title shows at the top of the video (0= no title).  For whatever reason, if you continue to use "showinfo=0", the "modestbranding" parameter will not function as it's supposed to and the logo will reappear when you press play.

As a work around to this, I discovered a new parameter that they dont publicize => "title=".  So, if you would like to remove the logo AND you want to remove the title from the player, you need to structure the embed src player string as follows, leaving "title=" blank:

... src="http://www.youtube.com/embed/VIDEOID?modestbranding=1&amp;title=" ...

As just a fun little note on this – I found out that you can actually change that title to be whatever you want.See this example.

Bobn

I know its not supported but can anyone tell me why I get these errors all across the top of my forum when I enable it?

SMF 2.0.2

QuoteAeva Media extra strings $txt['aeva_gallery'] = isset($txt['aeva_gallery']) ? $txt['aeva_gallery'] : 'Media'; $txt['aeva_home'] = 'Home'; $txt['aeva_unseen'] = 'Unseen'; $txt['aeva_profile_sum'] = 'Summary'; $txt['aeva_view_items'] = 'View items'; $txt['aeva_view_coms'] = 'View comments'; $txt['aeva_view_votes'] = 'View votes'; $txt['aeva_gotolink'] = 'Details'; $txt['aeva_zoom'] = 'Zoom'; $txt['permissiongroup_aeva'] = 'Aeva Media'; $txt['permissiongroup_simple_aeva'] = 'Aeva Media'; $txt['permissionname_aeva_access'] = 'Access Gallery'; $txt['permissionname_aeva_moderate'] = 'Moderate Gallery'; $txt['permissionname_aeva_manage'] = 'Administrate Gallery'; $txt['permissionname_aeva_access_unseen'] = 'Access unseen area'; $txt['permissionname_aeva_search'] = 'Search in Gallery'; $txt['permissionname_aeva_add_user_album'] = 'Add Albums'; $txt['permissionname_aeva_add_playlists'] = 'Add User Playlists'; $txt['permissionname_aeva_auto_approve_albums'] = 'Auto-approve Albums'; $txt['permissionname_aeva_moderate_own_albums'] = 'Moderate own Albums'; $txt['permissionname_aeva_viewprofile'] = 'View anyone\'s Gallery profile'; $txt['cannot_aeva_viewprofile'] = 'You cannot view Gallery profiles'; // End Aeva Media strings


Bobn


Advertisement: