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)

4x4 Mecca 06-29-2007 05:07 PM

I get "Invalid File Specified" when I try to import amazon. Never mind.. I'm a doofus.

The Geek 06-29-2007 05:21 PM

you can try:

([\d\w%]+)

Ren? Kunze 06-29-2007 05:26 PM

Ok i cant it.

Can you help me with http://www.clipfish.de

I have this:

And this:

Quote:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="464" height="380" id="player" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="http://www.clipfish.de/videoplayer.swf?as=0&videoid=$p1" />
<param name="wmode" value="transparent">
<param name="quality" value="high" />
<param name="bgcolor" value="#999999" />
<embed src="http://www.clipfish.de/videoplayer.swf?as=0&videoid=$p1" quality="high" bgcolor="#999999" width="464" height="380" name="player" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
</object>

da420 06-29-2007 05:27 PM

Quote:

Originally Posted by The Geek (Post 1279285)
FYI: I uploaded an Amazon definition to try to get you guys creative in this mods application.

Check here

I would love to provide more plug ins for this! But, I found the RegEx program confusing. I am sure I am over complicating it, but I couldn't find a decent tutorial on the site for how to use it, and when I tried to figure it out myself I only confused myself even more. It was last night, and I was tired when I tryed it, so that might have something to do with it, but a simple walk through on how to use it would be great so I can start providing us with some neat plug ins for this great mod. :)

Thank you.

The Geek 06-29-2007 05:32 PM

da40 - Ill try to put together a basic concept tutoiral Regexps are almost as much art as science and very difficult to get your head around.

@Rene - you need to escape special characters (like the . and the ?). Try this:

http://www\.clipfish\.de/player\.php\?videoid\=([\d\w%]+)[&\w;=\+_-]*

Ren? Kunze 06-29-2007 05:52 PM

Thank You.

I found an error.

I have on the top of showthred this error:

Quote:

Warnung: preg_replace() [function.preg-replace]: Compilation failed: unmatched parentheses at offset 61 in /includes/ame_bbcode.php (Zeile 336)
Here is the xml of Clipfish.

The Geek 06-29-2007 06:22 PM

I thought I would put down some basics of creating regexp's for AME as many users are wanting to create their own. This isnt an exhaustive list, nor am I an expert on regexps, this is just a rough, basic overview to get you started.

AME takes the regexp you provide and wraps it in [url] tags, boundaries and codes to make the regexp case insensitive so you don't have to worry about doing that. You do have to remember though that your regexp needs to match the entire URL. If it doesnt, it wont qualify as a match in AME.

Best way to test regular expressions (that I have found) is with regexp buddy. This is what I do:
  • Start up Regexpbuddy
  • Click the test tab
  • Tick the 'case insensitive' option
  • In the box below the tabs, I past the URL I want to create a regexp for. You need to be able to identify what part of the URL is the part you want to extract. In this instance, I am trying to create a regexp for http://www.clipfish.de/player.php?videoid=MzEwODYwfDg2NzY0Ng==. So I want to extract the MzEwODYwfDg2NzY0Ng part.
  • I then paste everything leading up to the part I want to extract into the top window like this: http://www.clipfish.de/player.php?videoid=
  • I then escape special characters from the url with the \ character like this: http://www\.clipfish\.de/player\.php\?videoid=. At this stage, RegexpBuddy should have highlighted your test URL up to the part we want to extract. If it hasnt, then you are missing something.

I now need to define a character class that will allow me to match the pattern I am after. If the pattern is only word characters (i.e. letters and or numbers), then I can use [\w]. If it is letters only, then I would use [a-z], If they are numbers only then I can use [\d].
I can also specify additional characters that can appear. For instance, if I wanted a class that allows word characters and underscores, I could do [\w_]. If I wanted letters only, hyphens and underscores, I could do [a-z_-]

In the case where I am trying to extract MzEwODYwfDg2NzY0Ng then a word character class would work fine: [\w]

The problem is that only matches the first occurence of a character in the class. In other words, my match would be http://www.clipfish.de/player.php?videoid=M NOT http://www.clipfish.de/player.php?videoid=MzEwODYwfDg2NzY0Ng== which is what I want!.

This is where special characters come in.
  • . will match any single character that is NOT a line break
  • * will match 0 or unlimited times
  • + will match once or unlimited times
  • ? will match 0 or 1 time.

So, to make my character class work, I use [\w]+

So now my regexp looks like:

http://www\.clipfish\.de/player\.php\?videoid=[\w]+

Now, that will match, but I need to capture whatever pattern is matched in the [\w]+ part. Thats where ()'s come into play. If I so this:

http://www\.clipfish\.de/player\.php\?videoid=([\w]+)

Then I get the contents of that pattern.

However!!! It still wont match yet because there are these annoying == signs in there! Since we are not sure how and when they will appear, lets just create another class to accomadate whatever else may come after.

[&\w;=+_-]* That class says "match any single character that is an &, a word (or digit), a semi colon, a plus, an underscore and a hyphen 0 to an unlimited amount of times (the asterix says that!). That means that any of those mentioned characters may of may not appear, but nothing outside of that class can appear (for instance, a %).
So my final regexp looks like:

http://www\.clipfish\.de/player\.php\?videoid=([\w]+)[&\w;=+_-]*

And in the case of AME, I can put $p1 in the replacement HTML to get the 'movie' id which in this case is MzEwODYwfDg2NzY0Ng.

nJoy

iogames 06-29-2007 06:27 PM

MotM!!!

ThorstenA 06-29-2007 06:29 PM

There are problems with special characters fetched from youtube into [ URL ] [ / URL ] tags. I'd also like a version without file uploades or DB changes. There was another mod available until a few days and it could integrate youtube without any changes mentioned above. This modification was dropped for this mod here, so I'd be happy to see improvements in easy upgrading (no file uploads / no db changes).

Ren? Kunze 06-29-2007 06:43 PM

So and now here is Sevenload.

The link is: http://de.sevenload.com/

Ren? Kunze 06-29-2007 06:59 PM

and here is Video Tube

Link: http://www.videotube.de

Ren? Kunze 06-29-2007 07:08 PM

Here is Yahoo Video

The link: http://de.video.yahoo.com

The Geek 06-29-2007 07:32 PM

Quote:

Originally Posted by ThorstenA (Post 1279369)
There are problems with special characters fetched from youtube into [ URL ] [ / URL ] tags. I'd also like a version without file uploades or DB changes. There was another mod available until a few days and it could integrate youtube without any changes mentioned above. This modification was dropped for this mod here, so I'd be happy to see improvements in easy upgrading (no file uploads / no db changes).

Then go make one. I really don't see the point of of your post other than to troll.

The Geek 06-29-2007 07:33 PM

Nice one Rene :)

eurofunny 06-29-2007 08:27 PM

Quote:

Originally Posted by Ren? Kunze (Post 1279372)
So and now here is Sevenload.

The link is: http://de.sevenload.com/

THX Rene........

Danke Ren?, daf?r das Dein Englisch so schlecht ist, hast Du das perfekt hinbekommen........Vielen Dank............Mach Dir aber nichts draus, mein Englisch ist auch nicht besser :)

DaNIEL MeNTED 06-29-2007 08:41 PM

edited...

Ooops. I see there's a fix. Thx Geek!

I have liveleak that I will post - as well as some cleaned up versions of the header info for people who are interested.

DaNIEL MeNTED 06-29-2007 08:52 PM

I changed my open close HTML to this:

HTML Code:

<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="400" style="margin:10px 0">
<thead>
        <tr>
                <td class="tcat" colspan="2" style="text-align:center">
                        <a href="$url" title="View this video at YouTube in a new window or tab" target="_blank">$title</a>
                </td>
        </tr>
</thead>
<tbody>
        <tr>
                <td class="panelsurround" align="center">

HTML Code:

</td>
        </tr>
</tbody>
</table>

**LIVELEAK removed - not working right.

rjmjr69 06-29-2007 10:29 PM

Awesome I love when others get involved and help out. Great work people.

I get nothing but errors from both of the ones you posted Rene

Finster 06-29-2007 10:50 PM

What we really need is for this to work with videos at Stage6.com

DaNIEL MeNTED 06-29-2007 10:54 PM

liveleak...

DaNIEL MeNTED 06-29-2007 11:07 PM

is there a reason why youtube videos show a white border?

mktrilogy 06-29-2007 11:18 PM

Ok, I uploaded the files, Installed the plugin, and check if the hack is on. Everything was correct.

I post a link "http://www.youtube.com/watch?v=0W1krRRPyp0" sample then nothing happens, all i see is the link, did i miss something?

DaNIEL MeNTED 06-29-2007 11:29 PM

hxxp?

4x4 Mecca 06-29-2007 11:54 PM

I installed the amazon code, but don't under stand a lick of it! lol. I'm thinking about getting regex, but am trying on my own first.

4x4 Mecca 06-30-2007 01:58 AM

I'm still trying photobucket... This is my starting code.
Code:

http://s5.photobucket.com/albums/y177/MrK5/Videos/?action=view&current=Bunce.flv
This is what I want to be left with, the prefix always changes
Code:

http://s5.photobucket.com/albums/y177/MrK5/Videos/Bunce.flv
This is the code I have to far
Code:

([\w/.:]+)\?action=view&current=([\w.]*)

Can anyone help?

Ren? Kunze 06-30-2007 02:11 AM

Quote:

Originally Posted by eurofunny (Post 1279423)
THX Rene........

Danke Ren?, daf?r das Dein Englisch so schlecht ist, hast Du das perfekt hinbekommen........Vielen Dank............Mach Dir aber nichts draus, mein Englisch ist auch nicht besser :)

Thank you for the words.
I cant write english but understand it.

Danke f?r Deine Worte.
Ich kann englsich nicht schreiben aber verstehen tue ich es.
Nun habe ich glaube ich bald alle Video Seiten die auf deutsch sind.

Quote:

Originally Posted by The Geek (Post 1279400)
Nice one Rene :)

Please Geek, so I can help you.

It is a great Hack.

furst 06-30-2007 03:18 AM

It doesn't work for me. When I post an url to youtube, the regular url comes out. The ame bbcode does not get appended to the post. When I manually add the ame tags, the video does work.

Edit: I've disabled all hacks and plugins except for AME, and it still doesn't work :(

4x4 Mecca 06-30-2007 04:12 AM

http://([\w.]+)(\.photobucket\.[\w.]+/[\w/.:]+)\?action=view&current=([\w.]*) that is my photobucket code so far, but it's still just giving me a link in posts. :)

Hornstar 06-30-2007 05:29 AM

Hey geek, hope this has not been asked already, but I am using mfyvie hack.

I am worried if i uninstall his i will have heaps of ugle bb codes around the site, will this hack convert those as well? or will i just have to put up with them?

Coders Shack 06-30-2007 05:54 AM

does the yahoo one really work? I'm pretty sure yahoo needs two things the ID and the vID, the vID is provided in the link but not the ID.

4x4 Mecca 06-30-2007 06:29 AM

It seems that the and sign '&' is what's messing up my code... here's the code, I've tried a dozen differen't ways, and it this is the most common result.

expression
Code:

http://([\w.]+)\.photobucket\.([\w.]+)/([\w\/\.\:]+)/([?action=view/&current=]*)([\w.]+)
Replacement
Code:

<embed src="http://www.photobucket.com/player.swf?file=http://$p1.photobucket.$p2/$p3/$p5" quality="high" bgcolor="#ffffff" width="531" height="416" name="ePlayer"
align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>

Result in posts
It tries to embed a video, but the link it's trying to use is
Code:

<embed width="430" height="389" type="application/x-shockwave-flash" wmode="transparent" src="http://photobucket.com/player.swf?file=http://s5.photobucket.com/albums/y177/MrK5/Videos/view"></embed>
and it shows this under the video screen meaning it wasn't used.

&current=Bunce.flv

mktrilogy 06-30-2007 07:18 AM

Quote:

Originally Posted by furst (Post 1279617)
It doesn't work for me. When I post an url to youtube, the regular url comes out. The ame bbcode does not get appended to the post. When I manually add the ame tags, the video does work.

Edit: I've disabled all hacks and plugins except for AME, and it still doesn't work :(

Same here bro. Must be other hacks installed or something. Am using Extremepixels skins and i cant think of anything that can not allow it to work. help.

furst 06-30-2007 08:02 AM

Quote:

Originally Posted by mktrilogy (Post 1279743)
Same here bro. Must be other hacks installed or something. Am using Extremepixels skins and i cant think of anything that can not allow it to work. help.

I thought it may have been a skin problem, so I tried posting under the default vbulletin skin and it was still a no go.

A|X 06-30-2007 08:12 AM

Hi,

I just install AME.
When i paste youtube url http://youtube.com/watch?v=noyl1PKkBdE nothing happen.

Please help what should i do?

Ren? Kunze 06-30-2007 09:07 AM

@a|x

Have you Disable New items of No or Yes.

@ Coders Shack

I have tested with the link and by me it is function.

The Geek 06-30-2007 09:23 AM

How to troubleshoot.

1. Make sure that the disable setting is set to no (admincp->AME CP->settings)
2. Disable 'Resolve URL titles' (admincp->AME CP->Settings).
3. Here are some random links to put into a post. See if all/some/none work (if you have not disabled the Resolve URL titles setting, this could take awhile to post!

Quote:

http://www.metacafe.com/watch/693063/lion_attack

You tube
http://www.youtube.com/watch?v=xnujO3SCGBE

my space
http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid=87816 7267

google
http://video.google.co.uk/videoplay?docid=4776181634656145640

ifilm
http://www.ifilm.com/video/2846503

metacafe
http://www.metacafe.com/watch/692030/tiger_woods_make_a_sensational_shot

bolt
http://www.bolt.com/nakhon/video/WhaleShark_at_Andaman_Sea/2201227
Disable all other modifications except this one and repeat the process.

If none of these work, post:
1. Check your apache error log for any info you could post to help us find the problem
2. Make sure you post your version# of PHP

The Geek 06-30-2007 09:28 AM

Quote:

Originally Posted by DaNIEL MeNTED (Post 1279437)
I changed my open close HTML to this:

HTML Code:

<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="400" style="margin:10px 0">
<thead>
        <tr>
                <td class="tcat" colspan="2" style="text-align:center">
                        <a href="$url" title="View this video at YouTube in a new window or tab" target="_blank">$title</a>
                </td>
        </tr>
</thead>
<tbody>
        <tr>
                <td class="panelsurround" align="center">

HTML Code:

</td>
        </tr>
</tbody>
</table>

**LIVELEAK removed - not working right.

Daniel, I love these changes to the container, I subbed $title in the URL's title slot and wrapped the table in a centred div. Ill add a link to it in the add on post.

therogueforums 06-30-2007 09:43 AM

Downloaded, will install tomorrow, and get back to you.

The Geek 06-30-2007 10:35 AM

The photobucket one is a beast. I almost have a consistant one licked, but wont be able to work on it until later... its Saturday you know!

The Geek 06-30-2007 10:55 AM

Quote:

Originally Posted by hornstar1337 (Post 1279670)
Hey geek, hope this has not been asked already, but I am using mfyvie hack.

I am worried if i uninstall his i will have heaps of ugle bb codes around the site, will this hack convert those as well? or will i just have to put up with them?

The problem is that his doesnt remove the codes when you uninstall it. THats good as you wont have dead codes laying around, but bad because the bbcodes still try to parse your messages!

This system has a converter in it that should be able to convert other media tags into standard URL tags.
THen you can use the AME rebuild posts tool to convert old post URLs into new ame tags.

In other words, this system can convert old posts and old codes.

HTHs!


All times are GMT. The time now is 12:59 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.01942 seconds
  • Memory Usage 1,856KB
  • 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
  • (6)bbcode_code_printable
  • (4)bbcode_html_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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