vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Trader Ratings v1.2.0 (https://vborg.vbsupport.ru/showthread.php?t=65730)

eoc_Jason 05-31-2004 10:00 PM

Trader Ratings v1.2.0
 
Trader Ratings - A user feedback hack
Copyright ?2004 Jason Rabel, All Rights Reserved.
__________________________________
Latest TR Verson: 1.2.0
vB Versions: 3.0.0 - 3.0.9
Author: Jason Rabel
Contact: PM me here, I'll respond.
Site: EXTREME Overclocking
??????????????????????????????????

Updates:
??????????????????????????????????
1.2.0 - September 4, 2004
- Added Trader Ratings Stats Page (finally!)
- Added PM notification when someone receives feedback
- Changed how positive feedback percentage score is calculated (bugfix)
- Ability to "close" the Trader Ratings pages (for maintainence or whatever) - TRATING_CLOSED
- Ability to set the URL field when submitting feedback to required or optional - TRATING_REQ_URL

1.1.0 - June 7, 2004
- Added time-based user edit/delete abilities, set via TRATING_UEDIT constant in traderratings.php file
- Userdate field is now an int field to be consistent with vBulletin
- Userrating field changed to tinyint to save space
- Fixed timeframes for showing historical ratings
- Made some various code consolidation
- Added missing ".TABLE_PREFIX." statement
- Templates.txt file shows code for postbit & MEMBERINFO, with conditional examples
- All 3 templates changed heavily
- Added some more phrases & fixed missing phrases

1.0.1 - June 2, 2004
- Fixed a "divide by zero" display error
- Postbit template fixed so guests do not have a trader rating

1.0.0 - June 1, 2004
- Initial Public Release

Description:
??????????????????????????????????
Trader Ratings has evolved from my vB2 Buy/Sell/Trade User Rating System. This is a rating system for when members buy / sell / trade items from each other (presumably on a FS section of your forum). It is based on the honor system since there is no way to truly tell if they did engage in a transaction. (But I'm working on a way to fix that.) Trader Ratings came about because it was a pain to try and maintain a single thread listing good / bad traders and so far has worked out quite well.

Features:
??????????????????????????????????
? Rate another member: Positive / Negative / Neutral
? Specify Buyer, Seller, or Trade
? Leave comments about the deal
? Records date when rating created
? Specify a URL to the deal
? Display ratings over time
? Filter based on Buyer/Seller/Trade/or feedback they left for others
? Users can edit/delete ratings left for others (time based limitation)
? Admins & Mods can edit/delete anyone's ratings (just incase)
? Stats page showing best & worst rated members, and recent ratings
? PM notification when a person is rated

Basic Info:
??????????????????????????????????
I haven't written a FAQ or any real documentation yet, but the way the system works is very simple. The only part that might confuse someone is that the Feedback Score is based only on UNIQUE members. Also, there are simple checks in place to make sure they actually do select proper info and enter a comment. A user is not able to rate themself (obviously). Permissions for viewing / rating are similar to standard forum viewing / posting permissions. Also it checks to make sure users exist and all that good stuff.

Installation Info:
??????????????????????????????????
This hack is very simply to implement requiring only:
? 1 new file
? 5 new templates / 2-3 template changes (navbar, posbit/postbit_legacy, MEMBERINFO, memberlist_resultsbit)
? 52 new phrases
? 1 new DB table / 1 table DB change & index

An install/upgrade PHP file is included to do all the template/phrase/DB stuff, so basically you run that, upload the file, and edit your postbit template. BAM!

Screen Shots / Demos:
??????????????????????????????????
See Screenshots below, or you can view them on my forums: My Trader Rating Page

Standard Disclaimer:
??????????????????????????????????
BACKUP YOUR DATABASE & FILES BEFORE IMPLEMENTING THIS HACK!!!

Forums Using This Hack:
??????????????????????????????????
EXTREME Overclocking Forums
i-Club -- Forums
Accord Tuner
NSX Prime
Honda-Acura.net
Guns Network
PimpRig

(PM me your forum if you want me to add you to the list)

Donations:
??????????????????????????????????
This hack will always be free, however your donations are kindly accepted and will help towards further development. If you donate, please leave me some info (either your forum site or username at vB.org) so that I can thank you. :)
https://vborg.vbsupport.ru/external/2010/02/12.gif

Plans For Future Releases:
??????????????????????????????????
? rebuttal / followup comments
? item description (possibly instead of thread url)
? button on thread that buyer/seller clicks to tie the transaction to two people

atomic fireball 06-01-2004 09:51 PM

the screenshots look beautiful!
let me be the first to thank you for porting this over the vB3 and I'll install later tonight. Thanks again!

designBox 06-01-2004 09:52 PM

First to reply.... :D
Seems to be awesome.
Thanks for the good work
THUMB UP

Edited: DAMNED.... now i am the second to thank you :P

lifesourcerec 06-01-2004 10:18 PM

Installed it and a blank "Trader Rating: ()"

bgray 06-01-2004 10:21 PM

Thanks so much Jason! Installing now. :)


After Install: I'm having a couple of issues with a blank install on a new board the options for adding a feedback seem a bit off. see www.webmastertrader.com for an example.

lifesourcerec 06-01-2004 10:39 PM

Quote:

Originally Posted by bgray
Thanks so much Jason! Installing now. :)


After Install: I'm having a couple of issues with a blank install on a new board the options for adding a feedback seem a bit off. see www.webmastertrader.com for an example.

You have to rename the upgrade_traderrating_vb2.php to upgrade_traderrating.php (remove the _vb2).

lifesourcerec 06-01-2004 11:08 PM

Got it working :) Jason for President!!

lifesourcerec 06-01-2004 11:14 PM

How do you leave feedback?

Also, this info doesn't show up (the data numbers are there, but not the text listed below in bold print:

Feedback Score:
Positive Feedback:
Members who left a positive:
Members who left a negative:
All positive feedback received:

Imprezer 06-01-2004 11:17 PM

Upgraded!

Works great!

I had it installed on my VB2 and after upgrading to VB3, I kept the DB tables since I was expecting this hack to be ported. Sure enough, the hack is here and the upgrade process went uber good.

Thanks again!

Alex

eoc_Jason 06-01-2004 11:25 PM

lifesourcerec & bgray - Check to make sure that it installed the phrases, you can search for "tratings" with the phrase search tool in the admincp.

Also, try commenting out the lines up at the top for:

$phrasegroups = array();

to

//$phrasegroups = array();

lifesourcerec 06-01-2004 11:29 PM

Phrases are there. Dunno what the deal is.

eoc_Jason 06-01-2004 11:30 PM

I had some trouble getting the phrases to display at first, this is the first time I have really messed with custom ones, but they are displaying on my forum just fine? I'll keep looking into it.

edit - does vb cache phrases? Maybe a cron job needs to run?

Larry@IOG 06-01-2004 11:33 PM

I installed on a new clean VB3 and I see no place to leave feedback. Also I see the trader feedback() but thats it.

Larry

lifesourcerec 06-01-2004 11:35 PM

Ok. Fixed. This is strange. I had to manually find one of the tratings phrase, click edit and then click save (didn't modify it). Now it works. Guess you have to do that to cache it.

Imprezer 06-01-2004 11:35 PM

Hmm...

I forgot to change the language ID.

How can I change it now?

All the phrases are installed, but are showing the language ID0 and I need it to be 1.

lifesourcerec 06-01-2004 11:36 PM

Quote:

Originally Posted by Larry@IOG
I installed on a new clean VB3 and I see no place to leave feedback. Also I see the trader feedback() but thats it.


Larry

Log out of the forum and then log back in. I had that problem at first also.

lifesourcerec 06-01-2004 11:37 PM

hehe only problem I have now is that I changed domain name. Wished phpmyadmin had a find and replace :).

eoc_Jason 06-01-2004 11:41 PM

Ah, so maybe that is it? (I honestly have no clue how phrases work). You can update the language id to be 1 if you run the following SQL statement:

UPDATE phrase SET languageid = 1 WHERE varname LIKE 'tratings%'

Someone let me know if that fixes it and I can update the zip.

Imprezer 06-01-2004 11:41 PM

Hmm again...

I kept the language ID at 0 and did what lifesourcerec said and it is all there. Weird. ;)

Oh well...

Everything is 100% now.

eoc_Jason 06-01-2004 11:48 PM

Imprezer - which of his suggestions worked?

Logging out then back in? or Searching for one of the phrases?

Larry@IOG 06-01-2004 11:53 PM

Quote:

Originally Posted by lifesourcerec
Log out of the forum and then log back in. I had that problem at first also.


Still not working. I will set up a account for you

Username: Test
Password: test

Website www.mustangbuyselltrade.com/forums

Thanks in advance

lifesourcerec 06-01-2004 11:56 PM

Are you using 2 template sets and have one under the default (Vbulletin 3)?

Larry@IOG 06-01-2004 11:59 PM

I just have one set under default
VB3

Larry

eoc_Jason 06-02-2004 12:00 AM

FOUND IT! Yes, vB does cache phrases... (doh)...

Lemme fix the install files real quick!

lifesourcerec 06-02-2004 12:04 AM

Quote:

Originally Posted by eoc_Jason
Imprezer - which of his suggestions worked?

Logging out then back in? or Searching for one of the phrases?

Heh, I know nothing about programming :). I just remember you mentioning cache. So, the subforum hack in vb2 came to mind where you had to edit and then save to get it to cache. Did that to the tratings phrase and everything worked.

eoc_Jason 06-02-2004 12:10 AM

Okay, I uploaded a file called refresh_phrases.php which will force the phrase cache to update. I need to fix the zip file to add the function in the installer php files... ;)

lifesourcerec 06-02-2004 12:17 AM

Quote:

Originally Posted by Larry@IOG
I just have one set under default
VB3

Larry

It has to do with the:
PHP Code:

$post[ratetradetotal


alkatraz 06-02-2004 12:19 AM

was waiting for this, thank you!!

eoc_Jason 06-02-2004 12:21 AM

Okay, the zip file has been updated, so now when people install it will force the phrase cache to update. As for the 18 people who downloaded the original zip, you can download the "refresh_phrases.php" file and manually run it in your admincp directory, or just wait for phrases to update.

Also, there was a slight problem with the traderratings.php file, I forgot to add 'user' to the phrase groups, you can either re-download the zip and upload the php file, or just edit your traderratings.php file and change the following to add the 'user' group (line 24 about):
Code:

// get special phrase groups
$phrasegroups = array('user');


Odoin 06-02-2004 12:28 AM

Thank you so much Jason!

Imprezer 06-02-2004 02:01 AM

I edit/saved one of the phrases.

When I look at all the phrases through MyPHPAdmin, I can see that most of them have language ID set to "-1" and some to "0".

The tratings phrases were set to "0".

What should they be set at? Right now, they are at "0" and everything works.

Odoin 06-02-2004 02:03 AM

Just go in and edit one of the phrases and do nothing and save it... it will then reload them :).

eoc_Jason 06-02-2004 03:20 AM

Or just download and run the PHP file I posted... The issue was because adding phrases via direct sql statments doesn't run the build_languages function, which IS run if you add/edit phrases via the CP.

However, they phrases should be set to 0 because they are custom phrases. -1 is default ones for base vB phrases (I think). I suppose you could set them to -1 but it wouldn't make a difference afaik.

Here's what I've been able to decypher so far (if there is official documentation on this, please someone LINK ME!)

-1 = Standard Phrase (aka default install)
0 = Custom Phrase
1 = English

EDIT - DOH, there is also a "Rebuild Languages" button under Languages & Phrases -> Language Manager.

Imprezer 06-02-2004 03:22 AM

Ok, cool.

If you want, Jason, you can link to my site as a showcase. I have a lot of TR data.

Thanks again,

- Alex

GamerJunk.net 06-02-2004 03:54 AM

Omg Thank You

drumsy 06-02-2004 03:57 AM

You are THE MAN!!! I have waited a LONG friggin' time for this to port to vB3 and I'm SO glad that it did!!! YOU ROCK!!!!!!!!!!!!!!!!!!!!

drumsy 06-02-2004 04:30 AM

Installed at www.honda-acura.net

drumsy 06-02-2004 04:34 AM

Hmmm, in viewing members who have a positive score, I have no problems, but I just clicked on a user whose score is (-1) and I get this:

Code:

Warning: Division by zero in /home/hondaacu/public_html/forums/traderratings.php on line 114
Members with a score of (0) do not yield this error.

drumsy 06-02-2004 04:57 AM

Also, I have a user with 22 comments. Is there anyway to spill these over to another page?

r6xual 06-02-2004 05:07 AM

Where exactly do we add the postbit_legacy code into the template. I ran the install, however the traderrating is not showing up at all in the posts. Is there a cerain spot that the postbit.txt needs to be inserted? I also ran the refresh_phrases and still no luck. Any ideas??


All times are GMT. The time now is 11:13 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01807 seconds
  • Memory Usage 1,834KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete