How To Use phpBay Pro On A Joomla Site

I was just trying to find a way of adding phpbay pro to a Joomla site for a friend and found the following to work. I’d like to thank the author of the following phpbay Joomla guide, Otherjohn, for pointing me in the right direction. Here’s what Otherjohn writes:

I thought I would share how I was able to easily get the phpBay Pro API Beta 3.x to work with joomla.
Step 1: Install Jumi on Joomla 1.5
Step 2: Upload the phpBay folder to your web root folder example: /home/acountname/www/phpbay
Step 3: Upload auction to your web root folder example: /home/acountname/www/auction.php
Step 4: create in your phpbay folder a php file named phpBay.php and insert the following code in it.

<?php
defined(’_JEXEC’) OR defined(’_VALID_MOS’) OR die( “Direct Access Is Not Allowed” );

require_once(”./phpbay/ebay.php”);
if (!empty($jumi)){
$keyword=$jumi[1];
$num=$jumi[2];
$category=empty($jumi[3])?””:$jumi[3];

$exclude=empty($jumi[4])?””:$jumi[4];
$custom_id=empty($jumi[5])?””:$jumi[5];
$columns=empty($jumi[6])?false:$jumi[6];
if($jumi[0]==0){
phpBayAPI($keyword, $num, $category, $exclude, $custom_id, $columns);

}else{
phpBayAPISideBar($keyword, $num, $category, $exclude, $custom_id);
}
}
?>

Step 5: on the pages you want to include phpBay insert the following line

{jumi [phpbay/phpBay.php] [0] [”yourkeyword”] [15]}

Here is what the items in the jumi brackets are. jumi [phpbay/phpBay.php] [0=phpbayapi,1=phpapisidebar] [”yourkeyword”] [howmanylistings] [category] [exclude] [custom id] [columns=true/false] So if you want to list 22 ebay items for corvette mufflers and you do want columns to be true.

{jumi [phpbay/phpBay.php] [0] [”corvette muffler”] [22] [”"] [”"] [”"] [true]}

The first brackets tells jumi where the includes file is

The second bracket tells phpBay whether or not to use the phpBayAPISideBar. To use the sidebar put a 1 if not use 0.
The third bracket is where you put your keywords in. Be sure to wrap your keywords in quotes.
The forth is the category, this is optional. wrap cat in quotes.
The fifth is the exlude items, also wrap these in quotes.This is optional.
The sixth bracket is the custom id. his is optional. wrap in quotes.
The seventh and final one is only for the regular phpBayAPI and it is for columns. This is a true or false.

- If you want to use the defaults of all the optional settings you can do…

{jumi [phpbay/phpBay.php] [0] [”corvette muffler”] [22] }

- If you want to also include cat do the following…

{jumi [phpbay/phpBay.php] [0] [”corvette muffler”] [22] [”cat”]}

and so on…. look at the phpBay.php code to figure out the rest :P

That’s all John wrote but it did the job supremely. If you have no idea what I’m talking about on this page all you need to know is that phpBay is a popular ebay affiliate product and that Joomla is a popular web site backbone. Thanks John.

Now you can earn extra affiliate income with phpbay pro and Joomla too!