Gossamer Forum
Home : Products : Links 2.0 : Customization :

Multiple Categories Mod v2 - How to add it to user forms?-Template Users

(Page 2 of 2)
> >
Quote Reply
Re: Multiple Categories Mod v2 - How to add it to user forms?-Template Users In reply to
Nope...that is NOT how the AltCategories should show up in your links.db file.

They should look like the following:

Code:
|Matérias-Primas/Indústrias~~Matérias-Primas/Indústrias/MDF~~Matérias-Primas/Lojas|

Follow my directions as written and DO NOT change any other codes as you've done!

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: Multiple Categories Mod v2 - How to add it to user forms?-Template Users In reply to
Ok Eliot ...

I will be crazy!!!

When I try to make only that you are saing ... nothing work ! The user goes to de add form and mark some altcats then I go to the admin validate and when I look to the AltCategories field there are not selected, this is the problem, can you understand me ???

Please help me

Thanks,

Marco Aurélio
Quote Reply
Re: Multiple Categories Mod v2 - How to add it to user forms?-Template Users In reply to
Yes...I can...And the problem is that you have not copied all the codes in this Forum to make it work...and you are editing additional codes that are messing up how the data is stored in your database, WHICH is causing you the problems of validating links with the correct AltCategories and also for users to add the AltCategories! I have followed ALL the steps in this Topic and I HAVE successfully got the Mod to work the way it should.

Good luck!

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: Multiple Categories Mod v2 - How to add it to user forms?-Template Users In reply to
This is undecipherable... Frown

I have made all the changes of the mod of ' Loopy', and later the changes of ' elms'

www.gossamer-threads.com/scripts/forum/resources/Forum3/HTML/000960.html

but I have some problems:

The field ' Altcategories' has added it at the end of the %db_def to avoid to carry out too many changes that affect to other files... Is that well, or can it generate some problem?

From my admin.cgi panel can see those ' AltCategories' when I make work ' modify link' or ' add link', but when I go to the page add.cgi (that reads add.html) appears me the following error:


Quote:
error building select field: no select fields specified in config for field ' AltCategories'!


Thank you for their help.

Carlos
Quote Reply
Re: Multiple Categories Mod v2 - How to add it to user forms?-Template Users In reply to
Code:
The field ' Altcategories' has added it at the end of the %db_def to avoid to carry out too many changes that affect to other files... Is that well, or can it generate some problem?

You need to also update your database with this new field...use the FAQ in the Resource Center for adding fields in your existing links.db file.

With regards to the unable to build select field, make sure that you copied all the codes that need to be placed in the sub build_select_fields routine in the db_utils.pl file.

Regards,

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


Quote Reply
Re: Multiple Categories Mod v2 - How to add it to user forms?-Template Users In reply to
Exact Eliot!, the error was in the sub build_select_field routine Wink

I had put:

Code:
if (! exists $db_select_fields{$column} && $column eq "AltCategories" && exists $db_select_fields{'Category'}) {
$db_select_fields{$db_cols[$db_alt_cat]} = $db_select_fields{'Mult-AltCategories'} = $db_select_fields{'Category'}}
elsif (! exists $db_select_fields{$column} && $column eq "AltCategories" && ! exists $db_select_fields{'Category'}) {
$db_select_fields{$db_cols[$db_alt_cat]} = $db_select_fields{'Mult-AltCategories'} = join (",", &category_list);}


}

but it should put

Code:
if (! exists $db_select_fields{$column} && $column eq "AltCategories" && exists $db_select_fields{'Category'}) {
$db_select_fields{$db_cols[$db_alt_cat]} = $db_select_fields{'Mult-AltCategories'} = $db_select_fields{'Category'}}
elsif (! exists $db_select_fields{$column} && $column eq "AltCategories" && ! exists $db_select_fields{'Category'}) {
$db_select_fields{$db_cols[$db_alt_cat]} = $db_select_fields{'Mult-AltCategories'} = join (",", &category_list);}


that is to say that it had displaced the key '}'

For that if it is not not that you that it can be, now works perfectly, but I have another little problem: Frown

When the page add appears.html when calling add.cgi from a category, no longer comes out the 'category' of the field category in text, but rather they leave all the categories in a menu, like when working with add.cgi from home.html, but have I seen that Anthrotech if that leaves this way, how is it made?

Thanks,

[This message has been edited by Nomada (edited April 17, 2000).]
Quote Reply
Re: Multiple Categories Mod v2 - How to add it to user forms?-Template Users In reply to
If I understand you correctly, you need to use the Category Select Mod (found in the Resource Center) and also make sure that you have set the following variable to 1:

Code:
$db_single_category = 1;

in the links.cfg file.

Regards,

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


Quote Reply
Re: Multiple Categories Mod v2 - How to add it to user forms?-Template Users In reply to
Thanks Eliot,

The problem is that the file links.cfg already has that activated option and before installing the Multiple Categories Mod it worked perfectly... : (

Code:
# Should your add.cgi automatically select what category the user
# is adding his link into?
$db_single_category = 1;

I don't understand so that I need the Category Select Mod, it is possible your you don't understand me, I want that category appears in text, not in menu...

Thanks again,
Quote Reply
Re: Multiple Categories Mod v2 - How to add it to user forms?-Template Users In reply to
 
Quote:
it is possible your you don't understand me...

LISTEN, I UNDERSTAND EXACTLY WHAT YOU WANT...AND I PROVIDED YOU WITH A SUGGESTION!

TAKE IT OR LEAVE IT!

Wink

Regards,


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


Quote Reply
Re: Multiple Categories Mod v2 - How to add it to user forms?-Template Users In reply to
Of course Eliot, and sorry for my curiosity (me only intent to understand for not to work for anything and to avoid incompatibilities with other mods) it can be that I'm something silly, but what I don't understand is so that it is good me a mod to exclude categories, when what I want is to only present the category is adding his link into with text format.


The mod Category Select List Mod objective:

Quote:
Once installed, the Links administrator can decide which categories to not allow users to add links under regardless of the category level. This is accomplished by simply adding category names to an array, @exclude_categories, which will be in links.cfg.

Thank you again,

Carlos
Quote Reply
Re: Multiple Categories Mod v2 - How to add it to user forms?-Template Users In reply to
I understand you...

Welp, I am using a combination of the Category Select Mod and configuring the $db_single_category to 1, and guess what? It works me...

I have provided you all the advice I have about this matter.

Best of luck with all your LINKS Projects.

Regards,

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


Quote Reply
Re: Multiple Categories Mod v2 - How to add it to user forms?-Template Users In reply to
Ok Eliot, Wink

Thanks you again. Smile
Quote Reply
Re: [elms] Multiple Categories Mod v2 - How to add it to user forms?-Template Users In reply to
Don't quite understand where these update codes go:

1. db_utils.pl

add this:

Code

if (! exists $db_.......

What sub and where?

after this in sub build_select_field:

Code

if (! exists $db_select...........

Ok it's the sub build_select but exactly where should it be added?

thanks,

jake

Last edited by:

awwa: Sep 28, 2003, 2:46 PM
Quote Reply
Re: [awwa] Multiple Categories Mod v2 - How to add it to user forms?-Template Users In reply to
Which mod are you trying to add? The Multiple Categories mod, or the Category Select List Mod? The code you posted is for the second one...


Leonard
aka PerlFlunkie
Post deleted by awwa In reply to

Last edited by:

awwa: Oct 11, 2003, 12:54 PM
> >