vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Show Thread Enhancements - AME - Auto Media Embedding (youtube, Amazon, google, myspace, etc...) (https://vborg.vbsupport.ru/showthread.php?t=150863)

The Geek 08-24-2008 08:08 PM

Just as FYI... Im on holiday so to relax, I crakced this code back open to add some more functionality. Got most of it sorted so there may be a version 2.0 coming out of the blue within the next week.

Specifically, it:
1- Addresses the UTF problem mentioned on this page (title with special characters like ?)
2- Sorts out vanishing $ characters from quotes and code blocks
3- Adds support for vblog
4- Adds support for group posts

Ill more than likely remove most of the 'installed' codes sinces they seem to keep changing more than I update this mod :) DJ (and others) seem to be doing a great job evolving the Code set and I think having AME come with outdated codes doesnt make much sense to new users :)

Anyhoo... the above fixes and features are already done. Ill add a couple toggle switches for the new supported areas and do some gerenal housekeeping on the code before I release.

If there is anything else you can think of that may be needed (apart from codes), give me a shout in this thread, however I can't guarantee that it will make it in.

nJoy all :)

Regs 08-24-2008 09:28 PM

nJoy indeed - the additional functionality for blogs and group posts is awesome!

Thank you TG and hope all is well!

Cheers,

Regs.

Digital Jedi 08-25-2008 01:49 AM

Quote:

Originally Posted by The Geek (Post 1606056)
Just as FYI... Im on holiday so to relax, I crakced this code back open to add some more functionality. Got most of it sorted so there may be a version 2.0 coming out of the blue within the next week.

Specifically, it:
1- Addresses the UTF problem mentioned on this page (title with special characters like ?)
2- Sorts out vanishing $ characters from quotes and code blocks
3- Adds support for vblog
4- Adds support for group posts

Dude, you have no idea how much folks are gonna love you for that. They've been asking ME to do it, and I have no idea what I'm doing as it is! :D Thanks a bunch.


Quote:

Ill more than likely remove most of the 'installed' codes sinces they seem to keep changing more than I update this mod :) DJ (and others) seem to be doing a great job evolving the Code set and I think having AME come with outdated codes doesnt make much sense to new users :)
That does seem like a good idea. That might clear up some confusion when people first start out.


Quote:

Anyhoo... the above fixes and features are already done. Ill add a couple toggle switches for the new supported areas and do some gerenal housekeeping on the code before I release.

If there is anything else you can think of that may be needed (apart from codes), give me a shout in this thread, however I can't guarantee that it will make it in.

nJoy all :)
Hrm, well, from a developer's standpoint, I would love a toggle switch to select/deselect all definitions in the Export screen. I've got a trick where I can Tab+Spacebar through the list pretty quick, but as you can imagine, with 155 definitions, my hand starts to cramp right around 50. :D

This would be entirely self-motivated, but an Add New option in the menu, rather then way down at the bottom of the page would be nice too (well, way down when you have 155+ entries. :erm:)

From a user's perspective, I think some folks would like a multiple delete option. I like the fact that definitions don't overwrite, but when I have too much coffee and do one of my larger definition updates, a lot of folks have asked if that could be added. Maybe a checkbox type deal.

I ran into a couple of posts here on the forum that suggested that AME rebuilt ALL your media link and that if you uninstalled it, you'd end up with useless links, which is why some are using PassiVid. I was hoping you could clarify that doesn't happen (unless you manually choose to) in the description, because I think some folks are misreading.

Other then that, hrm, I don't know. Categories maybe? A couple of people suggested a Profile Block, but, I don't know if thats outside the scope of this mod. Eh, I'm fishing. :D

This is definitely my favorite modification and I look forward to the next update. Thanks a bunch for not forgetting us. :) Will you be releasing this in the 3.7 section as well?

Digital Jedi 08-25-2008 01:59 AM

I had a quick question for you, Geek. Does AME add any conditions where you could check for it on threadbit? Someone suggested recently a little TV icon by the thread title when a video is posted in it. But I didn't know what, if anything, to look for to set up an <if> conditional.

The Geek 08-25-2008 06:54 AM

Quote:

Originally Posted by Digital Jedi (Post 1606208)
I had a quick question for you, Geek. Does AME add any conditions where you could check for it on threadbit? Someone suggested recently a little TV icon by the thread title when a video is posted in it. But I didn't know what, if anything, to look for to set up an <if> conditional.

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 :D

Quote:

Originally Posted by Digital Jedi (Post 1606203)
Hrm, well, from a developer's standpoint, I would love a toggle switch to select/deselect all definitions in the Export screen. I've got a trick where I can Tab+Spacebar through the list pretty quick, but as you can imagine, with 155 definitions, my hand starts to cramp right around 50. :D

ok :)

Quote:

Originally Posted by Digital Jedi (Post 1606203)
This would be entirely self-motivated, but an Add New option in the menu, rather then way down at the bottom of the page would be nice too (well, way down when you have 155+ entries. :erm:)

np :)

Quote:

Originally Posted by Digital Jedi (Post 1606203)
From a user's perspective, I think some folks would like a multiple delete option. I like the fact that definitions don't overwrite, but when I have too much coffee and do one of my larger definition updates, a lot of folks have asked if that could be added. Maybe a checkbox type deal.

Make sense :)

Quote:

Originally Posted by Digital Jedi (Post 1606203)
I ran into a couple of posts here on the forum that suggested that AME rebuilt ALL your media link and that if you uninstalled it, you'd end up with useless links, which is why some are using PassiVid. I was hoping you could clarify that doesn't happen (unless you manually choose to) in the description, because I think some folks are misreading.

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.

Quote:

Originally Posted by Digital Jedi (Post 1606203)
Other then that, hrm, I don't know. Categories maybe? A couple of people suggested a Profile Block, but, I don't know if thats outside the scope of this mod. Eh, I'm fishing. :D

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.

Quote:

Originally Posted by Digital Jedi (Post 1606203)
This is definitely my favorite modification and I look forward to the next update. Thanks a bunch for not forgetting us. :) Will you be releasing this in the 3.7 section as well?

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

Digital Jedi 08-25-2008 09:39 AM

Quote:

Originally Posted by The Geek (Post 1606315)
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 :D

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. :D



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.

The Geek 08-25-2008 10:12 AM

Hmmm... can't you do that with the replacement code or using the extraction method? There obviously has to be a link to the popup (which is what I would extract)

Maybe if you give me a link as an example I can get a better idea or offer some suggestions. Just remember that I am on vacation and I don't have regexp buddy installed on this box so I don't want to spend to much time getting caught up in Regexps :D

Digital Jedi 08-25-2008 01:25 PM

Don't mind me. I've had more pots of coffee then the USDA Recommended Daily Allowance. Since I last posted, I knitted a Buick....

Seriously, though, I had some great examples, and I can't seem to find any of them at the moment. One or two of the sites I was having trouble with apparently just changed their URL strings. (!!)

Basically, what I'm running into now and again is where the extraction method is of no use, because the pertinent data is not anywhere on that page, so the RegEx can't reference it at all. (Crazy sites where the video ID might be 3678, but every number in the HTML of the page is 3677. :confused: ) But often, the data I need is located in a pop-up window, a completely different page. If I could only get the RegEx to scan that page I could nab it.

Sometimes, I'm out of luck because the entirety of the page is generated by javascript, with nary a video ID to be found. I don't think much can be done about that.

Hey, like I said, I'm 90% caffeine at the moment. Enjoy your vacation. :D

The Geek 08-26-2008 06:29 AM

Here is beta 1 of 2.0 if you want to test and give me your feedback. Only things I have identified so far are:

1- First posts in a groupmessage via the quick reply wont AME (though subsequent ones will and editing it will)
2- I havent removed any of the defunct definitions yet

nJoy

tormodg 08-26-2008 08:02 AM

Geek, if a Version 2 goes Gold soon then you're officially the Coolest Geek on board.

Digital Jedi 08-26-2008 02:20 PM

Quote:

Originally Posted by The Geek (Post 1607108)
Here is beta 1 of 2.0 if you want to test and give me your feedback. Only things I have identified so far are:

1- First posts in a groupmessage via the quick reply wont AME (though subsequent ones will and editing it will)
2- I havent removed any of the defunct definitions yet

nJoy

So far so good. I can confirm the Social Groups behavior you mentioned. Some of the videos didn't' seem to want to continue to load on page reload, but then again, I was testing GameSpot, so all bets are off there. I don't have vBlog yet, so I can't confirm anything on that end.

Backend looks great. Everything seems to be working. I'll try and put it to the full test tonight.

Just a heads up to anyone who has maybe has some customized definitions. Make sure you back those up, because upgrading will replace all your definitions.

Digital Jedi 08-26-2008 02:39 PM

One trivial error I noticed there under settings. Social GRoups is accidentally spelled with a capital R. :)

The Geek 08-26-2008 03:51 PM

Quote:

Originally Posted by Digital Jedi (Post 1607423)
One trivial error I noticed there under settings. Social GRoups is accidentally spelled with a capital R. :)

Bah! :D

Hey... what about visitor messages?

Digital Jedi 08-26-2008 04:45 PM

Whoops! Forgot to check. BRB

Doesn't seem to be working on profiles.

The Geek 08-26-2008 04:58 PM

VMs werent in the previous version as I just thought of adding it!

brb... ok... added VM support and fixed previous issues. Only thing I can think of adding now is to a rebuild option for visitor messages and removing defunct definitions. On that note... which ones would you think I should remove?

On another side note, I have also whipped up most of the profile media block add on. I thought it would make sense to have something that integrated with AME's definitions. Not sure when Ill get around to finishing it though :)

Digital Jedi 08-26-2008 06:22 PM

Quote:

Originally Posted by The Geek (Post 1607513)
VMs werent in the previous version as I just thought of adding it!

Silly me, I misread. Just upgraded and it appears to be working. I need to test more thoroughly though. I only checked a few videos.

Quote:

brb... ok... added VM support and fixed previous issues. Only thing I can think of adding now is to a rebuild option for visitor messages and removing defunct definitions. On that note... which ones would you think I should remove?
Well, lets see. I've updated almost all of these at least once. iFilm is now Spike. I keep updating YouTube to keep up with new functionality, rather then because it's not working. DailyMotion won't leave their URLs alone. I don't know. On the one hand, a list of commonly used websites gets updated frequently and on the other hand, the sites that have remained fundamentally the same are kind of obscure.

Quote:

On another side note, I have also whipped up most of the profile media block add on. I thought it would make sense to have something that integrated with AME's definitions. Not sure when Ill get around to finishing it though :)
People will go absolutely crazy over this if you do finish it. Out of curiosity, how will it handle the size of the videos if they're defined too large in the definition?

The Geek 08-26-2008 06:29 PM

Quote:

Originally Posted by Digital Jedi (Post 1607555)
People will go absolutely crazy over this if you do finish it. Out of curiosity, how will it handle the size of the videos if they're defined too large in the definition?

One of the things I am working on :)

As far as the definistions go... How about a few standards? I am thinking:
Youtube
Myspace
Google
Yahoo
Amazon

This should play to each element of AMEs strength and those shouldnt change too much. If you have updated versions, can I check those out for possible replacement of the 1.0 versions?

Digital Jedi 08-26-2008 06:37 PM

Sure, here's what I have.

Amazon (Links) is turned off incidentally by default because I have the optional Amazon (Thumbnails) in the Master XML turned on.

tormodg 08-26-2008 07:45 PM

You guys rock. Keep it coming! :)

The Geek 08-27-2008 07:27 AM

Can you believe it. I had it totally done last night apart from these definitions and I overwrote the product with the last b2 :(

Luckily it wasonly a couple hours worth of work mainly consisting of phrasing and admincp help. The file changes are still intact :D

Anyhoo... I was updating the core definitions but noticed the amazon is pretty different from the original. Any particular reason why?

The profile block tool I sussed, but not sure I am totally happy with it. If I have time, I am going to play with a few more concepts that will encompass the ability to add multiple blocks (i.e. a video, a bookshelf, CD shelf, DVD shelf). It will be a bigger project, so we will have to see how it pans itself out.

Digital Jedi 08-27-2008 08:19 AM

I love when a project begins to take shape. :D

Amazon was updated a couple of times. Once time was to accommodate support for Amazon.co.uk, .co.jp, .ca, .fr and .de and to also account for an alternative URL string they where using. Then it was updated again so as not to conflict with the Amazon (aStore) definition. I still got to work one up for Amazon China now that I think about it. Their site is wiggy.

Bear in mind that definitions I did early on might not be as optimized as they could be, since I hadn't been doing it that long. Working on these I've gradually been updating them when I learn cleaner way to structure the RegEx.

The Geek 08-27-2008 09:26 AM

Cool. Here is the latest beta which will be complete except for the amazon changes you suggested. I want to do a bit more investigating into those changes before I change them.

Are the URL structures all the same except for the extension?

Anyhoo... test the beta if you can and get back to me. Like I said, it should be pretty complete.

Digital Jedi 08-27-2008 11:15 AM

As I recall is was a bit more then just the extension. Thinking about it again, I think I made a definition for the wiggy URLs, and then someone requested .co.uk which is when I added the extra extensions. Then I edited it again so it wouldn't mess with the austere definition I later made. Couldn't combine the two. I'd have to look at it again to be sure, but I should still have the testing URLs in my demo forum.

Awsome, I'll test it ASAP.

The Geek 08-27-2008 11:47 AM

Its no problem, I have done a new version and tested it against most of the extensions above.

BTW... hold off testing the above package... Looks like I didnt fully escape the \\ characters while updating the definitions. Therefore most wont work :D

I feel pretty comfortable with the release now so I'll put it together in the release section.

Thanks for your help :)

The Geek 08-27-2008 12:30 PM

Note that Version 2.0.0 can be found here

tekguru 08-28-2008 07:37 AM

Quote:

Originally Posted by The Geek (Post 1608171)
Note that Version 2.0.0 can be found here

New version downloaded!

Assopoker 08-28-2008 12:09 PM

isn't work for me, :S it does nothing

The Geek 08-28-2008 12:10 PM

On new posts? BTW, this is an old version

Assopoker 08-28-2008 12:22 PM

:( thank you

Digital Jedi 08-28-2008 01:11 PM

Quote:

Originally Posted by Assopoker (Post 1609000)
:( thank you

You do realize you can get the new version in the other thread, right?

acast 09-28-2008 02:03 PM

Can i do an auto media embedding in private messages?

goshalim 10-07-2008 08:01 AM

Thanks Install but having problems

look below

PHP Code:

Warning: require_once([path]/includes/ame_bbcode.php) [function.require-once]: failed to open streamNo such file or directory in [path]/newreply.php(742) : eval()'d code on line 1

Fatal error: require_once() [function.require]: Failed opening required '
/home/gorgino/public_html/canarybreeder/up/forum/includes/ame_bbcode.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/gorgino/public_html/canarybreeder/up/forum/newreply.php(742) : eval()'d code on line 1 


The Geek 10-07-2008 08:22 AM

You havent uploaded the files (or uploaded them to the correct location).

BTW, version 2.0.2 is out.

goshalim 10-07-2008 08:34 AM

I know , i tried both ,

First i downloaded on my desktop. Then run win zip and took the XML file.
I went to my ADMIN cp , to plugins and products , uploaded it to the product
shows me succesfully uploaded.
Then i open my forum and wheni prees post reply it comes the message above.

The Geek 10-07-2008 09:36 AM

That error means that includes/ame_bbcode.php either isnt in the includes folder or that the server cannot run it due to permission problems.

The Geek 10-07-2008 09:38 AM

Guys... this is version 1. Version 2 and 2.5 RC1 is availible here-> https://vborg.vbsupport.ru/showthread.php?t=189267

goshalim 10-07-2008 11:13 AM

I have install version 2.5 or 2 and still having the same problems.

Now you have mention to me that error means that includes/ame_bbcode.php

Can you explain me how do i correct that please

thanks in adnvance

The Geek 10-07-2008 09:26 PM

You should be asking in the 2.5 thread then :)

What it means is that either the file ame_bbcode.php wasnt uploaded to the includes folder OR that you need to check permissions on the file as the server cant execute it.

acast 10-10-2008 03:59 PM

Hi friends. Do you know how to put autoplay in goear embed? Or any music pages like goear?

Heafycore 10-10-2008 11:58 PM

Everytime I post a YouTube link, the link itself shows up, not the embedded video!
Anyone know how to fix this? I've tried looking through posts before here but my eyes are hurting now haha.

Oh, and I can't see "Resolve URL titles" under (admincp->AME CP->Settings).
Help please? x


All times are GMT. The time now is 09:20 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03095 seconds
  • Memory Usage 1,896KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (22)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete