Twitter media site

anyone want to test on their server in a couple of minutes before I post this?


and also thinking...should I post this as a single bbcode/addon , you need to do some screwy stuff to override the twitter js stuff and I am not ready to update the media pack
 
anyone want to test on their server in a couple of minutes before I post this?


and also thinking...should I post this as a single bbcode/addon , you need to do some screwy stuff to override the twitter js stuff and I am not ready to update the media pack

I would post it as a single addon. Easier that way
 
  • Like
Reactions: MOZ
Hi guys

Think I've found a quick fix for this.

Seems you can't use a wildcard for the username in the URL match any more. That needs to be an $id

So...

Match URL's:
https://twitter.com/{$id}/status/{$id}
http://twitter.com/{$id}/status/{$id}

Embed HTML:
HTML:
<blockquote class="twitter-tweet"><p>Tweet</p>&mdash; Twitter API (@user) <a href="https://twitter.com/{$id}/status/{$id}" data-datetime="date">date</a></blockquote><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Seems to work for me.
 
Hi guys

Think I've found a quick fix for this.

Seems you can't use a wildcard for the username in the URL match any more. That needs to be an $id

So...

Match URL's:
https://twitter.com/{$id}/status/{$id}
http://twitter.com/{$id}/status/{$id}

Embed HTML:
HTML:
<blockquote class="twitter-tweet"><p>Tweet</p>&mdash; Twitter API (@user) <a href="https://twitter.com/{$id}/status/{$id}" data-datetime="date">date</a></blockquote><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Seems to work for me.


SO I thought this wouldnt work, then I realized I made a mistake and didnt change the embed code... annndddd now it works :D so im happy again. Seems to make no sense why this would fix it, but whatever. Solid for now.
 
this will only work if you use the [media] tags. does not function if you post the status link (I get a long javascript error, when using the above fix), the embed will not create itself due to this error. So the fix is not permanent, need something better. Hopefully one gets created soon :)
 
alright...so does this work...

just wondering...if you are going to maintain and support this bbcode so I can remove it from the mediasites pack.


EDIT: of course a post answers my question before I hit post reply
 
looks good to me. Seems to work properly, I would just release it and if theres a problem you will find out and can fix it. Looks like it is working properly though
 
works well, although I have an odd border around the outside of my tweets. I have a feeling it has to do with the border and background you place around the outside of the default embed code, is there a way to turn that off in the templates?

EDIT: NVM fixed it :) Great addon!
 
Yeah I did that before as the fallback...like before twitter.js adds all of the styling and crap...i was playing with it and liked it..also thinking that if someone has the same background color as the tweet...it will just bleed into the page and look stupid imo...this adds separation.


Before the twitter js does it's thing, the info from the tweet would look all crazy, so my css at first only was intended to wrap the content and keep it from going crazy all over the place like this
twitterPrerender.webp
I had expanded that further for if someone doesn't use js but it would be too much of a pain in the ass to support as it would need MAJOR changes even when the twitter response only changes it's formatting a little so I left the one I am sharing with this basic preforming of the element.

What I did when i just fixed that gigantic space in the tweet was add some padding to the border on the bottom and placed that same little twitter logo there like this...
tweet.webp


for those that want to remove the border...


just remove the padding from .twitter-tweet {} in template: bbms_twitter_css

Code:
.twitter-tweet {
    background-color: #F5F5F5;
    background-image: url("styles/MediaSites/tiny-timeline-bird.png");
    background-position: right bottom;
    background-repeat: no-repeat;
    border-radius: 7px 7px 7px 7px;
    box-shadow: 0 0 7px 0 #032A46, 0 0 2px 0 #2B485C;
    padding: 0px ;
    width: 400px;
}
tweet2.webp
 
Code:
.twitter-tweet {
    background-color: #F5F5F5;
    background-image: url("styles/MediaSites/tiny-timeline-bird.png");
    background-position: right bottom;
    background-repeat: no-repeat;
    border-radius: 7px 7px 7px 7px;
    box-shadow: 0 0 7px 0 #032A46, 0 0 2px 0 #2B485C;
    padding: 0px ;
    width: 400px;
}
When I replaced that in the template for my style, nothing changed. The border surrounding the box is still there. I don't really mind the box around it being there though, just thought I would let you know that. I pasted that exact line of code into the template.
 
I am not sure what you are trying to remove



Code:
.twitter-tweet {
    background-color: #F5F5F5;
    background-image: url("styles/MediaSites/tiny-timeline-bird.png");
    background-position: right bottom;
    background-repeat: no-repeat;
    border-radius: 7px 7px 7px 7px;
    border:none !important;
    padding: 0px ;
    width: 400px;
}
fdglkdfjglkjslgkjglkj.webp
is this what you want?
 
Weird. Installed this but doesn't seem to work.

When I try to embed a tweet it just shows a blank space.

I assume once it's installed this is what I should see?

n9QjWMZ.jpg
 
All that seems to happen when I use it is it places <div class="tWwrapps"></div> in the post.
 
Current working solution;

Media Site ID: twitter
Site Title: Twitter
Site URL: https://twitter.com/

Match URLs: https://twitter.com/*/status/{$id}
http://twitter.com/*/status/{$id}

Embed HTML: <blockquote class="twitter-tweet"><p>Tweet</p>&mdash; Twitter API (@user) <a href="https://twitter.com/{$id}/status/{$id}" data-datetime="date">date</a></blockquote><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> </blockquote><script src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
 
Top Bottom