Webmasters Resources
search: Advance Options
Home cgi, cgi script, free cgi script, free cgi, cgi form, perl cgi Subscribe What's New What's Cool Search Discussion Privacy

Home > Category Title Modification

Category Title Modification

This mod will allow you to specify a unique title for each category in your links v2.0 database.

The change is quite easy and only requires six simple steps.

Step 1
Back up your category.def, category.db, site_html_templates.pl, category.html and nph-build.cgi files.
Step 2
Modify your category.def file as follows:

Original Code:

            Header             => [6,  'alpha',     40,   75,  0,  '',          ''],
            Footer             => [7,  'alpha',     40,   75,  0,  '',          '']
	

New Code:

            Header             => [6,  'alpha',     40,   75,  0,  '',          ''],
            Footer             => [7,  'alpha',     40,   75,  0,  '',          ''],
            category_title     => [8,  'alpha',     40,  100,  0,  '',          '']
	
Step 3
Edit your category.db file with you favorite editor and add an extra "|" at the end of each line.
Step 4
Edit your site_html_templates.pl file and find the site_html_category subroutine.
Original Code:

          build_links_per_page => $build_links_per_page,
          %globals
	  

New Code:

          build_links_per_page => $build_links_per_page,
          %globals,
          category_title       => $category_title
	  
Step 5
Edit your nph-build.cgi file and find the build_category_pages subroutine.
Original Code:

	    local ($description, $related, $meta_name, $meta_keywords, $header, $footer, $next, $prev);
	  

New Code:

	    local ($description, $related, $meta_name, $meta_keywords, $header, $footer, $next, $prev, $category_title);
	  

And change the following:

Original Code:

	    ($description, $related, $meta_name, $meta_keywords, $header, $footer) = @{$category{$cat}}[2..7];
	  

New Code:

	    ($description, $related, $meta_name, $meta_keywords, $header, $footer, $category_title) = @{$category{$cat}}[2..8];
	  
Step 6
Finally, modify your category.html and include <%category_title%> in your title tag.

Now you can go to the Links admin web page and edit your categories. A new edit field called " category_title" will appear on category web pages. You must enter a category title for each category or that category will have no title. After you have finished editing your category titles, rebuild your website and check that everything worked.

 Search



Home | Subscribe | What's New | What's Cool | Search | Discussion | Privacy

copyright © 2000 FLFSoft, Inc., all rights reserved
If you have comments or questions about this site, contact our webmaster.