News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

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

Rafferty

Don't Follow me I got No Idea what I'm Doing

Mick.

@Rafferty

First code, I use for random:

function show_aeva_media_block()
{
   global $sourcedir;

   // Set amount visible
   $visible = 5;

   // 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();



Second code:

and recent:

global $sourcedir;
   // Load the language file
   loadLanguage('Aeva');
   // Grab the file.
   if (file_exists($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, 5, 'm.id_media DESC'), false, '', 0);


The second code is a strip down from the first code.  I couldnt have 2 codes in the same page because of:
require_once($sourcedir . '/Aeva-Subs.php');

...so i removed it to have a these 2 blocks on top and bottom of my forum.   It works well too without errors.

Kindred

well, you really do not need all of that either...
in the first block, most of that is comments and error coding.
in the second block, all you need is


global $sourcedir;
   loadLanguage('Aeva');
   echo aeva_listItems(aeva_getMediaItems(0, 5, 'm.id_media DESC'), false, '', 0);
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Mick.

Quote from: Kindred on February 19, 2010, 10:54:16 PM
well, you really do not need all of that either...
in the first block, most of that is comments and error coding.
in the second block, all you need is


global $sourcedir;
   loadLanguage('Aeva');
   echo aeva_listItems(aeva_getMediaItems(0, 5, 'm.id_media DESC'), false, '', 0);


Yep,   i think i used just that in a block earlier today.  But for whatever reason i ended up with the ones i posted.   I forget why.

global $sourcedir;
   loadLanguage('Aeva');
   echo aeva_listItems(aeva_getMediaItems(0, 5, 'm.id_media DESC'), false, '', 0);

Rafferty

Don't Follow me I got No Idea what I'm Doing

DeathCom

Updated to 214 today, still the same results as 213, only now view count is omitted from item pages (all items, not just videos, not sure if that was the intent).

-DeathCom

Nao 尚

It isn't collapsable. You can edit the template file to remove some of the data, though. Just make a copy of that function and re-use it on every new release.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Nao 尚

At this point I'm starting to think I should create a new, sticky topic around here, specifically targetted to explain the aeva_listItems() function which I wrote in order to optimize and simplify the API, but in the end seems to baffle many. (I would like to remind everyone, though, that you can still use earlier SMG integration code -- just make sure to rename variables and functions to the new Aeva standards...)
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Nao 尚

?

214 simply hides the view count for YouTube videos.

Ah, to hell with view counts......!!! I'll just remove it altogether for all pictures and videos and I'll be done with. The more features, the more people request of me.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

dbailey

Just in case others had the same issue. I only started getting this message once I installed the gallery. Before that it wasn't there.

Nao 尚

But AM has nothing to do with TP...
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

ms_ukyankee

Thank you for the obvious hard work that has gone into this mod, I installed this week and imported 120 member albums from our old integrated coppermine gallery. I've lost count of how many times I've said "wow".

Fixed an illegal collations error after searching this thread and related sites trying to find the complete solution of which the last step was given to also alter the column collations a page or two back (thank you!).

If there were one thing I wished for in this mod, it would be a bulk/quick edit ability. If you have 20 albums to move to a group album (like Member Weddings) you have to click through 40 pages to do that it seems. And if you somehow have 20 featured albums (from import) you have to edit all 20 albums to disable that.  :-\

Make that two things, it would be nice for admin to be able to change who posted a file, because I've often had to post files for people and it'd be nice to change ownership.

Something I might change myself, regarding Featured Albums, on the main gallery page the Featured Albums (such as above mentioned Weddings album) are shown as empty even though they have sub-albums and photos. I'm hoping that copying some of the code from the profile gallery which shows subalbum contents will fix this but is there a reason why it shouldn't already?

I have a question about the quota system to make sure I understand, is this only per file quota or is there a total quota allowance somewhere that I have missed? It was something I had used in the coppermine system to allow more storage space for the donating membergroup.

Finally, where can I contribute a donation, it's slightly confusing with 3 related websites. :)
SMF since 2004 <3

Nao 尚

In Aeva-Subs-Vital.php, around line 823, replace the $preview_image line with:

$preview_image = $galurl . 'sa=media;in=' . $id_file . (!empty($context['aeva_has_preview']) || $type == 'image' ? ';preview' : ';thumb');

This should fix the view counter not being increased on items that are smaller than the max preview size.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Nao 尚

Quote from: leah on February 20, 2010, 04:50:05 AM
Fixed an illegal collations error after searching this thread and related sites trying to find the complete solution of which the last step was given to also alter the column collations a page or two back (thank you!).
Ah, at last someone who reads the topic before asking for help ;)
BTW, most collation errors are fixed in the latest SVN revisions.

QuoteIf there were one thing I wished for in this mod, it would be a bulk/quick edit ability. If you have 20 albums to move to a group album (like Member Weddings) you have to click through 40 pages to do that it seems. And if you somehow have 20 featured albums (from import) you have to edit all 20 albums to disable that.  :-\

Make that two things, it would be nice for admin to be able to change who posted a file, because I've often had to post files for people and it'd be nice to change ownership.
Yes it's in my to-do-list. It shouldn't be hard to implement, given that I've done the same already for album ownership.

Quick editing album properties isn't, though. I've already added many quick actions for items in albums (mass move, mass delete, mass approve/unapprove, mass add a playlist), and I don't see myself do more, honestly.
If I were paid a regular rate (I mean, a realistic monthly salary for a specialized programmer, such as $3 to $5K a month), it would be a different matter. Right now, I've run out of ideas to give my girl the excuse of working on this instead of making a living IRL, and frankly I've also run out of steam. Not that I'm moving all my energy towards the Phoenix Project -- I'm even unsure about whether I'd have passion to work on that either. I'm just there, after over two years of working on SMF for free or pretty much, and I've learned nothing more than before I was on SMF. Really... Okay, now there's a good gallery system for SMF out there. But it wasn't even my idea... I just let myself be abused by the situation at the time.
I'm choking and it's not getting any better with all the requests that are flooding this forum.

Anyway, end of the usual rant...

QuoteSomething I might change myself, regarding Featured Albums, on the main gallery page the Featured Albums (such as above mentioned Weddings album) are shown as empty even though they have sub-albums and photos. I'm hoping that copying some of the code from the profile gallery which shows subalbum contents will fix this but is there a reason why it shouldn't already?
The number of items shown is the number of items at the root of the album. I could show the total number of items, but it would be a mess to calculate and keep track of. Plus, people would come and complain that they see an album has 150 items when actually it has none. That would just be a reversal of the problem...

QuoteI have a question about the quota system to make sure I understand, is this only per file quota or is there a total quota allowance somewhere that I have missed? It was something I had used in the coppermine system to allow more storage space for the donating membergroup.
Well, how much money would you be willing to give to sponsor that feature, since it's for a donation system in itself? :P

The quotas are currently per-file.

QuoteFinally, where can I contribute a donation, it's slightly confusing with 3 related websites. :)
You can buy Foxy! at aeva.noisen.com for $20, or donate any kind of $$ directly at smf-media.com. In any case it will reach me.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Soms

Quote from: Kindred on February 19, 2010, 06:41:50 PM
you would have to paste the code which I posted into your template file (either index.template.php or boardindex.template.php, depending on where you want it displayed)

Thanks Kindred, I'll go and try that now. I'll get back to you.

ms_ukyankee

Quote
Ah, at last someone who reads the topic before asking for help ;)

I didn't read it all, I just used search. I knew it was that or incite wrath. ;) Nuh, I'm usually quiet, I research and try to sort problems out myself so that I learn something.

Quote
Quick editing album properties isn't, though. I've already added many quick actions for items in albums (mass move, mass delete, mass approve/unapprove, mass add a playlist), and I don't see myself do more, honestly.

Mass move albums? I don't see that in the version I've installed so it's in SVN or it's coming soon? Good to know either way, that's great.

Quote

Anyway, end of the usual rant...

I can totally understand it, and all open source projects I've worked with seem to have the same sorts of problems as this for module developers. Wordpress, Drupal, etc. It's a terrible shame.

Quote
The number of items shown is the number of items at the root of the album. I could show the total number of items, but it would be a mess to calculate and keep track of. Plus, people would come and complain that they see an album has 150 items when actually it has none. That would just be a reversal of the problem...

Okay, I'll just remove the text strings that say it's empty, since I wouldn't feature an empty album anyway. Rather that then someone not looking there because it says "empty".

Quote
Well, how much money would you be willing to give to sponsor that feature, since it's for a donation system in itself? :P

LOL, fair point. My site doesn't generate enough donations and ad revenue to even cover the dedicated server costs. So I have similar resource burn out issues as you. I'll leave it for now and hope it's a traffic boosting feature that makes up for additional bandwidth.

Quote
You can buy Foxy! at aeva.noisen.com for $20, or donate any kind of $$ directly at smf-media.com. In any case it will reach me.

Ok, will do.

About Foxy!, I looked at the description and to be honest, I'm not sure what it does so have no idea if I'd use it. My impression was that it was for playlists, and playlists generally apply to audio and video in my (limited) experience, neither of which I'd use.

Edited to remove not finding detailed description, there is one, sorry.

Thanks for the quick reply. :)
SMF since 2004 <3

MultiformeIngegno

Nao is there a way to set a minimum time between searches in gallery (as for the "normal" search)? :)
RockCiclopedia (wiki - forum), Tutta la storia del rock, scritta da voi ...
Rimanere aggiornati sul mondo della musica grazie al nuovo feed "RockCiclopedia Music News"!

Soms

Quote from: Kindred on February 19, 2010, 06:41:50 PM
you would have to paste the code which I posted into your template file (either index.template.php or boardindex.template.php, depending on where you want it displayed)
Thanks. After some trial and error (I will always be a noob!), I finally tweaked it to do what I wanted it to do which is to display the 5 latest items above the forum and 5 random items below the forum.

Above:
Quotefunction show_aeva_media_block()
{
   global $sourcedir;

   // Set amount visible
   $visible = 5;

   // 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, 5, 'm.id_media DESC'), false, '', 0);

   echo '
      <div id="aeva_pics" style="width: 100%;" overflow="visible">
         <div align="center">'. $images. '</div>
      </div>';
}

show_aeva_media_block();

Below (in my case) just above the info center:
Quoteglobal $sourcedir;
   loadLanguage('Aeva');
   $visible = 5;
     echo aeva_listItems(aeva_getMediaItems(0, $visible, 'RAND()'), true, '', 0);

Special thanks to Kindred, Rgecy, BlueDevil, and Nao


petesky


Nao 尚

Quote from: leah on February 20, 2010, 06:58:57 AM
Mass move albums?
No, mass move items (from one album to another.)

QuoteI don't see that in the version I've installed so it's in SVN or it's coming soon?
It's in 1.0 Final, really.

QuoteI can totally understand it, and all open source projects I've worked with seem to have the same sorts of problems as this for module developers. Wordpress, Drupal, etc. It's a terrible shame.
Well, in the industry, you either work for fame or for money. People who don't get both usually tend to get tired more quickly ;)
J/k. I don't know the Wordpress/Drupal situation. Not using them. Aren't they supposed to be super-active projects? Like, thE besT softwareZ evah?

QuoteOkay, I'll just remove the text strings that say it's empty, since I wouldn't feature an empty album anyway. Rather that then someone not looking there because it says "empty".
I understand.
I may do that actually -- simply hide the number of items, rather than show "0 items". It would sound more logical... Even if it's really really empty (with no sub-albums).
What do you think, users?

QuoteLOL, fair point. My site doesn't generate enough donations and ad revenue to even cover the dedicated server costs.
Use shared hosting ;)

QuoteOk, will do.
Thanks :)

QuoteAbout Foxy!, I looked at the description and to be honest, I'm not sure what it does so have no idea if I'd use it. My impression was that it was for playlists, and playlists generally apply to audio and video in my (limited) experience, neither of which I'd use.
No, it used to be about that. Now it has a lot more features, such as RSS feeds and the SMG button in post boxes (to upload a file in two clicks.) Etc.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Advertisement: