Quote:
Originally Posted by The Geek
Hmm... Thats kind of a cool idea, but out of the scope of this mod. However it could easily be done by creating an add on that uses AME's hooks:
1- Add a field to the thread table (i.e. ame_count)
2- in the automediaembed_prep_text_end hook, put something along these lines:
PHP Code:
if ($flag) { global $threadid; //update ame_count }
you could then use the ame_count field in a conditional for the TV icon.
Saying that, you would then want to update during edits, deletes and moving of posts. A bit of a pain, but the best 'performance' method possible 
|
I'll have to see if I can make that work. That's just a hair beyond my current level of knowledge, but I think I can tackle it.
Quote:
AME can overwrite media links if you want. That is what the conversion tool is for, it essentially takes the plethora of [media] tags and turns them into URL tags, essentially allowing you to uninstall them. Without breaking old posts. From that point you could then run the rebuild tool to convert into AME codes if that is what you wanted, however AME doesnt do this by default, you would have to run the tool.
|
Right, what I meant was some folks thought it did it by default and they thought it did it to all your video URLs across the forum no matter what. Meaning that if you uninstalled it, you'd have useless links left over. I've been setting them straight though.
Quote:
Yea, it really is outside the scope as AME is designed to scan blocks of text for userdefined URL patterns. A profile block would KNOW that it was geting a media URL and could simply display it in an object tag. In fact, that is pretty easy to do, the only messy part is adding a block as IMO it is very easy and doable, just kind of messy.
|
I was thinking it would probably be messy. Maybe another add-on for the future.
Quote:
I suppose it will need to go into the 3.7 section as it won't work on 3.6 and it should infer that it works with 3.7x (thought this version does too).
I am currently working on the rebuilding of blog and group posts which is a bit long winded and will add your suggestions above.
Thanks for your continued support on this project After looking at the current options availible, I still think AME is by far the best media embedder for customisability and performance.
nJoy
|
Hey, no problem. I enjoy working on these things.
Oh, I know. I did have one more question with regard to this, and I can't believe I almost forgot to ask. Sometimes, depending on the site, it's just impossible to get the pertinent data from the URL or the source page. A lot of times it's because the video embed ID isn't part of the HTML, but generated dynamically or the embed code might be located on a separate page. Is there a way to have the RegEx look to a different page then the source? I guess an example would be like this:
The source page is:
www.videosite.com/dont_click
The video ID is neither extractable from the URL nor the source page, but it can be found on these pop-up windows:
www.videosite.com/embed_code/dont_click or
www.videosite.com/embed_code/dont_click/videoid=123456
So I build a RegEx for the main URL. Either
http://www\.videosite\.com/[\w]+ or
([\w]+)
And somehow have a field where I can tell the RegEx/Embed RegEx to look either in a new specified source page, or in a new specified URL.
I don't think there's anything that can be done for information that's buried in javascript. Also, every so often, embed code
is javascript, and it just doesn't convert when posted.