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 06-27-2007 10:00 PM

AME - Auto Media Embedding (youtube, Amazon, google, myspace, etc...)
 
From the inventors of Swiss Cheese and the Egg comes AME - The Automatic Media Embedding System.

Note that Version 2.0.0 can be found here

AME is derived from GAL 6 base code but instead of linking keywords, it converts URLs that users paste or enter in their posts into inline embedded video streams.

Big credit goes out to mfyvie for the original concept that jazzed me up enough to lift code that I have been working on to radically improve his fresh idea. Though the same goal, I have taken a totally different approach to his initial release. This mod is 100% steaming fresh code straight from the Geeks oven of love.

First... the overview

AME scans new and edited posts for pre-defined patterns of URLs (i.e. youtube's). If it finds a match, it swaps the url tag for an ame tag.
When a post get parsed for bbcode and an ame tag is found, instead of hammering away at the post with umpteen bbcodes, AME quietly figures out which pre-defined embedding should be placed there and... viola', you have a pretty little embedded video like this:

Attachment 66927

This is significantly faster, has much lower overhead and is much easier to manage than loads of bbcodes or a than scanning every single post as the user views it to see if there are any conversions that need to be made.

Now for the bells and whistles

AME:
  • 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. This radically reduces overhead and speeds up the 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 in a post)
  • 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!
  • can extract the title (requires your server to allow url wrappers with fetch_contents)
  • 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 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
  • 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 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

Add ons

AME comes configured with YouTube, Myspacetv, Google Video, Bolt, iFilm, Yahoo, Dailymotion, Amazon and MetaCafe Support built in. Since the amount of providers are always changing and most sites will only need a particular amount, AME has been designed with an import and export system to allow members to easily share formats with one another. In fact, the second post of this thread is updated periodically to relflect those add ons. Currently there are over 12 more additional formats contributed by AME users. Click here to see them.

Installation
  • Upload the contents of the forums folder into your forums directory and import the product.xml file into your product manager.
  • After installation, make sure that the system is on (admincp->AME CP->Settings)
  • Then you may want to try to rebuild old URLs via the tools option.

Troubleshooting

See this post on troubleshooting

A note about support and such

I have my plate pretty full with taking care of my commercial mods and the support that comes with them. Saying that, I will help when I can - but to be honest, I have ensured that there should be little to no support needed on this mod as it is very much self contained.
Please do not PM or post asking me to give you regexp's to support additional media streams. I built the system so that you can add your own providers as well as the ability to import and export them. If you still need a pattern but are not great with regular expressions (who is?) then I suggest getting RegExpBuddy. Although I am not expert at regular expressions, I did a quick start tutorial on AME regexps here if you want to check it out. I don't mind you guys asking amongst each other for these things, but just note that I will most likely not respond to the requests.

I will reserve the first couple of posts in this thread to periodically add user contributed patterns to import and for additional information (I hate mega long first post's in the release section). So check there for up to date information.

nJoy

The Geek 06-28-2007 12:09 PM

This post is for listing updates and upgrade information. The updates will appear in the latest to the oldest

1.2.0 Released 12.07.07 Major update. Discussion for this release (and important upgrade notes) starts here.
  • New features
    • Added the ability to fetch embeded video data
    • Added ability to disable fetching titles/external data both globally AND on an item by item basis
    • Added default support for yahoo, dailymotion and amazon
    • Enhanced default regexps

1.1.3 Released 11.07.07 Minor update. Discussion for this release starts here,
  • Bug Fixes
    • Fixed issue with some versions of php reporting a reference error. A manual fix was posted last week, if you applied that fix or are not having a prolem, there really isnt a reason to update. To upgrade, simply reimport the product xml.

1.1.2 Released 03.07.07 Discussion for this release starts here,
  • Bug Fixes
    • Fixed issue when titles are changed via ajax. WHen these posts do not contain bbcode, the contents of the post could be potentially emptied.
1.1.1 Released 01.07.07 Discussion for this release starts here,
  • Bug Fixes
    • Fixed issues with older versions of php not parsing code
    • Fixed rebuild posts never leaving the first page
1.1.0 Released 29.06.07 Discussion for this release starts here.
  • Bug fixes
    • Fixed annoying bug that left the package setting to 'disabled' by default.
    • Fixed single quotes being left in some bbcodes that AME skips over
    • Enhanced the regular expressions to take into account other parameters
    • Fixed bug with importing a single definition
  • New features
    • Added the ability to fetch video titles
    • Changed the replacements and container HTML to use variables rather than back references. In other words, instead of placing \1 in your replacement, you would now put $p1. You can have up to 5 back references this way ($p1, $p2, $p3, $p4 and $p5). You can also use $url and $title in the container and the replacement.
    • I had to re-wipe the default definitions to make the changes outlined above. If you had tweaked your definitions, you will need to do so again.

Note that by default, the new 'Resolve URL titles' option is on. Some servers lock down the ability to use fetch_contents with url's. If your server has this restriction, then this feature will not work and you will need to disable it (or get your host to enable it). How will you know if you need to disable it? If your posts seem to hang when creating/editing a post with a matching URL in it.

The Geek 06-28-2007 12:10 PM

Reserved for user contributed definitions to import into AME.

User contributed:

Videotube And Liveleak -VideoTube contributed by Ren? Kunze and the LiveLeak contributed by DaNIEL MeNTED. I contributed a couple of very minor tweaks to some of the regexps.

Other:

puertoblack2003 06-28-2007 12:29 PM

thanks will try this out:up:

dinodonk 06-28-2007 12:32 PM

thanks! downloaded

eurofunny 06-28-2007 12:59 PM

Hi,

installed and then comes this error when i post a thread with youtube url or other contents........hack disabled at the moment........

Code:

Warnung: Missing argument 2 for ame_prep_text() in /includes/ame_bbcode.php (Zeile 152)

Fatal error: Call to undefined function: str_ireplace() in /mysite/includes/ame_bbcode.php on line 268


The Geek 06-28-2007 01:06 PM

hmmm. What version of php are you on?

eurofunny 06-28-2007 01:07 PM

Quote:

Originally Posted by The Geek (Post 1278408)
hmmm. What version of php are you on?

4.4.7

Lizard King 06-28-2007 01:08 PM

Perfect idea Sam :)

Ren? Kunze 06-28-2007 01:25 PM

Hello, unfortunately I get now an error if I a new topic or contribution provide:

Quote:

Warnung: Missing argument 2 for ame_prep_text(), called in /home/mars14/public_html/vb/includes/functions_newpost.php(524) : eval()'d code on line 191 and defined in /includes/ame_bbcode.php (Zeile 152)
Unfortunately I do not have notion like I these sides in chop to merge can.
http://video.google.de/
http://www.myvideo.de/
http://www.videotube.de/
http://www.clipfish.de/

Can help their me there.


All times are GMT. The time now is 06:14 AM.

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.02144 seconds
  • Memory Usage 1,786KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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