WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Tweet This] manually input function anywhere in theme files

[Plugin: Tweet This] manually input function anywhere in theme files

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author richardxthripp

    @richardxthripp

    Try <?php tweet_this_manual(); ?> which displays the Tweet This link and all the enabled extended services in a p tag in a div just like automatic insertion. If you see the Tweet This block twice, add <?php remove_filter('the_content', 'insert_tweet_this'); ?> to the top of the theme file. You don’t have to edit the Tweet This options and your specified options will continue to affect the Tweet This links.

    If you don’t want the p tag or div, you can use <?php echo str_replace(array('<div class="tweetthis" style="text-align:left;"><p>', '</p></div>'), array('', ''), get_tweet_this_manual()); ?> or edit the TT_PREFIX and TT_SUFFIX constants defined in tt-config-sample.php file and rename it tt-config.php. Make sure to not use WordPress automatic plugin update afterward to avoid overwriting the file.

    You can also use <?php tweet_this($service); ?> to display the icon and link for only one service, i.e. <?php tweet_this('twitter'); ?>, <?php tweet_this('facebook'); ?>, <?php tweet_this('myspace'); ?>, etc. If you use these functions, you should disable auto-insertion for Twitter and each extended services in the options to avoid duplicate links. tweet_this(); accepts the parameters $service, $tweet_text, $link_text, $title_text, $icon_file, $a_class, $img_class, $img_alt in that order, but all of them are optional.

    There is more information in the FAQ and source code. Use Ctrl + F as both are very lengthy…

    Hi Richard, thanks for the reply. That all looks great, I will give it a shot this and get back to you –

    Regards,
    Michel

    Plugin Author richardxthripp

    @richardxthripp

    Alright, good luck!

    Hi again, everything worked like a charm, exactly what i was looking for. I really appreciate you’re in depth help and support.

    Another question, regarding the facebook service, when i click on link, it takes me to a page and requests i input a page i’d like to share, shouldn’t this be auto-populated? Is this do-able with you’re plugin?

    Cheers!
    Michel

    I’ve also just experienced another issue.

    I’m using custom permalinks, /%category%/%postname%/

    When i ‘twitter this’, the auto populated message, outputs the post title and web address but is missing the page’s id.

    JP’s first all Original http://localhost:8888/?p=

    Regards,
    Michel

    Plugin Author richardxthripp

    @richardxthripp

    I haven’t actually tested Tweet This with anything but /%year%/%monthnum%/%postname%/, so maybe /%category%/%postname%/ makes the post ID harder to access? I will make a note of this.

    As for the Facebook problem, the description will be auto-populated if your website is publicly accessible. Since you are running on localhost, it is not, so Facebook has nothing to work with.

    Plugin Author richardxthripp

    @richardxthripp

    I have tested /%category%/%postname%/ with local URLs and it worked fine in Tweet This 1.8 on WP 3.0.1 running PHP 5.2.14. Perhaps it will not happen when you are running in a production (online) environment?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Tweet This] manually input function anywhere in theme files’ is closed to new replies.