Exemplo n.º 1
0
/**
 * The screen that lets users add a bookmarklet.
 *
 */
function u_marklet_screen()
{
    global $config_array, $Paths;
    PageHeader(lang('userbar', 'userinfo'), 1);
    PageAnkeiler(lang('userbar', 'userinfo') . ' » ' . lang('bookmarklets', 'bm_add'));
    // A quick hack to make sure the raquo's are encoded when using UTF-8
    $withlinktitle = lang('bookmarklets', 'bm_withlink');
    $nolinktitle = lang('bookmarklets', 'bm_nolink');
    $withlinktitle = str_replace("»", "»", str_replace("»", "»", $withlinktitle));
    $nolinktitle = str_replace("»", "»", str_replace("»", "»", $nolinktitle));
    $url = gethost() . $Paths['pivot_url'] . "index.php?menu=entries&func=new_entry";
    $withlink = sprintf("javascript:bm=document.selection?document.selection.createRange().text:document.getSelection();void(open('%s&url='+escape(location.href)+'&i='+escape(bm)+'&t='+escape(document.title), 'new_log_entry', 'resizable=yes, scrollbars=yes, width=790, height=480, location=yes, status=yes'));", $url);
    $nolink = sprintf("javascript:void(open('%s','new_log_entry', 'resizable=yes, scrollbars=yes, width=790, height=480, location=yes, status=yes'));", $url);
    $main_funcs = array(array($withlinktitle, $withlink, lang('bookmarklets', 'bm_withlink_desc')), array($nolinktitle, $nolink, lang('bookmarklets', 'bm_nolink_desc')));
    DispPage($main_funcs);
    echo "<p>" . lang('bookmarklets', 'bookmarklets_info');
    echo "<ul><li>" . lang('bookmarklets', 'bookmarklets_info_1') . "</li>";
    echo "<li>" . lang('bookmarklets', 'bookmarklets_info_2') . "</li></ul></p>";
    PageFooter();
}
Exemplo n.º 2
0
/**
 * The screen to edit a weblog, screen 1
 */
function main_blogs_edit1()
{
    global $Pivot_Vars, $blog_settings, $Weblogs;
    PageHeader(lang('weblog_config', 'create_1'));
    PageAnkeiler(lang('userbar', 'admin') . ' &raquo; ' . lang('weblog_config', 'create_1'));
    if (isset($Pivot_Vars['blog'])) {
        // Keep the (internal) name urlencoded since it is stored in the weblogs
        // array with an urlencoded key.
        $orig_name = urlencode($Pivot_Vars['blog']);
        $blog_settings = $Weblogs[$orig_name];
        // Being backwards compatible with older versions of Pivot
        if (empty($blog_settings)) {
            $orig_name = $Pivot_Vars['blog'];
            $blog_settings = $Weblogs[$orig_name];
        }
        // option to delete a weblog
        $text = sprintf(lang('weblog_config', 'del_weblog') . ' \'%s\'', $Weblogs[$orig_name]['name']);
        $send[] = array($text, 'blog_delete&name=' . $orig_name, lang('weblog_config', 'del_this_weblog'));
        DispPage($send, 'del_blog');
        echo "<br />";
        MidHeading(sprintf(lang('weblog_config', 'edit_weblog') . ' \'%s\'', $Weblogs[$orig_name]['name']));
    } else {
        $blog_settings = get_tempweblog();
        $orig_name = "";
        MidHeading(lang('weblog_config', 'create_new'));
    }
    StartForm('blog_edit2', 1);
    StartTable();
    EndForm(lang('go'), 2);
    DisplaySettings(get_weblog_config1($orig_name), 'blog_settings');
    EndForm(lang('go'), 1);
    PageFooter();
}