Gossamer Forum
Home : Products : DBMan : Customization :

MOD: DBMan/Links Integration - Help

Quote Reply
MOD: DBMan/Links Integration - Help
I installed the mod but in the view categories do not show. I get the following error when in the view:


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

This is what i have:

code:


# Select fields. Field name => 'comma seperated list of drop down options'.
%db_select_fields = (
isNew => 'Yes,No',
isPopular => 'Yes,No',
ReceiveMail => 'Yes,No'
);
# added Dbman/links2:
# Select fields. for dbman/links2 categories field.
$db_select_fields_category = 'Category';



Any ideas?

Thanks!!!
Adam
Quote Reply
Re: MOD: DBMan/Links Integration - Help In reply to
Thank you JP Smile

anr:
I am brain dead as to the category thingy... But maybe someone might help that is more in tuned to the programs. I have been away from them for a few months. However, If It comes to me as to what might help I will let you know.

As for the if/not question. You (and anyone else attempting these mods) would find it a BIG help (as I did) to look over the links side of the forum and do a search for the key words. If I recall there is a mod over there that goes into Template.cgi (I think or one of the programs anyway) that have to do with using if/not's in the templates.

To do these mods I actually did nothing but use the parts of the links modules that have to do with templates and just plugged them in where needed in the dbman programs.

Hope this helps.
timryan



[This message has been edited by timryan (edited April 02, 2000).]
Quote Reply
Re: MOD: DBMan/Links Integration - Help In reply to
The following codes:

Code:
$db_select_fields_category = 'Category';

Needs to be changed to the following:

Code:
$db_select_fields_category = (
Category => 'Cat1,Cat2,Cat3,Cat4'
);

TimRyan did not change the build subs in the db.cgi file. You have to manually add the categories as you do in the regular DBMAN.

Yes...it is possible to use if and ifnot statements in your template files.

Like the following:

Code:
<%if isNew%>
IMG CODES
<%endif%>
<%ifnot isNew%>
NO NEW CODES
<%endif%>

For the Yes and No checkbox fields, you will have to add the following codes in your sub html_record routine:

Code:
($rec{'isNew'} eq 'Yes') ? ($rec{'isNew'} = 1) : (delete $rec{'isNew'});

Hope this helps.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: MOD: DBMan/Links Integration - Help In reply to
Thanks once again Eliot!

I think last night when I was working on this I was just out of my mind. I tried the if statment but it didn't work. I just tried it again (same way which is excatly what you said and what I use in links) and it works!

The ifnot doesn't work though. That is part of the enhanced template support for links. I'll look at that one some other time.

As for the categories. I expected to have to just manually input them as you have mentioned... not a big deal really.

Thanks for the help once again!
Adam
Quote Reply
Re: MOD: DBMan/Links Integration - Help In reply to
The <%ifnot codes%> should work without installing the sub parse from the Enhanced Template.pm file.

But you can try to download those codes and insert them in your Template.pm that you are using with the DBMAN Templates.

Good luck!

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: MOD: DBMan/Links Integration - Help In reply to
I have another question. Is it possible to use (or add the ability to use) if and ifnot
statements?

Thanks!
Adam