ReadMe File for WebLinks #################################################################### # # # WebLinks - An Add-On Facility of BizDB Web Database System # # # #################################################################### # # E-mail: cnctek@cnctek.com # # MINIMUM SERVER REQUIREMENTS: # # Runs on any Unix, Linux or Windows NT/98/XP Operating System; # Provides full FTP access (or access via a Control Panel); # Supports Perl and cgi-bin; Needs BizDB already installed. # # # COPYRIGHT NOTICE # WebLinks is a product of CNC Technology. All rights reserved. # Only the user with our permission can use and modify this software. # Also permission is granted to execute this software on one domain name # only. Without CNC Technology's permission, no part of this script can be # reproduced ( other than the backup copy ), resold or redistributed to # any other individuals, companies and organizations. # # DISCLAIMER: # # All software and templates are provided on a "As Is" basis. CNC # Technology will not be liable ( nor responsible ) whatsoever for # any direct or indirect damages caused by the use of this Software # ( or Scripts ). # ################################################################## Please read the following paragraphs carefully. This is essential if you want to have a smooth and successful installation. IMPORTANT NOTE: WebLinks is an add-on facility of our popular BizDB Web database software. It works well on all versions of BizDB. Before installing and using this software, you must have a copy of BizDB successfully installed on your server. Your BizDB should be able to allow you to add, update and search database records. This is essential as WebLinks will use the information in your BizDB database file(s) to create the directories, subdirectories, member links and member profile pages. ################################################################## TABLE OF CONTENTS: A. Contents in our ZIP file B. How Good is "WebLinks" For You C. System Configuration Parameters D. How to setup "WebLinks" Templates E. How to setup FORM statements in "build-links.html" F. How to setup categories and subcategories in BizDB G. Installation Notes H. Supporting Multiple BizDB Database Files ################################################################## A. Contents in our ZIP file After decompressing the ZIP file by WinZIP/Win 95/98/2000, you should find the following files: (1) weblinks.cgi - CGI script used for extracting the (program) necessary information from the BizDB database file(s). With such information, weblinks.cgi will build the directories, subdirectories, member links and member profile pages. (2) build-links.html - This is the only Web-based interface for the Webmaster to start and pass control parameters to the "weblinks.cgi" program. (3) categories-page.tmpl - The sample Html template used for building (template) the top level directory page, i.e. the very first page containing the root categories detected from the specified BizDB database. (4) subcategories-page.tmpl - The sample Html template used for building (template) the second and lower level directory pages, i.e. pages containing all the subcategories and member links detected from the specified BizDB database. (5) member-page.tmpl - The sample Html template used for building (template) the member profile pages (very similar to the detail report page generated by the BizDB software). The webmaster uses this template to define which fields in the BizDB database record are to be displayed, and in what layouts, in the member profile page. (6) category_bullet.gif - This is a "little bullet" image stored in the "images" directory. WebLinks will automatically insert this "little bullet" image in front of each category / subcategory link generated in the directory pages. (7) weblinks-readme.txt - It's this document. (8) weblinks-to-support-multiple-database-files.txt - This document contains the procedures to use WebLinks to support multiple "BizDB" database files. B. How Good is "WebLinks" For You 1. WebLinks is a separately priced add-on feature of our popular BizDB Web database and search engine software developed for small and medium sized websites. Before ordering WebLinks, please make sure you have a licensed copy of BizDB installed on your site. WebLinks works smoothly with all versions of BizDB. 2. WebLinks is simple to install. It allows you to build easily navigated (Yahoo style) directory pages based on the category structure defined in your BizDB database. WebLinks supports unlimited number of categories and subcategories. You can setup multiple levels of subcategories within each category. 3. All directory and member profile pages generated by WebLinks are permanent pages. Their URLs will be accepted by all search engines and directory oriented websites. For some search engines, when you submit the URL of the very top level directory page, their software will automatically find out the URLs of all other directory and member pages linked to the directory and register them for you. WebLinks will be your excellent online marketing and hit-rate enhancement tool. 4. WebLinks has a very convenient and effective navigation structure (similar to those used in Yahoo, Lycos, LookSmart, etc.) built into each of the directory and member profile pages. All these pages are closely linked. The page load-time is extremely fast, without using much CPU power on your server. Visitors can switch pages easily from one category (or subcategory) to another within just a few clicks. 5. Like BizDB, WebLinks works on Html templates. You could use your own Html codes for page headers, footers, banners, graphics, navigation bars, etc. in your categories, subcategories and member page templates. As a result you can advertise rotational banners on your directory pages. The theme of your Website can be easily kept consistent throughout the directory pages. 6. WebLinks is designed as an offline utility. You can execute the software at non-peak hours, say every Sunday night, so that the user response times will not be affected. (Note: During software execution, the online database is temporarily locked from new additions and updates. At the completion of execution, all categories, subcategories, member links and member profile pages will be re-generated.) 7. Each order comes with a detailed installation and users guide. If you have successfully installed our BizDB software before, we are confident that you can install this software within 1 or 2 days. 8. If you have any questions, please visit our demo site located at http://www.cnctek.com/weblinks/about_weblinks.html C. System Configuration Parameters: Please make sure you have the following parameters in the "weblinks.cgi" program properly configured before uploading it to the CGI-BIN directory. Parameter Name Description (1) $superpwd Supervisor Password. The Webmaster must enter this password (case sensitive) to the "build-links.html" screen in order to get the "weblinks.cgi" program executed. (2) $template_dir Full pathname of the directory in which all WebLinks Html templates are stored. (3) $database_dir Full pathname of the directory in which the BizDB database files are stored. (4) $pages_dir Full pathname of the directory used to store all Web pages generated by the WebLinks software (including categories, subcategories and member profile pages). (5) $pages_directory_url Full URL of the directory used to store all Web pages generated by the WebLinks software (including categories, subcategories and member profile pages). (6) $page_extn File extension of all page files (including categories, subcategories and member profile pages) generated by the ebLinks software. Valid file extensions are ".htm", ".html" and ".shtml". Some servers require the file extension to be ".shtml" if you want to execute Server Side Include (SSI) commands in the generated pages. (7) $delete_old_files_before_create If you want to delete all current categories, subcategories and member profile pages before generating a new set, then set this parameter to "yes". Otherwise, set it to "". (8) $max_items_per_page Maximum number of member links to be displayed per screen. Each link is generated from a located BizDB record. (9) $category_bullet_url Url of the "little bullet" image. WebLinks will automatically insert this "little bullet" image in front of each category / subcategory link generated in the directory pages. (10) $return_url Return URL link used by OK and error messages. (11) @valid These are the urls (separated by comma) that are allowed to execute this WebLinks program. ################################################ * * * Parameters (12,13) are to be used together * * * (12) $days_for_new_entries If the BizDB record was just submitted in the last so many days, the new.gif or new.jpg image will be displayed. (13) $new_image Url of the "new.gif" or "new.jpg" image. This image is used to indicate that the record is a new one. ############################################# (14) @inhtml_array Your setting here must be exactly the same as that configured in your "bizdb-aed.cgi" script. If you can't find this parameter in your "bizdb-aed.cgi" script, then set this paremeter to "". ############################################# (15) $expiryDate_fld If used, this variable will ensure that all expired records in the BizDB database will be skipped from processing. If the "login_ctl" variable in your "bizdb-aed.cgi" script is set to "yes", we suggest that you check and setup the following "$expiryDate_fld" properly. The "$expiryDate_fld" variable defines which field number in the database will store the record expiry date. Set this to f20 if field number 20 is used to store the expiry date. Set this variable to "" if there is no need to check the record expiry date. If used, the setting here must be identical to that used in the "bizdb-aed.cgi" script. ############################################# * * * Parameters (16,17) are to be used together * * * All fields in the record are delimited by the character(s) defined by the parameter $delimitor. (16) $delimitor Your setting here must be exactly the same as that configured in your "bizdb-aed.cgi" script. (17) $uid_pwd_sep Used in field-1 (f1) for separating the Record ID from password. Your setting here must be exactly the same as that configured in your "bizdb-aed.cgi" script. ############################################# (18) $charset Define the character set to be used by the software and Html templates. This is required for supporting foreign languages. (See BizDB readme.txt) D. How to setup "WebLinks" Templates (1) categories_page.tmpl - The sample Html template used for building the top level directory page, i.e. the very first page containing the root categories detected from the specified BizDB database. The structure of this sample template is as follows: ......... Your own html codes ... ......... ...... Your own html codes ... ...... ...... Your own html codes ... ...... NOTE 1: The is a required system control tag. You must copy this entire tag to your template as it is shown here. Weblinks will replace this whole string by a table html containing labels and hyperlinks of all top level categories. (2) subcategories_page.tmpl - The sample Html template used for building the second and lower level directory pages, i.e. pages containing all the subcategories and member links detected from the specified BizDB database. The structure of this sample template is as follows: ......... Your own html codes ... ......... ...... Your own html codes ... ......

...... Your own html codes ... ...... NOTE 1: The is a required system control tag. You must copy this entire tag to your template as it is shown here. Weblinks will replace this whole string by a html codes containing labels and hyperlinks to the higher level categories. NOTE 2: The is a required system control tag. You must copy this entire tag to your template as it is shown here. Weblinks will replace this whole string by a table html containing labels and hyperlinks of the next level of categories originated from the category you are currently in. NOTE 3: The is a required system control tag. You must copy this entire tag to your template as it is shown here. Weblinks will replace this whole string by a table html containing labels and hyperlinks of all member links identified under the category you are currently in. (3) member_page.tmpl - The sample Html template used for building the member profile pages (very similar to the detail report page generated by the BizDB software). The webmaster uses this template to define which fields in the BizDB database record are to be displayed, and in what layouts, in the member profile page. The structure of this sample template is as follows: ......... Your own html codes ... ......... ...... Your own html codes ... ......

Title: **f6**  
 
Name:**f6**  
Category:**f7**  
Description:**f8**  
Address:**f9**  
Country:**f10**  
Phone:**f11**  
Fax:**f12**  

...... Your own html codes ... ...... NOTE 1: The is an optional system control tag If used, you must copy this entire tag to your template as it is shown here. Weblinks will replace this whole string by html codes containing labels and hyperlinks to the higher level categories. NOTE 2: The CGI program will search for any occurrence of **xxx** in this template and replace it by its actual value. where **xxx** can be one of the followings: **dbname** - will be displayed as the database name used, **key** - will be displayed as a record key, **pwd** - will be displayed as the password of the database record currently handled, **f1** - will be replaced by the value of the 1st field of the database record currently handled, **f2** - will be replaced by the value of the 2nd field of the database record currently handled, **f??** - will be replaced by the value of the ??th field of the database record currently handled. **bgcolor** - See Note 3 below. NOTE 3: The bgcolor="**bgcolor**" clause included in the statement above is an optional feature which is very useful to control the background colors of the database items displayed on the member links report. If you use it, you must make sure that you have assigned a proper value to the $bgcolor0 and $bgcolor1 parameters, both of which are defined in the "weblinks.cgi" script. (You can also use your own bgcolor clause eg. .) * * * * * * * * * * * * * * * * * * * * DISPLAYING OR FLAGGING NEW ENTRIES <<< If you want to display a "New" image in those member pages whose database records were created less than "xx" days old, you may insert the command line into a proper location in the "member_page.tmpl" template as demonstrated in the example above. * * * * * * * * * * * * * * * * * * * * * * * * AVOID BROKEN LINKS FOR IMAGE AND URL FIELDS <<< If you do not want broken links for URL, E-mail address or Image, you could use the command line pair to bracket the line(s) containing the URL ( or E-mail or Image ) fieldname "f??". If f?? is empty, the html statements bracketed by the "check-display" command lines will be treated as comments, otherwise the "check-display" command lines will be removed. E. How to setup FORM statements in "build-links.html" "build-links.html" is the only Web-based interface for the Webmaster to start and pass control parameters to the "weblinks.cgi" program.

--> Required --> This statement is to call the "weblinks.cgi" script. Adjust the URL to refer to the correct location in your server. --> Required --> This statement is to define the filename of the BizDB database to be processed by WebLinks. --> If you have multiple database files of the same field definitions, you can replace this statement by a drop-down-list (). *** This requires some minor software customizations. *** *** For details, please read Section H: *** *** - Supporting Multiple BizDB Database Files *** --> Optional but preferred --> This statement tells WebLinks which of the fields in the database contain externally reference URLs . "WebLinks" will insert an "http://" prefix to these Urls when they are displayed on the generated Web pages. --> Optional --> This statement tells WebLinks which type of record status is to be processed. If "active", only "active" records are extracted from the database. If "" (or absent), all records are extracted from the database. --> Required only if your database contains multiple selection drop-down list fields --> This statement tells WebLinks which of the database fields are "Multiple Selection Drop-Down List Fields". These fields are setup in the BizDB "Add Record" and "Edit Record" html templates. --> Required --> This statement tells WebLinks the filename of the Html template used for the generation of the top level directory page, i.e. the very first page containing the root categories detected from the specified BizDB database. --> Required --> This statement tells WebLinks the filename of the Html template used for the generation of the second and lower level directory pages, i.e. pages containing all the subcategories and member links detected from the specified BizDB database --> Required --> This statement tells WebLinks the filename of the Html template used for building the member profile pages (very similar to the detail report page generated by the BizDB software). The webmaster uses this template to define which fields in the BizDB database record are to be displayed, and in what layouts, in the member profile page. --> Required --> This statement tells WebLinks which field number in the BizDB database containing the category/subcategory information. --> Required --> This statement tells WebLinks which field number in the BizDB database containing the item/member link title information. --> Example: f6 stores the company name. --> Optional --> This statement tells WebLinks which field number in the BizDB database containing the description of the item/member link. --> Example: f8 stores the business description. --> Required --> This statement tells WebLinks to start building directory and member profile pages. --> Optional --> Defines the background color of the categories and subcategories tables generated by WebLinks. --> Optional --> Defines the font size of the categories, subcategories and member links tables generated by WebLinks. --> Optional --> Defines the font face of the categories, subcategories and member links tables generated by WebLinks. --> You must provide this field to allow the Webmaster to enter his supervisor password. Without a valid password, the request will be rejected. --> The Request submit button. Required
--> Required F. How to setup categories and subcategories in BizDB Category and subcategory names are defined in the "Add New Record", "Update Current Record", and "Search Records" templates of your BizDB system. In a native BizDB database, you may or may not have a field containing the category information of the database records. However if you are using WebLinks, you MUST have 1 database field defined for storing the category/subcategory information. The field number used for storing this information is up to you, as far as it is greater than f5. When defining the category and subcategory names, you must comply with the following formats: ... OR ... ... OR ... where 'category' = category name ' > ' = delimitor [note: there is a space before and after the > ] [ use > instead of the keyboard > character] 'subcategory' = subcategory name Example: You can define as many levels of categories and subcategories as you like. You may also have databases containing categories without subcategories. Example: G. Installation Notes: 1. Configure and copy "weblinks.cgi" to the cgi-bin directory. Make sure the Perl pathname (1st line of the cgi script) is correct. Also make sure the file access permissions of this script are set to 0755 ( Unix command to set modes: chmod 0755 weblinks.cgi ). Please also refer to Section C. 2. Configure and copy all template files to the template directory defined by $template_dir in weblinks.cgi. Make sure all the URLs used in the templates are correct. Avoid using ... or ... or or . Always use: ... or to make the URLs relative to your domain's home directory. 3. Copy the "category_bullet.gif" image file to an image directory on your server. Make sure the $category_bullet_url paremeter in "weblinks.cgi" is properly configured to point to this image file. 4. Configure and copy the "build-links.html" page to a secure Web directory so that no people could access your control page. We recommend that you setup "userid/password" protection to this directory. 5. At this stage you can start testing the software by calling up the "build-links.html" on the screen of your browser. Enter your supervisor password and the press the "Start Building" button. If everything is normal, the software will tell you how many pages have been built. IMPORTANT: The filename of the top level categories page is always called "i$home$dbname.html" (or "i$home$dbname.shtml") where dbname will be replaced by the BizDB database filename specified by you. You will find this file in the directory defined by the $pages_dir variable in the "weblinks.cgi" script. H. Supporting Multiple BizDB Database Files Recommended if you have a very large number of web pages to support and generate. In this case each database file will be used to store only one major category of records. 1. Customize your "weblinks.cgi" script file as follows: - backup your current "weblinks.cgi" script file. - locate for all lines containing the string "$parent_links_string =" and then replace the string "i\$home\$$dbname" on that line by "i\$home" using a text editor, eg. wordpad. Example: $parent_links_string = "You are here: Top \> "; will be changed to: $parent_links_string = "You are here: Top \> "; - configure and install this customized "weblinks.cgi" script. 2. Split the database into multiple files using the top level categories, eg business, internet, real estates, etc.. Use "business", "internet", "real estates" as the "dbname" filenames. 3. Reserve "f7" (example only) of each of the database as the category / subcategory field, so that its format can be recognized by "WebLinks" to generate the directory web pages. Example 1: In the "add record" and "edit record" template for the "business" file, you have the following html codes Example 2: In the "add record" and "edit record" template for the "internet" file, you have the following html codes 4. Each of the database files (defined by "dbname") generated by "BizDB Advance" must be run by "WebLinks" separately to generate the necessary directory and member pages. Example: For the "business" database file, "WebLinks" will generate the following directory pages: - i$home$business.html - list all the top (home) level categories (in this case, only "business") - i$business$business.html - list the next level categories of "business" - i$business-accountants$business.html - list the next level categories of "business-accountants" - i$business-accountants-financial$business.html - i$business-contractors$business.html - i$business-consultants$business.html - i$business-lawyers$business.html - i$business-lawyers-properties$business.html 5. If you have 3 database files, you will have the following top level directory pages generated by "WebLinks": - i$home$business.html - list all the top (home) level categories (in this case, only "business") - i$home$internet.html - list all the top (home) level categories (in this case, only "internet") - i$home$real-estates.html - list all the top (home) level categories (in this case, only "real-estates") Each of these pages will contain links to the lower level category pages. 6. Now setup a top level directory page (eg. i$home.html) manually yourself with links pointing directly to the following pages - i$business$business.html - list the next level categories of "business" - i$internet$internet.html - list the next level categories of "internet" - i$real-estates$real-estates.html - list the next level categories of "real estates" *** If you have 20 database files, you must setup 20 links. *** The following pages generated by the "WebLinks" can be ignored: - i$home$business.html - list all the top (home) level categories (in this case, only "business") - i$home$internet.html - list all the top (home) level categories (in this case, only "internet") - i$home$real-estates.html - list all the top (home) level categories (in this case, only "real-estates") -------------------------------------------------------------------------- Now you are ready to run your "WebLinks" program. Good Luck! Best regards, Webmaster CNC Technology Web Site Design, Hosting and Marketing Services