MyBB Community Forums
x.com MyCode? - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Resources (https://community.mybb.com/forum-8.html)
+--- Forum: MyCodes (https://community.mybb.com/forum-117.html)
+--- Thread: x.com MyCode? (/thread-241050.html)



x.com MyCode? - MisterHelp - 2024-05-19

Does anyone have a working x.com MyCode?
Thanks for any help.



RE: x.com MyCode? - Crazycat - 2024-05-19

Use https://community.mybb.com/thread-192687.html, as https://platform.x.com/widgets.js redirects to https://platform.twitter.com/widgets.js

Probably later, https://platform.x.com/widgets.js will be the real url


RE: x.com MyCode? - MisterHelp - 2024-07-24

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.


RE: x.com MyCode? - lost puppy - 2024-07-25

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!


RE: x.com MyCode? - MisterHelp - 2024-07-25

(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!


RE: x.com MyCode? - nuraman00 - 2024-11-20

(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?


RE: x.com MyCode? - bv64 - 2024-11-21

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


RE: x.com MyCode? - nuraman00 - 2024-11-21

(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.


RE: x.com MyCode? - bv64 - 2024-11-21

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