vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Add-On Releases - DJ's AMEs :: Media Definitions for AME 2.5 :: More Video, Twitter, Pinterest... (https://vborg.vbsupport.ru/showthread.php?t=195884)

Nook_Neformat 06-22-2012 01:05 PM

Anyone can help to embed new divshare design?

Tourmeister 06-24-2012 04:37 AM

Can't seem to get links to Google Maps to work:

Link to actual map here:

https://maps.google.com/maps?saddr=S...=1,2,3&t=m&z=6

Ramsesx 06-26-2012 12:20 PM

Would be great to have a code for this one:
http://www.zdf.de/ZDFmediathek/beitr...g---Die-Stolze
Thanks.

Tourmeister 07-05-2012 07:29 PM

Quote:

Originally Posted by Tourmeister (Post 2342449)
Can't seem to get links to Google Maps to work:

Link to actual map here:

https://maps.google.com/maps?saddr=S...=1,2,3&t=m&z=6

Did Google change something with respect to how the maps are linked? I have AME 2.5.6 installed on my forum (VB 3.8.1 PL1) and it worked fine for a while just using the link to the map. Now, the map is not embedded and all that shows is the link, just as you see it in my post here. What is odd is that all the embeds that worked fine before still work fine when the old posts are viewed. But new attempts at embedding using the link will not work. Is there a new definition for AME that I need to update?

wcbryant 07-10-2012 11:36 PM

I've been poking around today trying to figure out if I can use AME to embed tweets using Twitter's oEmbed.

I've got this in Regular expression:
Code:

http[s]*://[www\.]*twitter\.com/[\w]+/status[es]*/([\d]+)
And this in Replacement:
Code:

<script type="text/javascript" src="https://api.twitter.com/1/statuses/oembed.json?id=$p1"></script>
And yet what happens is I end up with a blank post with no tweet/Twitter rendering when I post something like "https://twitter.com/twitterapi/statuses/133640144317198338".

Is the problem somehow trying to render by way of javascript in a post through AME? I concede I may well be barking up the wrong tree trying to do it this way. Wide open to any and all suggestions.

https://dev.twitter.com/docs/embedded-tweets
https://dev.twitter.com/docs/api/1/get/statuses/oembed

BirdOPrey5 07-11-2012 10:41 AM

If you reload the page does the tweet show?

wcbryant 07-11-2012 02:08 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2346926)
If you reload the page does the tweet show?

Hey, thanks for the response. No, no change when you reload. Remains a blank post, but I can see the JS code there in a View Source. That may be noteworthy insofar as loading that oEmbed link directly (the target result of the replacement) returns all of the data (and a render script) as below (this is Twitter's example of it in practice):

https://api.twitter.com/1/statuses/o...40144317198338

So it's like it's not functioning as a GET, or not writing/parsing/embedding the response. I'm just not sure. Then again, it probably wouldn't show the response in the View Source even if it was working -- nevermind, just sorted that out.

Obviously I'm at a bit of a loss.

Also, I'm wondering about how safe/secure this is even if I did make it work. I suppose I'm only letting people pass a numeric string through to the script itself, so it can't get loaded up with anything malicious. See any issues on that front (as a secondary question)? Probably a non-issue, but I thought I'd ask someone who actually has a clue (unlike myself).

BirdOPrey5 07-11-2012 03:22 PM

This is the required replacement code:

Code:

<blockquote class="twitter-tweet"><p>&nbsp;</p>&nbsp;<a href="https://twitter.com/twitterapi/status/$p1">&nbsp;</a></blockquote>
<script src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

The Javacript looks for the class "twitter-tweet" if it is missing nothing will happen.

No security risk as long as you trust Twitter.

wcbryant 07-11-2012 03:55 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2347009)
This is the required replacement code:

Code:

<blockquote class="twitter-tweet"><p>&nbsp;</p>&nbsp;<a href="https://twitter.com/twitterapi/status/$p1">&nbsp;</a></blockquote>
<script src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

The Javacript looks for the class "twitter-tweet" if it is missing nothing will happen.

No security risk as long as you trust Twitter.

Still not working on my end. Larger (vertically) mostly blank post with either a hyphen or an underscore in it.

Here's what's showing up in View Source:
Code:

<!-- message -->
                <div id="post_message_2176544">
                       
                        <div style="display: none;" id="ame_noshow_post_1342025206_1">
        <a href="http://www.(MYSITE).com/forum/redirect-to/?redirect=https%3A%2F%2Ftwitter.com%2F(SOMETWITTERNAME)%2Fstatus%2F(TWEETID)" title="Twitter" target="_blank">Twitter</a>
</div>
<div style="display: inline;" id="ame_doshow_post_1342025206_1">
<blockquote class="twitter-tweet"><p>&nbsp;</p>&nbsp;<a href="http://www.(MYSITE).com/forum/redirect-to/?redirect=https%3A%2F%2Ftwitter.com%2Ftwitterapi%2Fstatus%2F(TWEETID)">&nbsp;</a></blockquote>
<script src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
</div>
                </div>
                <!-- / message -->

So it's there and the tweet id is passing through properly. We're just not rendering their widget (or whatever it is) on the page/post.

Should the twitter.com/twitterapi GET be a script itself instead of an 'a href' call?

Nevermind, that didn't work either.

Just found this, it's how someone got it to work with PHPbb (which is probably completely irrelevant, but maybe there's something there:
http://punyweakling.com/add-a-tweet-...a-phpbb-forum/

I do appreciate the info and assistance.

BirdOPrey5 07-11-2012 05:06 PM

It seems the AME mod is ignoring the uRL completely... at least om my forum. Weird. No idea why...


All times are GMT. The time now is 07:16 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.02948 seconds
  • Memory Usage 1,756KB
  • 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
  • (5)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)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