PowerSeek SQL Documentation >> 7. Static / Dynamic Directory PowerSeek SQL Manual Index
1. Installation
2. The basics in 20 minutes
3. Settings
4. The Directory Manager
5 . Front Page Setup
6 . Customization (Look & Feel)
7 . Static / Dynamic Directory
8 . The User Manager
9 . Maintenance
10. Premium Links
11. Plugins
12. How To's, Tips & Tricks

13. PowerSeek SQL Mobile Edition

<< Previous Page
Customization (Look & Feel).
Index Next Page >>
End User Functions.

7. How to run a static or dynamic directory

     7.1 How to run a static directory
          7.1.1 Generating the HTML files from the admin control panel
          7.1.2 Updating Changes to existing HTML files (Previously generated HTML files)
          7.1.3 Generating HTML files from Telnet or SSH
          7.1.4 Using cron to generate your HTML files on a scheduled basis
          7.1.5 Updating Changes to existing HTML files (Previously generated HTML files) From Telnet/SSH
          7.1.6 Using cron to update Changes to existing HTML files on a a scheduled basis
     7.2 How to run a dynamic directory
     7.3 How to run a dynamic directory with Mod_Rewrite

 

7.1 How to Run a Static Directory

A static directory is a directory where the whole directory structure is generated or published as files. The files generated are available as ordinary HTML files that your visitors browse. You will need to generate the HTML files of your Directory if you plan on running a static directory.

It is recommended that you run a static directory, due to performance reasons. Another reason why we recommend this is because your category/directory pages are static pages where the URL's of these pages are Search Engine friendly. This means that the Crawlers and Spiders (advanced or basic basic crawlers/spiders) of Search Engines will index your directory/category link pages, as there are no complicated CGI script URL's involved.

The disadvantage of a Static Directory is that you need to rebuild your Directory or parts of it to reflect any changes made to directories/categories and links. Note that there is an update function available to update changes so that you don't have to rebuild the entire Directory. You can update changes by going to the Control Panel >> To Do >> Generate HTML Files >> Update Generated HTML files

To run a Static Directory, make sure that PowerSeek SQL is set to run a Static Directory by going to the Control Panel. Then click the Settings tab. Now click 'Global Engine Settings'. A popup window will appear. Near the top of the window there will be text reading 'Are you going to run a static or dynamic directory?'. Set it so that you run a static directory.

You can generate the HTML files from the admin control panel or you may generate it from the Linux/Unix command prompt. You can also use the Unix Cron Program to generate HTML files on a scheduled basis.

7.1.1 Generating the HTML files from the Admin Control Panel.

You can generate your entire Directory’s files from the Admin Control Panel >> To Do >> Generate HTML Files >> Browser Based HTML Generation

7.1.2 Updating Changes to existing HTML files (Previously generated HTML files)

You don't always have to re-generate the entire Directory if changes has been made to links or directories/categories. To only update the changes that was made, go to the Admin Control Panel >> To Do >> Generate HTML Files >> Update Generated HTML files

Note:

The option to update generated files will only update in the following situations:

  • When links have been edited/moved/copied/deleted.

  • When links have been added manually by hand.

  • When links have been approved/edited/moved/copied from the New Submissions area.

  • When categories have been added/edited/renamed/moved or deleted.

You will want to re-generate everything in the following situations:

  • If you used any of the importers included with PowerSeek SQL to import links. (ODP importer/crawler/import utility)

  • If you used any third party application to import links into PowerSeek SQL

  • If you edited any PowerSeek SQL template or any aspect of any template including custom templates and template includes.

  • If you assigned custom templates to categories

  • If you changed banners that is to be rotated inside PowerSeek SQL templates

7.1.3 Generating the HTML files from Telnet or SSH

You can also generate your Directory from a Telnet or SSH session. To generate HTML file from Telnet/SSH, Telnet/SSH into your server/hosting-account. Go to the directory where generate.cgi resides in. generate.cgi is located in the ‘admin’ directory where the admin cgi script files resides.

From the Telnet/SSH command prompt, type in:
perl generate.cgi no_delete
or
perl generate.cgi delete

The delete or no_delete option does the following:

no_delete: When this option is used, then generate.cgi will only generate HTML files.

delete: When the delete option is used, all previously created directories and files that was generated will be removed. Use this option with caution because it will delete all sub directories in the ‘html’ directory. The ‘html’ directory is the directory where all generated HTML files are stored.

Generating your files from the unix command prompt will be much faster than from the browser because there are no browser limitations and connections from the browser to your Control Panel involved. Build speed increases could be up to a 1000% or more.

7.1.4 Using cron to generate your HTML files on a scheduled basis

You may use the Unix Cron program to rebuild/generate the HTML files on a daily or weekly schedule. You can configure the schedule with the Unix Cron program.

You will have to know how the Unix Cron program works. Note that you cannot just execute generate.cgi with the Unix Cron program. The reason for this is that generate.cgi needs the working directory to be the directory in which it resides.

To make the directory in which generate.cgi resides in, the working directory, you can create a Unix shell script, (Almost like a dos batch (.bat) file) that executes generate.cgi

The shell script should look something like this:

cd /home/yourdomain/www/cgi-bin/admin # Change to generate.cgi's working dir
perl generate.cgi no_delete # Execute generate.cgi

Note that a shell script is a normal text file that you create and upload to your web host or server. Also note that you will most likely need to assign executable permissions to it (the permission setting of 755)

IMPORTANT

Remember that when you use the CRON program that you will have to supply parameters to generate.cgi – The parameters required is delete or no_delete – See 7.1.2 for more on this.

7.1.5 Updating Changes to existing HTML files (Previously generated HTML files) From Telnet/SSH

You don't always have to re-generate the entire Directory if changes has been made to links or directories/categories. To only update the changes that was made via SSH/Telnet open a Telnet/SSH session. Go to the directory where update.cgi resides in. update.cgi is located in the ‘admin’ directory where the admin cgi script files resides.

From the Telnet/SSH command prompt, type in:
perl update.cgi

Generating changes from the Unix Command Prompt will be much faster than from the Browser because there are no Browser limitations and connections from the Browser to your Control Panel involved. Build speed increases could be up to a 1000% or more.

7.1.6 Using cron to update Changes to existing HTML files on a a scheduled basis

You may use the Unix Cron program to update changes to the HTML files on a daily or weekly schedule. You can configure the schedule with the Unix Cron program.

You will have to know how the Unix Cron program works. Note that you cannot just execute update.cgi with the Unix Cron program. The reason for this is that update.cgi needs the working directory to be the directory in which it resides.

To make the directory in which update.cgi resides in, the working directory, you can create a Unix shell script, (Almost like a dos batch (.bat) file) that executes update.cgi

The shell script should look something like this:

cd /home/yourdomain/www/cgi-bin/admin # Change to generate.cgi's working dir
perl update.cgi # Execute update.cgi

Note that a shell script is a normal text file that you create and upload to your web host or server. Also note that you will most likely need to assign executable permissions to it (permissions of 755)


Also See:
9.5 Generating HTML files
7. Running a static or dynamic directory


 

7.2 How to run a dynamic directory

If you would like to run a Dynamic Directory, then you don't have to build HTML files and all data displayed in your directory would be live. This means that all changes made to your Directory will be displayed in your Directory immediately after it has been made.

The disadvantage of running a dynamic directory is that it can be heavy on system resources if you have many thousands of links. Keeping the load on your web server as low as possible is always advised because it ensures faster load times of pages. Search Engines will also have difficulty in indexing your category/directory pages because they are called via cgi scripts.

To run a dynamic directory, make sure that PowerSeek SQL is set to run a Dynamic Directory by going to the Control Panel. Then click the Settings tab. Now click 'Global Engine Settings'. A popup window will appear. Near the top of the window there will be text reading 'Are you going to run a static or dynamic directory?'. Set it so that you run a dynamic directory.

 

 

7.3 How to run a dynamic directory with Mod_Rewrite

PowerSeek SQL additionally supports Mod_Rewrite. Mod_Rewrite allows the option of rewriting URLs. What this means is that URLs could look like static pages but they are in fact dynamic pages. When Mod_Rewrite is used with PowerSeek SQL the mode being used will still be dynamic but the URLs will look as if they are static so that they can be friendly to Search Engines. The primary advantage of using Mod_Rewrite is that you will run a Dynamic Directory but the URLs will be search engine friendly.

Requirements:

- To be able to use Mod_Rewrite with PowerSeek SQL your web hosting will need to be Linux based.
- Your web host will also need to support the use of .htaccess files.

How to implement:

Log into the PowerSeek SQL Control Panel.

Then click the 'Settings' tab.

Then click 'Global Engine Settings'

A popup window will appear.

Near the top you will see: Are you going to run a static or dynamic directory? - Set this option to 'Mod_Rewrite' and scroll down to the bottom of the window to save the setting.

After saving you will see instructions on what to do. Follow the instructions presented to you.

 

<< Previous Page
Customization (Look & Feel).
Index Next Page >>
End User Functions.
PowerSeek SQL Web Directory Software - Web Directory Script
Features | Demos | Examples | Download | Buy Now | Documentation | Affiliates | Support | Hosting | Contact Us | Login | Site Map
Pre-Sales Questions | Upgrade from Turbo Seek | Knowledge base | PowerSeek PPC Module
FocalMedia.Net