Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Modify Form

Quote Reply
Modify Form
Is there any way to have all the categories a link is in listed on the modify form but not allow the User to select/change any of the categores?
Quote Reply
Re: [rayhne] Modify Form In reply to
Yes.

You can add a tag which shows which category each link belongs to inside of the modify select loop.

<%loop link_results_loop%>
<%showcat,$ID%> <<<You need to write the global, see below

blah blah

<%endloop%>

In the modify_select.html template you can also use <%ID%> to return the ID of each link as it appears in the select loop.

There is an explaination of how to write a global to return the category for a particular link in the RESOURCE section under GLOBALS.


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] Modify Form In reply to
You mean this global?

http://www.gossamer-threads.com/...orum.cgi?post=152224
Quote Reply
Re: [rayhne] Modify Form In reply to
Yes


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [Ian] Modify Form In reply to
Thanks, Ian!!! You're a doll! :)
Quote Reply
Re: [Ian] Modify Form In reply to
I tried this a couple different ways, including putting this into the link.html (I'm trying to see if it'll list all the categories the link is in on the search_results.):

<%if query%>
<a class="mainfontb" target="_blank" href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>"><%Title%></a>
Category: <%link_category_id%>
<%else%>
<%loop link_results_loop%>
<%showcat,$ID%>
<a class="mainfontb" target="_blank" href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>"><%Title%></a>
<%endloop%>
<%endif%>

But all I get is a repeat of the category it originally comes up in. (all that globals seems to do is put the category in the link...I'd like all the categories that link belongs to to be listed)

Last edited by:

rayhne: Jul 23, 2002, 7:45 AM
Quote Reply
Re: [rayhne] Modify Form In reply to
If you set "db_gen_category_list" to "No", then this will be automatic.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Modify Form In reply to
In Reply To:
If you set "db_gen_category_list" to "No", then this will be automatic.


But does setting "db_gen_category_list" to no affect the admin area at all? Also, if you have that set to no, the User adding a site has to be in the category s/he wants the site added to, correct?

(Plus before I do that, I have to redesign my add/modify forms.)
Quote Reply
Re: [rayhne] Modify Form In reply to
Yes, you are completely right.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Modify Form In reply to
How does it affect the admin area? (I'd like to know before I do it so I don't freak.)
Quote Reply
Re: [rayhne] Modify Form In reply to
In "Database -> Links -> Add/Modify", you will have to enter the full path name yourself, there will be no select field.

You can still have it by hacking line 478 of Links/Link.pm, just put if (1) instead of if ($CFG->{...}) )Wink

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Modify Form In reply to
I just did a test of setting it to no but it only shows one category, even though the link is in several categories. I need it to list all the categories the link is in (on the modify form and, if possible, in the search_results)
Quote Reply
Re: [rayhne] Modify Form In reply to
OK, I have a modified module Links/User/Modify.pm, which I will send you by PM. It's tested a bit, but if you could test it even more, you're welcome....

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Modify Form In reply to
That seems to do it! Thanks!