[personal profile] matgb posting in [community profile] style_system
K, I'm stuck. I'm working on a set of ShareThis buttons for my layout and a few other people. It may even get submitted as a solution to the outstanding bug on it if I can really get it working, but it'll need a lot more bells and whistles.

However, while it works fine as is for me, it breaks quite horribly if someone has put HTML into the subject of the post. According to S2 and what I've read, there are three different ways to get a plaintext subject, exept...

I can't get any of them to work. I've tried get_plain_subject (), I've tried striphtml() and I've used variants on ehtml. You can see the buttons working fine on any of my entries or friends page, but as can be seen from this one it breaks with the html.

I think I'm basically missing the syntax for how to use each of the subjects, but I've tried so many variants of syntax I think I need someone to tell me what to do.

Date: 2010-08-01 01:09 am (UTC)
ninetydegrees: Art & Text: heart with aroace colors, "you are loved" (Default)
From: [personal profile] ninetydegrees
Creating a var:
var string subject = $this->get_plain_subject();

Then using $subject in the links seems to have worked for me. Is this what you've already tried?
Edited (wow. it's late. my english is all broken.) Date: 2010-08-01 01:09 am (UTC)

Date: 2010-08-01 01:17 am (UTC)
ninetydegrees: Art & Text: heart with aroace colors, "you are loved" (Default)
From: [personal profile] ninetydegrees
You're welcome. :)

Date: 2012-06-30 06:48 pm (UTC)
From: [personal profile] elinor
Sorry if I'm being horridly rude asking, but did you complete your ShareThis buttons? And are they available for all users to pop into our posts?

Date: 2012-06-30 07:36 pm (UTC)
From: [personal profile] elinor
Oh wow, that would be awesome! But only if you've got the time and energy, mind :-)

Profile

Dreamwidth style system discussion

June 2025

S M T W T F S
12345 67
891011121314
15161718192021
22232425262728
2930     

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 6th, 2025 10:27 pm
Powered by Dreamwidth Studios