Webmastersite.net
Register Log In

Item types configuration

Comments on Item types configuration

rbl
Member

Usergroup: Customer
Joined: Sep 27, 2004
Location: Portugal

Total Topics: 19
Total Comments: 39
rbl
Posted May 07, 2008 - 1:35 PM:

Hi!
Been wrapping my head around every doc in the manual but I still don't understand how can I create different item types for different categories.
What's described in the manual are just "cosmetic" changes and I need something way more complicated than that, with extra fields, different permissions, etc..
How and where can I edit which fields for each item type?

Thanks!
Ricardo
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted May 08, 2008 - 10:44 AM:

I don't see how types relate to categories. Are you sure you're not going about this the wrong way, trying to use item types to make things look different by category? If items should look different by category, using conditionals or custom category templates would be more appropriate. However, if you really want to control which item types can be submitted to which categories, you can edit the 'suggest item' template to replace
<select name="type">{ITEMTYPESELECTOR}</select>
with your own selector, like
<select name="type"><IF {CATID} is 1><option value="type1">type1</option></IF><IF {CATID} is 2><option value="type2">type2</option></IF></select>
.

How and where can I edit which fields for each item type?

This is an entirely different question, though you seem to imply that you think it's related. What fields apply to which item type is determined entirely by what you type in the template. If you don't want a field shown for a type, don't type the template variable for it. As for the submission page, you can link to a custom template over the submission page for each item type.
rbl
Member

Usergroup: Customer
Joined: Sep 27, 2004
Location: Portugal

Total Topics: 19
Total Comments: 39
rbl
Posted May 08, 2008 - 12:29 PM:

Thanks Paul! That will help!

You might be right, I'm still not very familiar with WSNC but let me see if I can explain a little better. Lets say I'm making a site for car dealers and I have two major categories: Companies and Cars.
On the Cars category, dealers will post ads with the cars they have on sale and for the sake of this example, lets say that the current template fields are enough for this. Each ad will be online for 2 weeks and renovated no more than 2 times. No problems here.

On the Companies category, dealers will post info about their companies, non-ad items where some of the current fields have no use at all (like price) and where many other fields are necessary. These items will not expiry for 365 days or maybe have no expiry date at all. Each dealer should be able to post no more than 1 ad in this category.

And to make things a little more complicated, lets say I only want to limit posting in these 2 categories to a certain usergroup (the car dealers).

Is that clearer now?

Ricardo
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted May 09, 2008 - 2:50 PM:

Are you sure dealer listings can't just be member profiles?

The dealers submission type could be a custom template over the submission page: <IF {CATID} is 2><a href="suggest.php?action=addlink&custom=yes&TID=dealersubmit">Submit Dealer</a></IF> if the dealer category is 2 and the template is custom/dealersubmit.tpl. The expiration time could be set with a hidden input field (check the HTML source of the submit page and alter into hidden field with desired value), though of course that's not secure.

Each dealer should be able to post no more than 1 ad in this category.

Could be a problem, I don't see an option to make that per-category.

And to make things a little more complicated, lets say I only want to limit posting in these 2 categories to a certain usergroup (the car dealers).

Edit categories to set their usergroup permissions.
rbl
Member

Usergroup: Customer
Joined: Sep 27, 2004
Location: Portugal

Total Topics: 19
Total Comments: 39
rbl
Posted May 10, 2008 - 12:05 PM:

> Are you sure dealer listings can't just be member profiles?

No because I need to alias them in several sub-categories.

> Could be a problem, I don't see an option to make that per-category

Any easy way to hack it? Could be a nice addition to the several <i>per usergroup</i> override options we already have now.

Ricardo
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted May 10, 2008 - 3:12 PM:

As a custom project I'd estimate 1 to 2 hours ($50-$100).
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.