Dating sites have become very popular in the fast paced society we live in today. Going out and meeting people in person is becoming harder and harder because of the long working days and busy schedules. Many people work from PC’s and can’t afford the time for social events, this is where social networking and dating sites come in.
Dating and Matchmaking websites have thousand of members which share personal information, preferences and pictures among each other. Using a dating website can sometimes be more effective than real life for some people since the first step is always the hardest, you get to know a persons character before you meet, thus allowing you to make a decision without wasting time on a boring date.
Ads Factory has an embedded engine of administrating Payment Processor Parameters and interaction with payments of ads related items. Each Gateway is conceived as a plugin automatically loaded if configured. All Payment Gateways Plugins are stored in the components/com_adsman/plugins/payment/ and they are all extending the payment_object generic gateway. In the Ads Factory 1.5.8 installation are included payment gateways plugins for PayPal, Moneybookers and 2checkout.
A plugin for gateway Example can include the files:
pay_example.php
pay_example.en.php
pay_example.notify.php
External js,css or images are optional to design matters.
First we create the php file containing the Payment Gateway processing Class. The file and the class must be named identically (of course the file must have a .php extension) having the name prefixed by `pay_`. ( a plugin for gateway Example must have the class name pay_example and the file name pay_example.php ).
For start the file should contain the following:
< ?php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
define('EXAMPLE_LOG',0);
require_once(ADS_COMPONENT_PATH."/plugins/payment/payment_object.php");
class pay_example extends payment_object{
var $_db=null;
var $classname="pay_example";
var $classdescription="Example Payment method";
var $ipn_response=null;
var $action=null;
function pay_example(&$db){
parent::payment_object($db);
$this->action="PAYMENT URL OF THE GATEWAY";
}
function ipn($d){
// TO DO
}
function show_admin_config()
{
// TO DO
}
function save_admin_config()
{
// TO DO
}
function show_payment_form($order_id,$item_description,$itemname,$quantity,$price,$currency,$return_url=null)
{
// TO DO
}
function log_ipn_results($success) {
if (!EXAMPLE_LOG) return; // is logging turned off?
}
function validate_ipn()
{
// TO DO
}
function getLogo()
{
}
}
function ipn($d)
processes the Gateway IPN (the $d param will be an array with the request values - $_REQUEST).
show_payment_form($order_id,$item_description,$itemname,$quantity,$price,$currency,$return_url=null)
this function MUST be overwritten. It is the Gateway specific part. Here you display the HTML needed for the payment form. Specific to each Payment processor. Parameters are:
$order_id – unique identifier for the transaction.
$item_description – the description of the product (payment item) the user is paying for. You should display this in order to confirm this with the user.
$itemname – this is the PAYMENT ITEM internal name. YOU have to pass it on, so that it gets back per IPN. If no IPN is needed, then you can ignore it.
$quantity – the amount of item the user purchases; most time it is one.
$price – the item price.
$currency – the currency you set up in payment item admin.
$return_url – the url to pass the gateway as return url after payment was processed. (IT IS NOT THE IPN URL).
show_admin_config()
* this function MUST be overwritten. It displays the ADMIN form for configuring the Processor. For instance you can ask the moneybookers email.
* very important- the form must look like this:
save_admin_config()
* in this function you save the variables from the config form in the database.
* you must use the PARAMS field of the #__ads_paysystems table in the row for your payment system (where classname='$this->classname')
* We recommend to format the parameters like standard joomla parameters (variablename=value\n)
* Have a look at the Moneybookers class to see an example.
getLogo()
* overwrite this if you want to place the Processor logo somewhere else then in
/plugins/payment/{$this->classname}.gif or /plugins/payment/{$this->classname}.png or /plugins/payment/{$this->classname}.jpg
* you can specify an external image.
For payment gateways with IPN APIs you must create the pay_example.notify.php file and you can use one of the existent gateways as example.
After creating and copying the files in the components/com_adsman/plugins/payment/ directory you must create a database record in the `#__ads_paysystems` table and ready for configuration and paying.
Revised "Ads Factory" version 1.5.8.
< ?phpfunction ipn($d)
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
define('EXAMPLE_LOG',0);
require_once(JPATH_COMPONENT_SITE."/plugins/payment/payment_object.php");
class pay_example extends payment_object{
var $_db=null;
var $classname="pay_example";
var $classdescription="Example Payment method";
var $ipn_response=null;
var $action=null;
function pay_example(&$db){
parent::payment_object($db);
$this->action="PAYMENT URL OF THE GATEWAY";
}
function ipn($d){
// TO DO
}
function show_admin_config()
{
// TO DO
}
function save_admin_config()
{
// TO DO
}
function show_payment_form($order_id,$item_description,$itemname,$quantity,$price,$currency,$return_url=null)
{
// TO DO
}
function log_ipn_results($success) {
if (!EXAMPLE_LOG) return;
// is logging turned off?
}
function validate_ipn()
{
// TO DO
}
function getLogo()
{
}
}
After creating and copying the files in the components/com_jooanswers/plugins/payment/ directory you must create a database record in the `#__janswers_paysystems` table and ready for configuration and paying.
In the Emoticons tab of the backend you can view all the emoticons available, Chat Factory allows you to add an unlimited number of emoticons, you can also edit available emoticons from here by clicking on their name or the Edit button after checking the box next to the emoticon you want to edit.
Clicking on New will take you to the page where you can create any desired emoticon.
Write the appropriate title in the Title space, the Text is what users have to write for the desired emoticon to be inserted in the text, the Published drop-box lets you choose if the emoticon will be available for use. Upload a file from your computer that will show when the respective text is typed.
Chat Factory also allows you to advertise on your website without any extra work with the use of Advertisements and IM Ads that will appear when using the chat.
Clicking on New will open the new ad section, you can add a title, description,upload a file for the ad and post a link to the advertised website or product. For each ad you can set a number of impressions, the number of times the respective ad will appear on your website.
The other way of advertisement is with ads that display at a set interval to all chat users. In the IM Ads list view you can see all the ads on your website and their current state, published or unpublished, actions and the impressions.
Click on New to to create a new ad or click on the name of an existing one to edit it.
IM Ads are mostly the same as Advertisements, you enter a title, text and number of impressions. You can select if you want the ad to appear when users log in and on a set interval, in minutes.
In the Settings area you can configure your Chat Factory component to suit your needs best.
In the General settings tab you can select the groups of users that can use the chat, enable/disable advertisements, set the refresh interval for the user list or the refresh interval for friendship requests. Chat Factory also allows you to integrate with third party components via Community Builder. Here you can also set the Cron job password, link and how many days until old messages are deleted.
Under the Conversation settings tab you find 4 more settings for the Chat Factory component. You can allow users to send links via the messenger, set a limit for messages per minute to prevent spamming. You can set the interval at which the software checks for new messages and you can set an interval at which the user will be regarded as offline, this is set in seconds and must be greater than the new messages interval check.
On the About page you can find out if there are new versions and links to the developer.
Revised "Chat Factory" version 1.0.x.