Gossamer Forum
Home : Products : Links 2.0 : Customization :

REVIEW.CGI

Quote Reply
REVIEW.CGI
ok.. i am now done with the script.. i have sorta succesfully installed it onto templates..

www.paintballcity.com/cgi-bin/links/review.cgi?ID=75

i didn't install the failure and the success pages cause i didn't feel like it Smile

there are ALOT of variables though..

now the graph has 4 different types..

1. image graph.. (loads MUCH faster)
2. html graph.. (very slow.. but some like it)
3. image w/ percentages..
4. html w/ percentages..

it's just a switch of a varible in links.cfg.. you can have no graph too.. by switching it to 0 Smile

i'm not sure if it will be out tonight.. the code is practically final.. but i am busy with another mod i have to install for someone..

i'm going to make a few more adjustments to the multiple rating fields and make it show all of the ratings below the users review.. and then on the top it will show Overall Rating..

Also.. i am going to make a simple script to help you guys install the mod Smile there is alot of stuff to do and there is one part that i know alot of you are going to mess up.. hehe

i already deleted my rate.cgi Smile it's no longer needed.. hehe

jerry

[This message has been edited by widgetz (edited August 17, 1999).]
Quote Reply
Re: REVIEW.CGI In reply to
  Smile Nice work Jerry! Can't wait till the code is release!

BTW, I had problems adding a review:

Code:
CGI ERROR==========================================
Error Message : fatal error: Template: Can't find template: /home/paintba/public_html/cgi-bin/links/admin/templates/review_success.html at /home/paintba/public_html/cgi-bin/links/admin/Template.pm line 41.
Script Location : review.cgiPerl Version : 5.00502

------------------
www.techdevelopers.com
ASP, HTML, CGI, Flash, and more!

HPCalc.com - English
Official HP Calculator Site
www.hpcalc.com/english



[This message has been edited by XanthisHP (edited August 10, 1999).]
Quote Reply
Re: REVIEW.CGI In reply to
ya.. i told you i didn't do that Smile

it just loads the template thats all.. it does add the review.. hehe.. just i didn't have time to put the template up.. Smile

jerry
Quote Reply
Re: REVIEW.CGI In reply to
The template is up. But the review will not go in untill I build the site. Jerry set it up so that you validate each review.



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


Quote Reply
Re: REVIEW.CGI In reply to
no.. it will autovalidate when you build your pages Smile
Quote Reply
Re: REVIEW.CGI In reply to
Hi Widgetz - James,

Did you notice that the graph for 10 has 11 bars?

It takes a while for the page to load in Netscape (I am usine netscape, I don't about IE). I suppose that submission form can be put on a seperate page?

Quote Reply
Re: REVIEW.CGI In reply to
Please stop posting tests to my site.

It is a live link. Thanks

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


Quote Reply
Re: REVIEW.CGI In reply to
Just to clarify, I did not post any tests to your site.
Quote Reply
Re: REVIEW.CGI In reply to
Widgetz, sorry. Didn't know what you meat by not placing a success/error template. . . Now I get it.
Quote Reply
Re: REVIEW.CGI In reply to
hi.. if you are concerned about the slowness Smile

you should use the image graph.. it loads much faster...

its slow cause the table has 11 x 10... 110 tds in it.. Smile

the reason it has 11 bars..

is cause 100 is the 11th one Smile [count and you will understand] 1-9 10-19 20-29 etc...

jerry

[This message has been edited by widgetz (edited August 10, 1999).]
Quote Reply
Re: REVIEW.CGI In reply to
  Whats the difference between the HTML graph and the Image Gragh??? Also, have you made some code so that the external rate it will work on your site???

Thanks alot widgetz... when your site is up, and if I get this script to work, i;ll give yo a couple of thousand banner impressions.
Quote Reply
Re: REVIEW.CGI In reply to
those happy faces at the top are annoying arn't they? Smile

anyways.. my version.. (the most updated out of the three currently running versions..)

is now displaying the image graph.. the color you can choose.. just you have to change the image to something.. right now.. this image is a transparent gif.. so it's white..

three currently running are:

mine.. non template.. (image graph w/o %) NEWEST:

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

ground zero's... (html graph w/o %) template.. newer.. not newest

http://www.paintballcity.com/...nks/review.cgi?ID=47

and ceglobe's... (image graph) (OLD VERSION)

http://www.ceglobe.com/...ware/review.cgi?ID=1

the one ceglobe has is really old.. he made it look like his own review mod.. so don't think i'm lying to you Smile

anyways.. i am going to be making external rating tommorrow mornig.. cause it's 3:00am now Smile

jerry
Quote Reply
Re: REVIEW.CGI In reply to
Hi Jerry!

I have noticed that when clicking on the "Next" link to go the the next page of reviews, it displays on error message.
I was wondering if you have an ETA when it will be ready for download. Thanks!

Cheers,
Mike
Quote Reply
Re: REVIEW.CGI In reply to
aww man Smile

ok.. i have to fix that.. not hard.. just it's cause i put some tag in yesterday..
Quote Reply
Re: REVIEW.CGI In reply to
hi..

uhh.. i just made the external review/rate..

here..
http://www.widgetz.com/external.html

will rate link 1001 at pdamania.com

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

but remember.. you have to BUILD ALL or VALIDATE it first.. build all autovalidates the reviews and updates the html (links.db) version of the ratings..

http://admin:demo@www.pdamania.com/admin/

ok.. i plan on releasing this script tonight.. no user db.. i want to get to doing my site before summer is over Smile so i'll leave any other add in for review.cgi up to you guys

jerry

Quote Reply
Re: REVIEW.CGI In reply to
only one more change to review.cgi and it should be out.. i need to fix up the multiple rating feature so it averages out the total of each rating and stuff..

i was going to do it today.. but i found myself helping other people again Smile

anyways.. check back soon

jerry
Quote Reply
Re: REVIEW.CGI In reply to
I'm still waiting.
Quote Reply
Re: REVIEW.CGI In reply to
lol.. ok Smile

i'll try today.. it's cause there is SO many things........ (in other files.. nph-build.cgi etc.. )

i either have to make a readme (easy way).. or i will make those webpages that take forever.. hehe

jerry
Quote Reply
Re: REVIEW.CGI In reply to
bmxer.. yea. if you noticed.. when links chmods a new cat dir 777 it says 511...

xanthis.. it will most likely say "can't parse" or something and have a link to a page with manual instructions.. (built with the install file based on the cfg file)

jerry
Quote Reply
Re: REVIEW.CGI In reply to
the reason this is not out yet is cause i am working on a script that will install the mod for you..

http://admin:demo@www.pdamania.com/admin/install.cgi

i plan to release the source for this.. so other people can use it also.. it's really easy to use.. all you need to do is specify what each file does.. here is a cutout of the current install.cgi

Code:
%files = (
"test.cgi" => ["add", "reviewcgi", "$db_script_path", 1, 0755],
"test.def" => ["add", "reviewdef", "$db_script_path", 1, 0644],
"nph-build.cgi" => ["mod", "nph-build", "$db_script_path", 1, 0755],
"rates" => ["del", "", "$db_script_path/data", 0, 0777]
);

basically.. you tell it what file.. then you tell it if it's a add, mod or a delete... then you tell it the TXT filename where it gets the actual source.. then the path where the file on your server is located.. and then if it's a dir (1 equal no) and then the CHMOD...

pretty cool?

i have to work on the MOD part Smile i haven't "ran" it yet.. and it scares me to run it.. hehe.. at least it makes a SINGLE backup eh?

(so it can't write over and over and screw up the code more and more.. hehe)

it checks if the file is there too.. pretty cool..

jerry
Quote Reply
Re: REVIEW.CGI In reply to
anyone know why it displays

"CHMOD TO 420" instead of 644?

in ftp it says the permission is 644.. and on the hash i specifically put 644..

directories chmod 511 also.. (LINKS does that too...)

anyone know why?

jerry
Quote Reply
Re: REVIEW.CGI In reply to
Do the file permissions work even though they say the wrong number?

------------------
------------------------------------------
Lavon Russell
LookHard! Search
http://www.lh.yi.org
webmaster@lh.yi.org
Quote Reply
Re: REVIEW.CGI In reply to
Jerry,

Will the installation script work for people who modified their scripts with other mods? I have modified my site with a lot of mods already . . .



------------------
http://www.techdevelopers.com
ASP, HTML, CGI, Flash, and more!

HPCalc.com - English
Official HP Calculator Site
http://www.hpcalc.com/english

Quote Reply
Re: REVIEW.CGI In reply to
Hey... I think it's better he's taking his time, rather than releasing something that's going to have a bunch of bugs he'll have already fixed...

Sometimes, it's not a good idea to release a wine/whine before it's time <G>

Quote Reply
Re: REVIEW.CGI In reply to
Jerry,

Now that you have been making so much wind about your great review mod, please do release it. We have been waiting for over a week now Smile.

Cheers,
Mike
Quote Reply
Re: REVIEW.CGI In reply to
hehe.. no bugs.. just that i've got to make install.cgi install it for you.. that's all..

the program itself is lacking the multiple ratings feature..

(you can have multiple fields).. but it doesn't do anything with the other fields..

[i don't want to make it now... Smile maybe later.. i was hoping that somebody else that knew perl would do it.. it's rather easy.. i put the rating fields array in already.. just you have to make a foreach to display each of them and to average them up...

jerry
Quote Reply
Re: REVIEW.CGI In reply to
Hi,

=========
the program itself is lacking the multiple ratings feature..
=========

I thought that is what seperates (mainly) your mod from the one by CEGlobe. There may be other differences. At least I have been waiting for that reason. I mean really waiting.
Quote Reply
Re: REVIEW.CGI In reply to
uhh... ceglobe's mod has exactly what my mod has of multiple ratings.. just the ability to check each rating..

cause i gave him my code..

i don't want to work on review anymore.. so i rather have you guys work on it.. just like how i work on links.. Smile

anyways.. i have been doing my website the past few days.. nothing else.. Smile

have a look..
http://www.pdamania.com/

jerry
Quote Reply
Re: REVIEW.CGI In reply to
also.. what seperates mine and ceglobe's is actually how it is coded.. hehe

in my opinion.. my code is alot more compact and very easy to understand.. [easy to mod]

jerry
Quote Reply
Re: REVIEW.CGI In reply to
Widgetz,

So, when are you releasing it?
Quote Reply
Re: REVIEW.CGI In reply to
i could if i wanted to right now Wink

in your point of view.. you think..

"need the mod.. someone made the mod.. get the mod.."

i think..

"make the mod.. make the mod.. still make the mod.. make the mod.. make the mod.. make the mod.. make the mod.. finish the mod.. fix the mod.. make more of the mod.. make more of the mod.. make mod easy to install.. make mod the way they want it.. reply to all the emails about when mod will be out.. release mod.. get more email about how to install the mod.. reply to those.. get more email about how to use mod.. reply to those.. get more email about how to make a link to mod.. reply to those.. get more email about how to make mod look prettier.. DON'T REPLY TO THOSE.."

and then there is alot more.. heh

anyways.. i just made one more step to make the install easier.. but now i have three more.. hehe.. db_utils.pl, nph-build.cgi, and admin_html.pl...


grrrrrr..
jerry
Quote Reply
Re: REVIEW.CGI In reply to
Widgetz,
SweetA$$ site. I like the header and the logo. Plus the way the mods integrate with it. I think for the mod, you should do what you want because people may want it very badly and say they are dying for it but you've spent all that time working on it so i think what you want to do with it matters more. My opinion.

------------------
------------------------------------------
Lavon Russell
LookHard! Search
www.lh.yi.org
webmaster@lh.yi.org

[This message has been edited by Bmxer (edited August 16, 1999).]
Quote Reply
Re: REVIEW.CGI In reply to
i've never been awake so early in the morning! geez! i go to sleep when the sub comes up.. and i wake up when it goes down.. hehe

anyways... i think i'm done

DO NOT INSTALL THIS UNLESS YOU KNOW WHAT YOU ARE DOING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

i'm SOOOO serious about that Smile

anyways.. i made a really simple but easy to use instructions script.. hehe

www.widgetz.com/review/

check out how it works

http://www.widgetz.com/review/1.txt
http://www.widgetz.com/review/2.txt
http://www.widgetz.com/review/3.txt

etc.. it's really easy.. the next and the prev checks to see if there is the next or the prev file Smile

serious.. do not install... unless you know what you are doing!!

jerry

[This message has been edited by widgetz (edited August 17, 1999).]
Quote Reply
Re: REVIEW.CGI In reply to
some features it's lacking

A COMPLETE multiple rating system.. (alot of people should get working on that.. many emailed me they would do it)

DELETE REVIEWS when links deleted.. not a hard one.. just a little twitch to db.pl's sub delete_records..

that's all for now..

jerry
Quote Reply
Re: REVIEW.CGI In reply to
Man, with those instructions, i really believe you were up that long.

------------------
------------------------------------------
Lavon Russell
LookHard! Search
http://www.lh.yi.org
webmaster@lh.yi.org
Quote Reply
Re: REVIEW.CGI In reply to
actually.. i just woke up early Wink

went to sleep earlier than usual.. 12:30 am

i forgot to include in the instructions about.. the #!/usr/bin/perl

thing..

jerry
Quote Reply
Re: REVIEW.CGI In reply to
i've spent more time making instructions for it.. then making it.. hehe

anyways.. i'm almost done..

jerry
Quote Reply
Re: REVIEW.CGI In reply to
oh.. btw.. did you notice for the subcategories under software..

Quote:
H-PC, P-PC, H-PC_Pro, Auto_PC..

(not in alphabetical)

cause i made a better version of the subcats like yahoo.. you list them by either doing

(ALL)1 or (ALL)2

for all alphabetical.. and styles 1 styles 2

OR the way i did it..

(H-PC|P-PC|H-PC_Pro|Auto_PC)1

of course there is (*&DFHDJF)2 also..

jerry
Quote Reply
Re: REVIEW.CGI In reply to
Hi!
Great script! But how may I use it, without loosing all ratings?

bye
Tiggr

------------------
visit http://larp-welt.de/
the resource for german live roleplaying

Quote Reply
Re: REVIEW.CGI In reply to
you can't.. if you want accurate averages and log all ips.. you have to reset..
Quote Reply
Re: REVIEW.CGI In reply to
Widgetz,

Can you restrict users from voting/reviewing only once per link/item ie by IP blocking or some other method to abstain from multiple useless reviews?

Thanks.
Quote Reply
Re: REVIEW.CGI In reply to
Hi, having a few probs

Get this :

Installing Information

Root Path /usr/home/padders/public_html/pages
CGI Path
Admin Path /usr/home/padders/public_html/cgi-bin/links/admin
Backup Path /usr/home/padders/public_html/cgi-bin/links/admin/backup
/review.cgi File

Creating File Error! /review.cgi: Permission denied

um... i have chmod everything to 777 to get it to work.... what is going on?

why is no cgi path shown

and also where is review.cgi coming from???? i do not have a copy or anything?

sorry for what maybe a 'silly' question :-)
Quote Reply
Re: REVIEW.CGI In reply to
ok, i also get this when i click on the link /review.cgi

Error! /review.cgi: No such file or directory
Quote Reply
Re: REVIEW.CGI In reply to
you don't follow instructions.. Smile

STEP 1...

umm.. socates.. that's in it.. it blocks forever Smile which is better than right now.. block for recent only..

jerry
Quote Reply
Re: REVIEW.CGI In reply to
all the new files come from install.cgi.. it takes them off my server and puts it on yours..

i have only had a report of ONE successful installer.. heh

jerry
Quote Reply
Re: REVIEW.CGI In reply to
I can't even read the instruction text Widgetz. The font colors too light.
Quote Reply
Re: REVIEW.CGI In reply to
wow, you are write i skipped straight past that after chaning the !perl thingy.

About to try it again. Thanks for creating such a great mod though.
Quote Reply
Re: REVIEW.CGI In reply to
adjust your browser.. or you can read the text..

1.txt, 2.txt, 3.txt etc..

the cgi reads off of those..
Quote Reply
Re: REVIEW.CGI In reply to
ok. i have everything installed and seems to work now but ...

<possibly stupid question>

how do you call the review program ie so that people can add reviews? do i not need to change link.html template?

sorry, i could not find any info about this

</possibly stupid question>
Quote Reply
Re: REVIEW.CGI In reply to
ok.. got it i think

just replace rate.cgi with review.cgi in the link in link.htm

oops :-)
Quote Reply
Re: REVIEW.CGI In reply to
WOOOOOOWWWWWWWWWWWWWWw

I NOW WORKS :-)

This is an amazing mod - just what i needed.... thank you so much. (I think Alex will want to include it in next release :-) )

Two quick things:

1. When someone submits a mod it takes them to a very simple text page. Although using the back button is easy for us some do not even know of its existence (my mum!)
--- where can i edit the look of this page. The best thing i guess would be that brief notice, a 1/2 sec pasuse and then redirection either to ratings page for that link or to the directory where link is listed - what you think?

2. The images that are meant for the ratings - where should they be?

Thanks again :-)
Quote Reply
Re: REVIEW.CGI In reply to
uh.. the templates.

review_form.html
review_error.html
review_success.html
and review.html

hehe.. for non templates..

site_html.pl .. on the bottom.. sub site_html_review_form etc..

enjoy
jerry
Quote Reply
Re: REVIEW.CGI In reply to
you might want to download the files that the install.cgi modified..

jerry
Quote Reply
Re: REVIEW.CGI In reply to
FYI: When I viewed with NS the text was fine. I think IE is shrinking the size one font even more making it microprint (hench, it looks lighter too). I saw this in IE5 and 4. If anyone else is having trouble reading, try NS.

Quote Reply
Re: REVIEW.CGI In reply to
IE always does that for any site.
Quote Reply
Re: REVIEW.CGI In reply to
Have you checked the font settings and made them normal because my site comes up neutral for both and ie and ns are at the same font.

------------------
------------------------------------------
Lavon Russell
LookHard! Search
http://www.lh.yi.org
webmaster@lh.yi.org
Quote Reply
Re: REVIEW.CGI In reply to
lala..

uhh. i don't care.. i'm leaving it like that.. hehe..

[This message has been edited by widgetz (edited August 17, 1999).]
Quote Reply
Re: REVIEW.CGI In reply to
umm.. ok... people are asking this question.. and i just want to post it here to clarify..

YOU DO NOT DOWNLOAD REVIEW.CGI...

YOU DOWNLOAD REVIEW.ZIP AND IN IT IS 3 FILES.. readme.txt, install.cgi, reset.cgi

you put INSTALL.CGI in the directory with LINKS.CFG... (OF COURSE AFTER YOU DO STEP 1!!)

install.cgi makes review.cgi, review.db, review.def, valrev.db, (if you use templates, review.html, review_form.html, review_error.html, review_success.html)

it also modifies site_html.pl or site_html_templates.pl depending on which one you use..

OK!!? Smile

however it does not modify links.cfg, nph-build.cgi, admin_html.pl and db_utils.pl! Smile this you do through the manual instructions....!!

geeez. Smile people are asking me.. WHERE IS REVIEW.CGI WHERE WHERE WHERE! Smile hehe.. maybe i should rename install.cgi to review.cgi..

jerry
Quote Reply
Re: REVIEW.CGI In reply to
If you forget to upload the modified links.cfg in step 1 then you get a message saying no review.cgi

So, after step 1 upload links.cfg and then run install.cgi

OK, I have installed it successfully. Got this message
=======
Reseting Ratings and Votes
Done!
=======

BUT, But this is a new installation and I have an empty database. So, I shall further test it.

Thanks for all the hard work, that went into this and a fantastic set of instructions.

Gracias,
Over and Out

[This message has been edited by socrates (edited August 17, 1999).]
Quote Reply
Re: REVIEW.CGI In reply to
ok.. hehe.. i'll put that as step 1.9 Smile

[This message has been edited by widgetz (edited August 17, 1999).]
Quote Reply
Re: REVIEW.CGI In reply to
Hi,

I installed it. Everything seemed to go okay. install.cgi and reset.cgi showed no errors.

However, when I tried to build the pages, I got a "page cannot be displayed" error message. I got the same error message for build all, staggered, and staggered (auto).

I checked permission of nph-build, and it was set 755. Other permissions seemed to be set okay, as well.

Any ideas?

Many thanks.

------------------
www.armynavy.com/


[This message has been edited by TrainedMonkey (edited August 17, 1999).]
Quote Reply
Re: REVIEW.CGI In reply to
is this a server error or a script error?

does it show up like a 404 or using CGIERR?

never heard of this before.
Quote Reply
Re: REVIEW.CGI In reply to
Nice mod! Got it up and running on a test site with few problems.

One thought, In sub get_rating_image don't hard code the URL for the rate images.

------------------
JRM Studios www.jrmstudios.com
The Hotrodding Network www.hotrodding.net
Web discuss Free speech newsgroups - www.webdiscuss.com



Quote Reply
Re: REVIEW.CGI In reply to
Looks like a server error.

"Cannot find server"

Thanks.

------------------
http://www.armynavy.com/
Quote Reply
Re: REVIEW.CGI In reply to
Just a few mistakes with your install script. It produces the html code wrong for, => and <=>. I forget how it suppose to be. Anyway, I had to put that in the review.def when I upload. Next thing, review_failure.html should be review_error.html. I had some problems with that. This is all the problems I found. I should be finish installing all of it in a few mins. Smile
Quote Reply
Re: REVIEW.CGI In reply to
One more thing too. The images aren't transfering from your server to mines. . . Might want to check that out too! Otherwise, everything works OK for me! Smile Smile Smile Smile Smile Smile Smile Smile Smile Smile Smile Smile Smile Smile Smile Smile Smile Smile Smile Smile Smile Smile

------------------
http://www.techdevelopers.com
ASP, HTML, CGI, Flash, and more!

HPCalc.com - English
Official HP Calculator Site
http://www.hpcalc.com/english

Quote Reply
Re: REVIEW.CGI In reply to
not sure what you meant about the

<= <=> thing..

but i'll do the failure one in a sec. hehe
Quote Reply
Re: REVIEW.CGI In reply to
Code:
Rating => [4,'numer',10,10,1,'','^[\d\.]+$'],

I can't get it to display the problem because this ubb forum has the HTML turned on, but if you ran install and check the file, links.def and look at the part where it initializes the structure of the db, look at the => and you will see the problem.

[This message has been edited by XanthisHP (edited August 17, 1999).]
Quote Reply
Re: REVIEW.CGI In reply to
Jerry,

Are you using the same images from "Phoenix"? or is there some place where we can get those stars?

Other than that eveything else seems to be working fine.

Thanks again.

PS I am not sure what XanthisHP is refering to - review.def seems to be fine.
Quote Reply
Re: REVIEW.CGI In reply to
mine are a little different than pheonixes.. his/her (sorry :\) is rate00.gif - rate20.gif

mine is rate0.gif - rate20.gif

that's the only difference..

you can get them from pheonix and rename them..

if you use pheonix's mod.. you might want to switch over to mine..

just add this in the site_html_link part..

Code:
rate_img => &get_rating_image ($rec{'Rating'}),

nothing else.. hehe

jerry..

[This message has been edited by widgetz (edited August 17, 1999).]
Quote Reply
Re: REVIEW.CGI In reply to
Socrates, maybe you didn't have to hand make the review.def, but I had to because my permissions on my server wouldn't allow install.cgi to create it. If you ran install.cgi and viewed the review.def, the html code for producing =>, looks like this, =& gt;

I had to put a space in between the & and the gt because it will produce => on this UBB forum. I just noticed that the html is turned off on this forum though. Anway, this will get confusing for PERL newbies who can't get review.def installed with install.cgi. BTW, I got the images from another place, so everything works! Good job Jerry! Smile
Quote Reply
Re: REVIEW.CGI In reply to
oh..hehe you were talking about the VIEW..

hehe.. i know why.. i put the code to change to & lt and & gt before the & amp; so it changed them to & amp;gt;
Quote Reply
Re: REVIEW.CGI In reply to
so far it looks like non template sites have more luck.. hehe. .the first person to be able to install this was

http://www.123webmaster.com/

they've got it all down pretty good.. even before i got all those bugs out.. hehe

i would like to see a template site and see if it is working alright.. post some urls please..

jerry
Quote Reply
Re: REVIEW.CGI In reply to
Jerry, I am using templates on my site.

http://www.techdevelopers.com
Quote Reply
Re: REVIEW.CGI In reply to
PROBLEM:

I started to install the mod on a brand new links installation. It's my third install to create a new section on my site.

I did completed step 1 and downloaded review.zip.
Uploaded install.cgi and chmod'ed it 755
run it and....

server 500 error Frown did I miss anything....??

Looking through the script I found the line: Use LWP
Could that be the problem?? I can't use LWP on my server Frown

Anyone have any ideas, I'm willing to do the changes by hand if anyone could let me know which ones.

Jeroen


------------------
Free 4U2: a searchable directory of free stuff
http://www.free4u2.com

When something does not function properly, hit it hard.....
.....When it breaks it had to be replaced anyway.


Quote Reply
Re: REVIEW.CGI In reply to
I'm with Tiggr & MikeB. I have external rate-it links scattered out all over the web and I can't mess with that, but I would like to install review-it.

Any help?

------------------
Will
Webmaster
FishHoo! Search index for Fishermen
www.fishhoo.com
Quote Reply
Re: REVIEW.CGI In reply to
I'm going to use this as is for a separate installation, but I'm with the "review only" folks for my main site. The external ratings feature has become too important of a promo tool for me. Besides, starting all the ratings over at this point is just not a good option (it took too long to build up the ratings I have).

How about it Widgetz? Can we convince you to put another pot of coffee on and take a look at what would need to be stripped out so it will just generate reviews?
Quote Reply
Re: REVIEW.CGI In reply to
Hi!
I only want to add the reviews, but I don't want to change the ratings-system! Is there a way to do this with this mod? Because it's the best review-system I found for links. But I have a lot of ratings, and I don't want to loose them!

I realy would need a way to install only the review-system, without a new ratings-system.

bye
Tiggr

------------------
visit http://larp-welt.de/
the resource for german live roleplaying

Quote Reply
Re: REVIEW.CGI In reply to
Never mind, I figured it out.

[This message has been edited by XanthisHP (edited August 18, 1999).]
Quote Reply
Re: REVIEW.CGI In reply to
Hi guys!

I know this one is probably a lamre, but here it goes:

When I execute install.cgi everything goes fine, except the creation of the templates. I receive a permission denied error. Any suggestions?

------

Nevermind Smile I figured it out........ I had to CHMOD the templates directory to 777 first, then back to 666.

Thanx!

Michael G. Bronner
emMGee Graf-X, Web Design
www.emmgee.com

[This message has been edited by MikeB (edited August 18, 1999).]
Quote Reply
Re: REVIEW.CGI In reply to
Where should i put the grraphics (stars) and where in the code can i change this directory

i get this linking to the graphics:

<img src="/images/rategifs/rate0.gif" width="102" height="18" alt="0" border="0">

they did not copy to my site if install.cgi was meant to make them.


---/mike B

you probably need to change the permission of the template files. Set it to 777 to make sure it works, and also do it on the directory Templates. that should work.
Quote Reply
Re: REVIEW.CGI In reply to
I have the same intent as Tiggr: I only need to install the review mod, not the ratings mod........ any ideas?

Thanks,
Michael G. Bronner
emMGee Graf-X, Web Design
www.emmgee.com
Quote Reply
Re: REVIEW.CGI In reply to
hi.. stripping out the rating system is quite easy.. it would make the code much shorter also.. and EASIER to install. hehe

about the 500 error.. you can upload LWP yourself and say

use "/path/to/lwp/"; i think....

anyways.. right now i have to make 2 mods.. about the images.. the image DIR is configurable through links.cfg..

hmm... whatelse.. anyways.. if i missed anything.. i'll get back to it later..

jerry
Quote Reply
Re: REVIEW.CGI In reply to
MOD 1 (for review.cgi)
======================
Description: This will let you have the number of reviews on the html pages by adding a new field just like the rating and votes field..
======================
file: links.def
======================

Under this:
Code:
Votes => [19, 'numer', 10, 10, 1, 0, '^\d+$'],

add this:

Code:
Reviews => [20, 'numer', 10, 10, 1, 0, '^\d+$'],

(change the field number to the correct one)

add this to the list of field numbers a few lines down..

Code:
$db_reviews = 20;

(change the number to whatever yours is..)

in nph-build.cgi...

find this line:

Code:
$total{$id} += $values[4];

below it add:

Code:
$review{$id}++ if ($values[5]);

then find this a few lines down..

Code:
if (exists $votes{$id}) {
$rating{$id} = ($total{$id}/$votes{$id});
$rating{$id} = sprintf ("%.2f", $rating{$id});
print "\tUpdating rating to $rating{$id} for link id $id\n" if ($values[$db_rating] != $rating{$id});
$values[$db_rating] = $rating{$id};
$values[$db_votes] = $votes{$id};
}

and below that.. add:

Code:
if ($values[$db_reviews] != $review{$id}) {
print "\tUpdating reviews to $review{$id} for link id $id\n";
$values[$db_reviews] = $review{$id};
}

now you have to add that extra field in links.db!! Smile

jerry
Quote Reply
Re: REVIEW.CGI In reply to
About LWP:

It is not uploadable, it has to be compiled as a module with perl itself.

Root access is required.

Isn't it an idea to make the scripts downloadable?? I think I'm not the only one without LWP

Jeroen

------------------
Free 4U2: a searchable directory of free stuff
http://www.free4u2.com

When something does not function properly, hit it hard.....
.....When it breaks it had to be replaced anyway.


Quote Reply
Re: REVIEW.CGI In reply to
do you guys realize it can't display a graph without the ratings?? hehe. i guess your in it for the database then?

jerry
Quote Reply
Re: REVIEW.CGI In reply to
lwp is uploadable.. beleive me Smile

i've done it on hypermart when they didn't have it.. now they do.. as a matter of fact.. links uses an uploaded version of lwp I THINK..

jerry
Quote Reply
Re: REVIEW.CGI In reply to
MOD 2
====================
taking out the ratings..
====================

first in review.cgi..

delete:

Code:
foreach (@rating_fields) {
unless (($in{$db_cols[$_]} =~ /^\d\d?/) and ($in{$db_cols[$_]} >= 1) and ($in{$db_cols[$_]} <= 10)) {
&site_html_review_failure ("Your $db_cols[$_] '$in{$db_cols[$_]}' is invalid.") and return;
}
}
if ($in{$db_cols[$db_review]}) {
($in{$db_cols[$db_contact_name]}) or &site_html_review_failure ("$db_cols[$db_contact_name] (Can not be left blank with Review)") and return;
($in{$db_cols[$db_contact_email]}) or &site_html_review_failure ("$db_cols[$db_contact_email] (Can not be left blank with Review)") and return;
}

then in site_html.pl or site_html_templates.pl

delete sub get_rating_graph...
delete sub get_rating_image (unless you want to use it for links.. much shorter than pheonix's)

then change your sub get_reviews to:

Code:
sub get_reviews {
my ($id) = @_;
my (@values, $reviews);
require "$db_lib_path/review.def";

open (DB, "<$db_file_name") or &cgierr ("Can't open review file '$db_file_name'. Reason: $!");
if ($db_use_flock) { flock(DB, 1); }
LINE: while (<DB> ) {
/^#/ and next LINE;
/^\s*$/ and next LINE;
chomp;
@values = &split_decode($_);
if ($values[$db_linkid] eq $id) {
($values[$db_review]) and (push (@reviews, @values)) and ($reviews++);
}
}
close DB;

if ($reviews) {
@reviews = &build_sorthit (@reviews);

$totalpages = int($reviews/$reviews_per_page);
if ($totalpages < $reviews/$reviews_per_page) { $totalpages++; }
if ($page > $totalpages) { $page = 1; }

$displayed1 = ($page-1) * $reviews_per_page + 1;
$displayed2 = $reviews_per_page * $page;
$displayed2 = $displayed2 - ($displayed2 - $reviews) if ($page == $totalpages);

my $prev_page = $page-1;
my $next_page = $page+1;

$span = qq~<font color="#c0c0c0"><b>< Previous</b></font>~ if ($prev_page == 0);
$span = qq~<a href="$build_review_url?$links_key=$id"><b>< Previous</b></a>~ if ($prev_page == 1);
$span = qq~<a href="$build_review_url?$links_key=$id&page=$prev_page"><b>< Previous</b></a>~ if ($prev_page > 1);
$span .= qq~ <font color="#808080">/</font> ~;
if ($page == $totalpages) { $span .= qq~<font color="#c0c0c0"><b>Next ></b></font>~; }
else { $span .= qq~<a href="$build_review_url?$links_key=$id&page=$next_page"><b>Next ></b></a>~; }

@reviews = @reviews[(($#db_cols+1)*($reviews_per_page*($page-1))) .. $#reviews] if ($page > 1);

for ($i = 0; $i < $reviews_per_page; $i++) {
%tmp = &array_to_hash ($i, @reviews);
last if ($tmp{$db_key} eq "");
$results .= &site_html_review (%tmp);
}
}
}

now.... in site_html_review_form.. you are going to get alot of unknown tags.. just delete each one of them from the list.. except for the ones for review.. and take them out of the template..

for people not using templates.. it should just show up blank on the page.. delete them as you find them! Smile

now in nph-build.cgi you are going to have to change your update_ratings to the old one..

here is the code..

Code:
sub build_update_ratings {
# --------------------------------------------------------
# Updates the ratings of each link.
#

# Let's collect the ratings.
my ($id, %rating, %votes, @values, $input);
opendir (HITS, $db_rates_path) or &cgierr ("unable to open ratings directory: $db_rates_path. Reason: $!");
while (defined ($id = readdir HITS)) {
next unless ($id =~ /^\d+$/);
open (HIT, "$db_rates_path/$id") or &cgierr ("unable to open rating counter: $db_rates_path/$id. Reason: $!");
my $input = <HIT>;
chomp $input;
($votes{$id}, $rating{$id}) = split /\s/, $input;
close HIT;
}
closedir HITS;

# Update the links database.
my $output = '';
INLINE: {
local ($^I, @ARGV) = ('.bak', $db_links_name);
LINE: while (<> ) {
/^#/ and print OUT and next LINE; # Skip comment Lines.
/^\s*$/ and next LINE; # Skip blank lines.
chomp; # Remove trailing new line.
@values = split /\Q$db_delim\E/;
$id = $values[0];

if (exists $votes{$id}) {
$values[$db_rating] = (($values[$db_rating] * $values[$db_votes]) + $rating{$id}) /
($values[$db_votes] + $votes{$id});
$values[$db_rating] = sprintf ("%.2f", $values[$db_rating]);
$values[$db_votes] = $values[$db_votes] + $votes{$id};
$output .= "\tUpdating rating to $values[$db_rating] for link id $id\n";
}
print &join_encode(&array_to_hash(0, @values));
}
}
print $output;

# Delete the ratings.
foreach (keys %votes) {
unlink ("$db_rates_path/$_") or &cgierr ("unable to remove rating: $db_rates_path/$_. Reason: $!");
}
}

then in review.def you need to take out the Rating field...

and also this line:

Code:
# Rating Fields
@rating_fields = (4);

that should be all......

jerry
Quote Reply
Re: REVIEW.CGI In reply to
oh yea.. you want to put back the rate.cgi .. if you don't have it.. look in your backup dir for the one the install.cgi backed up..

and the rates folder in /admin/data/
chmod it to 777.

jerry
Quote Reply
Re: REVIEW.CGI In reply to
If LWP is uploadable you have to tell me which scripts to upload and how to use it.

I picked up the archive and it included only instructions on how to compile it.

Let me know how you did this on Hypermart if you want. I tried a few things but can't get it to work.

Jeroen

------------------
Free 4U2: a searchable directory of free stuff
http://www.free4u2.com

When something does not function properly, hit it hard.....
.....When it breaks it had to be replaced anyway.


Quote Reply
Re: REVIEW.CGI In reply to
OOPs.. i forgot but if you want it to be a review only..

you need to do this

Code:
'Contact Name' => [2, 'alpha', 40, 75, 1, \&admin_name, ''],
'Contact Email' => [3, 'alpha', 40, 75, 1, \&admin_email, '.+@.+\..+'],
Review => [4, 'alpha', '40x3', 500, 1, '', ''],

it changes it to require these fields..

jerry
Quote Reply
Re: REVIEW.CGI In reply to
there is a report of EMAILING the validation email for this.. i myself know how to take it out.. and made an easy way for this mod which was in the instructions.. but someone said it doesn't work..

anyone else? (this is only if you validate manually)

jerry
Quote Reply
Re: REVIEW.CGI In reply to
Same here. I did the normal Review.cgi mod, then up-moded it to review only. When i manually validated my test review, i received no email.



------------------
Michael G. Bronner
emMGee Graf-X, Web Design
www.emmgee.com
Quote Reply
Re: REVIEW.CGI In reply to
I have been having a problem with the email. I am using the full script but when a confirmation should be sent this is what gets sent :

Unkown Tag: Title

that is the sole contents of the email.

any ideas?

------------------
-------------------------
http://www.freeontheweb.com/
Reviewed and rated resources for webmasters
-------------------------
Quote Reply
Re: REVIEW.CGI In reply to
what i wanted to make it like was to not have the email at all..

but anyways.. i think you skipped step six or something.. there is a part in admin_html.pl that you need to add for it to not do it..

jerry
Quote Reply
Re: REVIEW.CGI In reply to
Thanks for the strip down Jerry!
Quote Reply
Re: REVIEW.CGI In reply to
YES! It worked on the first try! I know we don't know each other that well but, "I love you man. (Can I have your Bud Lite?)" Wink
Quote Reply
Re: REVIEW.CGI In reply to
yea.. it seems after awhile everyone is getting the install on the first try..

cause of a few bug fixes i guess..

jerry
Quote Reply
Re: REVIEW.CGI In reply to
How do we display the reviews on the detailed pages???

Thanks alot Jerry -> Your script is the best!
Quote Reply
Re: REVIEW.CGI In reply to
Oops. Spoke to soon.
CGI ERROR
==========================================
Error Message : unable to open ratings directory: . Reason: No such file or directory
The directory does exist though, and that's the problem.
Quote Reply
Re: REVIEW.CGI In reply to
why always that I try to install this mod I receive this message

Error! Can't retrieve review.cgi from widgetz.com! Try Again Later!

------------------
Quote Reply
Re: REVIEW.CGI In reply to
First of all, congratulations to Jerry on a job well done ! this mod is what ever links site needs.

i was wondering , i just installed links, and added the mod. so i dont have any previous rates in the database that i want to keep , so i will use it for both , reviews, and ratings . but , it threre a way that the rating can also be displayed just like before on the links page ?
it would be nice.

Thanks,

by the way, where can i get the stars images ?

[This message has been edited by Laith (edited August 19, 1999).]
Quote Reply
Re: REVIEW.CGI In reply to
Widgetz, this is what I get when validating a review:

Email Error: 2. Record validated, but couldn't send auto email. Reason: Bad Email addres: ''.

Also, how can I use the variables and hash items in review.def in nph_build.cfg without doing the require statement (that disrupts the entire database)?

Thanks!

------------------
Michael G. Bronner
emMGee Graf-X, Web Design
www.emmgee.com
Quote Reply
Re: REVIEW.CGI In reply to
Laith, if you mean the numbers, they still come up if you put the <%Rating%> code in link template. If it is the pictures you want then i am not so sure.

You can get the stars from

http://www.asan.com/users/phoenix/mod-ratings.html

------------------
-------------------------
http://www.freeontheweb.com/
Reviewed and rated resources for webmasters
-------------------------
Quote Reply
Re: REVIEW.CGI In reply to
kiels.. my script doesn't USE the ratings dir... you are obviously trying to use rate.cgi.. if you are doing the "review only" mod.. then you can add it back in in /admin/data/rates chmod 777

proenca.. do you have LWP? or maybe my server was down.. i'll make a downloadable version when i don't feel so sick [i've been throwing up all day]

laith.. the ratings can't be displayed on the review page (like how they are now) becuase links.db only keeps track of the votes and the current "average" rating.. so it can't find the highest or lowest.. or it can't tell you how many of each number where rated on..

"average" cause it seems to work wierdly.. not sure if alex did mean to do that.. but it's cause you can't average something out that is using another average Smile

i beleive he times VOTESxRATINGS... and then he adds the rating in and then divides that plus votes plus the new rating.. which isn't a real average Smile

also.. i'll make some links on the instructions page for you people to get the stars and the "mods" for it..

mikeb.. that prolly means you have a bad email address Smile yea.. i have no clue on what to do with the review.def into the nph-build.cgi.. it is not a good idea.. what i would do is make a nph-review.cgi or something.. hehe..

woo.. so far so good.. i went to sleep at around 4:15 am.. got up 2:00 pm.. felt sick.. tried to stand up.. kept putting cold water on my head to "soothe" it.. hehe and then i took a shower.. long one.. hehe.. couldn't stand up.. closed my eyes so i wouldn't feel dizzy.. and then i didn't dry my hair.. so i could sleep with cold water.. but then i threw up all my ADVIL.. hehe.. SOOTHING.. i went to sleep at like 3:15pm and now i'm awake at 5:30pm.. still feeling weird.. haven't thrown up since! Smile

jerry

jerry
Quote Reply
Re: REVIEW.CGI In reply to
Hey widgetz,

Take a little more care for yourself man. You are working to hard on all these mods. It's not worth it getting sick of it.

But anyway, I hope you feel a little better and I am also looking forward to the downloadable version since I still can't use LWP.

I wrote my host provider but still no answer.

Take care,

Jeroen

------------------
Free 4U2: a searchable directory of free stuff
http://www.free4u2.com

When something does not function properly, hit it hard.....
.....When it breaks it had to be replaced anyway.


Quote Reply
Re: REVIEW.CGI In reply to
hehe.. dunno.. i always go to sleep late.. just this morning i woke up with one big headache.. and then it turned to stomach ache.. the only thing i have eaten was advil though.. hehe.. whenever i am about to eat something i feel sick again and really want to throw up.. anyways.. i have to go somewhere tonight.. so i can't get to anything til tommorrow..

i promised ceglobe i'll do something for him in the morning and it's pretty long thing.. hehe an "essay" sorta.. product review.. anyways.. it will help me get my "writing" skills back.. all i know to write right now is...

Code:
if ($in{'money'} > 999999999999999999999) {
print "YOU ARE RICHER THAN BILL GATES!!";
}
else {
print "Sorry man.. try again..";
}

hehe..

jerry
Quote Reply
Re: REVIEW.CGI In reply to
Laith, that shouldn't be hard at all... you can create you own images, just name them the same as the stars, in the same order. Smile

Cheers!

------------------
Michael G. Bronner
emMGee Graf-X, Web Design
www.emmgee.com
Quote Reply
Re: REVIEW.CGI In reply to
After installing this mod word for word ( i think !) when i try to rate a site i get this error:
CGI ERROR==========================================
Error Message : Can't increment counter file '/15'. Reason: Permission denied
Script Location : /u/web/antiq7/cgi-local/links/rate.cgi
Perl Version : 5.003


any ideas anyone?
thanks
Quote Reply
Re: REVIEW.CGI In reply to
padders, Thank you for the link to the images.
what i meant was for the average rating to appear as stars in the links page, i think that if we can do it with a smaller size stars, it would be very useful and elegant.

if anyone has any ideas how this can be done, please help me out.

p.s. this thread is getting too large, why dont you guys start a new thread Smile
Quote Reply
Re: REVIEW.CGI In reply to
I tried to make a new post, anyone saw review.cgi (2) ???? but you guys decided it was not such a good idea i guess

:-)
Quote Reply
Re: REVIEW.CGI In reply to
hello...

uhh dazed.. review.cgi has nothing to do with rate.cgi

ok..

umm.. if anyone wants to post.. please redirect to:

http://www.gossamer-threads.com/...um3/HTML/002805.html

this post is way to big.. and i don't like waiting for it to load anymore..

also.. bobsie if you would be so kind and close this post..

we'll leave it at 111 replies Smile

jerry