Gossamer Forum
Quote Reply
review.cgi
ok.. i'm going to release the code.. without instructions for awhile.. i'm going to change the do_review sub a bit tommorrow..

url: http://pdamania.com/review2.cgi?ID=1002

the images don't work and the total reviews don't work either.. i changed something and haven't changed the template yet..

i have made it so it builds on static html pages also.. it does work on detailed pages but i don't have an example of these..

ok.. i will release review.cgi and forum.cgi this week.. graph.cgi was ready a long time ago.. some of you already have it

jerry
Quote Reply
Re: review.cgi In reply to
i'm going to take forum.cgi code and use it on review.cgi.. i just realized how similar it is.. instead of topics it would be the links and the posts and the reviews.. so the reviews link to the links through LinkID.. and then because of this.. I could even use the modify subroutine to let users modify their reviews..

jerry
Quote Reply
Re: review.cgi In reply to
Once it clicks, it really clicks, doesn't it Smile

Lateral thinking...

Quote Reply
Re: review.cgi In reply to
I cant' wait to see them!

------------------
Robert Blackstone
Webmaster of Scato Search
www.scato.com
Quote Reply
Re: review.cgi In reply to
ok.. i made a few minor changes..

now i have a demo available for posting as well..

pdamania.com/review.cgi?ID=1001

usernames: pdamania, jsu7785, jerry
password: test

also.. each user can add only one review per link.. so after the user posted a link it will no longer accept posts (and it even won't show the form).. so if the reviews are all taken on this link.. try link ids up to 1006..

a useful link to logout of the accounts to switch or just to get rid of my cookies is

pdamania.com/logout.cgi

the overall rating is actually the 'Rating' and then the others are what they are labeled on the form.. i didn't go into making an average rating as the overall rating..

about the modify.. i'll finish this tommorrow..

(notes)
for modifying a rating to the Links database.. anyone want to tell me this is wrong?.. hmmm.. the last line seems wrong.. not sure.. if the $diff is negative.. then the field Rating in build_update will be negative.. if the pages were built, it will multiply votes by rating and then add this rating to get the right amount.. then divide and get the new Rating..
Code:
my $rating = $in->param('Rating');
my $diff = $rating - $rec->{Rating};
$sth = $DB->prepare ("SELECT 1 FROM Build_Update WHERE LinkID = $id");
$sth->execute();
($sth->rows) ?
$DB->do ("UPDATE Build_Update SET Rating = Rating + $diff WHERE LinkID = $id") :
$DB->do ("INSERT INTO Build_Update (LinkID, Hits, Votes, Rating) VALUES ($id, 0, 0, $diff)");
(/notes)

Smile sorry.. that was a part i didn't think would work at first.. i stopped working tonight and will use the code tommorrow..

jerry

[This message has been edited by widgetz (edited May 08, 2000).]
Quote Reply
Re: review.cgi In reply to
I'm not sure what you are doing.

But, each user will need to have a user ID that is tagged to a rating in the ratings_log database. Also, if a user makes a change to their review, then the ratings_log entry has to be edited, and the rating changed in the ratings_summary listing for each link. (ratings_summary has a column for each link with the # of votes for each amount, then a summary field which is votes*amount so during a build, only an access is needed, not a calculation).

The User entry should have a modification for each of the amounts of votes a user cast, as well as their average rating. This can be updated each time an entry in the ratings_log is made.

<G> Gets sort of complicated to accurately track ratings Smile

When it comes to reviews... well Smile Wink
Quote Reply
Re: review.cgi In reply to
review.cgi WILL be released tommorrow.. wednesday may 10.. probably at around 7pm my time (PST)..

tommorrow i will make a simple thing for you guys to follow to install review.cgi and later on i will make a more painless install for people that do not know what they are doing Smile

umm.. i will basically tell you the database to setup and give you three files.. review.cgi, graph.cgi, Reviews.def.. there are little mods to make in some files as well.. i will have a page written tommorrow with the tags for the templates as i will not provide a set of templates (i am hoping i can use a simple one someone creates at a later time)

i have to make a resume tonight.. oh joy Smile

also.. i would like to install this around 4pm PST on someone's copy of Links SQL.. email me at: email@jerrysu.com w/ username, password, ftp server, and path to Links.pm..

thanks a lot guys.. sorry for the long delay.. but school is something i need to do..

------------------
Jerry Su
url http://www.jerrysu.com/
email email@jerrysu.com
------------------


[This message has been edited by widgetz (edited May 09, 2000).]
Quote Reply
Re: review.cgi In reply to
Jerry,

I replied to your email, but it just bounced after 3 days.

I'm trying again at the new email address you just posted.

Let me know if it gets there!

Robert
Quote Reply
Re: review.cgi In reply to
i haven't gotten most of my yahoo email in the last few days.. since it's yahoo i'm guessing it should be fixed soon.. Smile

also.. the resume i am currently writing is for my business class.. i am in need of real life references.. my teacher said she will call one of them to check if 1) i asked them if they will be one of my references 2) i have done something for them in the past..

can anyone here be a reference please? it's just for homework.. she tries to make everything as real as it gets though.. i just need to put your names and addresses and phone numbers and i'll be fine.. thanks.. plz email email@jerrysu.com if you can help me out..

i have helped a lot of you ;]
Quote Reply
Re: review.cgi In reply to
ok.. here you go..

i already know of a few things i need to fix in this version.. they are very easy fixes.. adding success and failure templates.. thats all..

http://www.widgetz.com/review2/

yes.. widgetz.com is back up.. just it's tempoary..

------------------
Jerry Su
url pdamania.com
email email@jerrysu.com
------------------
Quote Reply
Re: review.cgi In reply to
Ok,

I installed it without much of a problem (even had to fixe the pass/Password and User/Username problems left over from upgrade).

One thing, when you go get the files, you have to go into each of the subdirectories and download the little files in each of them to a HOLDING subdirectory, then take the code and put them into your real version of Links. It's not just the 4 scripts, but 4 scripts, the Links.pm, the 3 files in the Links sub dir, the .def file and 2 templates.

Also, when getting Links.pm, make sure when you save it, or download it, that the hash doesn't become:

Code:
$LINKS{rating_graph_colors} = {
Background =& gt ; 'ffffff',
Border =& gt ; '000000',
Bar =& gt ; '6699ff',
BarBorder =& gt ; '000000',
Percentage =& gt ; '888888',
Rating =& gt ; 'ffffff',
RatingBG =& gt ; '000000',
Text =& gt ; '000000',
Transparent =& gt ; 'ffffff'
};

The & gt ; should really be: > (the hash assignment ie: =>



Now, one _really_ _really_ big question........ how do we use it once installed <G> Smile





[This message has been edited by pugdog (edited May 10, 2000).]
Quote Reply
Re: review.cgi In reply to
i found a lot of bugs.. i just found out it doesn't work in internet explorer either.. because of the cookies..

i am guessing this is because of the domain thing.. don't install this unless you know perl.. i will fix this tommorrow.. tired tonight..

------------------
Jerry Su
url pdamania.com
email email@jerrysu.com
------------------
Quote Reply
Re: review.cgi In reply to
ok.. just don't use this version.. wait until 2.01.. too many changes at the very end caused a lot of things to not work and the cookies don't work on internet explorer..

------------------
Jerry Su
url pdamania.com
email email@jerrysu.com
------------------
Quote Reply
Re: review.cgi In reply to
Hiho, no posts till 10 days. Have you give up the thing. I really would be happy to get a review for my site, maybe without user-login. Till now i use a normal links for the reviews for every entree - lot of handwork and not the best thing to handle :-(
Robert

Quote Reply
Re: review.cgi In reply to
i haven't been working on anything except for something for someone recently.. i am once again in the middle of paid work..

Jerry Su
email@jerrysu.com
http://www.jerrysu.com/
Quote Reply
Re: review.cgi In reply to
A sugestion...

In line 120 (or almost...)
look for:

if (defined $USER) {
my $sth = $DB->prepare ("SELECT * FROM Reviews WHERE LinkID = $id AND Username = '${$USER}{USER_Username}'");
$sth->execute();
($sth->rows) and $USER->{USER_Reviewed} = 1;
}

print &site_html_review_page ({ %$rec, %OUT, %$USER}, $dynamic);

and change it for this:

if (defined $USER) {
my $sth = $DB->prepare ("SELECT * FROM Reviews WHERE LinkID = $id AND Username = '${$USER}{USER_Username}'");
$sth->execute();
($sth->rows) and $USER->{USER_Reviewed} = 1;
print &site_html_review_page ({ %$rec, %OUT, %$USER}, $dynamic);

} else {
print &site_html_review_page ({ %$rec, %OUT}, $dynamic);
}

just a sugestion
=)

bye.

Byron H.
silence@sdf.lonestar.org
http://silencesoft.hypermart.net
Quote Reply
Re: review.cgi In reply to
Is there any running code now? Where can i get it?
Cause Alex let us wait :-( i will stay at the old links cause time runs ...

Robert

Quote Reply
Re: review.cgi In reply to
mmm...
i'm waiting the release too...
=)
but i'm working in the "bugsy" code...
=)
one problem...
success_html <-- i can't do it alone... any sugestion?

Byron H.
silence@sdf.lonestar.org
http://silencesoft.hypermart.net
Quote Reply
Re: review.cgi In reply to
the cookie problem only occurs if you have more than two cookies for a certain URL.. and only on MSIE..

the success page is sort of easy..

i am waiting for the next release of Links SQL before i start working on this again..


Jerry Su
email@jerrysu.com
http://www.jerrysu.com/