TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 195,831
  • Total Topics: 21,287
  • Online today: 98
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 97
  • Total: 97

TP Reviews module

Started by Megaforum, May 24, 2008, 04:25:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ken.

Quote from: Bec on October 09, 2009, 10:57:37 PM
Not sure if this is being worked on or not... but I am wondering with the rate fields rather than everyone having to input them when the review is created, can these be setup by default?

That may not work so well Bec.  ;)
If you have several different categories, as is the case with mine, then you are going to need different rate fields for each category.

If you would like to look at just two of mine for a comparison you'll see that there are completely different rate questions for each review:
http://www.ourfamilyforum.org/FamilyForum/index.php?action=tpmod;rvws;sa=viewitem;id=80
http://www.ourfamilyforum.org/FamilyForum/index.php?action=tpmod;rvws;sa=viewitem;id=17
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

Bec

totally understand, mine would pretty much all be the same as we are reviewing bridal suppliers so its either good or bad lol

lextalionis

#152
Brad, any update on the guest access?  If not, then could you explain which errors you corrected and update the OP files?

Right now for me the issues of not being able to post html in the item review description is kind of a problem and holding me on creating a template for the products I intend to review.  I know Bec was considering looking at this too.

Thanks,
Roy

IchBin

I have fixed a few errors. One of them is when you view an item that does not have any ratings. In figuring the value for a rating, it was doing a division on the raters and ratings. If one value was empty, it was dividing by zero (which throws an error in the log). I have also fixed a few undefined index errors. Other than that, I haven't had a chance to look at the guest access yet. I'll try to post my files tonight.

IchBin

Ok, I have fixed quite a few things today on my lunch.

TPReviews Changes::

  • Guests should be able to rate now.
  • Links to edit or delete comments for guests are removed. I do not think guests should be allowed to do that. By looking at the code, I think a permission may need to be added to allow/disallow a user to edit a comment.
  • Fixed (division by zero) for ratings
  • Added fix to show/allow "Add Item" button for users that Dragoon posted back on page 6 of this topic.
  • Several type-o's and errors in the code.
  • Added english-utf8 file

Suggested features:

  • Add avatar of user Reviewer posted.
  • Option to have highest rated item on front page from one or more categories.
  • Not sure I want to add images to category view. Adding images gets very very complicated with uploading etc, so that option will have to wait.

If I missed anything major, please let me know. I can't guarantee any time I can spend on this. But I'll definitely try. :) Will attach the updated zip in the first post. It is not necessary to reinstall if you already have it installed. Instructions below for update.

Update instructions:

  • Upload and replace all the files and folders in the tp-files/tp-modules/TPReviews folder.
  • Upload TPReviews.template.php file to the Themes/default/ folder.
  • Upload TPReviews.english.php file to the Themes/default/languages folder.

IchBin

#155
A crap, just realized guest rating still isn't working as expected. Hold off on updating please.


--edit--
Well, it would appear it's much more involved than I originally thought. The code now allows a guest to vote. However, a guest can only vote once. This means, no other guest can vote. How would you keep track of guests who vote? If you don't, a guest could just sit there and vote multiple times... So, I'll have to think on this problem and see what kind of way we can allow more than one guest to vote.

Ken.

Just installed this current version to my test site IchBinâ„¢.  :)
http://www.ourfamilyforum.org/tptest2/index.php?action=tpmod;rvws

One thing on the install, it would not install as is to SMF 1.1.10, so I did an edit to package-info.xml to change the version numbers and it went OK after that.
Quote<type>modification</type>
   <install for="1.1.10 - 1.1.99">
      <code>tp_do_mod.php</code>
      <code>TPReviews/Install/TPReviews_db.php</code>
      <require-dir name="TPReviews" destination="$boarddir/tp-files/tp-modules" />
      <require-file name="TPReviews/Templates/TPReviews.template.php" destination="$themedir" />
      <require-file name="TPReviews/Languages/TPReviews.english.php" destination="$languagedir" />
   </install>
   <uninstall for="1.1.10 - 1.1.99">

Don't know if you want feedback on this version but I'll post my error log entries in case you do.

These entries in the log occur after navigating to an existing test review:
http://www.ourfamilyforum.org/tptest2/index.php?action=tpmod;rvws;sa=viewitem;id=2
QuoteApply Filter: Only show the error messages of this URL  http://www.ourfamilyforum.org/tptest2/index.php?action=tpmod;rvws;sa=viewitem;id=2
Apply Filter: Only show the errors with the same message
8: Undefined index: by
File: /home/kenkayjm/public_html/tptest2/Themes/default/languages/Post.english.php (tp_below sub template - eval?)
Line: 90
   
8: Undefined index: tp-said
File: /home/kenkayjm/public_html/tptest2/tp-files/tp-modules/TPShout/Sources/TPShout.php
Line: 432
   
8: Undefined index: tp-said
File: /home/kenkayjm/public_html/tptest2/tp-files/tp-modules/TPShout/Sources/TPShout.php
Line: 432
   
8: Undefined index: by
File: /home/kenkayjm/public_html/tptest2/Themes/default/languages/Post.english.php (tp_below sub template - eval?)
Line: 90
   
http://www.ourfamilyforum.org/tptest2/index.php?action=tpmod;rvws;sa=comment;id=2
Apply Filter: Only show the errors with the same message
8: Undefined index: tp-said
File: /home/kenkayjm/public_html/tptest2/tp-files/tp-modules/TPShout/Sources/TPShout.php
Line: 432
   
8: Undefined index: tp-said
File: /home/kenkayjm/public_html/tptest2/tp-files/tp-modules/TPShout/Sources/TPShout.php
Line: 432
   
http://www.ourfamilyforum.org/tptest2/index.php?action=tpmod;rvws;sa=viewitem;id=2
Apply Filter: Only show the errors with the same message
8: Undefined index: by
File: /home/kenkayjm/public_html/tptest2/Themes/default/languages/Post.english.php (tp_below sub template - eval?)
Line: 90

http://www.ourfamilyforum.org/tptest2/index.php?action=tpmod;rvws;sa=viewitem;id=2
Apply Filter: Only show the errors with the same message
8: Undefined index: tp-said
File: /home/kenkayjm/public_html/tptest2/tp-files/tp-modules/TPShout/Sources/TPShout.php
Line: 432
   
8: Undefined index: tp-said
File: /home/kenkayjm/public_html/tptest2/tp-files/tp-modules/TPShout/Sources/TPShout.php
Line: 432
   
8: Undefined index: by
File: /home/kenkayjm/public_html/tptest2/Themes/default/languages/Post.english.php (tp_below sub template - eval?)
Line: 90
   
8: Undefined index: tp-said
File: /home/kenkayjm/public_html/tptest2/tp-files/tp-modules/TPShout/Sources/TPShout.php
Line: 432

http://www.ourfamilyforum.org/tptest2/index.php?action=tpmod;rvws;sa=viewcat;id=1
Apply Filter: Only show the errors with the same message
8: Undefined index: tp-said
File: /home/kenkayjm/public_html/tptest2/tp-files/tp-modules/TPShout/Sources/TPShout.php
Line: 432
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

IchBin

All of those Undefined errors are from the new version of TP beta 5b Ken.

Are you saying this version wouldn't install unless you edited the 1.1.1 and changed it to 1.1.10 ? That shouldn't be a problem. Maybe I'll go test the install again and see if I have the same problem. Thanks!

Ken.

Yes, it would not install until the version number was changed in the package.

" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

ZarPrime

Quote from: IchBinâ„¢ on October 14, 2009, 09:24:38 PM
--edit--
Well, it would appear it's much more involved than I originally thought. The code now allows a guest to vote. However, a guest can only vote once. This means, no other guest can vote. How would you keep track of guests who vote? If you don't, a guest could just sit there and vote multiple times... So, I'll have to think on this problem and see what kind of way we can allow more than one guest to vote.

I don't know why it's so important to allow guests to vote.  There has to be some value in registering at a Forum, at least I would think so.  If it was me, I would just allow guests to view the review but not to comment or rate it.  Of course, this is only one person's opinion.  It does seem like it would make the module simpler to code though.

I've been to sites on the net that allow you to rate things without logging into something.  I suppose they either have to set a cookie or read IP addresses into a database so that the same person can only vote once.

ZarPrime

This website is proudly hosted on Crocweb Cloud Website Hosting.