Installation of Article Directory

Installation

Attention: if you are using the plugin simultaneously with Article Directory WordPress Theme, miss the 5, 6, 7 and 8.1 points of installation:
  1. Copy the article-directory folder in WordPress plugins directory (/wp-content/plugins/).
  2. Activate the plugin through admin interface.
  3. Activate the “Membership (Anyone can register)” option on the “General Settings” page of admin area.
  4. On the same page select “Author” or “Contributor” in the option “New User Default Role”.
  5. Add the following code in the index.php file of your theme (or in another file in a place, where you want to display the categories list): <?php if (function_exists('article_directory')) article_directory(); ?>
  6. Add the following code in a place of your theme (for example, in sidebar.php), where you want to see the authorization form: <?php if (function_exists('article_directory_authorization_form')) article_directory_authorization_form(); ?>
  7. Add the following code in the header.php file before the </head> tag: <link rel="stylesheet" href="<?php bloginfo('wpurl'); ?>/wp-content/plugins/article-directory/author-panel.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="<?php bloginfo('wpurl'); ?>/wp-content/plugins/article-directory/categories.css" type="text/css" media="screen" />
  8. Select a prefered interface for authors in corresponding option at the “Settings → Article Directory” page of admin area. If you have selected the “Author panel”, then follow these subpoints:
    1. Create in directory with your theme a new PHP file, for example author-panel.php and paste the following code in it: <?php
      /*
      Template Name: Author panel
      */
      if (function_exists('article_directory_author_panel')) article_directory_author_panel();
      ?>

    2. Create in admin area a new page and select the template “Author panel” in page attributes. Through this page authors will add new articles and change their profile. Access in admin area for authors will be forbidden.
    3. Specify ID of this page in corresponding option at the “Settings → Article Directory” page of admin area.
  9. That’s all. If it’s necessary, you may customize other options of plugin.

Customization

There are two things, that you can customize:
  1. If it’s necessary, you may customize the author-panel.css and categories.css files under the site design.
  2. Customize options on “Settings → Article Directory” page.
How to add icons for parent categories
It’s doing using CSS. You need to add the styles for icons in style.css file of your theme.
Styles should be like this:
#cat-23 {background: url(i/icon.gif) 4px 3px no-repeat}
Here the digit 23 means, what this icon will be added in the 2nd column for the 3rd parent category from the top. Accordingly, it is necessary to create as many of such styles, how many you have parent categories, and specify the corresponding number for each icon.
i/icon.gif – this is the path to an icon file, beginning from a folder with your theme.
4px – icon shift value from the left of the parent category block.
3px – icon shift value from the top of the parent category block.
The plugin also lets you to display the list with the links to categories RSS feeds. To do this you must:
  1. Create a new page template.
  2. Add the following code: <?php $rssfeeds=true; ?>
    <?php if (function_exists('article_directory')) article_directory(); ?>
  3. Create a new page in the admin interface and select the created template in page attributes.