vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   iTrader Extension [Mainpage, Search, AND MORE] (https://vborg.vbsupport.ru/showthread.php?t=108065)

Gio~Logist 02-14-2006 10:00 PM

iTrader Extension [Mainpage, Search, AND MORE]
 

Brought to you by:
DopeGFX
-----------------------------------------------------------------
LOGOS | WEBSITES | SKINS | HTML | PHP(Limited) | AND MUCH MUCH MORE!
-----------------------------------------------------------------


[high]Changelog:[/high]
2-25-06
* UserCP navigation problem has been fixed
(Note: If you already installed this hack, just read this post for the fix.)

[high]Changelog:[/high]
2-15-06
* Top raters only show users who's total is greater than 0
* Hall of shame only shows users below 0.
* Database error fixed
* Added % to end of feedback score on mainpage
* Prefixed tables are supported now

2-18-06
*No more "invalid userid" error
*Even custom avatars show
*Non-registered users cannot see find a customer, your options, or find a seller.


What does this do?
This hack extends the capabilities of iTrader a great deal. For starters, it supplies a mainpage where you can view recent
ratings, highest rated members, lowest rated members, stats in general, and more. It also supplies a page where you can view
all members and their itrader stats. One of the best features this gives is the ability for people to show what they are selling
and what they are buying at the moment. Using these set fields, users can then click a "find a customer" link, or a "find a seller"
link that will bring up a perfect match for them.

What does this hack add to the functionability of iTrader?
  • Mainpage - Which includes the following
    • iTrader stats for site in general
    • Recent Ratings
    • Top Traders
    • Hall of shame (lowest rated traders)
  • A search where you can see all traders and some stats/info
  • The ability for users to have an option for "What they want to buy" and "What they are selling", which allows for the following:
    • A page where they can edit these fields.
    • A "Find A Customer" page that matches what they are selling with what someone is buying
    • A "Find A Seller" pahe that matches what they are buying with what someone is selling.

What does this hack require?
Template Edits: 2
Products Imported: 1
[high]You must have iTrader installed[/high]

Enjoy the hack.


Don't forget to click INSTALL

[HIGH]As always, feel free to make a donation to:[/HIGH]
gio@dopegfx.com

https://vborg.vbsupport.ru/external/2006/07/12.gif

Gio~Logist 02-15-2006 08:10 PM

Screenshots
  • Screen1 - Mainpage
  • Screen2 - Browse All Members
  • Screen3 - Find a customer
  • Screen4 - Find a seller
  • Screen5 - Your Options
  • Screen6 - Navigation

misticjeff 02-15-2006 08:58 PM

Whoopee!!! I love being first...

Installed!!! and a BIG thank you.

Gio~Logist 02-15-2006 08:59 PM

Quote:

Originally Posted by misticjeff
Whoopee!!! I love being first...

Installed!!! and a BIG thank you.

:p You are welcome.

Gio~Logist 02-15-2006 09:23 PM

Small problem found when not logged in. Just go to itrader_main.php and remove the following from the top:

Code:

// Get info for user we are viewing / rating.
$userinfo = verify_id('user', $vbulletin->GPC['userid'], 1, 1, 0);
$userperms = cache_permissions($userinfo, false);

Zip updated.

Odysseus 02-15-2006 09:53 PM

Ah, that is exactly what I was looking for.
Thank you so much for sharing!

Only one thing:
The "Hall of Shame" will show Members without any transactions or even members with 100% goot ratings, if there are not "enough" shamers with less than 100% than the maximum display setting.

Change the "Hall of Shame" SQL to this in order to have only members with less than 100% rating and at least one transaction:

Code:

$itrader_shame_get = $vbulletin->db->query_read("SELECT itrader_total, itrader_pcnt, username, userid, joindate
        FROM " . TABLE_PREFIX . "user
        WHERE itrader_total > 0
                AND itrader_pcnt < 100
        ORDER BY itrader_pcnt ASC
        LIMIT $mainpagelimit

itrader_main.php, starting at line 122

hotwheels 02-15-2006 09:56 PM

I just installed and for the most part it is working right, i am having a couple issue's here:
Find a customer
Find a seller
Your Options

All give me this error:
Quote:

Database error in vBulletin 3.5.2:

Invalid SQL:
SELECT itrader_buy, itrader_sell, userid
FROM vb3user
WHERE userid =;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3
Error Number : 1064
Date : Wednesday, February 15th 2006 @ 06:55:31 PM
Script : http://www.insanemustangs.com/forums...php?do=options
Referrer : http://www.insanemustangs.com/forums....php?do=search
IP Address : #######
Username : #######
Classname : vb_database

Gio~Logist 02-15-2006 11:14 PM

Quote:

Originally Posted by hotwheels
I just installed and for the most part it is working right, i am having a couple issue's here:
Find a customer
Find a seller
Your Options

All give me this error:


lol. Sorry about that. I deleted a little to much. You really only have to delete
Code:

$userperms = cache_permissions($userinfo, false);
Instead of the whole:
Code:

// Get info for user we are viewing / rating.
$userinfo = verify_id('user', $vbulletin->GPC['userid'], 1, 1, 0);
$userperms = cache_permissions($userinfo, false);

I will update zip now.

Gio~Logist 02-15-2006 11:17 PM

Quote:

Originally Posted by Odysseus
Ah, that is exactly what I was looking for.
Thank you so much for sharing!

Only one thing:
The "Hall of Shame" will show Members without any transactions or even members with 100% goot ratings, if there are not "enough" shamers with less than 100% than the maximum display setting.

Change the "Hall of Shame" SQL to this in order to have only members with less than 100% rating and at least one transaction:

Code:

$itrader_shame_get = $vbulletin->db->query_read("SELECT itrader_total, itrader_pcnt, username, userid, joindate
        FROM " . TABLE_PREFIX . "user
        WHERE itrader_total > 0
                AND itrader_pcnt < 100
        ORDER BY itrader_pcnt ASC
        LIMIT $mainpagelimit

itrader_main.php, starting at line 122


Good suggestion, accept the best way to do that would just be
Code:

WHERE itrader_total != 0
I am updating zip now with both of these changes (the post before and this one).

Gio~Logist 02-15-2006 11:23 PM

The zip has been updated. Thank god there were no major errors :p I don't believe there is anything else that needs to be edited. However, feel free to post any bugs you may see.


All times are GMT. The time now is 03:20 AM.

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.01772 seconds
  • Memory Usage 1,751KB
  • 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
  • (6)bbcode_code_printable
  • (4)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
  • (10)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