wildgoosespeeder
Code Helper
Tiers are for strangers!
Posts: 530
wildgoosespeeder said 161 great things
|
Post by wildgoosespeeder on Nov 21, 2014 22:55:23 GMT -8
Did you know you can embed Miiverse posts using HTML? How? Go to miiverse.nintendo.net. Log in with your Nintendo Network ID and password. Find a post you or someone else made: You will get HTML code. How about a plug-in that uses the [miiverse][/miiverse] tag? It should behave similarly to the YouTube tag.
|
|
|
Post by Wormopolis on Nov 21, 2014 22:58:08 GMT -8
I dont have a nintendo account. so you will need to post 2 examples of the html it returns
|
|
wildgoosespeeder
Code Helper
Tiers are for strangers!
Posts: 530
wildgoosespeeder said 161 great things
|
Post by wildgoosespeeder on Nov 21, 2014 23:01:14 GMT -8
Click the image. You should be able to at least view the thread.
|
|
|
Post by Wormopolis on Nov 22, 2014 21:59:50 GMT -8
<div class="miiverse-post" lang="en" data-miiverse-cite="https://miiverse.nintendo.net/posts/AYMHAAACAABnUYoZo9v8-w" data-miiverse-embedded-version="1"><noscript>You must have JavaScript enabled on your device to view Miiverse posts that have been embedded in a website. <a class="miiverse-post-link" href="https://miiverse.nintendo.net/posts/AYMHAAACAABnUYoZo9v8-w">View post in Miiverse.</a></noscript></div><script async src="https://miiverse.nintendo.net/js/embedded.min.js" charset="utf-8"></script>
|
|
|
Post by Wormopolis on Nov 22, 2014 22:00:24 GMT -8
I need another one to see what is different between them
|
|
wildgoosespeeder
Code Helper
Tiers are for strangers!
Posts: 530
wildgoosespeeder said 161 great things
|
Post by wildgoosespeeder on Nov 22, 2014 23:31:54 GMT -8
https://miiverse.nintendo.net/posts/AYMHAAACAABnUYoZo9v8-w
That's what changes. I'm thinking either:
[miiverse]https://miiverse.nintendo.net/posts/AYMHAAACAABnUYoZo9v8-w[/miiverse]
or
[miiverse]AYMHAAACAABnUYoZo9v8-w[/miiverse]
will work because YouTube does a similar thing:
[video src="https://www.youtube.com/watch?v=DiOLtgr_gjY"][/video]
[video src="https://www.youtube.com/watch?v=DiOLtgr_gjY"][/video]
Quote/edit my post to see the real UBBC!
|
|
|
Post by Wormopolis on Nov 24, 2014 3:01:34 GMT -8
[miiverse]AYMHAAACAABnUYoZo9v8-w[/miiverse]
|
|
|
Post by Wormopolis on Nov 24, 2014 3:21:38 GMT -8
use [miiverse]AYMHAAACAABnUYoZo9v8-w[/miiverse]
|
|
wildgoosespeeder
Code Helper
Tiers are for strangers!
Posts: 530
wildgoosespeeder said 161 great things
|
Post by wildgoosespeeder on Nov 24, 2014 13:44:16 GMT -8
[miiverse]AYMHAAACAAAYUKlx24nPbg[/miiverse]
|
|
wildgoosespeeder
Code Helper
Tiers are for strangers!
Posts: 530
wildgoosespeeder said 161 great things
|
Post by wildgoosespeeder on Nov 24, 2014 13:45:29 GMT -8
[miiverse]AYMHAAACAAAYUKlxKF8kSw[/miiverse]
|
|
wildgoosespeeder
Code Helper
Tiers are for strangers!
Posts: 530
wildgoosespeeder said 161 great things
|
Post by wildgoosespeeder on Nov 24, 2014 13:49:29 GMT -8
3X tags usage in one post:
[miiverse]AYMHAAACAADMUKmKG-e-Cg[/miiverse] [miiverse]AYMHAAACAAAYUKlr5Schpg[/miiverse]
Will the URL be filtered out (RegExp)?
[miiverse]https://miiverse.nintendo.net/posts/AYMHAAACAAAYUKlyJq5CIg[/miiverse]
Great work Wormo! Probably very easy (with some bugs like this post demonstrated). Submit to ProBoards Support Plugin Database!
|
|
|
Post by Wormopolis on Nov 24, 2014 22:08:02 GMT -8
that isnt really a bug. putting the entire URL in there doesnt follow the format of the tag. the tag expects just the part after post/
no need to submit a plugin. I would say you are probably the only person that would ever even use this.
|
|
|
Post by Wormopolis on Nov 24, 2014 22:10:07 GMT -8
<script type="text/javascript"> $('tr.item.post td.content div.message').each(function(){ if ($(this).text().match(/\[miiverse\](.*)\[\/miiverse\]/)) { $(this).html($(this).html().replace(/\[miiverse\](.*)\[\/miiverse\]/,'<div class="miiverse-post" lang="en" data-miiverse-cite="https://miiverse.nintendo.net/posts/'+ RegExp.$1+'" data-miiverse-embedded-version="1"></div><scr'+'ipt async src="https://miiverse.nintendo.net/js/embedded.min.js" charset="utf-8"></scr'+'ipt>')); } }); </script>
|
|
wildgoosespeeder
Code Helper
Tiers are for strangers!
Posts: 530
wildgoosespeeder said 161 great things
|
Post by wildgoosespeeder on Nov 24, 2014 23:41:00 GMT -8
that isnt really a bug. putting the entire URL in there doesnt follow the format of the tag. the tag expects just the part after post RegExp that out. I know I can do it. I do know how to code generally, but I have lost 99% interest in ProBoards development or JavaScript coding, even long before the conversion to V5. no need to submit a plugin. I would say you are probably the only person that would ever even use this. I thought that it was a plug-in. It should be though because this plug-in could be useful for any ProBoard that is Nintendo or general gaming discussion. Honestly, I probably wouldn't use it anyway for my forum but I am thinking about other ProBoards users so they have something.
|
|
wildgoosespeeder
Code Helper
Tiers are for strangers!
Posts: 530
wildgoosespeeder said 161 great things
|
Post by wildgoosespeeder on Nov 24, 2014 23:53:47 GMT -8
Like this if I remember correctly to filter it out?
<script type="text/javascript"> $('tr.item.post td.content div.message').each(function() { if($(this).text().match(/\[miiverse\].*\[\/miiverse\]/)) { $(this).html($(this).html().replace(/\[miiverse\](https?:\/\/)?(miiverse\.nintendo\.net\/posts\/)?(.*)\/?\[\/miiverse\]/gi,'<div class="miiverse-post" lang="en" data-miiverse-cite="https://miiverse.nintendo.net/posts/'+RegExp.$3+'" data-miiverse-embedded-version="1"></div><scr'+'ipt async src="https://miiverse.nintendo.net/js/embedded.min.js" charset="utf-8"></scr'+'ipt>')); } }); </script>
Changed $1 to $3. I even added the "gi" at the end for the replace() function.
g = finds more than 1 match i = case insensitive matching
|
|