Example #1
0
function ilost_posto_fanfou($pid)
{
    if ($_POST['action'] != "autosave" and $_POST['post_status'] != "draft" and $_POST['post_status'] != "save") {
        $postitle = get_the_title($pid);
        $posturl = get_permalink($pid);
        if ($_POST['original_post_status'] == 'publish') {
            $postitle = __('[Update] ', 'iLost') . $postitle;
        } else {
            $postitle = __('[New] ', 'iLost') . $postitle;
        }
        $t_url = "http://tinyurl.com/api-create.php?url=" . $posturl;
        $url_contents = file_get_contents($t_url);
        $temp_length = strlen($postitle) + strlen($url_contents);
        if ($temp_length > 127) {
            $remaining_chars = 124 - strlen($url_contents);
            $postitle = substr($postitle, 0, $remaining_chars);
            $postitle = $postitle . "...";
        }
        $postmessage = $postitle . " - " . $url_contents;
        $ff_user = new FFClient(fan_akey, fan_skey, ilost_getOption('fan_token'), ilost_getOption('fan_token_secret'));
        $ff_user->update($postmessage);
    }
}
Example #2
0
File: core.php Project: xuui/iLost
function ilost_footerscript()
{
    $growlBox = ilost_getOption('growlBox');
    if ($growlBox) {
        echo "<script src=\"" . ilost_path . "/scripts/jgrowl.js\"></script>\n<script src=\"" . ilost_path . "/scripts/konami.js\"></script>\n";
    }
    if (is_single() && ilost_ctrlentry()) {
        echo "<script type=\"text/javascript\">ilosts.quickComments();(function(jQuery){ilostQ=jQuery.noConflict();ilostQ(document).ready(function(){ilostQ('#commentform .form-submit #submit').after('<label class=\"cereply\">" . __('Use Ctrl+Enter to reply comments', 'iLost') . "</label>');});})(jQuery);</script>\n";
    }
    if (ilost_is_ie6() or ilost_is_ie7()) {
        echo "<!--[if lte IE 7]><script type=\"text/javascript\">var IE6UPDATE_OPTIONS={icons_path:\"" . ilost_path . "/scripts/ie6upimg/\"}</script><script type=\"text/javascript\" src=\"" . ilost_path . "/scripts/ie6update.js\"></script><![endif]-->\n";
    }
}
Example #3
0
function ilost_adgpostend()
{
    $postendcode = ilost_getOption('postendcode');
    if ($postendcode) {
        echo $postendcode;
    }
}