Gossamer Forum
Home : Products : Links 2.0 : Customization :

Another Header or Footer Field?

Quote Reply
Another Header or Footer Field?
Hi,

I want to make another header or footer field.

For example in the Links manager admin menu when you click on add new category you have the options of adding meta description and keywords and header and footer.

I want to add another second header section there in that menu and also place another <%header2%> in the category.html so when I choose to add something there I will be able to.

What do I need to do to make this possible?

Thanks
Ibrahim
Quote Reply
Re: Another Header or Footer Field? In reply to
Follow the instructions in the FAQ located in the Resource Center about adding a field to the links.def and links.db files...but instead use the category.def and categories.db files.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums


[This message has been edited by AnthroRules (edited April 02, 2000).]
Quote Reply
Re: Another Header or Footer Field? In reply to
Also, rather than adding a field to your category.def and categories.db files, the better solution is to use the Enhanced Template.pm codes located in the Resource Center that allows you include files in template files, like the following:

Code:
<%include menu.txt%>

And if you want to have different inserted files for different categories, then use the Multiple Category Template Mod located in the Resource Center.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.
Quote Reply
Re: Another Header or Footer Field? In reply to
I really wanted to make the same exact thing as the header as in the adim menu and recreate it and call it header2.

Will your first reply do what I need?
Quote Reply
Re: Another Header or Footer Field? In reply to
Yes.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.
Quote Reply
Re: Another Header or Footer Field? In reply to
Hi,

I did as you mentioned and went to the category.def file and changed the following remember i'm using the yahoo templates.

# Database Definition: CATEGORIES
# --------------------------------------------------------
# Definition of your database file.
# ***************************************** nonenglish modification - begin ****************
# %db_def = (
# ID => [0, 'numer', 5, 8, 1, '', ''],
# Name => [1, 'alpha', 40, 75, 1, '', '^[\w\d/_-]+$'],
# Description => [2, 'alpha', '40x3', 500, 0, '', ''],
# Related => [3, 'alpha', 0, 255, 0, '', ''],
# 'Meta Description' => [4, 'alpha', '40x4', 500, 0, '', ''],
# 'Meta Keywords' => [5, 'alpha', '40x4', 500, 0, '', ''],
# Header => [6, 'alpha', '40x4', 500, 0, '', ''],
# Footer => [7, 'alpha', '40x4', 500, 0, '', ''],
# Header2 => [9, 'alpha', '40x4', 500, 0, '', '']
# );
%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Name => [1, 'alpha', 40, 75, 1, '', '^[\w\d/_-]+$'],
Description => [2, 'alpha', '40x3', 500, 0, '', ''],
Related => [3, 'alpha', 0, 255, 0, '', ''],
'Meta Description' => [4, 'alpha', '40x4', 500, 0, '', ''],
'Meta Keywords' => [5, 'alpha', '40x4', 500, 0, '', ''],
Header => [6, 'alpha', '40x4', 500, 0, '', ''],
Footer => [7, 'alpha', '40x4', 500, 0, '', ''],
Nonenglish => [8, 'alpha', 40, 75, 0, '', ''],
Header2 => [9, 'alpha', '40x4', 500, 0, '', '']
);

Then I put the <%header2%> code in the category.html and built pages and it didnt work so I then went to the site_html_template.pl file and added:
header2 => $header2,
to the sub site_html_category section
asuming it might work

still no luck

I guess I need further help

Ibrahim

Quote Reply
Re: Another Header or Footer Field? In reply to
*sigh*

Did you do the following?

1) Add a new delimiter at the end of each of your records in the categories.db. Since you have added a field in your category.def file, you need to upgrade your existing database with the new field. READ the FAQ in the Resource Center about adding fields to your existing links.db file. In that FAQ, you will see a script to use to upgrade the links.db. Change the following values in that script:

links.def ---> category.def
links.db ---> categories.db
links2.db ---> categories2.db

Also, change the $total_field and $new_fields to your total number of fields and also the new field number.

2) Did you upload the correct header files into your templates directory and change the permission of these files to 666 (rw-rw-rw-)?

3) Did you input values into the Header2 field? Like the following:

Code:
header2.html

BTW: You should NOT define the header2 tag in the sub where you defined it. You do not need to define this tag AT ALL.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


[This message has been edited by AnthroRules (edited April 05, 2000).]
Quote Reply
Re: Another Header or Footer Field? In reply to
I saw that script but didnt understand which file I'm supposed to enter it into?
Quote Reply
Re: Another Header or Footer Field? In reply to
Uh...you don't insert it any file...It is a stand alone script that you save as something like upgrade.cgi. Then you upload the script to your server in your /data/ directory.

Then change the permission of the script to 755 (rwxr-xr-x). Then execute the script via your web browser or telnet.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.