Gossamer Forum
Home : Products : Gossamer Links : Discussions :

<no subject>

Quote Reply
<no subject>
Hello all. I am still plodding through LinksSQl as a content Management tool. I'm getting ever so much closer. I have a question about adding a pull down list of urls - a "link to forum" pull down menu so that when our editors add a story, they can identify which area of the boards would be a good place to send people when they are done reading the story.

What I've done is this:

I added a column in Database -->links -->Properties
called it Forum

I am confused about the two choices at the bottom of the Add Coulm page:

1) Form Names
(Stored in Database)
Only for checkbox, multi-select or radio forms.

2) Form Values
(Displayed on Form)
Only for checkbox, multi-select or radio forms.

How do I use these two options to create a drop down list of potential URL's that are linked?

----------

At first, I thought I'd add a list to the include_form template of the drop down menu, but then realized that they would not be linked this way, and when I went to add the column, it became clear that i was approching this in the wrong way.

Advice and handholding welcome. :) I'm really trying to figure this out.



Quote Reply
Re: <no subject> In reply to
Hi,

The form names is what will be actually stored in the database. So I would enter a list of url's one per line:

http://www.site.com/gforum.cgi?forum=1
http://www.site.com/gforum.cgi?forum=2
http://www.site.com/gforum.cgi?forum=3
...

Then, for form values, you can use enter the same thing.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: <no subject> In reply to
Thanks Alex :)

More Questions:

1) How do I include this in the include_form template? Just use the name of the column <%Forum%> ?

2) For "form values" do I just list the actual names of the forums? Your directions seemed unclear. Or am I supposed to again list the URLs?

I'm sorry, my brain hurts trying to figure this out. But, It is looking way more like a Content Management tool every hour :)
Quote Reply
Re: <no subject> In reply to
Hi,

1. There isn't an easy way to auto-generate the select lists. You need to type it out like:

<select name="Forum>
<option<%if Forum eq 'option1'%> selected<%endif%>>option1
<option<%if Forum eq 'option2'%> selected<%endif%>>option2
<option<%if Forum eq 'option3'%> selected<%endif%>>option3
..
</select>

2. You put the same thing in both fields. This is only used for the admin and controls what is displayed. For instance, you could put:

#FFFFFF
#00000

as form names to store color codes in the database, but in the select box, you want easier things to remember so you would put:

white
black

in the form values. This means the admin would show 'black', but in the database it's stored as #000000.

Hope that helps,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: <no subject> In reply to
I am assuming in the option1
in your suggestion would correlate with the form values that were put into the column Forum?

In other words:

1) Form Names would be the complete url
2) Form Values would be the Forum Title (ie: LinksSQl Discussions, for example)
3) option1 in the example you gave would equal ---------?

Quote Reply
Re: <no subject> In reply to
Update:

I am able to get a link to show up at the bottom of each detailed page that links to my forums, but I'd like the actual link to read whatever the name of the forum is, rather than hyperlinking the entire url.

Form Names
the url of the forum

Form Values
the name of the forum as I'd like it to appear to the end user

I then call the column by using this
<%if Forum%>
<a href="<%Forum%>">
<%Forum%>
</a>
<%endif%>

How would I get the script to use the Form Value rather than Form Name?

(I still haven't figured out the submitting via "Add A Link" stuff, but I'll deal with that later.)

Thanks again.
Quote Reply
Re: <no subject> In reply to
Hi,

The form name and form values are only used in generating the select lists in the admin area only. Anything done on the user side has to be done manually.

So you would want to do:

Code:
<%if Forum%>
<%if Forum eq 'http://...'%>
<a href="<%Forum%>">Forum 1</a>
<elsif Forum eq 'http://...'%>
<a href="<%Forum%>">Forum 2</a>
...
<%endif%>
<%endif%>
Hope that makes sense,

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: <no subject> In reply to
Hmm. ok. But, this seems to be accomplished in Link.html template by hyperlinking the link to a url.

Just think there must be an easier way. :)

Quote Reply
Re: <no subject> In reply to
Hi,

Unfortunately generating the <select> Form is a little more complex. You need to add the value <option value="...">, and then what is displayed after that. On top of that you need to check if value == what was entered and add ' selected' to the option tag.

Not as easy I'm afraid.

Cheers,

Alex

--
Gossamer Threads Inc.