View Single Post
  #1886  
Old 01-23-2013, 05:41 PM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, just to keep you guys apprised, we didn't really solve the problems with my server, but I've found a workaround that should work, and maybe any of you that were having a similar problem saving definitions can benefit from it. I'm having to put brackets around the http of the RegEx or encase the whole RegEx in (). No idea what that works, but at least I can save defs now. (Still can't delete any.) I'll try to have some updated ones for you sometime this week.

In addition to that, those of you having trouble with URLs that have been changed to https links, just do as BirdOfPrey recommended and add an s? to the RegEx. I'll post updated ones for those later.

Because of both the https issue and the fact that I'm using brackets, all definitions released from here on out will require the RegEx pattern to look like this:
Code:
[https://]*
Which, ironically, is the way The Geek used to format his default definitions in the first place before I started doing it differently. Maybe that's why. (Doh!)

I cannot open my board just yet to the public, but I'll try and set up something where you can continue to make definition requests. It won't be vB, so you won't be able to see my demos, but it will be something temporary anyway.


Quote:
Originally Posted by Tourmeister View Post
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
In addition to the https, the colon was throwing the definition off. Just add both to the ReGex like so:

Code:
https?://maps\.google\.com[\w.]*/[maps]*\?[\w]*=[\w+&;:='%,.-]+


Quote:
Originally Posted by wcbryant View Post
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
I was able to get this to work, but I used additional JavaScript which I picked up from another BBCode posted here. It has the same limitations that JavaScript has when posting via AJAX, but it works. JavaScript is not my language, so I don't know why it does. Possibly older code. Hopefully not deprecated.

Code:
<script type="text/javascript">
function loadx(data) {
  document.write(data.html);
}
</script>
<script type="text/javascript" src="https://api.twitter.com/1/statuses/oembed.json?id=$p1&callback=loadx"></script>
<div class="twitter" onLoad="loadx().html"/>


Quote:
Originally Posted by J4CKT View Post
Hi guys,

Having a couple of issues.

I have downloaded the definitions pack and all the defs for locally stored media imported without a problem.

However the big list of external link definitions kept failing to load completely. So as advised in the faq I did a couple at a time. I am at a point now where I have added enough definitions in small groups that the whole list will work but there are some that won't work at all. All the youtube definitions for example won't upload regardless of if I do them one at a time or as part of the whole list.
Is that all the YouTube defs (Playlists, User Profiles) or just the default one? Did you get any error messages when you tried, or is simply nothing happening after import?


Quote:
Originally Posted by BirdOPrey5 View Post
I can't get the second link to play any video... Maybe I will try again later.

The first site isn't ideal for linking via AME. I have attached a definition that works for this video but it may fail if the story title has numbers in it. Could't find any way around that.

Also understand if you use this if anyone tries to link to that site to a news story without a video (assuming they have any) it will also break.

Really i would avoid using AME unless linking to actual video sites (youtube, vimeo, and the like.)
I took a look at that first one, and it looks like it might be possible to make a def for just the videos section. That way they could avoid false embeds from the whole site. I'll put that on my list of things to do as well, presuming you don't beat me to it. :up: I'll also try and get all yours and the community's defs I may have missed included in the Master XML.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01215 seconds
  • Memory Usage 1,806KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete