Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Add Site Methodology - Reconsideration

Quote Reply
Add Site Methodology - Reconsideration
Hi Alex,
I'm not trying to poke at you ... just a simple suggestion. When you go back into Links for the next revision, would you reconsider the way you allow Links to added.

Your great program has allowed most of us to build some very powerful link directories. And because of this the "Category/SubCategory List" for "add" is getting very, very long.

I saw this problem attacked from a different angle with another Links program. The programmer would require you to go the section (SubCategory) you wanted you Link placed into and then from there select "add" and the Link would be placed in that subcategory, no matter how deep it was. Thus actually not requiring 'any' "Category/SubCategory/Subcategory" list.

Thanks for considering,
Jeff

Quote Reply
Re: Add Site Methodology - Reconsideration In reply to
You can do this in Links now. There is a setting in link.cfg called $db_single_category. If that variable is set to 1, whichever category the user is in when they click Add will be where that link is added. The name of the Category will show up on the add form (so they know where they are putting their link) but no drop-down box.

Hope that helps.
Phoenix
Quote Reply
Re: Add Site Methodology - Reconsideration In reply to
Hi Phoenix,
WOW!! ... oh yes ... that is going to save me about 8 hours of work.

How would I display the Category in a custom template <%single_category%> ??? to show the person where they are about to add their listing to?

thanks again,
Jeff
Quote Reply
Re: Add Site Methodology - Reconsideration In reply to
you just have to use <%Category%>
and set the variable to 1.

Aaron

------------------
www.serve.com/garden/geosearcher



Quote Reply
Re: Add Site Methodology - Reconsideration In reply to
Thanks Aaron,

Do you if it is possible to remap the display for fields that have spaces and are displayed as New_York/New_York to look like New York/New York, when using <%category%> to display the location. Just a visual ... would not want to damage actual data.

thanks
Jeff
Quote Reply
Re: Add Site Methodology - Reconsideration In reply to
Anywhere on the category pages where you want the categories to display without the "/" or the "_" included, use <%category_clean%> (templates) or $category_clean (non-templates). That way, "New_York/New_York" will display as "New York New York".

I hope this helps.
Quote Reply
Re: Add Site Methodology - Reconsideration In reply to
Very nice feature...however, there is a problem. If someone clicks on "Add A Site" link that is not linked from a category or accesses the "add.cgi" file alone, the category field is grayed out.

For instance, if you visit:

www.anthrotech.com/cgibin/wwwvl/add.cgi

You will notice that the category field is grayed out.

Any solutions to this?

Also, remember that to use the <%category_clean%> code in the "add.html" template file, you must make an entry in the site_html_templates.pl file:

Code: (in the sub site_html_add_form and sub site_html_add_success)
--------------------------------------------
print &load_template ('add.html', {
Category => $category,
category_clean => $category_clean,
%globals
});
}
---------------------------------------------
If you do not put the bolded codes above, then you will receive an error message.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited June 14, 1999).]

[This message has been edited by Eliot (edited June 14, 1999).]
Quote Reply
Re: Add Site Methodology - Reconsideration In reply to
I wrote a better solution in the Links Modification forum. See the thread at http://www.gossamer-threads.com/...um3/HTML/001863.html