Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
DJ's AME :: The Ultimate Automatic Media Embedder :: 2.5.7 Details »»
DJ's AME :: The Ultimate Automatic Media Embedder :: 2.5.7
Version: 2.5.7, by Digital Jedi Digital Jedi is offline
Developer Last Online: Sep 2023 Show Printable Version Email this Page

Category: Major Additions - Version: 3.8.x Rating:
Released: 10-14-2013 Last Update: 10-17-2013 Installs: 97
Supported DB Changes Uses Plugins Auto-Templates
Additional Files Translations  

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

AME 2.5.7: Electric Boogaloo


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.)


[hr]#CCCCCC[/hr]
CREDITS

This modification was originally built by [name]The Geek[/name], 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.

[hr]#CCCCCC[/hr]
RECOMMENDATIONS

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?


[hr]#CCCCCC[/hr]
NEW INSTALLATIONS
  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.

[hr]#CCCCCC[/hr]
TO UPGRADE

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.

[hr]#CCCCCC[/hr]
WHAT ELSE?

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

Download Now

File Type: zip DJ's AME 2.5.7.zip (475.2 KB, 927 views)

Screenshots

File Type: png screen-demo-1.png (48.8 KB, 0 views)
File Type: png screen-demo-2.png (367.6 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
3 благодарности(ей) от:
CreativeIT, ozzy47, xorex

Comments
  #182  
Old 01-22-2018, 09:44 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bbqchef33 View Post
anything folks?? same problem for months since we went with SSL. all links are white screens. Changed everything to https and ?rel=0 with no luck. Ive run out of ideas.
Have you tried posting new videos, do those work?

I have no idea why &rel=0 would do anything at all.

However AME caches its parsed code so if you don't re-edit an old post any changes you make to the replacement code isn't going to be noticeable on posts you've already viewed. If it works for new posts then there is a tool (link) I believe in the AME section of the Admin CP to clear the cache. But I would backup before using it, I've had issues with it before.

For the record I went to SSL (using the older version of this mod) without any issue but I had updated the code to use SSL years before I put an SSL cert on my board.
Reply With Quote
Благодарность от:
blind-eddie
  #183  
Old 08-17-2018, 02:16 PM
m7sen m7sen is offline
 
Join Date: Mar 2014
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can anyone update this addon ?
Reply With Quote
  #184  
Old 01-08-2019, 04:38 AM
Mandushi's Avatar
Mandushi Mandushi is offline
 
Join Date: Feb 2016
Location: Albania
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have this problem, how can i fixed ?

PHP Code:
mod_fcgidstderrPHP Deprecatedpreg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /includes/ame_bbcode.php on line 712 
Reply With Quote
  #185  
Old 01-27-2019, 05:24 PM
annatar annatar is offline
 
Join Date: Jan 2010
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am not a PHP expert and I only use a small number of AME definitions so this may have issues with some other definitions but I can explain what I changed to resolve the '/e modifier is deprecated' message in ame_bbcode.php near line 712

In the function ame_process_bbcode I made the following change.

Replace

Code:
$text = preg_replace($ameinfo['find'], $ameinfo['replace'], ($param2 ? $param2 : $param1), 1);
with the following

Code:
$text = '';
for ($i = 1; $i<count($ameinfo['find']); $i++) {
    preg_match($ameinfo['find'][$i], $param1, $matches, PREG_OFFSET_CAPTURE);
    if ($matches) {
        $findStr = $ameinfo['find'][$i];
        $replaceStr = $ameinfo['replace'][$i];
        $findStr = preg_replace("/(~ie)/", "~i", $findStr);
        $text = preg_replace_callback($findStr,
            function($m) use($replaceStr) {
                $rep = $replaceStr . ';';

                $rep = str_replace('$param1', "'" . $m[1] . "'", $rep);
                $rep = str_replace('\1', '', $rep);
                $rep = str_replace('\2', '', $rep);
                $rep = str_replace('\3', '', $rep);
                $rep = str_replace('\4', '', $rep);
                $rep = str_replace('\5', '', $rep);
                $rep = str_replace('\6', '', $rep);
                if (count($m) > 2) {
                    $rep = str_replace('$param2', "'" . $m[2] . "'", $rep);
                    $rep = str_replace('$p1', $m[2], $rep);
                }
                if (count($m) > 3) {
                    $rep = str_replace('$p2', $m[3], $rep);
                }
                if (count($m) > 4) {
                    $rep = str_replace('$p3', $m[4], $rep);
                }
                if (count($m) > 5) {
                    $rep = str_replace('$p4', $m[5], $rep);
                }
                if (count($m) > 6) {
                    $rep = str_replace('$p5', $m[6], $rep);
                }
                eval('$str='.$rep);
                return $str;
            },
            ($param2 ? $param2 : $param1), 1);
        break;
    } else {
        $text = $param1;
    }
}
I am really only using the youtube definition so I did not need the \1 through \6 options so I simply set them all to empty strings.

Hopefully this helps some people and maybe someone else can take it and improve upon it.

If this helps anyone and you want to tip anything I wouldn't refuse it.
Reply With Quote
  #186  
Old 07-03-2019, 03:59 AM
Mandushi's Avatar
Mandushi Mandushi is offline
 
Join Date: Feb 2016
Location: Albania
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by annatar View Post
I am not a PHP expert and I only use a small number of AME definitions so this may have issues with some other definitions but I can explain what I changed to resolve the '/e modifier is deprecated' message in ame_bbcode.php near line 712

In the function ame_process_bbcode I made the following change.

Replace

Code:
$text = preg_replace($ameinfo['find'], $ameinfo['replace'], ($param2 ? $param2 : $param1), 1);
with the following

Code:
$text = '';
for ($i = 1; $i<count($ameinfo['find']); $i++) {
    preg_match($ameinfo['find'][$i], $param1, $matches, PREG_OFFSET_CAPTURE);
    if ($matches) {
        $findStr = $ameinfo['find'][$i];
        $replaceStr = $ameinfo['replace'][$i];
        $findStr = preg_replace("/(~ie)/", "~i", $findStr);
        $text = preg_replace_callback($findStr,
            function($m) use($replaceStr) {
                $rep = $replaceStr . ';';

                $rep = str_replace('$param1', "'" . $m[1] . "'", $rep);
                $rep = str_replace('\1', '', $rep);
                $rep = str_replace('\2', '', $rep);
                $rep = str_replace('\3', '', $rep);
                $rep = str_replace('\4', '', $rep);
                $rep = str_replace('\5', '', $rep);
                $rep = str_replace('\6', '', $rep);
                if (count($m) > 2) {
                    $rep = str_replace('$param2', "'" . $m[2] . "'", $rep);
                    $rep = str_replace('$p1', $m[2], $rep);
                }
                if (count($m) > 3) {
                    $rep = str_replace('$p2', $m[3], $rep);
                }
                if (count($m) > 4) {
                    $rep = str_replace('$p3', $m[4], $rep);
                }
                if (count($m) > 5) {
                    $rep = str_replace('$p4', $m[5], $rep);
                }
                if (count($m) > 6) {
                    $rep = str_replace('$p5', $m[6], $rep);
                }
                eval('$str='.$rep);
                return $str;
            },
            ($param2 ? $param2 : $param1), 1);
        break;
    } else {
        $text = $param1;
    }
}
I am really only using the youtube definition so I did not need the \1 through \6 options so I simply set them all to empty strings.

Hopefully this helps some people and maybe someone else can take it and improve upon it.

If this helps anyone and you want to tip anything I wouldn't refuse it.
it does not work
Reply With Quote
  #187  
Old 07-11-2019, 05:40 PM
annatar annatar is offline
 
Join Date: Jan 2010
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mandushi View Post
it does not work
Odd. It works fine on my installation but as stated I am not an expert and only modified it enough to get it to work in my limited use cases.
Reply With Quote
  #188  
Old 07-17-2019, 07:13 PM
Mandushi's Avatar
Mandushi Mandushi is offline
 
Join Date: Feb 2016
Location: Albania
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

are there any updates for this version ?
Reply With Quote
  #189  
Old 07-22-2019, 02:46 PM
ChiNa ChiNa is offline
 
Join Date: Jul 2012
Posts: 457
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How to fix preg_replace() errors in PHP 5.6 + 7.x for DJ AME's 2.5/2.7 :

- This fix is for the preg_replace Errors (Error 1) in ame_bbcode.php reported by user Mandushi above.
- In my case I encountered the 2nd Error (Error 2) seen below after upgrading to vBulletin 3.8.1.1 and PHP 5.6+

Error 1: In vBulletin 3.8.x versions using PHP 5.6 +:
Code:
mod_fcgid: stderr: PHP Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /includes/ame_bbcode.php on line 712
Error 2: In vBulletin 3.8.1.1, when using PHP 5.6 +:
Code:
Deprecated: preg_replace(): The /e modifier is deprecated, use  preg_replace_callback instead in includes/ame_bbcode.php on line  331\n'
Here is the fix:

Thankfully I had some help to complete this fix long time a go on StackOverflow (Credits Barmar). So the methods below below will fix all of the preg_replace deprecated errors in ame_bbcode.php file.

1. Edit the > ame_bbcode.php and find this line in function named (&fetch_full_ameinfo):
Code:
if (!$findonly)
2. Then replace the COMPLETE section with this instead:
Code:
if (!$findonly)
        {

        $ameinfo['find'][] = "~($result[findcode])~ie";
        $ameinfo['replace'][] = 'ame_match_bbcode($param1, $param2, \'' . $result['ameid'] . '\', \'' . ame_slasher($result['title']) . '\', ' . $result['container'] . ', \'' . ame_slasher($result['replacecode']) . '\', \'$match[1]\', \'$match[2]\', \'$match[3]\', \'$match[4]\', \'$match[5]\', \'$match[6]\')';

        }
        else
        {

        $ameinfo['find'][] = "~(\[url\]$result[findcode]\[/url\])~ie";
        $ameinfo['find'][] = "~(\[url="?$result[findcode]"?\](.*?)\[/url\])~i";
        $ameinfo['replace'][] = 'ame_match("$match[1]", "", ' . intval($result['extraction']) .', "' . ($result['embedregexp'] ? "~" . ame_slasher($result['embedregexp']) . "~sim" : "") . '", "' . ($result['validation'] ? "~" . ame_slasher($result['validation']) . "~sim" : "") . '",$ameinfo)';
        $ameinfo['replace'][] = 'ame_match("$match[1]", "$match[2]", ' . intval($result['extraction']) .', "' . ($result['embedregexp'] ? "~" . ame_slasher($result['embedregexp']) . "~sim" : "") . '", "' . ($result['validation'] ? "~" . ame_slasher($result['validation']) . "~sim" : "") . '", $ameinfo)';

            }
3. Next find the line below in function named function ame_process_bbcode:
Code:
$text = preg_replace($ameinfo['find'], $ameinfo['replace'], ($param2 ? $param2 : $param1), 1);
4. And replace it with this instead:
Code:
$text = preg_replace_callback($ameinfo['find'], function($match) use (&$param1, &$param2, &$ameinfo) {
        return eval($ameinfo['replace']);
    }, ($param2 ? $param2 : $param1), 1);
And that's pretty much it. Now you should no longer experince the preg_replace errors in ame_bbcode.php

Additional Fix for line 324 in ame_bbcode.php

1. The line seen below at line 324 will also show up as a Deprecated Error:

Code:
$text = preg_replace($ameinfo['find'], $ameinfo['replace'], $text);
2. To fix it, just replace it with the line below as well:

Code:
      $text = preg_replace($substitutes, $subhandlers, $text);
      $text = preg_replace_callback($ameinfo['find'], function($match) use (&$text) {
        return eval($ameinfo['replace']);
       }, ($text), 1);

Please leave a feed back for others to know if you were able to make it work on your end. Thank you.

Regards China.
Reply With Quote
2 благодарности(ей) от:
Mandushi, z3r0
  #190  
Old 08-07-2019, 01:40 PM
Shbwh.net Shbwh.net is offline
 
Join Date: Aug 2019
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This don't work with https
Reply With Quote
  #191  
Old 10-07-2019, 06:56 PM
CreativeIT's Avatar
CreativeIT CreativeIT is offline
 
Join Date: Sep 2013
Location: South Australia
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Note: In this post, all instances of +++++ute should read as b i t c h u t e (without the spaces)
Censoring can be a real +++++.

If anybody wants to embed video from https://+++++ute.com use the following code to add the new definition:

Regular Expression:
Code:
https://www.+++++ute.com/video/([\w/]+)
Replacement HTML
Code:
<iframe frameborder="0" width="480" height="360" src="https://www.+++++ute.com/embed/$p1" allowfullscreen></iframe><br />
<font size="1"><strong>+++++ute Source:</strong> <a target="_blank" href="https://www.+++++ute.com/video/$p1">https://www.+++++ute.com/video/$p1</a></font>
Do not extract destination data.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:27 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07116 seconds
  • Memory Usage 2,388KB
  • Queries Executed 29 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (14)bbcode_code
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (6)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete