Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: pat-article-social
Pat64 wrote #289537:
So, you’ve got the SVG icons and the first letters. Right? In this case, it’s normal ;)
ok… I expected a fallback only if icons are not supported.
So “fallback” attribute added
Great, thanks!
Interesting. This is what I thing to add in the plugin (as a fallback for SVG icons). Could you tell me how you make?
I’m simply using it with the title='<i class="fa fa-icon"></a>'
attribute for now, but it could be used as a css content
rule like so:
.your-class:before {
font-family: "FontAwesome";
content: "\f004";}
Last edited by NicolasGraph (2015-03-29 09:41:21)
Offline
Re: pat-article-social
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: pat-article-social
Hi… again ;)
For <txp:pat_article_social_sum site="twitter,facebook,pinterest" unit="k" text='<i class="fa fa-share"></i>' showalways="0" zero="0" />
, I wouldn’t expect to see anything if the article is not already shared but the colon (:) stays visible.
Edit: I think to remove this colon as I use an icon for the pat_article_social_sum
tag too. Wouldn’t it be good to let the user free to use this colon (in the text attribute) or not? In my mind it doesn’t need to be hard coded. …and you could remove the lang attribute as it seems to be used only for the that.
Last edited by NicolasGraph (2015-03-30 13:31:40)
Offline
Re: pat-article-social
The “text” attribute isn’t attended to store a CSS class but it’s available for the text label before the count (i.e. Total of share).
So, where do you want to put this class (in which tag, this one: <b class="fa fa-share"> </b>
)?
Last edited by Pat64 (2015-03-30 16:15:01)
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: pat-article-social
Pat64 wrote #289579:
The “text” attribute isn’t attended to store a CSS class but it’s available for the text label before the count (i.e. Total of share).
Is it a problem do do that? It works well…
So, where do you want to put this class (in which tag, this one:
<b class="fa fa-share"> </b>
)?
It’s <i class="fa fa-share"> </i>
, and I put it in txp:pat_article_social_sum
as said before. No problem for me about that.
The only problem for me is to hide the colon (See my previous post).
Last edited by NicolasGraph (2015-03-31 08:18:30)
Offline
Re: pat-article-social
Ok.
The colons are shown only if “text” attribute isn’t empty.
The “alternative” attribute is no more followed by a colon (need to add it manually).
https://github.com/cara-tm/pat_article_social/commit/b475d46f5cd1a13b3c7efa423c5c8144beca91f4
I’ll update this 0.4.9 version for the end of the day.
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: pat-article-social
Pat64 wrote #289605:
The colons are shown only if “text” attribute isn’t empty.
The “alternative” attribute is no more followed by a colon (need to add it manually).
What is the alternative
attribute for? Is it the same as text without the colon?
You are fast, thank you for that, but are these new attributes really needed?
Offline
Re: pat-article-social
Done.
You can download it now: https://github.com/cara-tm/pat_article_social
The “alternative” attribute is a fallback (optional) when no count exist (attached with the “text” attribute – optional, too, i.e.: text=“Total of Shares”), so users can set an alternate texte (i.e.: “Share Now:”).
All these are’nt new ;)
And I’m fast maybe because I’m first user (added in many live projects).
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: pat-article-social
Pat64 wrote #289610:
You can download it now: https://github.com/cara-tm/pat_article_social
Thanks!
All these are’nt new ;)
ok, I get out…
Offline
Re: pat-article-social
Hi Patrick,
Just trying this plugin now.
The only thing I’m trying to use at the moment is this tag: <txp:pat_article_social_twttr status="" />
, per your Github info.
A couple of questions.
First, instructions say that after installation, go to Preferences and set the “cache” directory /root/cache
. My field was already filled with just cache
(just like the images
directory path), but are you’re saying the directory field needs to be edited as /root/cache
?
I also see this in your instructions: “Previews of articles don’t show the renderings of this plugin, voluntarily.” That probably explains why I don’t see the rendered tweets when I use the “View” link while article is in a Draft status. Is that correct? And if so, is there really no way to see the rendered tweets while the article is in Draft status?
Last edited by Destry (2015-06-17 11:01:17)
Offline
Re: pat-article-social
Has that embedded tweet tag I referenced previously been replaced by this one, which is actually in the plugin documentation? …
<txp:twttr status=”“ />
Offline
Re: pat-article-social
I did some testing and can confirm that <txp:twttr status=”“ />
is the correct tag to use (nice, it’s shorter), and the article must be “Live” to see the rendered tweets (unfortunately, but not too big of deal). I can see a test tweet.
The only thing I’m still unclear about is the cache field. I currently have it filled as /root/cache
, and a directory “cache” installed in my public root, but that seems odd to me.
Offline