Uutiset:

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

Main Menu
Advertisement:

Aeva 6.9.99 and earlier (old)

Aloittaja karlbenson, lokakuu 14, 2007, 06:22:33 IP

« edellinen - seuraava »

Akyhne

Lainaus käyttäjältä: weightman - marraskuu 30, 2008, 06:22:21 IP
LainaaQuick fix: search in your generated sites file, around line 185, replace

      'embed-hq-movie' => 'http://www.youtube.com/v/$2&ap=%2526fmt%3D18&rel=0',

With

      'embed-hq-movie' => 'http://www.youtube.com/v/$2&fmt=18&rel=0',

This made the example link posted here work on my site. This also seems to have corrected my problem with the "Check whether Youtube videos are embeddable" feature since a little message saying embedding is disabled comes up to the right of the non-working video now.

Thanks

Yeah, but you probably also disabled HQ video playback. You took the code out that makes HQ playback.

weightman

LainaaYeah, but you probably also disabled HQ video playback. You took the code out that makes HQ playback.

Yes, you are correct. HQ is disabled now. Disabling it in the admin center prior to making the above edit did not resolve the above issues however.

Akyhne

If I play a lot of the videos posted on my site with the &fmt=22 at the end of the youtube videos DIRECTLY from their page like this: http://www.youtube.com/watch?v=zlfKdbWwruY&fmt=22 then I get the lowest quality available.

If I write &fmt=18 after the links, I get HQ

I think the issue is this:
When you use the &fmt=22 code, you actually get a HQ video - in fact the very video the user have uploaded. But depending on the media type he/she has been uploading - if it was MOV, .flv, wmv or whatever, you can probably do the same if you know the integer to put in back of the &fmt=

I have a SMF forum with hundrets of Youtube linked. I use AVEAC 3.0 modified by myself to play HQ for all videos. There are a few videos that gives me the "not available"- text. When I doubbleclick on those ones, I get the message on the Youtube site that the owner has disabled embedding.
The link weightman posted, is actually the first video I have come across that doesn't work AT ALL on my forum!!

If I post the dancing guy's video on my forum, I get the same quality as webmonkey has posted as second video... which is not LQ but what I would call HQ. If you take his link and put it on youtube, you will actually get LQ.

Just try this: http://www.youtube.com/watch?v=zlfKdbWwruY
This is what I call LQ video and is the quality we are all used to

When you have had enough, try http://www.youtube.com/watch?v=zlfKdbWwruY&fmt=18 which gives the quality I call HQ but what that monkey guy calls LQ.

I know it's not the same quality as the monkey guys HQ, but as I mentioned I think you are then streaming the original video.
I have no intension of getting monkeys HQ, as it takes a damn long time to stream it on my 4096kbit connection. What would my users think!!

Akyhne

Lainaus käyttäjältä: weightman - marraskuu 30, 2008, 06:41:02 IP
LainaaYeah, but you probably also disabled HQ video playback. You took the code out that makes HQ playback.

Yes, you are correct. HQ is disabled now. Disabling it in the admin center prior to making the above edit did not resolve the above issues however.
HQ and LQ playback didn't work for me in version 4.02. That's the reason I skipped it and went to 3.xx

karlbenson

First off.  I am Karl (new account : my old one was intentionally and permanently skuttled)
[Jade or anyone with my email or msn will be able to confirm that with me]
Nope I'm not back for good.
However I have been peppered with email requests since Nao took over to provide some quick answers to some of the problems/issues [albeit from memory] to help Nao with the transition. I had an hour to spare to do just that.

P.S thanks for all the kind posts/messages and emails which I received.

Anyways, heres some comments starting several pages back, so please bear with me. {LONG POST : YAWN}

Lainaus käyttäjältä: Nao 尚 - marraskuu 22, 2008, 04:57:40 IP
[...](Advantage: I love writing regexps. [...]
I did too, before I started re-writing all those definitions. hence my new username :P

Lainaus käyttäjältä: Nao 尚 - marraskuu 22, 2008, 04:57:40 IP
[...]Possibly too many nasty bugs to fix. [...]
Hope not too many.  Otherwise the original author deserves to be hung drawn and quartered :P

Lainaus käyttäjältä: Nao 尚 - marraskuu 22, 2008, 04:57:40 IP
[...]Having to add and remove video sites constantly.[...]
I thought it was fun trying to infinite no. of sites. Although I wished there would have been more help with pre-created definitions from the community. [more on that in a bit]

Lainaus käyttäjältä: Nao 尚 - marraskuu 22, 2008, 04:57:40 IP
Are there any "real" advantages to AEVAC 4?
I know I'm a bit late. AE4 is a major step forward. Just I didn't get the chance to iron out all the bugs.
AE4 was necessitated (being written from the ground up) to get around some bottlenecks/limitations/bug in AE3 that I'd been unable to get around.
Not to mention it was a heck of alot faster/lighter on memory.

I think AE4 is cleaner code.  (and Nao, your more likely to understand that, than AEvac3 :P [messy code.])

P.S [sentence added later] Not to mention I spent weeks re-writing all the definitions.

Lainaus käyttäjältä: Xaneth - marraskuu 23, 2008, 01:34:41 AP
The thing is, YT videos in version 4 just produce the white circle of death, as mentioned earlier, which basically renders it useless for YT.

Check the youtube page for that video and make sure that it doesn't say "Embedding is disabled by request".
In AEVAC4, if you can use lookups, it should automatically check whether embedding is possible for youtube videos.
If you can't, then you'll end up with some videos that can't play. Thanks to youtube for this amazing feature *sarcasm.

Lainaus käyttäjältä: Nao 尚 - marraskuu 23, 2008, 04:16:15 AP
@akyhne> I think Karl was a bit too kind to n00bs coming by to ask for support for whatever obscure video site they wanted ;) (Probably some website created by a friend and that only them would use :P)
Not really.  It started out as that I would just support the main ones.
However when someone mentioned to me that vbulletin has a similar mod http://www.vbulletin.org/forum/showthread.php?t=175378
and then it became a case of that I wanted it to have more than theirs did.  So any that they supported that mine didn't, I would try to support. Plus I got many requests to my own forum, email, pm box, which soon counted up. [Not forgetting a google search for some more :P ]

Lainaus käyttäjältä: Nao 尚 - marraskuu 23, 2008, 04:16:15 AP
Well that one is cool for n00bs, but I suspect this is one of the reasons v4 has grown to such large proportions... Actually, I already thought that v3 was going in the wrong direction because of all of the overhead... Karl tried to take every possible n00b mistake into account when doing v3 and v4... As a result, what used to be a 20kb (!!!) mod has turned into a 250kb mod, including 32kb of code just for the actual job of turning links into embedded videos...

Nao, yes, in total the filesize of the mod (as a package has gone up) and as more sites were supported, it will obviously increase further.  However AEVAC4 was meant to make it more scaleable.
Both in terms of speed and bandwidth/filesize usage.  Although it was hard to compare like for like (aevac4 vs aevac3), aevac4 was twice as fast even with all the upgrades, and used alot less memory.

Although the definitions file is 250kb. In almost ALL circumstances, that never gets used.
A 'lite' version gets written out with out ANY comments, and without information that was not needed, and based on what features are enabled.
This is why its scaleable. If you enable only youtube, and disable fix links, then the file that gets used can be like 1kb.
(even with all the sites and features enabled, I think at minimum it loses a third of the filesize).

Lainaus käyttäjältä: Nao 尚 - marraskuu 23, 2008, 04:16:15 AP
LainaaIf you are going to take over the mod, it would be better to do version 4!
Yeah, I guess...
But I'd feel so much more comfortable if I could take out all of the unneeded code...

See above about scalability and my comment at the end.

Lainaus käyttäjältä: Nao 尚 - marraskuu 23, 2008, 04:16:15 AP
My guess is that it's one of the main reasons he gave up on AEVAC. He should have adopted a more restrictive policy, and/or made a paid-for version where n00bs could actually get support and ask for obscure video site integrations.
I didn't want to give it up. Adding new sites was a pleasure.  I think my plan was to enable only major sites by default.
Although I changed this later on because, if the user didn't have correct chmod permissions, then it would use the full definitions file, and they would all be enabled.

Thinking about it now, the solution would be to try to detect if its using the full version, and if so respect the enabled flag.

Lainaus käyttäjältä: Nao 尚 - marraskuu 23, 2008, 04:16:15 AP
Lainaaand last and least important "Include the Original Link (for sites that don't have it in the player)."
I think it's one of the better new features, if you ask me... :P
Funny, so did I. But everyone else hated it.
There is a flag in the definitions file for each site which states whether site x has it shown.
I was trying to only include it when the player itself didn't have a button or link back to the video (so the user can comment on that video at youtube etc).  I was going to throw it open to the community to decide which ones should have it and which ones not. (or at least decide by their complaints).

Lainaus käyttäjältä: Nao 尚 - marraskuu 24, 2008, 03:25:51 AP
I would like to have Karl's official approval and I hope someone (Jade?) will transmit this message to him and ask for his advice. Thank you.
Official Response: Nao, I'm delighted that your taking it over.
Firstly because you've helped me with it so far so I know you get it.
Secondly because you're more than capable
and finally (and selfishly) so I won't be getting any more emails about it being left to rot (JOKE!)

[Note, I did leave specific instructions / permission with the smf team to allow for people to take over my mods / for them to re-assign at their discretion.]

Lainaus käyttäjältä: Nao 尚 - marraskuu 24, 2008, 03:25:51 AP
(I would appreciate even more if he could share any additional code he has -- earlier private beta, external tools, etc.)
I've attached a zip containing every PUBLIC version that I have released. I had not kept any betas.
v4.0.2 as I released on the website was the latest and best version of the mod that I had.

Also in the zip is a file that I used to write out the lists of the sites supported for the readme.  Not much use I know.

I don't have any further code. I will discuss at the end what my plans were, which you can decide on merit whether you want to go gown that road or not.

External tools were notepad++ and a browser.  oh and a favorite in my list for www.google.com :P
If I was struggling on finding how to embed the item, I would look whether someone else had done it.

Lainaus käyttäjältä: Nao 尚 - marraskuu 24, 2008, 03:25:51 AP
if I ever think the mod has reached a stable condition,
Although my mod was still marked beta. With only a handful of bugs to resolve, I would have been ready to call it final very soon had I not left.
But despite being beta, I was more than happy to run it on my own sites, and still find it a damn site more stable than many other RC or FINAL mods/softwares that I've ran.

Lainaus käyttäjältä: Nao 尚 - marraskuu 24, 2008, 03:25:51 AP
I'm willing to do the AEVAC job if it doesn't eat up too much of my time.
It does.  But there maybe a solution.

Lainaus käyttäjältä: Nao 尚 - marraskuu 24, 2008, 03:25:51 AP
I could very well drop SMF 1 support,
With AEVA, I would have done too if necessary. However there were very little differences between the two which made it easy to support both.
I'm not sure how that would differ under your control.

Lainaus käyttäjältä: Nao 尚 - marraskuu 24, 2008, 03:25:51 AP
I'm still unsure whether to host the project at noisen.com (my personal website, over which I have complete control), or smf-media.com (SMG's website
Do what you feel is necessary for support. Although Nao,I would still like the mod to be available on the mod site here.

Lainaus käyttäjältä: akyhne - marraskuu 26, 2008, 02:13:11 AP
Dimensions should be optional in the admin center.
Just youtube or for them all? It might be a bit overkill to set the dimensions in the acp for them all.

Lainaus käyttäjältä: Nao 尚 - marraskuu 26, 2008, 02:59:05 AP
That's the plan. I'll try to find whether Youtube offers a variable that sets widescreen format. Maybe it will in a few days, when enough people complain that 4/3 vids shouldn't have black bars ;)
...although a widescreen vs normal might dropdown would probably look ok.  Although another youtube specific setting lol.

Its actually quite funny. Because youtube have kept their links and sizes the same for years, where every other site has been a pain in the ass in changing them all the time.  Whats the betting that youtube opt for ugly-seo-urls (eg dailymotion) in the near future and break half the internet where the old links are used. LOL.

Lainaus käyttäjältä: gmvasco - marraskuu 26, 2008, 04:35:17 IP
Good enough for me :)

By the way, can you give us divshare mp3 player support? (this mod is the gift that keeps on giving) :)

Here's a random example of that mp3 player: http://www.divshare.com/download/5925984-2b2

And thanks again. And again.

This would definately need a lookup because the link format doesn't distinguish between mp3 and video. otherwise you'll try to embed video in mp3 player etc.
I can't remember exactly, but I suspect that divshare and mp3 was one that I tried to get working but was unable to.



At this point I realise that I've quoted too much, feel like I've written an eassy and decide to skip to the important bits.

Re http://www.simplemachines.org/community/index.php?topic=200401.msg1819931#msg1819931

If I had got to my next version, the mod would have likely reached 200 or 250 supported sites.
I agree it is far too many.
For this reason I was looking at an alternative way.

According to my friend who uses the vbulletin AME mod (which is similar).
they've actually got it in two parts.

1) The player (with only a couple of sites supported) [supported by the main author]
http://www.vbulletin.org/forum/showthread.php?t=189267

2) The definitions list (each separate) [supported by other people/submitted by individuals/community]
http://www.vbulletin.org/forum/showthread.php?t=175378

Basically the player has an upload option for the user to upload a definition.
The definitions are in xml format.

I actually toy'd with this idea just before writing aevac 4.0.
It would be possible to do something very similar with smf.  And cheating to use SMF xml functions to read/parse the definitions.

This would be the sort of road that I would have preferred to go down, so that it didn't waste all the popular definitions that I had got to work.
And relying on the community to provide the definitions instead of me you.

I don't see why more people can't provide completed definitions, it isn't really that hard once you look at mine.
Obviously there will be ones that are more difficult (photobucket gets 5 stars for being the crappest site cos they use stupid links and change them every other month)

I think for such a large mod, we should see more community involvement in the additions of sites.

Lainaa
"Fix uses of the embed html"> I didn't test this, and whether it works or not, I'm not very eager to keep it at all actually...
It does work (at least 4.0.2 did the other day on my site).  This was to counter the problem where noobs put the whole embed code. And what they end up with are 3 or 4 videos and junk surrounding it. There was no way I could think of to protect it. Replacing it was better option.
You also have the benefit that its taking up alot less space in your database.
That when you uninstall, your left with a viable link instead of junk.
That when the embed code changes, that you don't have to go through everything.

Whilst of course its upto you if you should drop it.
It is a common occurance for noobs to post the embed code. (otherwise i wouldn't have spent the hours making it work).



before I forget it was also suggested that I could have been looser with the regular expressions.
My expressions were very tight. (this might use up more memory).
it has been suggested that I could use \d+ \s+ instead of mandating [a-z] and the length {10,20}
I've not really done loose expressions so I never bothered to look into it.



removing my aevac debug might be a good idea. Could save a few hundreths of a tenth.  I only left it in cos I was testing with it and couldn't be arsed to remove it.




Lainaus käyttäjältä: Nao 尚 - marraskuu 30, 2008, 03:47:45 IP
I have yet to understand why Karl url-encoded the "=" sign (%3D) while it should be left as it. As for "ap", I have no idea what it stands for... If only he could have documented his search...
I have no idea either. :P

I copied it straight from youtube. (but i did confirm it with other sites and test it).
However youtube have constantly being messing about with this and adding new formats.
It should be an equals to me. But video sites never conform to logic. (in fact i don't think theres any video sites producing legit valid embed code to w3c standards (ignoring the <embed><object>) issue for a second.

NOTE: Although & is shown as & in those lines above, my mod makes sure that all & are &amp; in the url (preventing double-encoding).
ampersands in urls should always be encoded (but you already knew that) :P

THOUGHT: I just remembered, we were using HQ links before they were public/out of beta.  So they may no longer be correct.
Youtube has added other changes, so you might have to re-do the hq link from scratch based on whatever youtube are now styling their links as.



Other ideas:
People were asking to move towards w3c complaint coding.



From memory. These are the bugs that I am aware of
&nbsp; - This should have been fixed.  It will not fix old posts with it though as unfortunately the &nbsp; has been inserted into the post itself.
I believe this was caused by the protection of quotes PRE-parsing of bbcode OR on posting with linking of urls.
(Yes the cause was auto_link_urls function, but only when called on those two occasions).
I was unable in every circumstance to replicate it. I tried with utf8/nonutf8 and smf 1.x and 2.x.

Enabling/Disabling Embedding local media.  It wouldn't enable/disable itself properly when told to. So it would embed when you had it off.
Not sure if I fixed this in the last version which I released.
If not I can't remember the solution that I had planned, but I don't think it was too complicated.

YouTube HQ. videos not playing/loading/hanging - Something I learnt after I left, that youtube doesn't have higher quality for every video, and stupidly doesn't load lower quality when it doesn't have it.  You can't fully detect it as I understand it.  Youtube was still displaying higher quality links for me for videos which didn't have it (older ones).  Partly youtubes fault this one.
Solution:  Only use lower quality videos. OR detect if the user has specified a higher quality link, if they have then the user says hq exists, so use it.

Youtube + lookups (not always). Something like two days before I left, youtube added this geolocation crap to their website which detects whether you're being served you're localised version.  Unfortunately, it does a 301 redirect  from www. to uk.youtube.com etc
However the lookup functions of smf (which the mod uses), does NOT understand a 301. And will return null/empty.

This issue only affected me on my localhost. Not my actual server. It may depend on what geo-locating youtube is using and whether it is accurate, and where your server is.

I'm not sure whether this is still happening. And is not entirely in my your hands.

.Core files - Is this still happening?  I thought I'd fixed it in v4, thats why I re-wrote it cos it was pissing me off in v3.
The only users that were affected to my knowledge are ones on php 5.2.6. Any other php version appears to be unaffected.
This one is beyond me.  My only other solution would be to remove protecting of quotes. to stop it happening.

(Actually, brainfart, one thing I didn't check is whether a $message that was being protected was too large (thus crashing))
I wonder if splitting messages over 50kb in size and then protecting it in chunks.







I think thats everything for now. Nao ONLY, if you have any specific questions, drop me a pm, or to my email (which you already have)

or here, and I'll reply in the next few days if possible.

Anyways, I just want to take the opportunity to thank Nao for taking over the mod.
I would encourage people to get involved with the mod and help with contributions of definitions.
Testing of each one aswell.

Finally.  Apologies for the length of this post.  I'm sure that you have a headache now.

karlbenson


Akyhne

Karl: The way vbulletin does the list of embedded sites was exactly what I had in mind.

I'm quite sure the &nbsp; wasn't solved in V4, but I would have to check again. At least it was an error in V3.

Unfortunately local playback and HQ Youtube playback didn't work in V4 (at least not for the many videos I have in my forum).

Nao 尚

Wow, the Karl's back :)
Just wait for me to finish reading my backlog of messages! It's impressive how awfully busy this weekend has been in terms of messages on various boards, PMs, etc, it was clearly the best time for me to hurt my hands lol!
I'll answer today at any rate. I'm just trying to sort out the mess that is this day to 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.

Nao 尚

Okay, big SMG day for me -- wrote a long-overdue feature (upload separate thumbnails for items that would otherwise get generic icons as thumbnail). Took me longer than expected, and there are so many things to discuss here, that it'll have to wait until tomorrow.

@wingman and everyone at the top of the page> yes, it was only a quick fix, designed to allow that particular video to show up. In no way was it a "definitive fix"... (the &fmt=18 shouldn't even have been there :P)

Sorry again for being overwhelmed with work on the SMG side... Hopefully, tomorrow I'll have all of my time available for Aeva. *And* replying Karl's post :)
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.

Sabre™

WELCOME BACK KARL!!!!  regularexpression!!!!!

Lainaus käyttäjältä: regularexpression - marraskuu 30, 2008, 10:57:50 IP
I think for such a large mod, we should see more community involvement in the additions of sites.

I was going to suggest something similar, in which the Subs-Avec-Sites template containing the new sites(user requested/submitted), would be updated/uploaded monthly(stand alone) for uploading/updating to your site.
But I know not of other edits that maybe needed on other templates, if any are.

Great work Nao!!
Keep it up champ  8)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


shumilica

Hello. I was using until today de 3.0 version. Now i installed version 5, wich is better, but i have a request.
Trilulilu.ro site has different player for audio than the video one. They have on their site a plugin for wordpress, wich makes the difference between one and another. Here it is: http://static.trilulilu.ro/download/trilulilu_plugin.zip Can you implement this to this mod and make trilulilu video and trilulilu audio embed with different players (i would't mind to be the same, if it worked, but if I embed a link to an audio file then it doesn't work to be played from the forum).
Hope you understand and hope it is easy to adapt. And if yes, can you put the code to be modified here? Thank you.
Today, if you're not confused it means you're not thinking clear!

Nao 尚

@Sabre> I'm currently thinking of splitting the mod in two, yes. Making sure that people don't have to upgrade just to get support for a specific site. I'll upload the site list to Aeva's mod page, and let the mod download it directly there, if the SMF team doesn't mind (and if it's technically possible -- I haven't looked into it yet.)
Of course, users will be able to download the site list manually from the mod page, too (that's the point).

@shumilica> I'll try to take a look but please, please post this kind of request on aeva.noisen.com's request section -- it's the right place for that, and I'll always look there for new work to do when I have some spare time, while browsing through this topic is already complicated for me.

@Karl> I'm preparing to answer your post today... I will need some courage, wish me luck! ;)
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.

Sabre™

Beautiful!!      I was thinking/hoping you may go that way, after reading previous posts of yours.
As stated, great job buddy :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Nao 尚

Well I do have some pretty good ideas of what I'm going to do to make the mod better and easier to use, and I'm trying to shape a philosophy around them, but clearly, I've only taken over a couple of weeks ago, and only worked on it for a couple of fulltime days, so I'm quite open to suggestions. I just need to sort them out. The most solid path for the future, I will try, out of respect, to borrow from Karl, if he has anything in mind (including the ideas shared in his long post). Apart from that, I'm pretty free and for instance I think I'll rework the Aeva settings into two sections (normal settings, and site list), maybe more, and add actual templates for them (I'm not comfortable with using SMF functions for them, and I don't think any theme creator would in their right mind skin the Admin templates anyway, so SMF 1.x should be good.)

Oh dear, I'm starting to get lost in my thoughts. I'll get back to you.
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 尚

Okay everyone, you'll have to help me here... I just need someone or some people to compile a list of everything I *should* do, and everything I said I *would* do... A series of topics on aeva.noisen.com would be even better.

Lainaus käyttäjältä: regularexpression - marraskuu 30, 2008, 10:57:50 IP
However I have been peppered with email requests since Nao took over to provide some quick answers to some of the problems/issues [albeit from memory] to help Nao with the transition. I had an hour to spare to do just that.
Thank you again.
It is true that I was pretty much thrown into the vortex without prior knowledge... Although I was vaguely aware of what function did what in Aevac 3 (which I used), I had never tried Aevac 4 myself -- if you remember, you told me it might fix an issue I had with trimUrl... Sure it did :) But I wasn't sure it would, and I figured it was too little of a bug to justify manually uninstalling and reinstalling immediately... Then I postponed... Until you decided to retire, and I figured I'd rather stay with a "functional" version until someone took over. So, when it turned out that it would be me, I had to upgrade... And although Aevac 4 is much easier to understand in the sense that the code structure is better and every other line is commented, I'm still far from being able to say I "get" your mod. I think it'll take a couple of weeks (months?) before I fully understand it enough to be confident in changing code here and there, more than the quick fixes, code indentation and template modifications I've been doing so far.
Just like Wayne would say--I'm not worthy! But the task is up to me now.

Lainaa
Lainaus käyttäjältä: Nao 尚 - marraskuu 22, 2008, 04:57:40 IP
[...]Possibly too many nasty bugs to fix. [...]
Hope not too many.  Otherwise the original author deserves to be hung drawn and quartered :P
Are you sure? I heard he was a jolly good fellow!

LainaaI thought it was fun trying to infinite no. of sites.
There's always a moment when you realize you have to stop the mess.

Again with my examples with Kyodai Mahjongg -- I know, not much related, but it's my only long-term experience in maintaining popular software -- there were always people asking for me to add new layouts to the game. I was always ahead of the competition in every area, including that one. I decided to stop after 100 (having made myself most of them). I only added a handful of layouts later, considering they were very skillfully made. In the meantime, other games went over the 100 limit, and even reached the 1,000 barrier I think... That was probably fun and everything, but they put most of their marketing power into the fact that they had something like 1,000 layouts. Okay, fine, but when you have so many layouts to choose from, which one will you choose? After a while, I realized there were only a few layouts that were interesting to play. There's really very limited appeal to the strategy of quickly clearing a layout that just draws a letter of the alphabet with Mahjongg tiles. Great. The original layout (Turtle/Pyramid as it's mostly called) is still the best one -- and for many games, the only layout they provide. Whenever I play a game of KMJ, I only play with the Turtle layout. Games with hundreds of layouts? Only played Turtle on them, too... The point was that with KMJ, people could create their own layouts in less than a minute. It's a better selling point than offering thousands.

I'm telling you this because it relates very closely to the problem with the site list -- there are only a dozen that appear regularly everywhere. So I will focus on these. Youtube and Dailymotion, mostly (as they're the most challenging ones to support, too, especially Youtube). If a user wants their forum to support a specific niche site, they could add their own code (as in a layout editor). Turns out that it's harder for anyone to grasp the inner layers of even basic regexp matching (as opposed to tile matching :P), so it's up to me to make them, again -- but it doesn't matter, I'd like to try and differentiate the most important sites from the rest... I've already done part of the work by making a "Popular sites" section in the admin area, and clearing the way for possibly many more site categories. These are the "categories" that users will be able to import. For instance -- a game category. Only filled with gaming video websites. Or an adult category, which will be available *separately* (I share your point of view about this), and in full accordance to your original statement on them. It's just an example.

LainaaAE4 was necessitated (being written from the ground up) to get around some bottlenecks/limitations/bug in AE3 that I'd been unable to get around.
Not to mention it was a heck of alot faster/lighter on memory.
Are you sure it couldn't be any faster...?
This is an important question.
My *feeling* is that what Aeva(c) does is turn links to videos at parse_bbc time. I can't say that for sure though, because there's a lot of stuff with the [aeva(c)] tag, and I'm afraid I still haven't dwelved deep enough into Aeva to be sure. (I know I'm repeating myself, but although I will try my best to evenly share my time between SMG and Aeva in the future, my current absolute priority is getting the frigging final 1.5 release of SMG out, because we've been working on that exclusively for the last two months, and we're nearly done...)

So, if I'm right and if everything is done at parse_bbc time, to me it would be easier to have an actual visible (and editable) aeva tag, that would contain all of the settings needed to run the video, for instance -- [nobbc][aeva type=unembed]...[/aeva][nobbc] would simply show the link, followed with an icon that means "this video can't be embedded". Edit--I think you already sort of do this with #noexternalembed, but it would be better off in a "regular" tag. It could also be used in other ways:
- forcing to show a video thumbnail instead of a video player (as in SMG),
- choosing a specific width/height for instance (if you want the video to be smaller than normal, or larger),
- more "user-friendly", "type" could be "169" or "ws" for a 16/9 view, "43" or "fs" for a 4/3 view (which is why they'd need to be editable, so the poster can change the aspect ratio after posting the video),
- users could choose the playback quality manually,
- etc...

This is just an idea, I'm not saying I'll implement it. (Well, I enjoyed making the [smg] tag from scratch, so I'll probably do it ;))

Oh, coding questions:
- why are you using for() loops associated with a count(), instead of simply foreach()-looping through the site list? Is for() supposed to be any faster?
- Or in a regexp, you use (i|) instead of (i?), is it faster, too?
- Your lookup code is great, btw. I just wouldn't use fetch_web_data(), as, even though it saves some code, doesn't behave correctly on safe-mode servers, while some of these might have the curl library installed -- which makes for a great replacement, check out my code in MGallery-Embed.php if you're curious (I'll use it in Aeva anyway).

LainaaI think AE4 is cleaner code.  (and Nao, your more likely to understand that, than AEvac3 :P [messy code.])
You know, I *like* messy code, as long as it's geeky ;)

LainaaP.S [sentence added later] Not to mention I spent weeks re-writing all the definitions.
Yeah, obviously I respect that ;) (Which is the main reason why I wouldn't remove definitions from the mod -- I would rather sort them and put them in an external file.)

LainaaNot really.  It started out as that I would just support the main ones.
However when someone mentioned to me that vbulletin has a similar mod http://www.vbulletin.org/forum/showthread.php?t=175378
and then it became a case of that I wanted it to have more than theirs did.  So any that they supported that mine didn't, I would try to support.
I never heard about that mod... (Of course, I never go to websites about forums that are not SMF, either...)
Is it any good?
It's annoying to me. It is very (very!!) important for me NOT to use external code as much as possible. For instance, although I converted SMF Gallery Pro to SMF2, from the moment I switch to SMG, I never looked back, and never opened these files again. Not that I would have needed to. Plus, it's much funnier to figure everything out by yourself. Even when I wrote the SGP to SMG converter last week, I only used a dump of my original test database (which was, hopefully, more than enough to convert everything correctly).
Knowing that there's a similar mod isn't too exciting to me, because I might be tempted to use their knowledge. I could at the very least be tempted to read their feature list (which seems quite long), but I know I'll end up looking at "how they did it" if this ever happens. I also know that even if I did this, I would probably rewrite everything to my own taste, do it my own way, but I wouldn't feel the approach to be honorable in the first place.
There's a fine line between programming for yourself (i.e. adding features when you want to include them, only if you enjoy making them), versus programming for the community (i.e. doing everything possible to make the best possible mod -- and this would include looking above over forum software's shoulders and check out their code.)
I remember doing it a few weeks ago when it came to strenghtening SMG's security code. I knew it wasn't too good, so I looked into SMF and used one of their tricks, then into phpBB3 and used another of their tricks -- then mixed them together and obtained a better protection (it's hard to protect against malware files because there's a high chance of adding false positives to the rejected list.)
This, I did without too much trouble, because (1) security is ten times more important than any honor code, (2) both phpBB and SMF wrote their code according to security bulletins published online -- I just saved some extra time, which is what I needed (because of the 1st point, again). But site lists? "Cool" features? I don't know what to think...
I'd really appreciate your opinion on this, before I start looking into that vBulletin mod.

LainaaNao, yes, in total the filesize of the mod (as a package has gone up) and as more sites were supported, it will obviously increase further.  However AEVAC4 was meant to make it more scaleable.
By the way, I hope you weren't annoyed by my negative thoughts about some of your personal choices. I'm not saying they were wrong -- just that we were in disagreement over them. I tend to be ******y without realizing it, which can hurt when things are said "behind your back". (Of course, I was hoping you would read my posts, but I wasn't expecting it either.)

LainaaBoth in terms of speed and bandwidth/filesize usage.  Although it was hard to compare like for like (aevac4 vs aevac3), aevac4 was twice as fast even with all the upgrades, and used alot less memory.
I'm not sure how you did it, but I'm not going to go through a diff parse of both mods (I did that some time ago and there too many differences here and there), just to find out ;) I'm trying to forget anything I could have known about v3.

LainaaAlthough the definitions file is 250kb. In almost ALL circumstances, that never gets used.
And it shouldn't. It could slow down a forum's execution by a large share... (I suppose.)

LainaaA 'lite' version gets written out with out ANY comments, and without information that was not needed, and based on what features are enabled.
The comments aren't too big a deal, since anyone with speed in mind will use their own server, and enable a caching technology such as APC, which will in turn precompile the php files and strip them of their comments.
BTW, did you know that your comments represent about 13KB out of the 33KB in Subs-Aeva.php? ;)
20KB is very manageable actually... :)

LainaaThis is why its scaleable. If you enable only youtube, and disable fix links, then the file that gets used can be like 1kb.
Yup. This is something I really appreciate in v4. That, and the fact that you return the site list in a global... Which in turn, allowed me to use it in SMG 1.5 :)

LainaaI didn't want to give it up. Adding new sites was a pleasure.  I think my plan was to enable only major sites by default.
Oh yes, that's still not done... Uh, I'm not even sure this can be done without initializing the Generated-Sites list first... I'll have to check.

LainaaAlthough I changed this later on because, if the user didn't have correct chmod permissions, then it would use the full definitions file, and they would all be enabled.
Incorrect chmod... In the Sources folder, really?

LainaaFunny, so did I. But everyone else hated it.
Yeah, you told me back then... ;) I was surprised. I like seeing the full URL (in all cases, even when the player is clickable), so maybe I'll add an option to always show it...

LainaaThere is a flag in the definitions file for each site which states whether site x has it shown.
Yeah, that's easier that way I guess... ;)

LainaaI was trying to only include it when the player itself didn't have a button or link back to the video (so the user can comment on that video at youtube etc).  I was going to throw it open to the community to decide which ones should have it and which ones not. (or at least decide by their complaints).
Back to what I was saying sometime ago: you try to listen to the community too much ;)
There's a balance to be found. Finding your own pleasure, and theirs. If they don't like your settings, just give them an extra setting to disable them.

LainaaOfficial Response: Nao, I'm delighted that your taking it over.
Firstly because you've helped me with it so far so I know you get it.
Well it was only on a few details, really... I never understood why you credited me for my help in the first place... I don't even remember what I contributed to ;) (I know I still have the PMs, but...)

LainaaSecondly because you're more than capable
In terms of regexp? I'm only second to you. I look for years for the way to make a full string optional, until I found out about (?!string) in your "god of all regexps"... Fantastic. The same regexp taught me about recursive regexps. Wow. I thought I knew pretty everything I needed to know, but clearly the guide over at php.net isn't complete... I found another guide on a Perl website that is.
I also must credit Dannii for sharing with me his enthusiasm for regexps. I knew very little about them before -- and the month I spent working with him on PrettyURLs really taught me all of the basis I needed to acquire. And a few tricks to spare.

You are my two sensei when it comes to regexp. I only hope I can write equally good regexps in the future. (Dragooon can tell you how happy I am everytime I add a new convoluted regexp to SMG, eheh. There are quite a few. I like that because he doesn't get them. So I can spread my knowledge. Maybe I'll be his sensei, too. My very own young padawan.)

Lainaaand finally (and selfishly) so I won't be getting any more emails about it being left to rot (JOKE!)
Yay!
Now you'll be getting e-mails from people complaining that I'm ruining your work of love, that I'm a ****** with them and they want you back because you didn't treat them like cattle :D
Just wait for it... It's going to be legendary!

Lainaa[Note, I did leave specific instructions / permission with the smf team to allow for people to take over my mods / for them to re-assign at their discretion.]
Yes, I was told about that. Although the process could have been better optimized through a regexp or something: Goodbye Topic->Me (I should take over)->->Topic users (Do it)->Sinan (Do it)->Jade (Do it)->Me (OK)->Dragooon (ask Sinan)->Sinan (ask metallica)->metallica (ask the team)->Customizer Team->End of story... And I'm not kidding you ;)

LainaaI've attached a zip containing every PUBLIC version that I have released. I had not kept any betas.
v4.0.2 as I released on the website was the latest and best version of the mod that I had.
Thanks for the file ;)

LainaaExternal tools were notepad++ and a browser.
I use Notepad2 for programming (Ctrl+shift+Z is better for undo/redo, and I prefer to deal with source files in my taskbar rather than in a tab bar...), and Notepad++ for to-do-lists (because I always keep them open that way).

LainaaIf I was struggling on finding how to embed the item, I would look whether someone else had done it.
Yeah, it looks like it's the only solution... Even for retrieving thumbnails, which is somehow as complicated.
Or I'd just go looking through the website to see if it has a rss feed per item... In which case it usually embeds a thumbnail in it. (I did that for Google Video which had eluded me for some time!)

LainaaAlthough my mod was still marked beta. With only a handful of bugs to resolve, I would have been ready to call it final very soon had I not left.
Yes, I'll release a "final" v5.0 soon. Maybe all bugs won't be fixed, but it's very usable. Bugs can be crushed later as they come. They always come back, anyway.
And if I call it "final", maybe people will flock to it, I dunno... Do you know that v4 still gets downloaded 4 times more than v5? Did you submit a direct link to the file to another site or something? Because I have no idea why it is the case... (I mean, v5 *is* v4, only with a shortened name and fixed bugs...)

BTW I always wanted to ask you whether you would accept that I change the mod's name (while keeping it recognizable), but it seems that I didn't even have to ask, since you're using the new name, thank you :)

LainaaBut despite being beta, I was more than happy to run it on my own sites, and still find it a damn site more stable than many other RC or FINAL mods/softwares that I've ran.
Sure :)

Lainaa
Lainaus käyttäjältä: Nao 尚 - marraskuu 24, 2008, 03:25:51 AP
I'm willing to do the AEVAC job if it doesn't eat up too much of my time.
It does.
Not as much as SMG ;)

LainaaWith AEVA, I would have done too if necessary. However there were very little differences between the two which made it easy to support both.
Yes, indeed it's easy enough to keep support going. This was one of my first ideas, but when I saw everything looked okay, I decided against dropping it (for now).
I'd rather drop support for PHP 4, so that I could use some of PHP 5's features and functions, but well... I'm used to the compatibility crap now, with SMG and everything.

LainaaI'm not sure how that would differ under your control.
I'm trying to stay in your line. I know that I would have appreciated that the "spirit is respected" if anyone had accepted to take over Kyodai Mahjongg (no one ever applied, so I just left it on the side of a road before going on vacation to Sicily, and it never came home on its own.)

LainaaDo what you feel is necessary for support. Although Nao,I would still like the mod to be available on the mod site here.
Oh, it will always be... SVN revisions will be over at smf-media.com, specific patches at noisen.com (none for now), and actual downloadable packages at simplemachines.org, in the mod page.

Okay, I've answered more than half of the message -- I'll start the rest immediately, but I'll post this now, so that I don't cry like a baby when I have a power shortage  >:(
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 尚

Lainaus käyttäjältä: regularexpression - marraskuu 30, 2008, 10:57:50 IP
Its actually quite funny. Because youtube have kept their links and sizes the same for years, where every other site has been a pain in the ass in changing them all the time.  Whats the betting that youtube opt for ugly-seo-urls (eg dailymotion) in the near future and break half the internet where the old links are used. LOL.
Well, the other half will use Aeva and see no difference because I'll have figured out a solution ;D

Hmm, maybe it would be a good idea to implement a management task that will go through every post in the board to check for existing Aeva links and fix them if they need to...

Lainaus käyttäjältä: gmvasco - marraskuu 26, 2008, 04:35:17 IP
This would definately need a lookup because the link format doesn't distinguish between mp3 and video. otherwise you'll try to embed video in mp3 player etc.
Yeah, it's a pity... (Which is why Divshare is listed in the Audio-only websites for now.)
Another possible reason for adding the [aeva] tag: tell the browser to use a video or audio flash player for a specific link... ;)
Yeah I know, "overkill", once again... But at least it'd work. If users are smart enough to check out the aeva tag documentation (that I would have to write >_<)

LainaaI can't remember exactly, but I suspect that divshare and mp3 was one that I tried to get working but was unable to.
It's rank 2730 in Alexa so it's definitely worth a shot.  ;)

LainaaI don't see why more people can't provide completed definitions, it isn't really that hard once you look at mine.
Most people are very reluctant to even change a single quote in a SMF file...
Most people don't learn PHP.
Most people who learn PHP, are afraid of manipulating regexps.
Most people are not as crazy as we are.

LainaaI think for such a large mod, we should see more community involvement in the additions of sites.
Well, most of the time, they won't thank you, won't pay you, won't repay you, and will expect you to be happy that they even downloaded your stuff.

I hate users.

Lol okay I'm pulling your leg but a good share of users is just like that... And it can be boring. (I have no patience for people who are expecting others to do all the work for them. That's all. If I had acted like that, I would never be in the position I am in.) (What position?!)

LainaaYou also have the benefit that its taking up alot less space in your database.
Ah... Yes ;)

LainaaWhilst of course its upto you if you should drop it.
No, I won't...

Lainaabefore I forget it was also suggested that I could have been looser with the regular expressions.
My expressions were very tight. (this might use up more memory).
I don't know... I just know that my first attempt at a regexp for Aeva (divshare) was very loose -- a simple .* at the end of the URL ;)

Lainaait has been suggested that I could use \d+ \s+ instead of mandating [a-z] and the length {10,20}
Yeah, or \w+? ... I like \w, because it encompasses the underscore character. Not many people are aware of that, though.

LainaaI've not really done loose expressions so I never bothered to look into it.
Let's say that loose expressions are less likely to break up in the future, when some websites switch from a digit-based scheme to an alpha-numeric scheme. ("OMG, we've got too many users! Let's change our URLs and break Aeva!!")

Lainaaremoving my aevac debug might be a good idea. Could save a few hundreths of a tenth.  I only left it in cos I was testing with it and couldn't be arsed to remove it.
Yeah I may remove it in the future, I dunno yet... No plans for now.

LainaaI copied it straight from youtube. (but i did confirm it with other sites and test it).
However youtube have constantly being messing about with this and adding new formats.
It should be an equals to me. But video sites never conform to logic. (in fact i don't think theres any video sites producing legit valid embed code to w3c standards (ignoring the <embed><object>) issue for a second.
- as for embed, it'll never be valid, since the w3c is pushing for the <video> tag (which is cool, but requires us to change the doctype.. Uh, not doing that again for a long time!)
- <object> is valid, but sometimes you can't just cater to an object tag. You have to add the embed tag. It's annoying, but for instance I have trouble getting a single object tag to work fine in Opera... (Works for my mp3 players, not for the rest.)
I'm also thinking I could turn all of these into javascript calls to swfobject... But I think a local swf file is needed for that :(
- regarding the equals sign, I used to think that "ap=" was short for autoplay... Now, I just think it's a hidden value that sends a string to the player... And that string includes the fmt=22 which forces us to urlencode the = signs so that it doesn't get parsed by Apache in the first place.
- anyway, this isn't of much use for now...

LainaaNOTE: Although & is shown as & in those lines above, my mod makes sure that all & are &amp; in the url (preventing double-encoding).
Yeah, I did notice that. (I was starting to change the & to &amp; when I figured it'd be faster to check my website to see if it worked...)
Although I'm not sure about the point of turning & to &amp; if we already know the page isn't going to validate in the first place... (because of the embed tag...)

LainaaTHOUGHT: I just remembered, we were using HQ links before they were public/out of beta.  So they may no longer be correct.
The HQ links you used are still recommended by some blogs. I'm not exactly sure what to do with them, though... If you find something in the future, if you have some time to spare, feel free to look into it ;) I may find a solution in the meantime, of course...

LainaaYoutube has added other changes, so you might have to re-do the hq link from scratch based on whatever youtube are now styling their links as.
If only they had a proper page with a FAQ for embedding their links...

BTW, was AME started before or after Aeva? That Aeva idea, this generous concept, was it inspired from some other project, or just came off in a moment of pure genius?

LainaaOther ideas:
People were asking to move towards w3c complaint coding.
Complaint coding? Oh, compliant you mean.
Yeah, see above.

LainaaFrom memory. These are the bugs that I am aware of
&nbsp; - This should have been fixed.  It will not fix old posts with it though as unfortunately the &nbsp; has been inserted into the post itself.
Ah, bugger... Well, users will know that if they find some more, they just need to reedit their posts :)

LainaaI believe this was caused by the protection of quotes PRE-parsing of bbcode OR on posting with linking of urls.
(Yes the cause was auto_link_urls function, but only when called on those two occasions).
I was unable in every circumstance to replicate it. I tried with utf8/nonutf8 and smf 1.x and 2.x.
Just in case you didn't notice--I fixed (well, I think I fixed, since I couldn't reproduce in any case, and no "victim" of the nbsp bug came to see me either before or after the fix..), I fixed the issue by inverting two lines in the script.
In autolink_urls, you had inadvertantly inverted both final strtr lines.
This was not the case in v3, which is why I'm not sure it is fixed (because someone reported that the bug happened in v3 as well.)

LainaaEnabling/Disabling Embedding local media.  It wouldn't enable/disable itself properly when told to. So it would embed when you had it off.
Not sure if I fixed this in the last version which I released.
If not I can't remember the solution that I had planned, but I don't think it was too complicated.
Can anyone confirm this happens?

LainaaYouTube HQ. videos not playing/loading/hanging - Something I learnt after I left, that youtube doesn't have higher quality for every video, and stupidly doesn't load lower quality when it doesn't have it.  You can't fully detect it as I understand it.  Youtube was still displaying higher quality links for me for videos which didn't have it (older ones).  Partly youtubes fault this one.
Solution:  Only use lower quality videos. OR detect if the user has specified a higher quality link, if they have then the user says hq exists, so use it.
Or maybe -- lookup the page, find "higher quality", follow the link, look that page and retrieve the embed code...? (Wow, a double-level lookup??!!)

Otherwise--I guess "only LQ" will do in the end... Youtube is supposed to see whether you can support HQ and send it automatically... (?)

LainaaYoutube + lookups (not always). Something like two days before I left, youtube added this geolocation crap to their website which detects whether you're being served you're localised version.  Unfortunately, it does a 301 redirect  from www. to uk.youtube.com etc
However the lookup functions of smf (which the mod uses), does NOT understand a 301. And will return null/empty.
Yes, interestingly I had the same issue with SMG! When retrieving the dailymotion thumbnail, I would get a 302, and the SMF function I was using didn't support any 30x. I made a bug report about this: http://dev.simplemachines.org/mantis/view.php?id=2699
It has yet to be addressed though, and won't change anything for earlier versions, so I went and rewrote it for SMG... And found a lot of funny annoying issues with direct URL communication for safe-mode servers... I sort of fixed that by using the curl library, as I mentioned in my previous post.

Anyway--where was I?

LainaaThis issue only affected me on my localhost. Not my actual server. It may depend on what geo-locating youtube is using and whether it is accurate, and where your server is.

I'm not sure whether this is still happening. And is not entirely in my your hands.
Just using a 30x-aware version of the functions should work fine... Shouldn't it?
I'm not going to use fetch_web_data forever in any case. I'll rewrite it to my taste ;) Something with support for 30x redirects and curl. Just like in my SMG functions. (Yeah okay I'm pretty fond of my personal MGallery-Embed.php functions. I was even planning to post some of them to php.net as good samples. Well I was too lazy to do it in the end.)

Lainaa.Core files - Is this still happening?  I thought I'd fixed it in v4, thats why I re-wrote it cos it was pissing me off in v3.
The only users that were affected to my knowledge are ones on php 5.2.6. Any other php version appears to be unaffected.
This one is beyond me.  My only other solution would be to remove protecting of quotes. to stop it happening.
My website is running PHP 5.2.6... And I never met this issue. I tried hard to reproduce. I asked Jade to send me a zipped version of one of the files (still waiting, Jade! :P) I'd like to help, but as far as I know, no one has reported this to me...

Lainaa(Actually, brainfart, one thing I didn't check is whether a $message that was being protected was too large (thus crashing))
I wonder if splitting messages over 50kb in size and then protecting it in chunks.
You didn't finish your sentence, did you?
Max size in SMF is 65kb, although I think I remember seeing that recent versions tend to simply "upgrade" the text field to a large text version if a longer message is met, so that it can fit... I also remember that the Merge Double Posts mod makes sure to check for post sizes before it even shows an icon to merge them together. Apart from that... A 65kb featuring videos? Where does that happen? On Mars?
And posting a 65kb text to a 64kb field won't crash anything, I think.. It'll just truncate it.

LainaaI think thats everything for now. Nao ONLY, if you have any specific questions, drop me a pm, or to my email (which you already have)

or here, and I'll reply in the next few days if possible.
I thought it would be nicer to answer here, because readers might be interested in the know-how about Aeva, but feel free to answer me by PM or mail, too. (Although my old e-mail address doesn't work anymore so, err... PM it will be... Or PM me to get my new address if you want it.)

LainaaAnyways, I just want to take the opportunity to thank Nao for taking over the mod.
And thank you very much for, well, pretty much everything ;)

LainaaFinally.  Apologies for the length of this post.  I'm sure that you have a headache now.
Nope, but I did spend the better part of my afternoon on it ;)
I hope you won't have to do that just to answer mine! Just throw away everything that doesn't require a reply ;)

And be sure to update us on your life if you feel like talking about it! There's a whole topic of karlbensonmourners waiting for news about you... They probably don't even know you came by... Maybe you don't want them to know ;)
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.

karlbenson

Lainaus käyttäjältä: Nao 尚 - joulukuu 02, 2008, 10:26:54 AP

LainaaAE4 was necessitated (being written from the ground up) to get around some bottlenecks/limitations/bug in AE3 that I'd been unable to get around.
Not to mention it was a heck of alot faster/lighter on memory.
Are you sure it couldn't be any faster...?
It depends on settings.  On average I think it was 0.08 to protect/embed 1 video in 50 posts. (50 videos). (thats matching all the sites).

Lainaus käyttäjältä: Nao 尚 - joulukuu 02, 2008, 10:26:54 AP
My *feeling* is that what Aeva(c) does is turn links to videos at parse_bbc time. I can't say that for sure though, because there's a lot of stuff with the [aeva(c)] tag

Correct. The embedding/matching is done at runtime.
It would be faster to pre-embed them into the post/using bbcode or another reference.

However I didn't want to do that because.
a) the whole intention of the mod was to embed media WITHOUT bbcode.
- I (and others who I spoke to about it), agreed that it would compromise the mod. If I wanted bbcode I would have used the Streaming3 mod.
b) I didn't want the mod to leave a load of dead tags behind when the mod was uninstalled.
(and I didn't want to have to write a removal).  I just wanted them to be straight links.

I believe the vb mod leaves shortcut/reference in the post.  I believe that the reference isn't created by the user, but automatically on posts. That way it only has to find its media reference tags, and not have to do protections and so forth.

Overall, I don't see that it really needs any speed improvements. I've actually not a single complaint about it being slow, or using too much memory. (and its been used heavily on some very big forums inc my old 700k forum).

Aevac is called in parse_bbc AFTER bbcode has been converted.
HOWEVER, in order to protect quotes from being embedded, the script pre-protects quotes BEFORE bbc is converted.
It isn't possible to protect afterwards because in SMF 1.x, quote bbcode gets replaced by a div. And it was impossible to write a regular expression to match divs when other bbcode also use div tags.
(remember its not just matching <div> </div> its can be nested quotes in various shapes).
(NOTE: however late in smf 2.x development, div tags on the quotes were switched to blockquote (if memory serves me correct), which would be easier to protect from being converted).

Eg
calls parse_bbc
-> pre-protects quotes
-> converts bbc
-> pre-protects other bbcodes from being embedded (like code, noembed)
-> embeds
-> undoes protection (aevac:// to http://)

Note: the [aevac] tag is IMPORTANT due to the recursive functions. To avoid an infinite loop when protecting a bbcode that I didn't want to replace.
So (bbcode eg quotes)
[aevac][bbcode]
[aevac][bbcode][/bbcode][/aevac]
[/bbcode][/aevac]
is ran on a recursive loop and becomes
[aevac][bbcode][/bbcode][/aevac]
then
[bbcode][/bbcode]

Note, the recursive expression that I wrote for protection of quotes is actually a god of regexs as it can actually deal with nested bbcode. (It took me 12 months to get one to work/ask around/searching).

Lainaus käyttäjältä: Nao 尚 - joulukuu 02, 2008, 10:26:54 AP
So, if I'm right and if everything is done at parse_bbc time, to me it would be easier to have an actual visible (and editable) aeva tag, that would contain all of the settings needed to run the video, for instance -- [nobbc][aeva type=unembed]...[/aeva][nobbc] would simply show the link, followed with an icon that means "this video can't be embedded". Edit--I think you already sort of do this with #noexternalembed, but it would be better off in a "regular" tag. It could also be used in other ways:
#noexternalembed was added late on for YouTube links which cannot be embedded.  I needed some way of informing the user that youtube doesn't allow that link to be embedded. My goal was to avoid bbcode.

Lainaus käyttäjältä: Nao 尚 - joulukuu 02, 2008, 10:26:54 AP
- forcing to show a video thumbnail instead of a video player (as in SMG),
- choosing a specific width/height for instance (if you want the video to be smaller than normal, or larger),
- more "user-friendly", "type" could be "169" or "ws" for a 16/9 view, "43" or "fs" for a 4/3 view (which is why they'd need to be editable, so the poster can change the aspect ratio after posting the video),
- users could choose the playback quality manually,
- etc...
The mods raison d'etre was to make it as user-friendly as possible. That meant no bbcode, no fiddly settings.
For example I hate it when positioning attachments in posts to have to set type/size etc
[attachment type=image height=63 value=filename.png]
(Thats nasty with other forum softwares).

As for aspect ratio and sizes, I prefered to leave that upto the admin. On all but youtube, I think you've only got standard.  If the admin wanted to change the sizes, its very easy to edit the file. (again why I didn't specify the ability to change it in the admin).

Lainaus käyttäjältä: Nao 尚 - joulukuu 02, 2008, 10:26:54 AP
Oh, coding questions:
- why are you using for() loops associated with a count(), instead of simply foreach()-looping through the site list? Is for() supposed to be any faster?
IIRC For loops are faster. In the context I was using them I wasn't always going to use every row, so using for with a count was better.

Lainaus käyttäjältä: Nao 尚 - joulukuu 02, 2008, 10:26:54 AP
- Or in a regexp, you use (i|) instead of (i?), is it faster, too?
Depends on what site.  Remember I re-wrote all 500 or so regexs (sometimes at late hours).
It works. But  yes ? is probably faster.

Lainaus käyttäjältä: Nao 尚 - joulukuu 02, 2008, 10:26:54 AP
- Your lookup code is great, btw. I just wouldn't use fetch_web_data(), as, even though it saves some code, doesn't behave correctly on safe-mode servers, while some of these might have the curl library installed -- which makes for a great replacement, check out my code in MGallery-Embed.php if you're curious (I'll use it in Aeva anyway).
Actually not, I looked at using curl.  Both reading on here somewhere and on the net generally.
It is LESS likely that cUrl will be available when fetch_web_data() won't work. I believe thats why smf developed it.
Particularly for shared servers which disallow the use of the fopen(and similar/related functions) / use safemode/openbase dir. Those same hosts are unlikely to have cUrl aswell.
(p.S I thought it should work even in safe mode. Open base dir it probably won't though).

IMO, it would be a good idea to use cUrl as a backup. if smf's functions don't work, then try searching for cUrl.
(that would be very simple to do, check for return of false/null from fetch_web_data, then check for cUrl).

Lainaus käyttäjältä: Nao 尚 - joulukuu 02, 2008, 10:26:54 AP
LainaaNot really.  It started out as that I would just support the main ones.
However when someone mentioned to me that vbulletin has a similar mod http://www.vbulletin.org/forum/showthread.php?t=175378
and then it became a case of that I wanted it to have more than theirs did.  So any that they supported that mine didn't, I would try to support.
I never heard about that mod... (Of course, I never go to websites about forums that are not SMF, either...)
Is it any good?
It's annoying to me. It is very (very!!) important for me NOT to use external code as much as possible. For instance, although I converted SMF Gallery Pro to SMF2, from the moment I switch to SMG, I never looked back, and never opened these files again. This, I did without too much trouble, because (1) security is ten times more important than any honor code, (2) both phpBB and SMF wrote their code according to security bulletins published online -- I just saved some extra time, which is what I needed (because of the 1st point, again). But site lists? "Cool" features? I don't know what to think...
I'd really appreciate your opinion on this, before I start looking into that vBulletin mod.

I wasn't suggesting employing like for like.  I wouldn't even look at their code.
With an upload a definition function, that would not be too complex to code (especially for someone working on a media gallery).

It would just be the reading of the xml definition
<?xml ?>
<aevac>
<site>
<name></name>
<regex>{cdata'd}<regex>
<pattern></pattern>
</site>
<aevac>
</xml>

Like I said above it would be easy to cheat with this, and use SMF's xml reading functions rather than writing your own. (There is some code floating around from unknown to show an example of this on this forum, or you could copy/alter from smf's package functions aka the code smf's uses to read mod packages. eg I think its Packages.php)

Lainaus käyttäjältä: Nao 尚 - joulukuu 02, 2008, 10:26:54 AP
LainaaNao, yes, in total the filesize of the mod (as a package has gone up) and as more sites were supported, it will obviously increase further.  However AEVAC4 was meant to make it more scaleable.
By the way, I hope you weren't annoyed by my negative thoughts about some of your personal choices. I'm not saying they were wrong -- just that we were in disagreement over them. I tend to be ******y without realizing it, which can hurt when things are said "behind your back". (Of course, I was hoping you would read my posts, but I wasn't expecting it either.)
I'm not bothered, I just wanted to explain the background behind it.  That its scalable to running 1000 sites or 10 sites in a way which means if you've only got 10 sites enabled,your not wasting bandwidth/filesize/processing time by doing work for 990 sites which are disabled.

Lainaus käyttäjältä: Nao 尚 - joulukuu 02, 2008, 10:26:54 AP
LainaaAlthough I changed this later on because, if the user didn't have correct chmod permissions, then it would use the full definitions file, and they would all be enabled.
Incorrect chmod... In the Sources folder, really?
I plan for the worst. In a situation where the GENERATED definitions file could not be loaded or was not generated, it uses the MASTER definitions. 

Lainaus käyttäjältä: Nao 尚 - joulukuu 02, 2008, 10:26:54 AP
BTW I always wanted to ask you whether you would accept that I change the mod's name (while keeping it recognizable), but it seems that I didn't even have to ask, since you're using the new name, thank you :)

You don't have to stick my stupid naming conventions (aka my old Automatically Email Inactive Ordinary Users, which I named AEIOU. I added ordinary, just so that it had every english vowel letter in the acronym)

Lainaus käyttäjältä: Nao 尚 - joulukuu 02, 2008, 10:26:54 AP
LainaaWith AEVA, I would have done too if necessary. However there were very little differences between the two which made it easy to support both.
Yes, indeed it's easy enough to keep support going. This was one of my first ideas, but when I saw everything looked okay, I decided against dropping it (for now).
I'd rather drop support for PHP 4, so that I could use some of PHP 5's features and functions, but well... I'm used to the compatibility crap now, with SMG and everything.
Yeah PHP4 is a pain. But there wasn't anything too hard to provide back-wards compat for Aevac, as there was with some other mods.




P.S Talking of lookups/thumbnails etc.
One link that I had in my browser was
http://www.oembed.com/

it might be useful to get some more information. It wasn't in my immediate plans, but looks like it might be useful for a couple of sites. (and better than pulling a 20kb webpage to pull a little xml).

weightman

Lainaathe whole intention of the mod was to embed media WITHOUT bbcode.

I would prefer this mod not require BBC code as the n00bs won't use it.

karlbenson

Crazy long post responses :P Part 2

Lainaus käyttäjältä: Nao 尚 - joulukuu 02, 2008, 12:08:06 IP
Hmm, maybe it would be a good idea to implement a management task that will go through every post in the board to check for existing Aeva links and fix them if they need to...

I did sort of write a script for that (which was in that zip) and was available on the mod site at one time or another.
Well it actually replacing old bbcodes with normal links, but I'm sure it could be manipulated.

Lainaus käyttäjältä: Nao 尚 - joulukuu 02, 2008, 12:08:06 IP

Lainaus käyttäjältä: gmvasco - marraskuu 26, 2008, 04:35:17 IP
It's rank 2730 in Alexa so it's definitely worth a shot.  ;)

Seriously, never quote Alexa. Even with recent improvements, its about as accurate as measuring a fart in a windtunnel on full belt. :P

Lainaus käyttäjältä: Nao 尚 - joulukuu 02, 2008, 12:08:06 IP

LainaaI don't see why more people can't provide completed definitions, it isn't really that hard once you look at mine.
Most people are very reluctant to even change a single quote in a SMF file...
Most people don't learn PHP.
Most people who learn PHP, are afraid of manipulating regexps.
Most people are not as crazy as we are.

Nah, its because we are lazy.  If you look at the vbulletin community 90% of their regexs are user-contributed.

Lainaus käyttäjältä: Nao 尚 - joulukuu 02, 2008, 12:08:06 IP
Lainaabefore I forget it was also suggested that I could have been looser with the regular expressions.
My expressions were very tight. (this might use up more memory).
I don't know... I just know that my first attempt at a regexp for Aeva (divshare) was very loose -- a simple .* at the end of the URL ;)

Don't use .*  it can lead to pulling more information + eating memory. This was my mistake on early versions.
I tend to use [^"]*?

Lainaus käyttäjältä: Nao 尚 - joulukuu 02, 2008, 12:08:06 IP

Lainaait has been suggested that I could use \d+ \s+ instead of mandating [a-z] and the length {10,20}
Yeah, or \w+? ... I like \w, because it encompasses the underscore character. Not many people are aware of that, though.

I just used a-z because i felt more people would understand it if they were trying to write definitions themselves.

Lainaus käyttäjältä: Nao 尚 - joulukuu 02, 2008, 12:08:06 IP
LainaaI've not really done loose expressions so I never bothered to look into it.
Let's say that loose expressions are less likely to break up in the future, when some websites switch from a digit-based scheme to an alpha-numeric scheme. ("OMG, we've got too many users! Let's change our URLs and break Aeva!!")

Its not the file id/name that is loose, for example. It might be easier to match all subdomains of youtube with [a-z]{1,3} rather than listing each one individually. Or instead of matching the whole directory structure, ignore it and just match the base domain, and the bit we want. Ignoring if the directory structure is incorrect.


Lainaa
Yeah, I did notice that. (I was starting to change the & to &amp; when I figured it'd be faster to check my website to see if it worked...)
Although I'm not sure about the point of turning & to &amp; if we already know the page isn't going to validate in the first place... (because of the embed tag...)
Moving towards W3c compliance.

Can't see the video tag taking off anytime soon

Swfobject is a pain in the ass, and only masquerades w3c compliance issues. Plus it would mean that it wouldn't embed for the increasing no. of users with javascript disabled.

Lainaa
BTW, was AME started before or after Aeva? That Aeva idea, this generous concept, was it inspired from some other project, or just came off in a moment of pure genius?
I believe that AME was created before my SMF mod (not 100% sure).  Although I didn't know about it until alot later when a user told me about it.

My idea for the mod came up due to Streaming 3 mod.  I didn't want to have to create bbcodes for 10 different bbcode sites. (like i had my youtube one). And I didn't want to use the Streaming 3 mod for security reasons. (I only wanted video to embed from trusted sources).
The inherent vulnerability/security issue with allowing flash is that it would allow users to embed ANY flash item hosted ANYWHERE.
Plus I wanted to do the embedding without any bbcode.  Bbcode is nasty and so last century.




With regards to &nbsp bug. No it was a v3 bug that should have been fixed in v4 (after I spoke to you about it and my use of $bbcode variable. I went back to use the smf version, and re-modified it.

mark7144

Lainaus käyttäjältä: weightman - joulukuu 02, 2008, 01:59:37 IP
Lainaathe whole intention of the mod was to embed media WITHOUT bbcode.

I would prefer this mod not require BBC code as the n00bs won't use it.
Same as above, the great thing about this mod is the lack of BBC codes.

Advertisement: