vBulletin Mods

The Official vBulletin Modifications Site

DJ's AME :: The Ultimate Automatic Media Embedder :: 2.5.7
by Digital Jedi
15 Oct 2013 04:45

5 Attachment(s)
From the team who brought you the blockbuster film "Yahtzee!", comes the next major motion picture about incredibly bad and arbitrary puns:

AME automatically embeds media in posts without the need for pesky BBCode cluttering up your editor toolbar. It's also lightweight, and saves resources that BBCode would ordinarily consume. Your users don't even have to know you have AME installed. If they share a link from YouTube, Dailymotion, Amazon, Metacafe or Vimeo, AME automatically embeds the content for them. No special code to learn. No instructions for newbies to understand.

In addition, AME allows you to create, import and export support for individual websites in the form of media definitions. These XML files expand your AME to support a limitless number of websites from around the net and let you share them with the community. We currently have around 200 media definitions collected at this repository thread. If you want additional support for website not listed, please ask for it there. Odds are, we might already have one. (TIP: Be sure to check the Add-Ons section below for stuff you might miss out on, otherwise.)


This modification was originally built by The Geek, who is no longer coding for vBulletin. We miss him. But he gave permission for someone to continue to build upon his work. All I've done is modify the code a little to support additional functionality and to provide a place to continue to support the product. The product didn't need too much tweaking, but I did manage to add some new features I think you will enjoy, which I'll lay out in the feature list below.


It is HIGHLY recommended that you read the READ ME.html file included in the ZIP file before you upgrade or install. You don't want to be blind-sided, now do you? :eek:

  1. Download and Unzip the contents of the ZIP file.
  2. Upload the contents of the "UPLOAD to Forum Root" folder to your forum's root directory. (This is the directory where your vBulletin is physically installed.) Also, if you've renamed your Admin CP folder, be sure to move the admincp folder's contents to your renamed directory.
  3. CHMOD your amecache folder to 777.
  4. Go to your Admin CP »» Plugins & Products »» Manage Products »» Add/Import Products and import the product-djs_AME-2.5.7.xml file.
  5. Your Admin CP should automatically refresh and you should now see the AME CP somewhere below your vBulletin Options menu.


If you are upgrading from AME 2.5.6.
  1. Delete custom definitions specifically for Amazon, Dailymotion, Metacafe, Vimeo and YouTube. (Key names: amazon, dailymotion, metacafe, vimeo and youtube) Theses five definitions are now hard coded into the product and will be updated along with the product if need be. You can back these up if you need to, but keep in mind if you use any custom defs for these sites, they will be duplicated every time you upgrade AME. So don't ask my why your videos are doubled up, or I'll throw rocks at you.
  2. Upload the contents of the "UPLOAD to Forum Root" folder to your forum's root directory, overwriting previous versions of the files.
  3. Ensure that your amecache directory is still CHMOD'd to 777.
  4. Import the product-djs_AME-2.5.7.xml file into your Product Manager, making sure to set the option to Allow Overwrite to Yes.
  5. If you are using the file cache, it is strongly recommended that you re-sync your cache using the Tools menu.


The following five posts will include:
  • Additional Screenshots
  • Full Features List
  • FAQ
  • Resources to develop your own custom definitions
  • AME History/Changelog

Digital Jedi 15 Oct 2013 04:46

6 Attachment(s)

Attachment 146832 Attachment 146830 Attachment 146829 Attachment 146828 Attachment 146827 Attachment 146831

Digital Jedi 15 Oct 2013 04:47


What's New in 2.5.7?
  • New! The Help Menus have been completely rewritten in most cases. And orphaned help menu items that were not connected to their entry have been rewritten and attached. Items that were missing help entries now have them to help you better understand what certain features of AME actually do.
  • New! You may have missed the fact that AME has additional (and duplicate) options in the vBulletin Options Menu. Some of these have been made accessible via a new menu item called Advanced Options in your AME CP. This includes the ability to cache custom AME templates and exclude forums by ID number, if for some reason you don't want to use the selection method.
  • New! The main ame_container template has been stripped of it's tables and now uses a blank template for centering purposes. In addition, the default global sizing options have been expanded to 768 x 480 (in the relevant zones). These changes give videos a cleaner, more cinematic feel.
  • New! The biggest and bestest new feature in AME 2.5.7, though, is the ability to add additional code to areas of AME that weren't practical to include in the definition. Opening up AME to a host of new possibilities it didn't have before. Please see the READ ME file for more information. Watch my repository thread for the release of new definitions that fully take advantage of this new functionality.

Previous Feature List from The Geek
  • Allows user to simply 'paste' in a URL (i.e. a youtube link) without needing to know any special tags. However instead of displaying just the URL, it will show the media embedded within the post
  • is lightweight as it does all of her chores without the overhead of having 1 bbcode per pattern or trying to parse a post every single time it gets displayed with a bunch of patterns. AME radically reduces overhead and speeds up processing. The only time ame will kick in is after creating a new post or after editing an existing one (or if an ame tag is found)
  • is extensible. She allows you to add, edit, delete, import and export patterns. That way you can decide which services to support, how they should look and then share them with others! At time of typing this, there are over 150 media sites that have been contributed by vBulletin.org members
  • can extract the media title (requires your server to allow url wrappers with fetch_contents or ccurl)
  • can extract embed code from sites whose URLs do not contain sufficient information to embed the video
  • can rebuild your old posts to convert your 'other' mediaish tags into URL tags.
  • can rebuild your old posts, blogs, comments, visitor and social group messages to convert URL tags into ame tags where needed
  • can convert her codes BACK to url codes so you're not stuffed with a bunch of dead tags if you uninstall!
  • won't uglify your site by having videos appear in quotes, php, code or html blocks (blech!)
  • can be globally disabled
  • can be excluded from forums
  • can exclude usergroups
  • can be toggled on/off per post, blog, comment, visitor and social group message
  • would cook dinner for you if she had arms
  • can wrap the output in a 'container' with original URL
  • has a super comprehensive admincp help system. Yes, I actually took the bloody time to add all the info you need into vB's admincp help system. If you ask a silly question in this thread that is addressed in the help system, you will be taunted.
  • is fully phrased
  • has hooks around integral operations so you can extend it
  • Supports embedding in vbBlog, Visitor Messages and Social Groups.
  • Can be disabled in one or more of the following sections: Posts, vbBlog, Visitor Messages and/or Social Groups
  • Validation ability. This will help prevent media being embedded that can not be embedded (i.e. youtube videos that the author has stipulated can not be shown off of youtube). This option requires the extraction option to be turned on and a valid validation regexp. I have included one in the default youtube version. When a video on you tube gets embedded, but the author doesnt allow embedding, a link (with icon) is shown instead.
  • Ability to prevent non authorised usergroups from viewing (see Readme file in zip for more info)
  • Usergroup permissions (edit usergroup to adjust edit/view permissions)
  • Template driven system
  • Signatures supported
  • Different sizes and template configurations for each supported zone (posts, blogs, groups, visitor messages and signatures)
  • A couple new hooks (Mainly to support a future add on for AME media in profiles)
  • Notfication system (similar to vB's to check for errors)
  • Definition keys for easier updating of definitions and to use in templates
  • File caching system which radically reduces processing
  • And more that I cant think of off the top of my head!

Digital Jedi 15 Oct 2013 04:47

  1. When I post a video, I get two videos with some messed up text at the bottom. What do I do?
    Answer: You have two definitions that support the same website. This almost always happens with YouTube, since there is a default YouTube definition, and there used to be a lot of custom ones floating around. Even though the key feature was added to prevent duplications, AME will still re-create it's default set every time you do an upgrade. So make sure you're only using one definition for YouTube. (NOTE: This doesn't include definitions that expand YouTube functionality, such as YouTube Playlists or YouTube Short URLs.)
  2. I posted a YouTube video, but it says "This Video is no Longer Available". But I looked at the site and it's there. How come the video isn't showing?
    Answer: Check the page you got the video from and look for the Embed Code box. If it says "Embedding Disabled by Request" this video can not be embedded.
  3. I posted the embed code, but all I get is the embed code and not the video. Why didn't the video convert?
    Answer: Well, that's why. You don't post embed code using this mod. You just post the link to the page the video is on.
  4. What special instructions do I need to give my users so they can use this? Do I need to add anything to the editor?
    Answer: None. All your users need to do is post links. (If you previously used special BBCode, see the next question instead.)
  5. What do I do if I used to use [YOUTUBE][/YOUTUBE] tags tor other special BBCode to embed videos on my site?
    Answer: Go to Admin CP » AME CP » Tools » Convert Codes and you will find a special converter to turn these old media tags into specially made AME tags. READ THE INSTRUCTIONS CAREFULLY AND FOLLOW ANY STEP ADVISED BEFORE PROCEEDING.
  6. I used to use Goldbrick/PassiveVid/Other Media Embedding System. Do I need to uninstall the old one before installing AME? What will happen to my old posts?
    Answer: Refer to the instructions for each of these mods for uninstalling. Then check your database tables for any remnants of the old modification as they will conflict with AME. You can then install the AME product. Unless your old modification used some kind of special tags for converting videos, you will have to manually edit the posts of old threads in order to get the videos to convert.
  7. How do I edit the specific width or height of a certain site individually?
    Answer: Media width and height are controlled globally, but if your global settings are impractical for whatever reason, go to your Admin CP » AME CP » Display Definitions » [DEFINITION NAME]. In the Replacement HTML box change the $ameinfo[height] and $ameinfo[width] variables to the literal dimensions you want.
  8. How do I align the videos to the left or right, instead of having it aligned centered in posts?
    Answer: To align the video to the left or right instead of having it centered, change the HTML in your ame_container template: Admin CP » Styles & Templates » «EXPAND SELECTED STYLE» » AME Templates » ame_container. Look for this line of code and change "center" to "left" or "right".

    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

  9. How can I make my own definitions for a given website to use with AME?
    Answer: Visit this post, which has a number of resources to help you learn.
  10. While I try to install AME 2.5, the installing window goes on forever and doesn't stop. Why can't I install this mod?
    Answer: During installation the AME Product adds a field to the "Post" table in your Database, so if your forums are large then it can take a couple of hours for the installer to get it done. My suggestion would be to shut down your forums, import the Product, let it take as long as it needs (like I said it can be hours) and then re-open your forums.
  11. When I try to import your Master XML file, the window hangs with all the definitions showing but nothing happens. Why can't I get the definitions to import?
    Answer: This is only step one of the process. Scroll down to the bottom of the list and click Import to continue (in Internet Explorer you can hit Ctrl+S rather then scrolling).
  12. When I try to import your Master XML file, not all the definitions import. It says it's successfully completed, but only seems to have imported half of the whole set. Why won't they all import?
    Answer: We only started running into this problem when the Master XML of definitions started getting really large. Mostly likely, your host has a PHP setting that limits the number of characters that can be submitted in this manner. During import, try selecting half, or smaller groups of the definitions and import them one group at a time.
  13. Does AME 2.5 work with vBadvanced?
    Answer: Yes it does. But if your just posting videos in a regular BBCode/Template Module there's no need for it. You could just post the Embed Code like any other module. However, if you have a module that displays posts from a thread, then it will show the AME embedded media on your vBa page. Just make sure you have the character count set high enough so the video's embed code isn't truncated before the ...[Read More] link.
  14. Does AME 2.5 work with Blogs, Visitor Messages and Social Groups?
    Answer: Yes, 2.5 has support for all three of these as well as Signatures. However, if you've upgraded your forums AFTER installing AME 2.5, you need to add support for these areas using the controls in your Tools menu. Go to Admin CP » AME CP » Tools » and click whichever applies Add Blog Support |Add Social Group Support | Add Visitor Message Support. (Not needed for signatures) Then set your options under Settings for each of these areas.
  15. How can I make it so that when certain Usergroups post videos, those posts need to get approval by a Staff Member before they show up?
    Answer: In this situation what could be done is to set the setting "Follow Forum Moderation Rules" to "No" for the specific Usergroup(s) you want this to happen with. What this will do is Moderate ALL of the post made by the Members of this Usergroup by sending the posts made to the Moderation Queue ... You will then have to manually approve each post in order for it to show in the forums. Take into consideration that this will move ALL of the posts they make into the Moderation Queue and not just the ones containing Video Links. As of now, there is no way to only move the post containing a Video to the Moderation Queue ... Its all or nothing basically, so you decide what you want to do.
  16. I posted a certain link and it got automatically parsed into a video, but I don't want it to be like that. How can I make it show up as just a link?
    Answer: Its a pretty simple solution. When you create the post you simply have to uncheck the checkbox that appears under the Additional Options Box that says Automatically embed media (requires automatic parsing of links in text to be on). With this unchecked it will video links will parse as normal links instead of videos. If the post has already been made, simply edit the post in Advanced Mode and uncheck that same option.
  17. How do I use the Embed Regex field?
    Answer: Click here for brief explanation on how to use this field.
  18. How can I delete some of the Supported Sites that already come with AME or those that I've installed myself?
    Answer: To remove a supported site, go to Admin CP » AME CP » Display Definitions. Check the box under the column labeled Delete that's next to definitions you want to remove. Then scroll to the bottom and click Save (in Internet Explorer you can hit Ctrl+S instead).
This FAQ is an update of Dannyloski's Trouble Shooting Guide for a previous version of AME.

Digital Jedi 15 Oct 2013 04:48


How To Create Media Definitions for AME 2.5
--BirdOPrey5 explains the basic info you need for creating media definitions.

Embed RegEx
--A Brief explanation as to how to use the Embed regexp (now called Extraction RegEx) field in definitions.

--Comprehensive Regular Expressions Tutorial and Reference Guide.

DJ's Frequently Asked Questions (AME 2.5)
--An update of Dannyloski's Trouble Shooting Guide, this FAQ addresses the most common problems associated with AME.

DJ's Definitions FAQ
--Information on specific definitions and their peculiarities as well some tips and tricks on how to use AME.

RegExBuddy Buddy Trial Download
--Limited free trial period with option to buy licence. I'd advise learning with this first, before trying the freeware below.

--Free Regular Expressions tester for beginners or the advanced. Excellent version if you don't want to spend quite that much on a tester. This is the one I currently use. Requires registration after a trial period, but remains free after registration.

--A newer RegEx tester that also has a free trial period. I have not tested this one personally.

--An Online JavaScript Regular Expression tester based on open source project XRegExp. Works very similar to RegExBuddy.

Digital Jedi 15 Oct 2013 04:49

1 Attachment(s)

AME has had a long and varied history. The ZIP file includes an AME History text file which is just for reference, and to help you understand why there are so many AME-related threads lying around. I've also attached it here for quick reference, as well as including the changelog in this post for my iteration of AME.


AME 2.5.7
Adopted the product under my silly prefix
Cleaned up and reformatted the UI
Rewrote most Help Menu Items
Stripped out tables from the ame_container template
Set global default size variables to a larger, more modern standard
Moved some vBulletin Options AME items into an Advanced Options item in the AME CP
Added ability to include optional JavaScript in <head> or <body> of areas where AME is normally parsed
Changed default definitions to now include updated YouTube, Amazon Thumbs, Metacafe, Dailymotion and Vimeo definitions (Will remove these from the Master XML)
Changed film_go.png from film image, to a more media generic green "play" button. Now called noembed.png

Replaced a deprecated PHP function in the new plugins
Corrected redundant text in the new feature descriptions, because that kind of stuff bugs the heck out of me

Max Taxable 15 Oct 2013 05:19


I have previous version, studying this one.

viper357 15 Oct 2013 08:06

Working well on 3.8.5. Thank You. :)

Gadget_Guy 18 Oct 2013 14:09


I just updated my site with this and am now getting this at the top of my pages:

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'nobody'@'localhost' (using password: NO) in [path]/showthread.php(112) : eval()'d code on line 4

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in [path]/showthread.php(112) : eval()'d code on line 4

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'nobody'@'localhost' (using password: NO) in [path]/showthread.php(112) : eval()'d code on line 10

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in [path]/showthread.php(112) : eval()'d code on line 10

Digital Jedi 18 Oct 2013 16:46


Originally Posted by Gadget_Guy (Post 2454403)

I just updated my site with this and am now getting this at the top of my pages:

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'nobody'@'localhost' (using password: NO) in [path]/showthread.php(112) : eval()'d code on line 4

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in [path]/showthread.php(112) : eval()'d code on line 4

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'nobody'@'localhost' (using password: NO) in [path]/showthread.php(112) : eval()'d code on line 10

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in [path]/showthread.php(112) : eval()'d code on line 10

What version of PHP is your server running? Admin CP »» Maintenance »» View PHP Info. Is it 5.5 or up? I presume you're on vBulletin 3.8.8? If this is the case, I'll see if I can push out a fix for that. You should be able to suppress this error by disabling the AME :: Extra plugins in your Plugin Manager until I can get that ready. This will, of course, disable the new functionality for that time.

Gadget_Guy 18 Oct 2013 17:24

I am running

PHP 5.2.17

vBulletin 3.8.7

I have already disabled the entire plugin for the time being


Gadget_Guy 18 Oct 2013 17:27

One further question,

Once we get this working, Will I need to upload any deltas or does this version have everything up to date at this point?


Digital Jedi 18 Oct 2013 17:27


Originally Posted by Gadget_Guy (Post 2454428)
I am running

PHP 5.2.17

vBulletin 3.8.7

I have already disabled the entire plugin for the time being


I think I can push out a correction for the problem here in a few. Seems it was a minor oversight on my part.

Digital Jedi 18 Oct 2013 17:31


Originally Posted by Gadget_Guy (Post 2454429)
One further question,

Once we get this working, Will I need to upload any deltas or does this version have everything up to date at this point?


Other than deleting the five definitions I mention in the install instructions, you don't need to add anything new unless you want to. The "Delta" thread will be updated (and renamed), hopefully today, with quite a few new definitions, particularly to take advantage of AME's new functionality. But that is, as always, optional. The five default definitions will always be kept up-to-date, since I can do that from my end now. And they'll be excluded from the big Master list in my other thread.

Gadget_Guy 18 Oct 2013 17:47



All times are GMT. The time now is 12:56.

Powered by vBulletin® Version 3.8.12
Copyright © 2019, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.