Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Two User Types? ... (plus misc)

Quote Reply
Two User Types? ... (plus misc)
Hey GT Community!

Been a while since I posted here, hope everyone is doing well. Smile

I had begun development on a project several years ago, but back-burnered it to pursue other things. That project never did see the light of day sadly, and so my Glinks license has been just "dormant" all this time.

I recently had an idea for a new website and thought that GLinks might work for it. But, I've forgotten almost everything relating to customizing it. Blush

For business reasons, I can't disclose *exactly* what we are developing in a public forum, but here is the jist of what I need to accomplish. I'm hoping someone might have an idea or two on how I might go about it.

Basically, I need to have 2 user types. One type of user would be an "advertiser," the other would be a "consumer".

Advertisers would be able to submit links, but they can't search or otherwise view the directory.

Consumers can search and view the directory. However, they need to be logged in to do so. (People can't view the directory just by visiting the site, they need to register and log in)

That's the first and main thing.

Beyond that, there are some related tasks, like:

1. when a consumer logs in, I want to display a half dozen or so "recommended" links to them without them performing an actual search. I'll need to create some kind of criteria that would try to match links they would find interesting. This could either be done by asking them to provide some "interest" info on the registration form, or possibly keep track of clicked link history and match the categories with links they've clicked in the past. Not sure which of those methods would be best vs. which would be easiest to implement.

2. Advertisers can only submit one link unless they upgrade to a paid account, and then the amount of links they can submit will depend on their "level" of participation. Like a bronze, silver, gold deal where bronze gets a few, silver gets more, gold gets a bunch. That kind of thing.

3. Ideally (and I'm not even sure this is doable) I'd like to be able to offer "local" links as an option, where an advertiser can perhaps specify his or her link as being of "local interest", include a zip code, and then when I present the consumer with the "recommended" links I mentioned in #1 above, it does some kind of IP based check (similar to Google local search) so if there is a local match it displays the local interest link to the consumer. BTW, I mentioned the advertiser being able to specify a link as being "local" (like with a checkbox)... The reason for that is I am trying to keep the number of categories to a manageable (and rather small) level, so don't think having a completely different set of local categories is the best way to handle this, although I did consider it.

4. Etc.

We're in the very early phases of development, more of a brainstorming phase really, so I'm sure more will pop up. Smile

Anyone have any advice on the above? Not really expecting a full response to every little thing, but if anyone has any input on any part of it (and particularly the two user types bit) I'd really appreciate it. Just something to get me started would be swell. :)

Thanks folks,
Matt G
Quote Reply
Re: [Matt G] Two User Types? ... (plus misc) In reply to
Hi,

The simplest way to get "different" types of users, is to add a new field. Something like:

Name: UserType
Default: consumer
Form Type: SELECT
Form options consumer/advertiser
For values: Consumer/Advertiser

Then sign them up using user.cgi?signup_form=1;consumer=1 or user.cgi?signup_form=1;advertiser=1 . In signup_form.html you would then have something like:

Code:
<%if advertiser%>
<input type="UserType" value="advertiser" />
<%else%>
<input type="UserType" value="consumer" />
<%endif%>

You can then control a bit more the site, using stuff like:

Code:
<%if user.UserType eq "consumer"%>
... show the link to add.cgi
<%endif%>

Quote:
2. Advertisers can only submit one link unless they upgrade to a paid account, and then the amount of links they can submit will depend on their "level" of participation. Like a bronze, silver, gold deal where bronze gets a few, silver gets more, gold gets a bunch. That kind of thing.

Mmm.. you could probably hack my LimitLinksAdd plugin, which lets you decide what users can submit what number of links. I could customize that if you needed (for a fee of course Wink)

For the location stuff - have you considered the ZIPSearch plugin? http://www.rgbworld.com/...ssamer-Links-Plugins

Worth trying for $30 Smile

Hope that helps a bit

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] Two User Types? ... (plus misc) In reply to
Thanks for the reply Andy!

I remember when you were a wee lad just getting your feet wet with LinksSQL. My goodness has it really been 11 years? Shocked

I'm really happy to see that you've taken off with all of this. You've created quite a niche for yourself here. Good on ya, sir!

Anyway, for the advertiser/consumer solution, I was thinking along those lines too. I added in a new field to Users like you suggested.

A sidenote on this... There are a few "form display" bits of data when creating a new field. However, it looks like the signup_form.html template just hardcodes the fields. (so that to add any fields to the user registration form I have to modify that template and hardcode them in). This makes me wonder at the purpose of the Form Display and Form Type for a given field. Do those serve any function at all? I suppose I should do myself a favor and RTFM. Wink

Your LimitLinksAddAdv plugin looks interesting. Not sure how much hacking would be involved, based on your desciption, it looks like it is pretty much what I would need.

In reviewing your UltraNerds site, you have QUITE a lot of plugins available, kinda tough to figure out which of those would help in my site build. I'm wondering if you have some kind of spreadsheet available you could PM/email me that would list them all on a table with a brief description and what if any of the Packages they are included in. A page that lists them would be fine too (like one on a line that I could scan through quickly). I'm hesitant to drop any significant funds into plugins for GLinks, as I'm teetering back and forth at the moment between using it and just coding from the ground up (GLinks does a lot that I don't necessarily need)... It's a matter of customization time v. cost v. ground-up coding time. But I'm open to it... Smile

You also mentioned the ZIPSearch plugin. I hadn't seen that before, that sounds like something I would be able to use. But, I'd need to make it *part* of a "Suggested Links" algorithm.

So, I need to do something along the lines of several criteria that are weighted in some way in order of importance to deliver suggested links to a consumer:
1. Link Rating (this will be determined be the bronze/silver/gold status of the link owner I mentioned in my first post)
2. Types of links the consumer has clicked on before (based on category of link)
3. Is the link "Local" (this is where the zipsearch would come into play)
4. Age of link (newest to oldest)
5. How many times has the link been suggested to the consumer without being clicked? (lowest to highest)

So say for example, I have a consumer from Seattle, who has clicked on a few links in the "Music" category in the past. And let's say I have an advertiser who just submitted a Link for their Seattle based band (and who is lets say a "Gold" level advertiser). When the consumer logs into their account, then that link would show at the top of the suggested links, because it is a match for all 5 criteria. If the advertiser was bronze, or if the link was older, or if the consumer hadn't clicked on "music" category links in the past, or if the consumer has seen the link several times but never clicks, then the link might show up lower on the list or not at all possibly.

Kind of a complex algorithm, I know. Smile Also, I haven't fully decided how to "weight" each of the criteria.

I noticed you had a "SearchSuggestions" plugin of some sort, do you think that would be helpful in this scenario?

Thanks for the help! Smile
Matt G
Quote Reply
Re: [Matt G] Two User Types? ... (plus misc) In reply to
Hi,

Yup, I'm still here <G>

Quote:
I'm really happy to see that you've taken off with all of this. You've created quite a niche for yourself here. Good on ya, sir!

Thanks Angelic

Quote:
Anyway, for the advertiser/consumer solution, I was thinking along those lines too. I added in a new field to Users like you suggested.

A sidenote on this... There are a few "form display" bits of data when creating a new field. However, it looks like the signup_form.html template just hardcodes the fields. (so that to add any fields to the user registration form I have to modify that template and hardcode them in). This makes me wonder at the purpose of the Form Display and Form Type for a given field. Do those serve any function at all? I suppose I should do myself a favor and RTFM. Wink

The "form name" is just for what you see in the admin panel when adding/editing/removing users... same for all the other tables as well

Quote:
Your LimitLinksAddAdv plugin looks interesting. Not sure how much hacking would be involved, based on your desciption, it looks like it is pretty much what I would need.

Yeah, what you would probably need to do is just edit it so the code has something like:

Code:
if (FREE account) {
$limit = 1;
} else {
...do other checks, and set $limit depending on the data
}

At the moment LimitLinksAdd simply takes a value from the Users table, which you can set manually per-user (the idea being you may have 1 user who you want to allow to submit 100 links, whereas another is only allowed 10)

Quote:
In reviewing your UltraNerds site, you have QUITE a lot of plugins available, kinda tough to figure out which of those would help in my site build. I'm wondering if you have some kind of spreadsheet available you could PM/email me that would list them all on a table with a brief description and what if any of the Packages they are included in. A page that lists them would be fine too (like one on a line that I could scan through quickly). I'm hesitant to drop any significant funds into plugins for GLinks, as I'm teetering back and forth at the moment between using it and just coding from the ground up (GLinks does a lot that I don't necessarily need)... It's a matter of customization time v. cost v. ground-up coding time. But I'm open to it... Smile

Yeah - I've been working on that collection for quite a while now <G> I'm afraid I don't have a spreadsheet as such - but I do have a list of them accessable easily:

http://www.ultranerds.co.uk/...kages.cgi?p=UltraPro

That just has a list is all the "paid" plugins that are part of the ULTRA Package PRO (which is basically all the GLinks ones I have Smile)

Quote:
You also mentioned the ZIPSearch plugin. I hadn't seen that before, that sounds like something I would be able to use. But, I'd need to make it *part* of a "Suggested Links" algorithm.

So, I need to do something along the lines of several criteria that are weighted in some way in order of importance to deliver suggested links to a consumer:
1. Link Rating (this will be determined be the bronze/silver/gold status of the link owner I mentioned in my first post)
2. Types of links the consumer has clicked on before (based on category of link)
3. Is the link "Local" (this is where the zipsearch would come into play)
4. Age of link (newest to oldest)
5. How many times has the link been suggested to the consumer without being clicked? (lowest to highest)

Thats a hard algorythm ;) Some of it could be done by adding fields into the Links table... but some of them I'm not sure how easy/possible they are gonna even be

Quote:
I noticed you had a "SearchSuggestions" plugin of some sort, do you think that would be helpful in this scenario?

That plugin is really just to suggest based on either:

1) Your records in the SearchLogs table (i.e searches people havce previously done)
2) A list of custom-setup words. For example, if you are a computer related directory - it could be a pre-populated list of keywords based on that area/industry

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] Two User Types? ... (plus misc) In reply to
Thanks again Andy!

I'm kinda mulling everything over still, a couple of things though.

This page: http://www.ultranerds.co.uk/...ckages.cgi?compare=1

Is basically exactly what I was looking for. Would be a smidge better if there was a description column on there, or a hover over with float out for descrip, but this gives me a better idea of what you've got going on. :)

Next, I've been thinking more about this 2 user situation. After contemplation, I don't think the additional enum field (UserType: advertiser/consumer) is going to work for me. In my particular case, while there will the be 2 types of users, it will also be possible (and in fact very likely) for an advertiser to also be a consumer.

One solution that I see is to add two enum fields to the Users table... Advertiser Y/N and Consumer Y/N

Another is to simply create a separate consumer user table. A thought here is that I'll need to collect different info for both user types. For example, I need to allow consumers to let me know what kind of categories of links they might find interesting. (granted this example might involve yet another table or tables, haven't thought through that yet)

But I'm not sure the best way. Bigger picture is on my site I will have two distinct "portals" of entry for the two user types. And each portal will have a much different user experience. (like for example, when an advertiser logs in they will go to their "links management" area, but a consumer will go to more of an "interactive links viewing experience")

This also got me thinking about something relevant... Do you know if anyone has done any kind of "Profile" or "Account Management" plugin (or maybe a set of globals of some sort)? Where a User can view and modify their own data (say if they change their email or street address, which i need to collect/store). I need to do more than that, but would be a good starting point...

Thanks,
Matt G
Quote Reply
Re: [Matt G] Two User Types? ... (plus misc) In reply to
Hi,

Yeah, not sure I could fit a description in there (its simply meant to show you what is included in what package :)). I could probably get an AJAX description showing up to the side of it, but afraid I'm a bit busy atm, so don't have spare time to do anything like that just yet.

Quote:
Next, I've been thinking more about this 2 user situation. After contemplation, I don't think the additional enum field (UserType: advertiser/consumer) is going to work for me. In my particular case, while there will the be 2 types of users, it will also be possible (and in fact very likely) for an advertiser to also be a consumer.

One solution that I see is to add two enum fields to the Users table... Advertiser Y/N and Consumer Y/N

Sure, that could work. I would use a SELECT field (no ENUM), and then have text values + the 0/1 values that get stored in trhe DB (just a bit nicer in terms of DB speed, especially if your user DB gets large)

Quote:
Another is to simply create a separate consumer user table. A thought here is that I'll need to collect different info for both user types. For example, I need to allow consumers to let me know what kind of categories of links they might find interesting. (granted this example might involve yet another table or tables, haven't thought through that yet)

Mmm, that could have a couple of issues:

1) you would need to edit the code to add it into the correct table
2) You will have issues with logging in (as you need to check different tables)
3) You may end up with duplicate username/email issues

If it were me - I would just use the standard table

Quote:
This also got me thinking about something relevant... Do you know if anyone has done any kind of "Profile" or "Account Management" plugin (or maybe a set of globals of some sort)? Where a User can view and modify their own data (say if they change their email or street address, which i need to collect/store). I need to do more than that, but would be a good starting point...

So users can edit their profile after signup? My User_Edit_Profile plugin does that:

http://www.ultranerds.co.uk/Detailed/87.html

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] Two User Types? ... (plus misc) In reply to
Hi Andy, thanks for the reply again.

Quote:
Sure, that could work. I would use a SELECT field (no ENUM), and then have text values + the 0/1 values that get stored in trhe DB (just a bit nicer in terms of DB speed, especially if your user DB gets large)

Are you suggesting here a CHAR column with a column width of 1, and just insert either a 0 or 1 depending on whether the user type being submitted is an Advertiser or not?

I'm not sure if CHAR or TINYINT would be a better choice in this case?
Matt G
Quote Reply
Re: [Matt G] Two User Types? ... (plus misc) In reply to
Hi,

TINYINT would be perfect, along with a 1/0 yes/no setting :) No point using a CHAR as it will take up a bit more space per record

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!