Gossamer Forum
Home : General : Perl Programming :

Ask an Expert Script

Quote Reply
Ask an Expert Script
Does anyone know of a good "Expert script" where a user posts a question and people who have signed up to be "experts" answer the question and then the answers are rated.

Sort of like AskMe.com or Experts.com

I want it to have a way for users to sign up to be experts and automatically keep track of rating.

I'm assuming this is basically a Bulletin Board/Discussion Board script with mods to allow for rating. So, does Ultra-Board or DiscusWare have any mods that will do this.

I've checked CGI Resource Index and haven't found exactly what I want yet.

Thanks in advance for your help.


Quote Reply
Re: Ask an Expert Script In reply to
Sounds like a wonderful application for LINKS SQL....
With some hacking, you could do what you want with
LINKS SQL.

Good luck!

Regards,

Eliot Lee
Quote Reply
Re: Ask an Expert Script In reply to
Could Links 2.0 be hacked to do this or would it require Links SQL?

Quote Reply
Re: Ask an Expert Script In reply to
It really depends on how many experts you expect to have or the number of questions that are answered. In terms of data processing speeds and also maintaining integrity of databases/tables, the better application is LINKS SQL since it already has built-in USER features.

To do what you want with Links 2.0, you would have to put A LOT of work into it...Minimally, you would have to do the following:

1) Create the following files:

a) experts.def
b) experts.db
c) expertsid.txt
d) users.db
e) users.def
f) usersid.txt
g) answers.def
h) answers.db
i) answersid.txt

You could use links.db, links.def, and linksid.txt as "question" files.

2) Then you would have to port the Relational Mod for DBMAN into LINKS 2.0, which is not an easy task.

Versuses in LINKS SQL....

All you have to do is use the BUILT-IN "EDITOR" feature for the EXPERTS and add a few other tables to store data. A LOT easier if you ask me.

Regards,

Eliot Lee
Quote Reply
Re: Ask an Expert Script In reply to
Eliot,

I see what you mean about Links SQL being much easier.

I was wondering, since this whole "Ask the Expert" thing is really just a glorified discussion board with ratings, is it possible to modify one of the discussion board scripts. I use DiscusWare but have never really hacked it at all. Also, what about UltraBoard or one of the other popular ones, any experience trying to modify them?

Thanks for being to quick to answer. You really are helpful. Hey, if Gossamer ever gets an "Ask the Expert" board going you got my vote for #1 expert. :)

Quote Reply
Re: Ask an Expert Script In reply to
In Reply To:
I was wondering, since this whole "Ask the Expert" thing is really just a glorified discussion board with ratings, is it possible to modify one of the discussion board scripts. I use DiscusWare but have never really hacked it at all. Also, what about UltraBoard or one of the other popular ones, any experience trying to modify them?
Uh...you could, but again...I would NOT use a flat file system...I guess I am not making myself clear...

Hope this helps:

FLAT FILE SYSTEMS (TEXT FILES)

BAD:

1) You have to constantly check file permissions.
2) You have to constantly check flock settings.
3) You have to hack Perl scripts quite a bit for them to work in a Relational environment.
4) Takes up tons of disk space.
5) Slower data processing.
6) Restrictions in terms of concurrent connections and amount of data (ca 1-3 users per connection and around 5,000 records)
7) Pain in the rump to add new fields or manage the database files

GOOD:

1) Easier to set-up in terms of uploading files and then changing permissions versus setting up MySQL.

MYSQL (or another Structured Query Language Application)

GOOD:

1) You don't have to worry about file permissions.
2) You don't have to worry about flock settings.
3) You don't have code so much as you would with flat files.

EXAMPLE:

You want to open a database file and write to it...with flat files, you would have to write about 10 lines of codes. With MySQL, you only have to write 1-2 lines of codes.

4) Takes up less disk space.
5) Faster data processing.
6) More concurrent connections (like around 1,500 depending on the speed of your server) and data (more than 75,000 records per table depending on how many and size of fields)
7) A lot easier to plug-in enhancements later on.
8) Easier to add fields.

BAD:

1) You need to have MySQL installed in your server.
2) A bit of a learning curve to overcome initally, but as soon as you understand STRICT Perl and also MySQL, you are on your way to easy scripting.

For more info, search this forum for MySQL.


Regards,

Eliot Lee
Quote Reply
Re: Ask an Expert Script In reply to
Eliot,

Now I see. Never underestimate my ignorance Blush

It sounds like I need to do two things.

1) Realize that this project is beyond my skills (right now). The world will have to wait for the greatest "Ask an Expert" script.

2) Learn a whole lot more about SQL. I'm in the special ed classes for PERL as it is so SQL will have to wait. However, at least I have a project now for the next few months (...years).

Thanks again for your help. If you hear of a "Ask an Expert Script for Dummies" let me know.

--Curt

Quote Reply
Re: Ask an Expert Script In reply to
Taking time to learn programming languages is a good idea...rather than programming a temporary makeshift script that will take longer to upgrade in the long run.

Since the application you are looking for will need to be SQL based and use programming languages like Perl, it would be best to learn them to hack flat file based Perl scripts, which would be a pain to upgrade later.

Regards,

Eliot Lee
Quote Reply
Re: Ask an Expert Script In reply to
yes.. i was about to make an entire site like epinions.com based on a mod to Links SQL 1.11..

just think of it like this..categories = categories.. links = questions.. users = users/experts..

then you have a table of answers from experts.. QuestionID, UserID, Answer, etc...
then another table of ratings for the answers.. AnswerID, UserID, Rating, etc...

they can easily be displayed with the correct code..

other than that whats left is the total and averages of the ratings.. ie SELECT TOTAL(Rating), AVG(Rating) FROM answerRatings WHERE AnswerID = $id

Jerry Su
widgetz sucks
Quote Reply
Re: Ask an Expert Script In reply to
if you want to start from scratch.. i'd suggest learning PHP.. its much simpler than perl and better with mysql..

otherwise you can start with a php type Links SQL type script.. if any..

you can use Links SQL if you want.. but if you don't know perl.. it'd be harder to understand..

ASP is probably the most powerful language for this type of script though because ASP has a built in way of tracking the user's session.. its extremely powerful as well.. usually for scripts that have user/server interactions ASP would be a good choice.. but it runs on NT..

Jerry Su
widgetz sucks