Link Directory SQL installation documentation

Help for setting up the Link Directory SQL script

top
Version

Program Name : Link SQL
Version : 1.0
Last Modified : 20 Mar 2008
Made : Hand made


top
Features

Advanced link directory script with numerous options.

The features of Link SQL are:

Search script with advanced ranking.
Option to search with MySQL FullText search.
Include membership management.
Members can update their listings.
Send mass mail to members/link owner/subscribers.
Create search engine friendly static pages.
Complete customization with templates.
5 star rating.
Advanced template programming.
Administrator control panel.
Visitors can rate the links.
Option to build detailed page for every link.
Script will work under mod_perl.
And More......


top
System requirements

A unix (linux) / Win NT webserver.
A MySQL 4.0 or higher.
Perl Version 5.6 or higher.
A web page that allows custom CGI.


top
Installation and configuration from the script

Open all the files with a .pl file extension in your favorite text editor and look for the line.

#!/usr/local/bin/perl
If needed change the path to Perl.

Open the /admin/main.cfg with your favorite text editor and follow the instructions in the file.


Directories and file upload

Make a directory in your cgi-bin directory something like link-sql. Upload everything from the cgi-bin directory (from the zip file) in the same context to your cgi-bin/link-sql directory. Upload everything in ASCII mode (be sure of that other why the script is not working)

Make a directory in your main directory something like docs. Upload everything from the docs directory (from the zip file) in the same context to your docs directory.

Note : For the Windows FTP users. Auto detect is many times not good working.


Directories and Files Permissions

For the link-sql directory chmod 755
For the files in the link-sql directory chmod 755

For the link-sql/admin directory chmod 755
For the files in the link-sql/admin directory chmod 755

For the link-sql/admin/config directory chmod 755
For the files in the link-sql/admin/config directory chmod 755

For the link-sql/admin/templates directory chmod 755
For the files in the link-sql/admin/templates directory chmod 755

For the link-sql/admin/templates/emails directory chmod 755
For the files in the link-sql/admin/templates/emails directory chmod 755



top
Add categories and links

You can add categories and links in the administrator control panel, open the admin.pl (http://www.yourdomain.com/cgi-bin/link-sql/admin/admin.pl) script in a browser. On the left side you see a menu where you can add the categories [Add Category] and links [Add Link], before you can add links, you need to create the categories before.


top
Create the web pages

After you have create the categories and links you can build the pages in the administrator control panel by pushing the [Build All] link. All pages and directories are created automatically by the script.


top
Template programming

The templates located in the 'admin/templates' directory can be edit to change the look from the site. Advanced template programing can be use to display different result, depending the value/condition.

You can use the following pattern in the templates.

'if' If condition is true.
'elsif' If condition is true and none of the condition(s) before where true.
'else' If none of the condition(s) where true.
'endif' Close the if pattern.

'andif' If condition is also true.
'endandif' Close the andif pattern.

You can use the following condition pattern in the templates.

'>' Condition (is greater than condition)
'<' Condition (is lower than condition)
'eq' Condition (is equal to condition)
'ne' Condition (is not equal to condition)
'==' Condition (is equal to condition numbers)

Simple template programing

Example: 1
<%if CATEGORY%>
<h2>Categories</h2>
<%CATEGORY%>
<%endif%>

In this case the variable 'CATEGORY' is displayed only when the variable 'CATEGORY' is set.

Example: 2
<%if Popular eq Yes%>
<sup class="popular">pop</sup>
<%endif%>

In this case the word 'pop' is displayed only when the variable 'Popular' is equal to 'Yes'.

Advanded template programing

Example: 1
<%if DAYS_OLD eq 1%>
new today
<%elsif DAYS_OLD < 8%>
new this week
<%elsif DAYS_OLD < 15%>
new older than 1 week
<%endif%>

When the variable 'DAYS_OLD' is equal to '6' the words 'new this week' is displayed.

Example: 2
<%if DAYS_OLD eq 1%>
new today

<%andif Popular eq Yes%>
and popular
<%endandif%>

<%elsif DAYS_OLD < 8%>
new this week

<%andif Popular eq Yes%>
and popular
<%endandif%>

<%elsif DAYS_OLD > 7%>
new older than 1 week

<%andif Popular eq Yes%>
and popular
<%endandif%>

<%endif%>

When the variable 'DAYS_OLD' is equal to '6' the words 'new this week' is displayed, if also the variable 'Popular' is equal to 'Yes' the words 'and popular' is also displayed.


top
5 star rating

This script have a 5 or 10 star rating display options, with this option you can display the rating in a graphic matter.

five star The five star rating is a number between 0 and 5, and can be used to display the rating from a resource in star (images are include in zip file/docs/images).
<img src="http://www.yourdomain.com/images/<%5STAR_RATING%>.gif" border="0" alt="">
ten star The ten star rating is a number between 0 and 10, and can be used to display the rating from a resource in star (images are include in zip file. /docs/images).
<img src="http://www.yourdomain.com/images/<%10STAR_RATING%>.gif" border="0" alt="">
This template tag can be used in the follow template (/admin/templates) files: popularLinks.html, ratingLinks.html, links.html, and detailed.html

You need (for the use of the 5 star rating option) also to replace the rating form in the 'rate.html' template with the form below.

<form action="<%RATE_SCRIPT%>" method="post">
<input type="hidden" name="do" value="rate_link">
<input type="hidden" name="id" value="<%ID%>">
<input type="radio" name="rate" value="10"> Excellent!<br>
<input type="radio" name="rate" value="8"> Very Good<br>
<input type="radio" name="rate" value="6"> Good<br>
<input type="radio" name="rate" value="4"> Fair<br>
<input type="radio" name="rate" value="2"> Poor<br>
<input type="submit" value="Cast Vote!">
</form>

top
Dynamic page creation but deliver static

You can deliver the pages static but create it dynamically (live from the database) with the help of the Apache module MOD_REWRITE.

This example goes out that you create the pages in your main web directory (http://domainname.com).
Create a file named 'htaccess.txt' and insert the follow lines:
RewriteEngine On
RewriteRule ^detailed/(.*)\. /cgi-bin/link-sql/browse.pl?do=detail&ID=$1 [L]
RewriteRule ^rate/(.*)\. /cgi-bin/link-sql/browse.pl?do=rate&ID=$1 [L]

RewriteRule ^$ /cgi-bin/link-sql/browse.pl [L]
RewriteRule ^index\. /cgi-bin/link-sql/browse.pl [L]
RewriteRule ^search\. /cgi-bin/link-sql/browse.pl?do=search [L]
RewriteRule ^popular\. /cgi-bin/link-sql/browse.pl?do=pop [L]
RewriteRule ^rating\. /cgi-bin/link-sql/browse.pl?do=top [L]
RewriteRule ^new/index\. /cgi-bin/link-sql/browse.pl?do=new [L]
RewriteRule ^new/(.*)\. /cgi-bin/link-sql/browse.pl?do=new&date=$1 [L]
RewriteRule ^subscribe\. /cgi-bin/link-sql/browse.pl?do=subscribe [L]
RewriteRule ^add\. /cgi-bin/link-sql/browse.pl?do=add [L]
RewriteRule ^Top/(.*)/page(.*)\. /cgi-bin/link-sql/browse.pl?cat=$1&page=$2 [L]
RewriteRule ^Top/(.*)/ /cgi-bin/link-sql/browse.pl?cat=$1 [L]
Upload the file 'htaccess.txt' to the main directory where the pages are created and rename the file to .htaccess.

After that you need to edit the '/admin/main.cfg' file and look for the follow lines.
# --------------------------------------------
# Configuration for the dynamic page creation.
# This is only used by the browse.pl script.
# --------------------------------------------

# Build the pages by the browse.pl '1' script
# or create the pages by the build.pl '0' script
  $config{'useBrowse'} = '1';

# Build the pages Dynamic '1' or static '0' for the use of browse.pl
  $config{'buildDynamic'} = '0';

# When you build the pages static for the use of browse.pl and MOD_REWITE. What
# is the name of the directory that comes in front of the category directory.
# $config{'useBrowse'} need to be '1' and $config{'buildDynamic'} need to be '0';
  $config{'preDirectory'} = 'Top';
Change the follow lines to:
  $config{'useBrowse'} = '1';
  $config{'buildDynamic'} = '0';
  $config{'preDirectory'} = 'Top';
And upload the file to your webserver.

top
Copyright Information

Copyright © 2000. Henk Boonstra. All Rights Reserved.

This script Link SQL is a professional release.

Selling the code for this program, or a program derived from Link SQL, without prior written consent is expressly forbidden. Similarly, redistributing this program, or a program derived from Link SQL, over the Internet, CD-Rom or any other medium is expressly forbidden without prior written consent. By using this program you agree to conditions above.


top
Warranty Disclaimer

THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY WARRANTY. WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.


Search

Tools Online SEO Tools

» Keyword Ranking
» Link Popularity Check
» Search Engine Saturation
» Meta Tag Analyzer

New Programs

» Membership Management
» Membership Management SQL
» Link Directory
» Link Directory SQL

New SEO Programs

» Meta Tag Analyzer
» Link Popularity
» Search Engine Saturation

New Free Programs

» Download Tracker
» Page Guard Pro
» Server Info

Tutorials Tutorials

» Link Popularity tutorial
» Module Rewrite guide
» Htaccess guide
» Install a CGI script

Related Links Related Links

» Business Blogs
» Hosting Resources
» SEO News
» SEO Tools