phplemon

AdQuick 2.7 - Ad Network & Ad Server Software

$69
+ Get BlogQuick Free

AdQuick allows you to run your own ad network similar to websites such as adengage.com and buysellads.com

AdQuick will allow you to bring together advertisers and publishers, and you the script owner will take a cut from every ad sold through your very own advertising network.

AdQuick can also be used as a stand alone Ad Server for your own advertising needs.


 

Adding a New Currency To AdQuick

 

AdQuick currently has several currencies already built into it such as, £, $ and €, but it is possible for you to add a new currency of your choice that isn't already built into the software.

To start with, there will be two files that we will be working with. They are the index.php file found in the "admin" folder, and the index.tpl file found in the "admin/templates/default" folder

Step 1

Open the index.tpl file and look for this code,

 

<select name="currency" style="width: 100px;" >

<option value="&pound;" {if $_config.currency == '&pound;'} selected="selected" {/if}>&pound;</option>

<option value="$" {if $_config.currency == '$'} selected="selected" {/if}>$</option>

<option value="&#8364;" {if $_config.currency == '€'} selected="selected" {/if}>&#8364;</option>

<option value="&#165;" {if $_config.currency == '¥'} selected="selected" {/if}>&#165;</option>

<option value="AU$" {if $_config.currency == 'AU$'} selected="selected" {/if}>AU$</option>

<option value="C$" {if $_config.currency == 'C$'} selected="selected" {/if}>C$</option>

<option value="HK$" {if $_config.currency == 'HK$'} selected="selected" {/if}>HK$</option>

<option value="NZ$" {if $_config.currency == 'NZ$'} selected="selected" {/if}>NZ$</option>

</select>

 

In this example, we are going to add a new currency and that currency will be the Swiss franc

The first thing you need to do is copy and paste the last line so it looks like this,

 

<select name="currency" style="width: 100px;" >

<option value="&pound;" {if $_config.currency == '&pound;'} selected="selected" {/if}>&pound;</option>

<option value="$" {if $_config.currency == '$'} selected="selected" {/if}>$</option>

<option value="&#8364;" {if $_config.currency == '€'} selected="selected" {/if}>&#8364;</option>

<option value="&#165;" {if $_config.currency == '¥'} selected="selected" {/if}>&#165;</option>

<option value="AU$" {if $_config.currency == 'AU$'} selected="selected" {/if}>AU$</option>

<option value="C$" {if $_config.currency == 'C$'} selected="selected" {/if}>C$</option>

<option value="HK$" {if $_config.currency == 'HK$'} selected="selected" {/if}>HK$</option>

<option value="NZ$" {if $_config.currency == 'NZ$'} selected="selected" {/if}>NZ$</option>

<option value="NZ$" {if $_config.currency == 'NZ$'} selected="selected" {/if}>NZ$</option>

</select>

 

This just makes it easy for you to replace the data in the last line with the new Swiss franc data. The currency symbol for the Swiff franc is, Fr, so we just go ahead and replace the last line of data with the Swiss fr symbols like this,

 

<select name="currency" style="width: 100px;" >

<option value="&pound;" {if $_config.currency == '&pound;'} selected="selected" {/if}>&pound;</option>

<option value="$" {if $_config.currency == '$'} selected="selected" {/if}>$</option>

<option value="&#8364;" {if $_config.currency == '€'} selected="selected" {/if}>&#8364;</option>

<option value="&#165;" {if $_config.currency == '¥'} selected="selected" {/if}>&#165;</option>

<option value="AU$" {if $_config.currency == 'AU$'} selected="selected" {/if}>AU$</option>

<option value="C$" {if $_config.currency == 'C$'} selected="selected" {/if}>C$</option>

<option value="HK$" {if $_config.currency == 'HK$'} selected="selected" {/if}>HK$</option>

<option value="NZ$" {if $_config.currency == 'NZ$'} selected="selected" {/if}>NZ$</option>

<option value="Fr" {if $_config.currency == 'Fr'} selected="selected" {/if}>Fr</option>

</select>

 

Save that file.

Step 2

Now move onto the index.php file. Once the index.php file is open, you must look for this code,

 

@mysql_query("update configurations set value='$val' where name='$key'");
if($_POST[currency] == '&pound;' || $_POST[currency] == '£')
mysql_query("update configurations set value='GBP' where name='CURRENCY_CODE' ");
if($_POST[currency] == '$')
mysql_query("update configurations set value='USD' where name='CURRENCY_CODE' ");
if($_POST[currency] == '€')
mysql_query("update configurations set value='EUR' where name='CURRENCY_CODE' ");
if($_POST[currency] == '¥')
mysql_query("update configurations set value='JPY' where name='CURRENCY_CODE' ");
if($_POST[currency] == 'AU$')
mysql_query("update configurations set value='AUD' where name='CURRENCY_CODE' ");
if($_POST[currency] == 'C$')
mysql_query("update configurations set value='CAD' where name='CURRENCY_CODE' ");
if($_POST[currency] == 'HK$')
mysql_query("update configurations set value='HKD' where name='CURRENCY_CODE' ");
if($_POST[currency] == 'NZ$')
mysql_query("update configurations set value='NZD' where name='CURRENCY_CODE' ");

 

Again, do what you did in the index.tpl file and copy and paste the last two lines this time, so it looks like,

 

@mysql_query("update configurations set value='$val' where name='$key'");
if($_POST[currency] == '&pound;' || $_POST[currency] == '£')
mysql_query("update configurations set value='GBP' where name='CURRENCY_CODE' ");
if($_POST[currency] == '$')
mysql_query("update configurations set value='USD' where name='CURRENCY_CODE' ");
if($_POST[currency] == '€')
mysql_query("update configurations set value='EUR' where name='CURRENCY_CODE' ");
if($_POST[currency] == '¥')
mysql_query("update configurations set value='JPY' where name='CURRENCY_CODE' ");
if($_POST[currency] == 'AU$')
mysql_query("update configurations set value='AUD' where name='CURRENCY_CODE' ");
if($_POST[currency] == 'C$')
mysql_query("update configurations set value='CAD' where name='CURRENCY_CODE' ");
if($_POST[currency] == 'HK$')
mysql_query("update configurations set value='HKD' where name='CURRENCY_CODE' ");
if($_POST[currency] == 'NZ$')
mysql_query("update configurations set value='NZD' where name='CURRENCY_CODE' ");
if($_POST[currency] == 'NZ$')
mysql_query("update configurations set value='NZD' where name='CURRENCY_CODE' ");

 

I'll break it down a little here, and show you two lines at a time which represents one currency,

 

if($_POST[currency] == 'NZ$')
mysql_query("update configurations set value='NZD' where name='CURRENCY_CODE' ");

 

Now on the first line out of these two, you will see, if($_POST[currency] == 'NZ$')

Where you see, NZ$, you need to replace that with what you added in the index.tpl file, which in this example was, Fr, so now it looks like, if($_POST[currency] == 'Fr')

On the second line out of the two above you will see, mysql_query("update configurations set value='NZD' where name='CURRENCY_CODE' ");

Where you see the code, 'NZD', this is the official currency code, and you will need to replace that code with the one that is associated with the currency you are adding, and in the case of the Swiss Franc it is, CHF, so now the second line will look like, mysql_query("update configurations set value=CHF where name='CURRENCY_CODE' "); - To get a list of these codes, look here.

So now, you code in the index.php file should look like,

 

@mysql_query("update configurations set value='$val' where name='$key'");
if($_POST[currency] == '&pound;' || $_POST[currency] == '£')
mysql_query("update configurations set value='GBP' where name='CURRENCY_CODE' ");
if($_POST[currency] == '$')
mysql_query("update configurations set value='USD' where name='CURRENCY_CODE' ");
if($_POST[currency] == '€')
mysql_query("update configurations set value='EUR' where name='CURRENCY_CODE' ");
if($_POST[currency] == '¥')
mysql_query("update configurations set value='JPY' where name='CURRENCY_CODE' ");
if($_POST[currency] == 'AU$')
mysql_query("update configurations set value='AUD' where name='CURRENCY_CODE' ");
if($_POST[currency] == 'C$')
mysql_query("update configurations set value='CAD' where name='CURRENCY_CODE' ");
if($_POST[currency] == 'HK$')
mysql_query("update configurations set value='HKD' where name='CURRENCY_CODE' ");
if($_POST[currency] == 'NZ$')
mysql_query("update configurations set value='NZD' where name='CURRENCY_CODE' ");
if($_POST[currency] == 'Fr')
mysql_query("update configurations set value=CHF where name='CURRENCY_CODE' ");

 

Save this file and then upload both files and overwrite the ones already on your server. You then just need to log into your admin area and click on "System Preferences" and change the currencies using the drop down menu.

Here is a list of supported currencies in Paypal, Click Here.