I wish to add the standard twitter icons for the web intents, so I added a web intents field to views, but there are no classes (and there is no way to add separate classes) as all the web intents come together, so I can't achieve this.

Here's the code produced when addind the field to views... I need classes in those span tags e.g., class="web-intents-reply" or something...

<div class="views-field views-field-web-intents"><span class="field-content"><span><a href="https://twitter.com/intent/tweet?in_reply_to=439049743285907456">Reply</a></span> <span><a href="https://twitter.com/intent/retweet?tweet_id=439049743285907456">Retweet</a></span> <span><a href="https://twitter.com/intent/favorite?tweet_id=439049743285907456">Favorite</a></span></span> </div>

I know you're not supporting views themeing, but I don't believe it's possible at the moment unless I'm missing something. One way I tried was to rewrite the field.. but there's no option to print a single intent, just all of them.

Help appreciated :)

CommentFileSizeAuthor
#3 twitter-n2207963-3-7.x-5.x.patch1.25 KBdamienmckenna

Comments

benjarlett’s picture

twitter_web_intents module gives this functionality:

  <div class="views-field views-field-favorite-link">        <span class="field-content"><a href="https://twitter.com/intent/favorite?tweet_id=439049743285907456">Favorite</a></span>  </div>  
  <div class="views-field views-field-reply-link">        <span class="field-content"><a href="https://twitter.com/intent/tweet?in_reply_to=439049743285907456">Reply</a></span>  </div>  
  <div class="views-field views-field-retweet-link">        <span class="field-content"><a href="https://twitter.com/intent/retweet?tweet_id=439049743285907456">Retweet</a></span>  </div></li>

which solves it for me.. but it'd be better if the twitter module just did something simmilar out of the box as it comes very close...

nicole_vz’s picture

This is done by editing the "twitter_views_field_handlers.inc" file. Lines 109 to 115 is the function you need to edit. It's a super simple change and I would submit a patch, but I don't know how to do that.

damienmckenna’s picture

Version: 7.x-5.8 » 7.x-5.x-dev
Status: Active » Needs review
StatusFileSize
new1.25 KB

So something like this?