query("INSERT INTO $tablelinkcategories (cat_id, cat_name, auto_toggle, show_images, show_description, \n" . " show_rating, show_updated, sort_order, sort_desc, text_before_link, text_after_link, text_after_all, list_limit) \n" . " VALUES ('0', '$cat_name', '$auto_toggle', '$show_images', '$show_description', \n" . " '$show_rating', '$show_updated', '$sort_order', '$sort_desc', '$text_before_link', '$text_after_link', \n" . " '$text_after_all', $list_limit)"); header('Location: link-categories.php'); break; } // end addcat case 'Delete': { $standalone = 1; include_once('admin-header.php'); $cat_id = $_GET['cat_id']; $cat_name=get_linkcatname($cat_id); $cat_name=addslashes($cat_name); if ($cat_id=="1") die("Can't delete the $cat_name link category: this is the default one"); if ($user_level < get_settings('links_minadminlevel')) die ("Cheatin' uh ?"); $wpdb->query("DELETE FROM $tablelinkcategories WHERE cat_id='$cat_id'"); $wpdb->query("UPDATE $tablelinks SET link_category=1 WHERE link_category='$cat_id'"); header('Location: link-categories.php'); break; } // end delete case 'Edit': { include_once ('admin-header.php'); $cat_id = $_GET['cat_id']; $row = $wpdb->get_row("SELECT cat_id, cat_name, auto_toggle, show_images, show_description, " . " show_rating, show_updated, sort_order, sort_desc, text_before_link, text_after_link, " . " text_after_all, list_limit FROM $tablelinkcategories WHERE cat_id=$cat_id"); if ($row) { if ($row->list_limit == -1) { $row->list_limit = ''; } ?>

Edit “cat_name?>” Category

Category Options
Name:
Show:
(shown in title regardless)

(shown in title regardless)
Sort order:
Limit: (Leave empty for no limit to number of links shown)
Toggle:
Formatting
Before Link:
Between Link and Description:
After Link:

query("UPDATE $tablelinkcategories set cat_name='$cat_name', auto_toggle='$auto_toggle', show_images='$show_images', show_description='$show_description', show_rating='$show_rating', show_updated='$show_updated', sort_order='$sort_order', sort_desc='$sort_desc', text_before_link='$text_before_link', text_after_link='$text_after_link', text_after_all='$text_after_all', list_limit=$list_limit WHERE cat_id=$cat_id "); } // end if save header("Location: link-categories.php"); break; } // end editcat default: { $standalone=0; include_once ("./admin-header.php"); if ($user_level < get_settings('links_minadminlevel')) { die("You have do not have sufficient permissions to edit the link categories for this blog. :)"); } ?>

Link Categories:

get_results("SELECT cat_id, cat_name, auto_toggle, show_images, show_description, " . " show_rating, show_updated, sort_order, sort_desc, text_before_link, text_after_link, " . " text_after_all, list_limit FROM $tablelinkcategories ORDER BY cat_id"); $i = 1; foreach ($results as $row) { if ($row->list_limit == -1) { $row->list_limit = 'none'; } $style = ($i % 2) ? ' class="alternate"' : ''; ?> style="border-bottom: 1px dotted #9C9A9C;">
Name ID Toggle? Show Sort Order Desc? Formatting Limit  
Images Desc. Rating Updated Before Between After
cat_name)?> cat_id?> auto_toggle?> show_images?> show_description?> show_rating?> show_updated?> sort_order?> sort_desc?> text_before_link)?>  text_after_link)?>  text_after_all)?> list_limit?> Edit Delete

These are the defaults for when you call a link category with no additional arguments. All of these settings may be overwritten.

Add a Link Category:

Category Options
Name:
Show:
(shown in title regardless)

(shown in title regardless)
Sort order:
Limit: (Leave empty for no limit to number of links shown)
Toggle:
Formatting
Before Link:
Between Link and Description:
After Link:

Note:

Deleting a link category does not delete links from that category.
It will just set them back to the default category .