MyBB Community Forums

Full Version: x.com MyCode?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Does anyone have a working x.com MyCode?
Thanks for any help.
Sadly, it doesn't work.

Using the same tweet but with twitter.com works fine. But if I use x.com it doesn't load.
The one I use works for either "Twitter" or "X"

Regex:

\[twitter\]https://[twitterx]+\.com(/[A-Za-z0-9_-]+/status/[0-9?Ss=]+)\[/twitter\]


Replacement:

<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr"></p><a href="https://twitter.com$1"></a></blockquote>
<script async="" src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>[tlinkie]<a href="https://x.com$1" target="_blank">https://x.com$1</a>[/tlinkie]</p>


The last part of the replacement is just copying the link into a spoiler (the "tlinkie" is a MyCode which creates a 'Spoiler' to hide the link) which you don't need actually!
(2024-07-25, 02:08 PM)lost puppy Wrote: [ -> ]The one I use works for either "Twitter" or "X"

Regex:

\[twitter\]https://[twitterx]+\.com(/[A-Za-z0-9_-]+/status/[0-9?Ss=]+)\[/twitter\]


Replacement:

<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr"></p><a href="https://twitter.com$1"></a></blockquote>
<script async="" src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>[tlinkie]<a href="https://x.com$1" target="_blank">https://x.com$1</a>[/tlinkie]</p>


The last part of the replacement is just copying the link into a spoiler (the "tlinkie" is a MyCode which creates a 'Spoiler' to hide the link) which you don't need actually!

That works great, thank you!
(2024-07-25, 02:08 PM)lost puppy Wrote: [ -> ]The one I use works for either "Twitter" or "X"

Regex:

\[twitter\]https://[twitterx]+\.com(/[A-Za-z0-9_-]+/status/[0-9?Ss=]+)\[/twitter\]


Replacement:

<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr"></p><a href="https://twitter.com$1"></a></blockquote>
<script async="" src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<p>[tlinkie]<a href="https://x.com$1" target="_blank">https://x.com$1</a>[/tlinkie]</p>


The last part of the replacement is just copying the link into a spoiler (the "tlinkie" is a MyCode which creates a 'Spoiler' to hide the link) which you don't need actually!

What file needs to be modified?
In various threads of yours I just read the question about which file you have to edit for this.
The edits all take place in the ACP, take a look at your admin area, you will discover a lot
(2024-11-21, 07:19 AM)bv64 Wrote: [ -> ]In various threads of yours I just read the question about which file you have to edit for this.
The edits all take place in the ACP, take a look at your admin area, you will discover a lot

I've used the ACP and edited template files before.

But sometimes I make mistakes, so I wanted verification before preceding.
it's good that you've already done that, because that's how you should always do it!
but the templates are not files, they are in the database!


in this case it would be
ACP --> Configuration --> MyCode where you can create a new code

never forget to back up your data, copy and save the template before tinkering with it; saves many hours that can be spent elsewhere in a more useful and enjoyable way