Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Shortcode for youtube embed and schema
The conversion is potentially quite involved and I’ve never followed anything close to that procedure so I can’t vouch for it.
But unless you’re using exotic characters in your articles, you can usually get away with just changing the collation on the tables and columns/indexes in your DB admin tool of choice, and then making sure to change your textpattern/config.php file to reflect the collation in use.
Sometimes you get things left behind: like, if you only alter the table collation and don’t change the column/index collation too, you can find that no articles show up on your site. Or only some plugins load. If you switch to debugging mode, you’ll usually then see “illegal mix of collations” errors on some tables, which gives you a pointer as to which columns need updating. Fix those and your content returns.
As always, if you’re going to attempt this, backup, backup, backup :)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
Re: Shortcode for youtube embed and schema
Eeep, I might just accept the lack of emoji with that! I can see the more modern encoding alright on my fresher installs of txp, my own has the original I suppose.
In general is it ok to leave it like this, it’s not like an sql upgrade scenario where it isn’t supported anymore? (Testing your psychic powers) :D
…………………
I <3 txp
…………………
Offline
Re: Shortcode for youtube embed and schema
It’s fine as-is. We don’t enforce it in core, besides new installs shipping with it set to utf8-mb4 by default.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
Re: Shortcode for youtube embed and schema
Bloke wrote #330542:
It’s fine as-is. We don’t enforce it in core, besides new installs shipping with it set to utf8-mb4 by default.
Phew, thanks Stef, and that explains the emoji issue too!!
…………………
I <3 txp
…………………
Offline
Re: Shortcode for youtube embed and schema
Hi folks, I have a shortcode query to tack on.. so I have a shortcode calling an img with text from a form so that I can do a two col img/text within an article. For the text, it would be very handy to be able to skip lines within the tag and have those automatically turn into p tags but I’m not sure if it’s possible, when I skip a line at the min in the text variable it does break the tag so it can’t seem to cope with that. If anyone can help thanks so much!
Shortcode:
<txp::img_left mythumb="288" text="These measures make your website more resistant to hacking and/or data sniffing. In this era of GDPR protection these measures help keep your data, and your visitors data safe and secure." />
Form:
<div class="flex-container">
<figure class="flex-item">
<txp:images id="<txp:yield name="mythumb" />">
<img src="<txp:image_url id="<txp:yield name="mythumb" />" thumbnail='1' />" width="<txp:image_info id="<txp:yield name="mythumb" />" type='thumb_w' />" height="<txp:image_info id="<txp:yield name="mythumb" />" type='thumb_h' />" loading="lazy" alt="<txp:image_info id="<txp:yield name="mythumb" />" type='alt' />" title="<txp:image_info id="<txp:yield name="mythumb" />" type='caption' wraptag='' class='' escape='unset' />" class="fade image" /></txp:images>
</figure>
<div class="flex-item"><p><txp:yield name="text" /></p></div>
</div>
…………………
I <3 txp
…………………
Offline
Re: Shortcode for youtube embed and schema
Hi Hilary, not sure to fully understand your question, but you can try to replace
<div class="flex-item"><p><txp:yield name="text" /></p></div>
with
<div class="flex-item"><txp:yield name="text" escape="textile" /></div>
Offline
Re: Shortcode for youtube embed and schema
etc wrote #330661:
Hi Hilary, not sure to fully understand your question, but you can try to replace
<div class="flex-item"><p><txp:yield name="text" /></p></div>...
with
<div class="flex-item"><txp:yield name="text" escape="textile" /></div>...
Hi Etc, I did try that but I just skipped lines within the text content in the hope the skipped lines would then translate into p tags by using the escape textile tag, but it just put the code on the page overall without now showing the actual img or text..
…………………
I <3 txp
…………………
Offline
Re: Shortcode for youtube embed and schema
Could it be quotes? This pattern
<txp:image_url id="<txp:yield name="mythumb" />" ...
will not work as you expect, it should be
<txp:image_url id='<txp:yield name="mythumb" />' ...
Offline
Re: Shortcode for youtube embed and schema
etc wrote #330684:
Could it be quotes? This pattern
<txp:image_url id="<txp:yield name="mythumb" />" ......
will not work as you expect, it should be
<txp:image_url id='<txp:yield name="mythumb" />' ......
Will test that later thanks so much for all your help with everything!
…………………
I <3 txp
…………………
Offline