Added help hooks.

Added gethelp_link() and helpWindow() functions.


git-svn-id: https://develop.svn.wordpress.org/trunk@296 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mike Little 2003-08-07 00:00:55 +00:00
parent c1691badef
commit 95b9f24803
3 changed files with 45 additions and 14 deletions

View File

@ -8,6 +8,12 @@ require_once($abspath.$b2inc.'/b2functions.php');
require_once($abspath.$b2inc.'/xmlrpc.inc');
require_once($abspath.$b2inc.'/xmlrpcs.inc');
function gethelp_link($this_file, $helptag) {
$url = 'help/en/'.$this_file.'.help.html#'.$helptag;
$s = '&nbsp;<a href="'.$url.'" onclick="javascript:helpWindow(\''.$url.'\'); return false;" title="Click here for help"><span class="helplink">[?]</span></a>';
return $s;
}
if (!isset($use_cache)) $use_cache=1;
if (!isset($blogID)) $blog_ID=1;
if (!isset($debug)) $debug=0;
@ -77,6 +83,11 @@ setTimeout("redirect();", 600);
window.open ("b2upload.php", "b2upload", "width=380,height=360,location=0,menubar=0,resizable=1,scrollbars=yes,status=1,toolbar=0");
}
function helpWindow(url) {
window.open(url, "Help", "width=640, height=450, location=0, menubar=0, resizable=0, scrollbars=1, status=1, titlebar=0, toolbar=0, screenX=60, left=60, screenY=60, top=60");
}
// End -->
</script>
</head>

View File

@ -74,6 +74,26 @@
<dd>This list and button allow you to assign the ownership of links (for which
you have administration privileges) to someone else.</dd>
<dt id="toggle_visibility"><a href="#toggle_visibility">Toggle Visibility</a></dt>
<dd>This button allow you to toggle the visibility of the checked links (for
which you have administration privileges). Visible links become invisible and
invisible links become visible.</dd>
<dt id="move_to_cat"><a href="#move_to_cat">Move To Category</a></dt> <dd>This
list and button allow you to move several links (for which you have
administration privileges) at the same time. Check the checkboxes of the links
you wish to change, select a category from the drop down list and click the
move button.</dd>
<dt id="toggle_checkboxes"><a href="#toggle_checkboxes">Toggle Checkboxes</a></dt>
<dd>This link allows you to toggle the checked state of a ll the links in the
list. Links which were checked will become unchecked, links which wrre
unchecked will become checked.</dd>
<dt id="add_a_link"><a href="#add_a_link">Add a link</a></dt>
<dd>

View File

@ -2,13 +2,13 @@
// $Id$
//
// Links
// Copyright (C) 2002 Mike Little -- mike@zed1.com
// Copyright (C) 2002, 2003 Mike Little -- mike@zed1.com
//
// This is an add-on to b2 weblog / news publishing tool
// This is an add-on to b2/WordPress weblog / news publishing tool
// b2 is copyright (c)2001, 2002 by Michel Valdrighi - m@tidakada.com
//
// **********************************************************************
// Copyright (C) 2002 Mike Little
// Copyright (C) 2002, 2003 Mike Little
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@ -483,15 +483,15 @@ function checkAll(form)
<table width="75%" cellpadding="5" cellspacing="0" border="0">
<tr>
<td><b>Link Categories:</b></td>
<td><a href="linkcategories.php">Manage Link Categories</a></td>
<td><a href="links.import.php">Import Blogroll</a></td>
<td><a href="linkcategories.php">Manage Link Categories</a><?php echo gethelp_link($this_file,'manage_link_categories');?></td>
<td><a href="links.import.php">Import Blogroll</a><?php echo gethelp_link($this_file,'import_blogroll');?></td>
</tr>
<tr>
<td>
<b>Show</b> links in category:<br />
<b>Show</b> links in category:<?php echo gethelp_link($this_file,'link_categories');?><br />
</td>
<td>
<b>Order</b> by:
<b>Order</b> by:<?php echo gethelp_link($this_file,'order_by');?>
</td>
</tr>
<tr>
@ -526,7 +526,7 @@ function checkAll(form)
</select>
</td>
<td>
<input type="submit" name="action" value="Show" class="search" />
<input type="submit" name="action" value="Show" class="search" /><?php echo gethelp_link($this_file,'show');?>
</td>
</tr>
</table>
@ -543,7 +543,7 @@ function checkAll(form)
<input type="hidden" name="cat_id" value="<?php echo $cat_id ?>" />
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<th width="15%">Name</th>
<th width="15%"><?php echo gethelp_link($this_file,'list_o_links');?> Name</th>
<th>URL</th>
<th>Category</th>
<th>Rel</th>
@ -627,7 +627,7 @@ LINKS;
<tr><td colspan="4">Use the checkboxes on the right to select multiple links and choose an action below:</td></tr>
<tr>
<td>
<input type="submit" name="action2" value="Assign" /> ownership to:
<input type="submit" name="action2" value="Assign" /> ownership <?php echo gethelp_link($this_file,'assign_ownership');?> to:
<?php
$results = $wpdb->get_results("SELECT ID, user_login FROM $tableusers WHERE user_level > 0 ORDER BY ID");
echo " <select name=\"newowner\" size=\"1\">\n";
@ -640,14 +640,14 @@ LINKS;
?>
</td>
<td>
Toggle <input type="submit" name="action2" value="Visibility" />
Toggle <input type="submit" name="action2" value="Visibility" /><?php echo gethelp_link($this_file,'toggle_visibility');?>
</td>
<td>
<input type="submit" name="action2" value="Move" /> to category
<input type="submit" name="action2" value="Move" /><?php echo gethelp_link($this_file,'move_to_cat');?> to category
<?php category_dropdown('category'); ?>
</td>
<td align="right">
<a href="#" onclick="checkAll(document.getElementById('links')); return false; ">Toggle Checkboxes</a>
<a href="#" onclick="checkAll(document.getElementById('links')); return false; ">Toggle Checkboxes</a><?php echo gethelp_link($this_file,'toggle_checkboxes');?>
</td>
</tr>
</table>
@ -662,7 +662,7 @@ LINKS;
<table width="95%" cellpadding="5" cellspacing="0" border="0">
<form name="addlink" method="post">
<input type="hidden" name="action" value="Add" />
<tr><td colspan="2"><b>Add</b> a link:</td></tr>
<tr><td colspan="2"><b>Add</b> a link:<?php echo gethelp_link($this_file,'add_a_link');?></td></tr>
<tr height="20">
<td height="20" align="right">URL:</td>
<td><input type="text" name="linkurl" size="80" value="<?php echo $link_url; ?>"></td>