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

Multiple Categories(How?)

(Page 2 of 2)
> >
Quote Reply
Re: [Westin] Multiple Categories(How?) In reply to
Hi,

Mmm, the only way really to limit the number of categories they can submit to, is by making sure they havn't submitted to a ton of the categories when validating the links.

Could be done with a little plugin, but afraid I don't have time to look into that at the moment, sorry.

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
Okay,

While I don't "validate" submissions in the traditional sence (I see every submission since all new and modified submissions come to my email account for me to look over), I guess I can (will have to) rely on the people following my rules/guidelines where it says under the category list, "SELECT NO MORE THAN 3 CATEGORIES TO PLACE YOUR LISTING IN" and if they don't want to play by the rules, just go and delete the listing. At most it will be listed in all the categories for 1 to 8 hours tops.

I hope that GT is still listening if they are even working on a Links 4.0 for mass of suggestions that people have requested and needed special plugin coding to do it.

Last edited by:

Westin: May 20, 2009, 6:23 AM
Quote Reply
Re: [rascal] Multiple Categories(How?) In reply to
Hey Andy,

Maybe you can just tell me how to make it so that the first item in the category list shows as "Select Category" instead of showing the first actual category? Since I don't really want people submitting their listings to our "Articles" category and Articles being the first category in the list, chances are very high that people are listing in the Articles category by mistake instead of by choice. Seems it should be simple enough in a selection list to place a "Select Category" as the default selected item and if they try to sumbmit to the "select category" category I would think that Links would know that theres no such category and tell them to select a category instead of accepting the data, but even still if it doesn't, I'd accept that they get dumped in a non existant category if they chose "select category" as their chosen category.

I believe everything to do with the category list in the include_form template is :
Code:
<div class="row<%unless category_loop_selected%> required<%endunless%> clear">
<label for="CatLinks.CategoryID" class="name">Category:<%unless category_loop_selected%> <span>*</span><%if CatID == 75 or 78 or 79%><br>CHOOSE A SUBCATEGORY OF THE MEMBER PRICE LIST TO ADD YOUR SELL OR BUY LIST<%endif%><%endunless%></label>
<div class="value wrappedtext">
<%~if config.db_gen_category_list == 2%>
<script type="text/javascript" src="<%config.build_static_url%>/treecats.js"></script>
<%~set selected_cats = Links::Tools::category_list_selected%>
<%~loop selected_cats%>
<input type="hidden" name="CatLinks.CategoryID" value="<%escape_html ID%>" >
<%~endloop%>
<noscript>
<ul class="categories">
<%~loop selected_cats%>
<li><%Full_Name%></li>
<%~endloop%>
<%~if not selected_cats.length%>
<li><%Links::language('ADD_SELCAT')%></li>
<%~endif%>
</ul>
</noscript>
<div id="treecats"></div>
<script type="text/javascript">
var tc = new treecats({ <%-- selectionMode : 'multiple', --%> cgiURL : '<%config.db_cgi_url%>', imageURL : '<%config.build_static_url%>/<%t%>/images' });
tc.load();
</script>
<%~elsif category_loop_selected%>
<%~if category_loop.length > 1%>
<ul class="categories"><%loop category_loop%><li><%Full_Name%><input type="hidden" name="CatLinks.CategoryID" value="<%escape_html ID%>"></li><%endloop%></ul>
<%~else%>
<%loop category_loop%><%Full_Name%><input type="hidden" name="CatLinks.CategoryID" value="<%escape_html ID%>"><%endloop%>
<%~endif%>
<%~else%>
<select id="CatLinks.CategoryID" name="CatLinks.CategoryID" multiple="multiple" size="5">
<%~loop category_loop%>
<option value="<%escape_html ID%>"<%if selected%> selected="selected"<%endif%>><%'&nbsp;&nbsp;' x $CatDepth%><%Name%></option>
<%~endloop%>
</select><br><font color="red">CHOOSE <B>NO MORE THAN 3</B> FORMATS/CATEGORIES TO PLACE YOUR DECK LIST IN.</font>
<%~endif%>
</div></div>

Last edited by:

Westin: May 20, 2009, 6:29 AM
Quote Reply
Re: [Westin] Multiple Categories(How?) In reply to
Hi,

Sorry, I've not had that much luck working with the AJAX treecats stuff - still need to spend some time learning it (just need to find some time to do it :P)

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
Sorry, I use the dropdown selection so that was the one that I wanted to add the "select category" as the first item in the list. The ajax one I Don't use at this time.
Quote Reply
Re: [Westin] Multiple Categories(How?) In reply to
Untested, but try:

Code:
<select id="CatLinks.CategoryID" name="CatLinks.CategoryID" multiple="multiple" size="5">
<option value="" <%if not CatLinks.CategoryID%>selected="selected"<%endif%>>-- select --</option>
<%~loop category_loop%>
<option value="<%escape_html ID%>"<%if selected%> selected="selected"<%endif%>><%'&nbsp;&nbsp;' x $CatDepth%><%Name%></option>
<%~endloop%>
</select>

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
As usual, perfect!

Thanks,
> >