Giter VIP home page Giter VIP logo

inline-tweet-sharer's People

Contributors

rhyswynne avatar winwar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

inline-tweet-sharer's Issues

Support for custom bit.ly domains

Just a quick note here: for those who use bit.ly custom short domains, adding the ability to manually specify the domain to be used would be useful. Simply changing the inline-tweet-sharer-urlshortened value to the domain seems to fix it, but from a UI point of view having either the option to manually enter via input in the admin panel or have the API detect all domains associated with the account would be a nice touch.

Incorrect character count

I discovered that the plugin was incorrectly counting and prematurely cutting off tweets due to HTML encoded characters. For example, a quote may be counted as 6 characters (")

In order to alleviate the situation, I updated the count like this:

if ((strlen(utf8_decode($tweetlinkstring))+strlen($permalink)) > 140 ) { $tweetlinkstring = substr( $tweetlinkstring, 0, (140-(strlen(utf8_decode($tweetlinkstring))+strlen($permalink)+3)) ); $tweetlinkstring = preg_replace( '/ [^ ]*$/', '...', $tweetlinkstring ); }

This decodes the tweet string for accurate character count, and also accounts for the length of the link.

Customised Text

From - https://wordpress.org/support/topic/suggestion-combine-dialog-boxes-change-text-option/

Possibility to have a customised text. Explanation: Say I want to highlight a longish sentence, one that is too long for a tweet . Then it would be nice to be able to chose a different text for the tweet that pops up when the reader clicks the text.

Say the highlighted sentence is: "Abraham Lincoln in one of his lucid moments said that well structured and elegant coding is the way to go and the best thing to do". Then it would be good to be able to specify a shorter tweet text, for example: "Abraham Lincoln said you should do elegant and structured code". (Yes, it is a silly example but I hope it illustrates what I mean.)

Unicode not working?

Please test this content and tweet it.

Цаг агаарын болон бусад хүндрэл учрахгүй бол буудай, төмсний хэрэгцээгээ дотооддоо бүрэн хангах боломжтой болно.

Changing wrapper div to span

The object the tweet gets wrapped in is currently a div, which I had to set to display: inline, but I also have found that since I use a the simple TinyMCE editor, wordpress puts the div on a new line since the editor automatically puts my text into

tags. So even though my editor looks like this

This is some text [then the shortcode] with what I wanted tweeted [/shortcode] and some text after

The output HTML looks like this

<p>This is some text</p> <div class="inline-tweet"> with what I want tweeted</div> and some text after.

And when that displays, it looks like:

this is some text
with what I wanted tweeted and some text after.

So, I changed in the plugin PHP the div to a span, but I am wondering why it is a div in the first place, since it should always be an inline element inside of a

right? Or could that be an option? I don't want the plugin to break during updates if I manually change the

to a in the inline-tweet-sharer.php file.

Does this make sense?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.