Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Multiple Categories(How?)

(Page 1 of 2)
> >
Quote Reply
Multiple Categories(How?)
GLINKS 3.01

Can anyone tell me how to let users add links to multiple categories, and how to limit how many categories they can add there link in if possible?


Thanks,
Rascal
Quote Reply
Re: [rascal] Multiple Categories(How?) In reply to
Here is a perfect example of support from GT, NEVERED ANSWERED THIS POST, as well as several other posts by users in this forum.

Fact:

If you purchase any of there products and need help or you just want an answer to a question you may have to wait for days or your post will be ignored all together.


GT, you must never forget who puts the food on your table. If you don't want to monitor the forums and answer posts, consider hiring Andy or Pugdog to monitor the forums and answer questions.
Quote Reply
Re: [rascal] Multiple Categories(How?) In reply to
Sorry about the late reply, but I don't monitor this forum as closely as the Gossamer Links Discussion forum. We try spending as much time as we can answering posts on the forum, but we sometimes get bogged down with other projects and product development. If you don't get a response, bump your thread up, or try e-mailing support.

To answer your question, it's easy to let users add links to multiple categories with Gossamer Links 3.x (a little more work in 2.x). All you need to do, is edit your include_form.html and change:
Code:
<select id="CatLinks.CategoryID" name="CatLinks.CategoryID">
to
Code:
<select id="CatLinks.CategoryID" name="CatLinks.CategoryID" multiple="multiple" size="5">
And also make sure you have the db_gen_category_list turned on. Note that it won't work too well if you have a lot of categories since the generated html will be very large. Also not that payments are not supported when allowing your users to insert links into multiple categories.

As to limiting the number of categories - that is not possible to do with the default program, but you can write a plugin to hook into user_add_link to perform a check before the link is added.

Adrian
Quote Reply
Re: [brewt] Multiple Categories(How?) In reply to
Also not that payments are not supported when allowing your users to insert links into multiple categories.

Does this mean you can still take 1 x payment for the link but not multiply it for multiple category entries. Or does it mean the payment system won't work?
Quote Reply
Re: [brewt] Multiple Categories(How?) In reply to
Quote:
Also note that payments are not supported when allowing your users to insert links into multiple categories.
I don't really understand why payment is not supported in this case.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [Alba] Multiple Categories(How?) In reply to
Quote:
Does this mean you can still take 1 x payment for the link but not multiply it for multiple category entries. Or does it mean the payment system won't work?

I believe it just doesn't support the charges for multiple categories.

i.e if someone submits a link in 3 categories, they will still only be charged for 1 category (rather than 3 x the standard rate for 1 category).

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Multiple Categories(How?) In reply to
Quote:
i.e if someone submits a link in 3 categories, they will still only be charged for 1 category (rather than 3 x the standard rate for 1 category).
Hopefully means this.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Multiple Categories(How?) In reply to
Great, that would be fine for what I am looking at.
Quote Reply
Re: [webmaster33] Multiple Categories(How?) In reply to
Yes, that's the case; however, which category that gets chosen for the payment amount is somewhat random (well whichever $IN->param() returns first). So if you have categories which do not require payment, and one of them is chosen, then the user may be able to add the links without payment if $IN->param() returns that category as the first one.

If you have a payment-is-required site and don't want to charge per category the link is in, then allowing multiple category inserts should work fine for you.

Adrian
Quote Reply
Re: [brewt] Multiple Categories(How?) In reply to
Ok I am a little slow on how to do this. I went to the include-form page and replaced the code below. But I still get the same result. I have the ajax db gen to yes. Is there anything else I need to do here? I still only see an opportunity to select on category. Or is there a way to select more than by holding the shift button or something like that? Not sure what I am suppose to be seeing after I changed the line of code.

Thanks.
Quote Reply
Re: [brewt] Multiple Categories(How?) In reply to
brewt wrote:
To answer your question, it's easy to let users add links to multiple categories with Gossamer Links 3.x (a little more work in 2.x). All you need to do, is edit your include_form.html and change:
Code:
<select id="CatLinks.CategoryID" name="CatLinks.CategoryID">

to
Code:
<select id="CatLinks.CategoryID" name="CatLinks.CategoryID" multiple="multiple" size="5">

And also make sure you have the db_gen_category_list turned on.
Hi, I've made the template change and db_gen_category_list is set to Yes (AJAX). However, like the previous poster I'm not understanding how to select multiple categories when I add a link, for instance!

(I'll post a support ticket if needed but thought I'd try the wisdom of the forum first...)

Thanks,
Terri Z


Terri Zwierzynski

Resources for the Solo Entrepreneur Lifestyle
http://www.solo-e.com -- "...because it's not just about the business!"
Quote Reply
Re: [terriz] Multiple Categories(How?) In reply to
Hi,

AFAIK, you can't do multiple category selections form a user add form (only from the admin panel)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Multiple Categories(How?) In reply to
That was fast! Smile

From the glinks=3.1.0 manual (emphasis is mine):
Quote:
Improved support for adding links to multiple categories: By changing the html select element to allow multiple selections, you can easily allow users to select multiple categories to add their links to. The templates and e-mail templates have been updated to handle the multiple templates properly.

However, I cannot find multiple categories referenced anywhere else in the manual Tongue

Hmmmm...
Terri


Terri Zwierzynski

Resources for the Solo Entrepreneur Lifestyle
http://www.solo-e.com -- "...because it's not just about the business!"
Quote Reply
Re: [terriz] Multiple Categories(How?) In reply to
Hi,

Quote:
That was fast! Smile

=)

Quote:
However, I cannot find multiple categories referenced anywhere else in the manual Tongue

Mmm.. AFAIK, all you can do in GLinks 3.2 is set multiple categories in the ADMIN AREA (by clicking "done" when you have selected a category, and then choosing another category, etc)

Hope that helps - I'm off to bed now =)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [terriz] Multiple Categories(How?) In reply to
If you open up the include_form.html template and search for "selectionMode", uncomment that bit of javascript (ie. remove the <%-- and --%>). That will allow you select more than one category.

Adrian
Quote Reply
Re: [brewt] Multiple Categories(How?) In reply to
Hi Adrian,

Thanks so much! I see how it works now...you choose the first category, click done, and then an "add" link appears that lets you choose a second category, etc.

Excellent!
Terri Z


Terri Zwierzynski

Resources for the Solo Entrepreneur Lifestyle
http://www.solo-e.com -- "...because it's not just about the business!"
Quote Reply
Re: [terriz] Multiple Categories(How?) In reply to
Sorry to bring this thread up again....

Where would I translate the ajax words?

Thanks,

Juan Carlos
Quote Reply
Re: [Gorospe] Multiple Categories(How?) In reply to
What words?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Multiple Categories(How?) In reply to
When using 100% ajax category select, the following words appear:

[change] (asks me to start selecting a category in add.html)
[Done] [Cancel] (once Ive selected 1 category, it asks these two questions)
[Add] (If I wish to add a second or more categories).

Thanks Andy,

JC
Quote Reply
Re: [Gorospe] Multiple Categories(How?) In reply to
Hi,

Check out /static/tresscats.js, and find:

Code:
this.lang = {
noSelection : 'No category selected',
noSelectionLink : 'No link selected',
rootText : 'All Categories',
expand : 'Expand',
collapse : 'Collapse',
change : '[Change]',
remove : '[Remove]',
done : '[Done]',
cancel : '[Cancel]',
add : '[Add]',
loading : 'Loading',
duplicate : 'You have already selected this category.'
};

..that should do it :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Multiple Categories(How?) In reply to
Awesome Andy.

Thanks.
Quote Reply
Re: [Gorospe] Multiple Categories(How?) In reply to
You can modify those without changing the javascript file, by modifying the lang properties of the treecats object (tc.lang.foo = 'foo').

Adrian
Quote Reply
Re: [brewt] Multiple Categories(How?) In reply to
Well I was so happy that Andy told me where, that I just went and translated, but it didnt work... Its still in english.

And Brewt, that option seems great, but I dont have a clue on what youre talking about.
Could you tell me where that would be...

Thanks,
Quote Reply
Re: [Gorospe] Multiple Categories(How?) In reply to
Hi,

Took me even a while to work what Adrian said out =) (maybe cos its still just early morning Tongue)

Anyway, what he means - is that in include_form.html, find:

Code:
tc.load();

..and just before it, add:

Code:
tc.lang.noSelection = 'No category selected',
tc.lang.noSelectionLink = 'No link selected',
tc.lang.rootText = 'All Categories',
tc.lang.expand = 'Expand',
tc.lang.collapse = 'Collapse',
tc.lang.change = '[Change]',
tc.lang.remove = '[Remove]',
tc.lang.done = '[Done]',
tc.lang.cancel = '[Cancel]',
tc.lang.add = '[Add]',
tc.lang.loading = 'Loading',
tc.lang.duplicate = 'You have already selected this category.'

Then, just rename them in there (instead of the main .js file)

First time I've ever needed to change the wording on that, so appologies for not knowing that sooner Wink

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Multiple Categories(How?) In reply to
Hi, (Look I actually searched to try to find what I needed to do w00t )

I'm not charging anybody to list anything and as I've now found out for the stuff that we list (magic the gathering card decks), they can fall into multiple formats (format = category in links) and so I'd like to allow people to choose multiple categories.

I've gotten that far and people can now choose multiple categories.

However, what's to stop them from adding their deck to every single category in my system? I'm guessing that I need a way of limiting the amount of categories they can add their listing to. But as you know, my knowledge is limited to being just enough to get me in trouble. So help is greatly appreciated to limiting the amount of categories a listing can be added to.

Weston
> >