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)

GamerJunk.net 06-02-2004 05:18 AM

Ok got it installed but now I have a few problems...

My VBAdvanced mainpage is blank and so is my shoutbox.

What in this script could make those 2 go blank? Is it the permissions?

GamerJunk.net 06-02-2004 05:19 AM

Quote:

Originally Posted by r6xual
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??

Well I put it right after age and before posrs

Rampag33 06-02-2004 05:22 AM

Damn this looks so good. I wish I had a use for this on my site this.
May have to alter a few things.

Great Work.

eoc_Jason 06-02-2004 05:23 AM

Drumsy - I'll take a look into the divide by zero, it should be a simple enough fix. As for pagination, it is set to the forum default (I think it's 40?), however you can manually change it to less if you edit the php file just look at the spot where it says:

// split thread over pages if necessary

But the newest ratings are at the top, so it shouldn't be an issue with that many on a single page.

r6xual - I added mine below the location field, but it's just a user preference how they like their postbit layed out.

eoc_Jason 06-02-2004 05:24 AM

There are no template (beyond one postbit edit) or file changes, so I don't know what would be causing your error...

Quote:

Originally Posted by RasMasta
Ok got it installed but now I have a few problems...

My VBAdvanced mainpage is blank and so is my shoutbox.

What in this script could make those 2 go blank? Is it the permissions?


r6xual 06-02-2004 05:33 AM

Code:

<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
                                <if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
                                <if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>Trader Rating: (<a>href="traderratings.php?$session[sessionurl]u=$post[userid]">$post[ratetradetotal]</a>)</div>

Thats a section out of my postbit_legacy template. Howver once again i ran the refresh phrase ph file and still nothing shows up in the posts for the trader rating.

Heres an example thread

http://www.gpfanatix.com/forums/showthread.php?t=16

stangcentral 06-02-2004 05:36 AM

I am getting the following error when i try to install this....

Database error in vBulletin 3.0.1:

Invalid SQL: INSERT INTO vb3_phrase (languageid, varname, text, phrasetypeid) VALUES (0, 'tratings', 'Trader Ratings', 1)
mysql error: Duplicate entry 'tratings-0-1' for key 2

mysql error number: 1062

Spinball 06-02-2004 06:31 AM

Wow - being on another continent means when you wake up you already have the hack released and with some bug fixes.
Well done Jason.

lifesourcerec 06-02-2004 08:13 AM

Quote:

Originally Posted by stangcentral
I am getting the following error when i try to install this....

Database error in vBulletin 3.0.1:

Invalid SQL: INSERT INTO vb3_phrase (languageid, varname, text, phrasetypeid) VALUES (0, 'tratings', 'Trader Ratings', 1)
mysql error: Duplicate entry 'tratings-0-1' for key 2

mysql error number: 1062

That means it is already in your database. So, you may need to use the upgrade and not the new install.

lifesourcerec 06-02-2004 08:14 AM

Jason, how would I add a link to this in member profile? Easier for users to search and then view from member profile.

Spinball 06-02-2004 12:28 PM

One point Jason. If the person given a rating is now deleted, there are empty brackets in the rating screen. Perhaps you could put 'Guest' in there instead? Or whatever the default is for deleted users?

Beermonster 06-02-2004 02:17 PM

unbelievable easy to install :)

[high]* Beermonster clicks install[/high]

eoc_Jason 06-02-2004 02:30 PM

Spinball - It would probably be wiser to edit your postbit and add an <if condition=> for a guest to not display a trader rating link.

I'll make that correction in the code, and also I need to fix a divide by zero that someone posted above. So 1.01 should be released within the next hour or so.

Quote:

Originally Posted by Spinball
One point Jason. If the person given a rating is now deleted, there are empty brackets in the rating screen. Perhaps you could put 'Guest' in there instead? Or whatever the default is for deleted users?


eoc_Jason 06-02-2004 03:20 PM

Okay, v1.01 has been posted. I sent out an email to the list. There are also all the intructions in the readme for upgrading from 1.0->1.01

Anyone who still can't get their TR to work, please PM me or post again with your specific problem, I'm not sure who has fixed their issues and who hasn't in this thread. ;)

Odoin 06-02-2004 03:26 PM

This might have been asked... Also this might be simple or hard but I do not understand VB enough to know what it will take.... I want to display the user rating only in the forums that have items for sale or wanted.... Right now it displays in every forum... (postbit). Any ideas?

Thank you for your time.

Spinball 06-02-2004 03:31 PM

Hi Jason,
can I bring the other issue we were discussing by PM into the public arena incase there are other people in the same position?
Basically before we installed Jason's excellent hack for vB2, we manually kept records of trader ratings.
Our users naturally want to keep these points.
In the vB2 system, I just incremented their points in the user table the once and that was all that was needed.
Now, however, with the groovy list of ratings, I think an explanation as to where the extra points are from is neccessary.
To test this I have created a dummy entry in the rating table assigning 20 points to myself with the explanation that they were carried over from the manual system.
These points are shown in the posts for users - (excellent!) but not, however, in the ratings page for that user.
Now I appreciate that this might be difficult to achieve with the extra data like 'members who left a positive' and 'members whi left a negative' type statistics.
But would it be possible to make the feedback score at the top be
Quote:

SELECT sum(userrating) FROM user_rate_trade WHERE rateduser = the_user_id

eoc_Jason 06-02-2004 07:44 PM

One issue that comes up when you manually changed it is, you don't know how many were postitive, and how many were negative (or even neutral), nor do you know how many were from unique members. You just have an arbitrary number that sums up to something. Your solution is to simply take the difference of what is stored in the trade table and the rating you created, and create only all pos/neg entries to balance them out.

In all honesty I think it would just be better to drop what numbers you manually changed, and allow users to either re-rate whatever they can truly remember, or just let them live with their new (err, old) score and it can build up if they buy or sell more stuff. I don't consider it a life-altering event if a few points were lost.

However, since you seem intent on keeping their new numbers, your first SQL query that you PMed me will give you the score difference between the new and old. Then for each rating you will need to create the corresponding amount of rating rows in the trade table, which you can use either userid 0 (it should display a blank username) or 1 (which should be yours).

The whole point of the new ratings system is to display mostly by unique members, as to not over inflate a users rating (eBay, among many other sites and software packages do the same). I think it is more correct to see that X person has had X postitive feedback from unique people, rather than the same number from a single person. Changing the feedback score to not count by unique members is not difficult, however in the long run I don't think it should be done just for the sake of the few ratings that had to be manually inserted.

But, to answer your question, with v1.01 you will need to edit the traderratings.php file in two places to adjust the counting method. First at the very bottom in the tratings_user function, this is what recalculates and updates the rating score in the user tabel whenever a rating is added or deleted. Second is in the do=view section near the top, it's similar to the code in the function (In v1.02 I've actually changed it some so that it uses the same function.) But you can basically remove the "DISTINCT" clause out and that will count all entried, not members. But then you should probably change the text on the page accordingly since the pos/neg totals will no longer be by members either. (and the All positive feedback received part will be redudant).

Like I said before, I think it would probably be best just to drop the manual edits and let people gripe and moan for a while until they get over it, so that your ratings will be consistent with everyone elses and you won't have to always hack up code every time I post a new release (since I'm planning on adding a lot more features, I don't know how many will interfere with your plans for how you want it to function).

eoc_Jason 06-02-2004 07:51 PM

Oh yeah, I forgot to ask you guys, but would you be interested in me adding the ability for users to rate based on usergroups? It's not terribly hard. I actually use it on my site currently because new users can't use/see the FS/WTB section so it only makes sense for them not to be able to rate people.

lifesourcerec 06-02-2004 10:45 PM

For those with the

PHP Code:

Trader Ratings: () 

issue, try logging out of the forum and re-signing in. Usually works for oue users.

lifesourcerec 06-02-2004 11:11 PM

Dunno if this is already a feature or not, but how can you make:

Specific URL mandatory and somehow make it where that a link a\can only be used twice (one time for each involved).

sketch42 06-03-2004 02:18 AM

Quote:

Originally Posted by lifesourcerec
Dunno if this is already a feature or not, but how can you make:

Specific URL mandatory and somehow make it where that a link a\can only be used twice (one time for each involved).


2 things .... i havent installed this yet but i want to install it on 2 templates what do i need to edit.. how do i find out what the style id's are?


also can u make it so only a thread from a particular forum(s) is valid?
so say my B/S/T forum is located at /forumdisplay.php?f=49 ; /forumdisplay.php?f=50 ; /forumdisplay.php?f=51

only threads from those forums would be valid?

also i almost forgot... i dont have access to phpMyadmin can u make a query install file?

NameWolf 06-03-2004 02:36 AM

Installed ! Great work.

Regards,

NW

drumsy 06-03-2004 03:30 AM

Quote:

Originally Posted by sketch42
2 things .... i havent installed this yet but i want to install it on 2 templates what do i need to edit.. how do i find out what the style id's are?


also can u make it so only a thread from a particular forum(s) is valid?
so say my B/S/T forum is located at /forumdisplay.php?f=49 ; /forumdisplay.php?f=50 ; /forumdisplay.php?f=51

only threads from those forums would be valid?

also i almost forgot... i dont have access to phpMyadmin can u make a query install file?

The install file does your database modifications for you.

sketch42 06-03-2004 03:32 AM

Quote:

Originally Posted by drumsy
The install file does your database modifications for you.

thanks... do u also know bout my first question bout the styles?

EyeCrave 06-03-2004 04:32 AM

Thanks.

I've had people asking me to implement a trading forum for DVDs. Thanks to this it makes it easier for me to watch over them.

Bungie 06-03-2004 04:56 AM

Very nice! Installation was a breeze. Exactly what I was looking for. Fine, fine job. ;)

sketch42 06-03-2004 05:19 AM

ok 2 things

i installed it and its great, but when i click on the trader rating on one of my templates i get a blank page one template works fine.. but not the other...

and second
Quote:

The thread URL to the deal:
(optional)
can u make that mandatory
not an option??

Great hack ... clicks Install

Spinball 06-03-2004 05:23 AM

Quote:

Originally Posted by sketch42
2 things .... i havent installed this yet but i want to install it on 2 templates what do i need to edit.. how do i find out what the style id's are?

I had to deal with something like this.
It's easy if you have a style used as a parent style of those you want to update.
I have a parent style which is not actually available for use by forum members but which acts as a parent for all 4 styles I have created for my members.
One of the child styles is usually the default one.
For the installation of this hack I made the parent style the default one and the installation process automatically updated the parent and all the child styles.
I then made usual style the default again.

The key to this is that if you update a parent style, all the children get updated automatically aswell.

Spinball 06-03-2004 05:31 AM

Quote:

Originally Posted by sketch42
ok 2 things
i installed it and its great, but when i click on the trader rating on one of my templates i get a blank page one template works fine.. but not the other...

See my post above. I have the same problem when I installed the Arcade.
Basically the installation procedure gets the default template and edits it.
So it's edited your default template, left the other alone and of course that one won't work, now.
What you'll have to do now is edit the installtion script to just run the template editing process, make the non-working template the default and then run the installation.
In the future follow my advice above. (Hope this is right, Jason?).

Spinball 06-03-2004 05:56 AM

Jason I have a feature request which would be useful for us. If there were an option available within the trade rating screen to moderator/supermod/admin folks which allows all negative feedback to be listed then it would be easy to see whether some users have been 'spoiling' others' reputation without good cause.

sketch42 06-03-2004 06:01 AM

Quote:

Originally Posted by Spinball
Jason I have a feature request which would be useful for us. If there were an option available within the trade rating screen to moderator/supermod/admin folks which allows all negative feedback to be listed then it would be easy to see whether some users have been 'spoiling' others' reputation without good cause.

why only negative... i can see ppl make up fake accnts and give themselves positive feedback... which is why i still hold that the showthread should be mandatory..

o and thank you spinball i edited the install file and everything worked great!!

lifesourcerec 06-03-2004 06:15 AM

If you want the thread URL to be mandatory,

In traderratings.php, find:
PHP Code:

if ($userbuysell == 255 || $userrate == 255 || $usercomments == '') { 

Replace with:
PHP Code:

if ($userbuysell == 255 || $userrate == 255 || $usercomments == '' || $userurl == "") { 

Then modify the phrase tratings_thread_url and removed the "(optional)" text.

--- Thanks to Jason for the code.

sketch42 06-03-2004 06:22 AM

Quote:

Originally Posted by lifesourcerec
If you want the thread URL to be mandatory,

In traderratings.php, find:
PHP Code:

if ($userbuysell == 255 || $userrate == 255 || $usercomments == '') { 

Replace with:
PHP Code:

if ($userbuysell == 255 || $userrate == 255 || $usercomments == '' || $userurl == "") { 

Then modify the phrase tratings_thread_url and removed the "(optional)" text.

--- Thanks to Jason for the code.

thank you thank you thank you!!!

Spinball 06-03-2004 06:43 AM

Quote:

Originally Posted by lifesourcerec
Dunno if this is already a feature or not, but how can you make:

Specific URL mandatory and somehow make it where that a link a\can only be used twice (one time for each involved).

I think this is a very good idea. You could even go one step further and make it so that the link to leave feedback is only available on trading threads and automatically refers to that thread.
On our forums it is against the rules to negotiate via PM since the mods can't see what's going on and then can't adjudicate should a problem occur. Only private details are passed via PM.
Forcing people to refer to a thread when leaving feedback would mean that unless they cheat and put in an unrelated thread (risking a ban) they must refer to a thread and therefore can't use PMs to trade.

sketch42 06-03-2004 08:30 AM

Quote:

Originally Posted by Spinball
I think this is a very good idea. You could even go one step further and make it so that the link to leave feedback is only available on trading threads and automatically refers to that thread.
On our forums it is against the rules to negotiate via PM since the mods can't see what's going on and then can't adjudicate should a problem occur. Only private details are passed via PM.
Forcing people to refer to a thread when leaving feedback would mean that unless they cheat and put in an unrelated thread (risking a ban) they must refer to a thread and therefore can't use PMs to trade.

i agreeif u can control wat forum(s) the url is located tht would be even better but i think that this is somewhat in the works already

Quote:

Plans For Future Releases:
??????????????????????????????????
? rebuttal / followup comments
? limited editing / deleting by users
? stats page (maybe - show like top rated, most recent, etc)
? item description (possibly instead of thread url)[not too fond of the instead myself]
? email/PM notification when a user has been rated
? button on thread that buyer/seller clicks to tie the transaction to two people


possible to see trader rating on view profile page? and/or memberlist page?

PranK 06-03-2004 01:39 PM

love ya work. :)

i'll be installing tonight.

btw - site is www.skylinesaustralia.com

eoc_Jason 06-03-2004 02:50 PM

Phew... a ton of posts while I was asleep! Okay to answer a few questions...

1. The next release v1.02 will have a few changes of the changes you guys have been describing. (I'm not going to go into details cuz I don't want to make promises I can't deliver.)

2. *Probably* in 1.03 will be an option that will tie a buyer & seller together with a thread (via a button on the thread which the buyer must click, then they will have the option to rate each other). However I don't want to get rid of rating people where there isn't a threadid, as some sites & people do deal via PM or other means. So there will probably be a split into "Verified" and "Unverified" deals, where the verified has a link to the thread and all that jazz.

As for admin stuff, I know there needs to be something done to make it easier, but I'm having a hard time visualizing what the interface needs to look like exactly. If one person was giving a lot of people negative feedback, you can always go to his trader ratings and click the link to see who he left feedback for. I'll keep thinking about it, but the more input you guys can give me, the better.

Also I was thinking of making a stats page showing the higest & most rated people, and also the lowest. Possibly the last few ratings. How many ratings per day, avg per day, etc...

Lastly, I'm just curious, if I put up a paypal donate button on the first post, do you think any of you guys would dontate anything? I know this brings a lot of commerce to your sites, and also long-term member loyalty. I usually wouldn't do something like this, however I'm currently unemployed and in what little free time I have I've been spending all of it working on coding this, and helping people get it installed (and tweaked a couple servers too... hehe).

Yahhoon23 06-03-2004 02:53 PM

One little error that I'm sure can be fixed easily I hope.

When I click Feedback Left for Others I get this message.

Database error in vBulletin 3.0.0:
Invalid SQL: SELECT * FROM wireless_user_rate_trade LEFT JOIN wireless_user ON wireless_user.userid = wireless_user_rate_trade.rateduser WHERE user_rate_trade.userid = 9 ORDER BY userdate DESC, userrateid DESC LIMIT 0, 30
mysql error: Unknown table 'user_rate_trade' in where clause
mysql error number: 1109
Date: Thursday 03rd of June 2004 11:52:17 AM
Script: http://www.wirelessmatt.com/forum/tr...u=9&viewtype=4
Referer: http://www.wirelessmatt.com/forum/traderratings.php?u=9




The user I selected positively left feedback for another, so at first I thought it was because the person didn't leave feedback for anyone, but that's not the case.

eoc_Jason 06-03-2004 03:00 PM

Yahoon23 - that's a bug in the file, I forgot to add the ".TABLE_PREFIX." to the part after the WHERE clause...

Find line ~200 under the -> //Various View Types For Feedback Display
under the switch case 4: -> //Feedback Left for Others

WHERE user_rate_trade.userid

to

WHERE ".TABLE_PREFIX."user_rate_trade.userid

I thought I got all the SQL table prefixes, but I guess I missed one... ;)

Yahhoon23 06-03-2004 03:07 PM

Beautiful. Works like a charm.

Thanks alot.

Also, for those of you wanting a quick-fix until an updated version releases with the Trader Rating in the member profile. I just went and edited the memberinfo template and added the same postbit conditional.

It's not pretty, but for the time being, it's doing the trick.


All times are GMT. The time now is 06:08 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.01988 seconds
  • Memory Usage 1,868KB
  • 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
  • (1)bbcode_code_printable
  • (5)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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