Gossamer Forum
Home : Products : Links 2.0 : Customization :

REVIEW.CGI SQL.. (v2)

(Page 1 of 2)
> >
Quote Reply
REVIEW.CGI SQL.. (v2)
I couldn't find my original post in the search so I had to make a new one Wink sorry..

anyways.. i started review.cgi v2 umm.. lets see.. two nights ago.. and i've been working on it a little after schools.. (usually at night around 7-10..)

and i came up with what it's pretty much gonna be.. (not complete yet.. and not all the math has been done Wink

Since the demand for a graph is so high.. i did use it in this version (but i don't plan on using it on my site)..

right now.. the code is (what i call it... and probably what you would call it..).. NOT DONE.. Wink

i've been working with MySQL for a few weeks now and my queries still arn't the best.. so that is where most of the improvements may take place..

Review.cgi SQL can generate .html pages in Links or Links SQL.. but it is easier with Links SQL..

btw.. did i tell you it uses SQL?? Wink that's a drawback that most of you will totally not like.. but the reason is.. for big sites.. of course like.. freeontheweb.com (there you go padders Wink).. a review.db can get like 30x larger than the links.db.. and it would keep growing.. (of course that means 30 reviews per link).. at that point.. review.cgi flatfile won't be able to read and output data anymore.. it would take you like a million hours to load Wink

umm.. if you think review.cgi is slow.. it MAY be.. now.. but i must tell you something.. it is a .cgi file.. but it is not being built as the data is retrieved.. so if it takes a while to load the reviews part of it.. that means your browser is trying to print out the html Wink [tables are slow you know..]

ok.. enough for now..

http://216.65.106.208/sql/review.cgi?ID=2

do keep in mind.. when i make a cgi script.. i don't really care if it's pretty Wink [so excuse the layout]

also note.. i don't use neither links 2 or links sql.. so even though the code is almost done.. it may take a little more time for me to give you instructions..

i'm using some program i made myself.. i'm making it like links sql.. but with a whole bunch of links 2 mods.. (don't plan on redistributing..)

http://216.65.106.208/sql/category.cgi

jerry
Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
one thing i forgot to mention.. when you post the day is always.. 0000-00-00 00:00:00.. that's MySQL's default.. i didn't send it an appropriate time yet.. so it's gonna just do it like that..

i'll do that later when i decide what's my date/time gonna look like..

jerry
Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
SO this will work with Links 2.0 users?

Get it done. I want no breaks. No homework. Nothing but review.cgi 2.0

Smile

------------------
James L. Murray
VirtueTech, Inc.
www.virtuetech.com


Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
ack.. i'm stranded right now trying to figure out what to do for a science project tommorrow.. i can't go out and buy materials right now Wink

anyways.. i think i will go with doing a 10 point prject when i need 20 points.. it won't hurt as bad.. otherwise i would have to figure out how the heck i'm gonna make a seismograph out of computer paper Wink

did i mention.. tommorrow is friday.. friday = more time... plus day before saturday.. and then of course sunday.. Wink

homework check... MATH (yes).. BUSINESS (no).. PE (no).. ELECTRONICS (no).. SPANISH (no).. LANGUAGE (no).. SCIENCE (done)..

ahh.. math should be done soon.. cya!

jerry

[This message has been edited by widgetz (edited October 07, 1999).]
Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
Jerry,

Can you please check out:
http://www.gossamer-threads.com/...um3/HTML/003244.html

------------------
James L. Murray
VirtueTech, Inc.
www.virtuetech.com


Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
If you want help with this, I can help make it LinkSQL compliant.

Alex has said the 'key' part of is program is the DBSQL.pm engine, and that discussing mods to the code outside of that is pretty ok. He's outlined some of the API already in the LinkSQL resource FAQ, and more I'm sure will be forthcoming.

I'm getting the hang of SQL and SQL/DBI/Perl
more and more, and have integrated several of my renegade scripts into SQL.

I tried looking at your efforts so far, but they are returning an error page.

I'm pretty good with interfaces and layout, so it can take that load off you.

[This message has been edited by pugdog (edited October 08, 1999).]
Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
Same question as Ground Zero.

Will this work with Links 2?

Many thanks.

------------------
www.armynavy.com
MilitarySurplus Ring




Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
ack.. mysql server is down.. or maybe they deleted my account.. idunno.. that is why you got the prepare error pugdog..

it was working all good last night..

jerry
Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
yes it will work with links2..

it's just a whole different style database (MySQL)..

I will not make a flatfile version.. (i have decided) cause it's a waste of time and it's a pain when you get alot of reviews..

jerry
Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
i started working on UserDB tonight.. and it's also gonna be a SQL database.. but this is for the usernames and passwords that are gonna be used with review.cgi (can also be associated with add.cgi, modify.cgi (and delete.cgi).. and forums etc..

i've only made a login script and a logoff so far.. hehe.. not even a signup.. they are pretty basic.. but very secure..

it has 3 levels of authentication.. first.. the usual login by form.. then it saves a session id as a cookie.. this session id also creates a small 11 byte file on the server with the users IP address.. when the user roams around the site.. he/she carries the cookies with them and it keeps them identified and don't need to type in the password unless they logoff..

the thing is.. if they don't accept the cookie.. then query string will automatically be used.. as they browse around the site ?uid=username.93849384343434 would tag around the url..

also.. if someone was to forge the user id as in try to write the cookie by hand.. the program will check their IP address.. and if it doesn't match.. automatically expires the session..

btw.. the sessions stored on the server are automatically deleted..

no demo yet..
jerry
Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
ok.. i would like to know the demand for "image" graphs.. they are faster than regular html.. and because of the light work on the ratings and stuff.. it doesn't take too much time..

try:

http://www.pdamania.com/graph.cgi

the numbers are hardcoded right now.. so it's just based on variables i put in..

but i can easily transfer it.. it's fully customizable.. size color.. shape.. etc.. this is my first time doing it.. so i just made it blue Wink

jerry
Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
Jerry,

Just curious as to wheter you are making an import script for users of review.cgi (1). If your not, I am gonna have some typing to do Wink

------------------
Michael Bray
....
Review your webhost, or find a new one at http://www.webhostarea.com


Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
yea.. it's easy to do.. why not..

jerry
Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
Jerry,

Your a legend! Smile

------------------
Michael Bray
....
Review your webhost, or find a new one at http://www.webhostarea.com


Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
i was just working on the graph.cgi thing and now i made it so you can adjust it in any way you want.. as many ratings as you want. .(as in.. rates 1-10.. or 1-5 [like me])

it will do an algebraic equation to figure out the spaces and the bar widths..

an algebraic equation we just learned in school Wink

not to mention it centers everything by itself now. (may not seem hard.. but it sorta is Wink.. this isn't HTML you know!!)

i'm not sure whether or not i should make it do an equation vertically.. (as in by height).. that way it will change the lines that show the 10% area.. 20% area.. etc where they should be based on the height.. but i'm too lazy right now..

also.. the colors are easily editable..

right now it's running on random output right now.. it just gets the percentage randomly (equaling 100%)..

jerry

[This message has been edited by widgetz (edited October 09, 1999).]
Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
ok.. so now there is a third graph for review.cgi..

here are the 3 types of graphs..

1. Image/HTML w/ and w/o %s
2. HTML w/ and w/o %s
3. Image w/ and w/o %s

you can see the new one.. (image.) here
http://pdamania.com/sql/review.cgi?ID=2

i am also gonna add some more features.. right now the image one is the only one that you can change the colors.. but i will do this for the two others too.. it's much easier..

the main advantage of the image one is it's VERY fast loading (especially on netscape)..

some others are that you can specify the width and the height of the graph so you can place it into small areas.. unlike the html and image/html graphs.. (although i plan on doing something about that)..

the disadvantage is that it doesn't have the ALT feature.. when you put your mouse over a bar it won't give you how many votes there was..

it's much more custimizable than review.cgi (v1).. i'm not sure whether or not i should make multiple graphs.. (one for each type of rating).. but it's very very easy to do..

you can put any message on the top.. i wasn't sure what i should put on.. so i just put that text.. hehe.. you can put like the title or whatever of the link if you wanted..

ok.. now what? anything else?

mysql server seems to go down alot.. so if you went to the example and it said can't connect to pdamania.com (111).. please excuse.. i have no control on it..

jerry
Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
Looks great Jerry! Smile

------------------
James L. Murray
VirtueTech, Inc.
www.virtuetech.com


Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
ok.. now the image/html graph is almost comparable to the image graph.. just i can't change the color of the bars unless i change the color of the image..

i'm gonna work on the html graph.. i dunno what it should look like.. but i'm thinking about just the same thing as last time.. just using some math for the width and the height..

you can see the 3 graphs..

http://216.65.106.208/sql/review.cgi?ID=2

as soon as that is done.. i could declare review.cgi 2 complete.. but the thing is userdb ( Wink) unless you guys want to go by IPs again..

jerry
Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
Jerry,

Suggestions:

1. Ability to display the email address and name of the reviewer only if the user agrees during submission.

2. Total reviews by this person
3. View other reviews by this person

Like cgi-resources, again. That way viewers will be able to compare reviews by a specific person.

Thanks
Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
no problemo..

i just didn't want to get far into the user until i finished UserDB.. because this is in MySQL.. getting the number of reviews is just one line query and then one line print.. (sorta like how i did ratings.. even with the average!)

and then the other thing would require an extra subroutine and a template to view the reviews.. but then that is pretty easy..

jerry

[This message has been edited by widgetz (edited October 12, 1999).]
Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
ok.. tommorrow i am going to finalize the script and let you guys preview/test the version that makes the HTML pages.. right now it's pretty much done..

the problem right now if because i am not making this mod using Links2 or Links SQL.. There will be the least features for Links2.. still.. Links SQL will have less features than my running version also.. because my code is not at all similiar to alex's.. [review.cgi itself will be fine.. plus if you just added build_reviews in nph-build.cgi that will be fine also.. but there will be some things that won't be there for links2 but will easily be able to be done in links sql..]

they are possible.. it's just it has to do with flatfile databases and personally.. i will not have review.cgi work with flatfile databases.. it will make it too slow..

jerry
Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
forgot to ask... but...

HOW MANY PEOPLE HAVE ACCESS TO MySQL?

GO TO:

http://www.pdamania.com/sql/review.cgi?ID=6

and just review YES or NO.. I need this information to decide whether or not I should spend time on a flatfile version that will just crash after thousands of reviews anyway Wink

jerry
Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
Hehe,

I did a survey like this about a week ago and got 4 responses.

------------------
Michael Bray
....
Review your webhost, or find a new one at http://www.webhostarea.com


Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
doesn't matter if i get 4 responses or like 10000 Smile.. all that matters is that i get responses.. and out of that.. it will tell me if flatfile is needed.. so far 5 all say yes they have mysql.. so if the people that don't have mysql don't go and vote.. it's their loss.. not mine..

jerry
Quote Reply
Re: REVIEW.CGI SQL.. (v2) In reply to
Do you mean hosted by the ISP or installed in my own cgi-bin from the following package
http://www.mysql.com/download_3.22.html
or either? BTW how hard is the install and are any other PERL modules needed by REVIEW.CGI? Wink
> >