Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: affiliate visited outgoing links viewer  (Read 17655 times)

0 Members and 1 Guest are viewing this topic.

xplicit

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 214
affiliate visited outgoing links viewer
« on: April 02, 2006, 11:38:13 am »

Hi all

Just to let you know I'm working on a script which is intented for registering the clicks on the outgoing links in a affiliate programm. Or to say it in other words I'm writing a script where link partners can see how much traffic I redirected to them.

This is intended for link partners and the coppermine webmaster to see if the advertisements or link are generating traffic.

The script will be in the normal coppermine environment,

Environment :

* Should work for all versions 1.3x, 1.4x
* php4 or higher
* SQL based

User rights:

* Coppermine administrator can see all the visited links and counts
* Link partners can only see the traffic for their own link (check based on theire own username/password)

Maintenance:

* Administrator can generate new ID's which will replace the normal link urls
* Administrator can assign the rights for linkpartner and the related username
* Administrator can reset the counter

Project deadline : approx end of this week.

Any suggestions for further related functions are welcome

***** UPDATED 8 APRIL : ATTACHED THE ZIPFILE *****
« Last Edit: April 11, 2006, 08:17:17 am by GauGau »
Logged
Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.

lordprodigy

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 228
    • B514 ///
Re: affiliate visited outgoing links viewer
« Reply #1 on: April 02, 2006, 07:04:14 pm »

this is awesome. looking forward to it.
Logged

xplicit

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 214
Re: affiliate visited outgoing links viewer
« Reply #2 on: April 03, 2006, 03:03:39 am »

Well it looks promissing :)

The layout is based on a script I had seen before which used separte text files. Script itself is totally different but got a nice touch and feel if I may say so.

Most parts are working, but have to do a lot of finetuning but I will give you some previews of the main screen and the succesfull adding of a link in the database.

Of course the visual aspects are things to worry about at the end.

Any suggestions welcome!


Mainscreen: (http://picserver.student.utwente.nl/i/9CVZL3WC92XG/730w)

Succesfull added a link: (http://picserver.student.utwente.nl/i/91OT9V3VWM28/730w)
Logged
Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.

xplicit

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 214
Re: affiliate visited outgoing links viewer
« Reply #3 on: April 05, 2006, 02:08:19 am »

Ok not much reactions so far  :(

Perhaps I'm the only one interested ;)

So I made some progress it's not yet coded as I want so it got hardcoded tables, and database links and only tested in 130 but the version is version independent so I'm sure it will work for the 144.

I have made a test link so feel free to play with it!!

http://timecatchers.no-ip.org/144/clickcounter.php

It's not secured so everybody van edit as much as the want, the redirect file is not present at that server so you cant use that part but all database stuff etc is working ok, it even got a nice detectiion for the urls you can enter. Also if fields like friendly name are left blank it will use the url instead and shorten it to 30 characters and add the ... to it

So ga ahead and play.

Any comments welcome
« Last Edit: April 08, 2006, 01:56:49 am by xplicit »
Logged
Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.

xplicit

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 214
Re: affiliate visited outgoing links viewer
« Reply #4 on: April 07, 2006, 01:50:47 am »

OK almost done :)

Just some finetuning.

Here is the code I have sofar

***** UPDATED 8 APRIL : REMOVED CODES SEE FIRST POST FOR THE COMPLETE SOURCEFILE *****
« Last Edit: April 08, 2006, 08:51:09 pm by xplicit »
Logged
Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.

xplicit

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 214
Re: affiliate visited outgoing links viewer
« Reply #5 on: April 07, 2006, 01:54:45 am »

***** UPDATED 8 APRIL : REMOVED CODES SEE FIRST POST FOR THE COMPLETE SOURCEFILE *****
« Last Edit: April 08, 2006, 08:51:33 pm by xplicit »
Logged
Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.

xplicit

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 214
Re: affiliate visited outgoing links viewer
« Reply #6 on: April 07, 2006, 01:55:38 am »

add after above splitted code:

***** UPDATED 8 APRIL : REMOVED CODES SEE FIRST POST FOR THE COMPLETE SOURCEFILE *****
« Last Edit: April 08, 2006, 08:52:04 pm by xplicit »
Logged
Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.

xplicit

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 214
Re: affiliate visited outgoing links viewer
« Reply #7 on: April 07, 2006, 02:09:23 am »

Functionality:

User rights:

* Coppermine administrator can see all the visited links and can rest, remove or edit links
* Link partners can only see the traffic for their own link and remove, reset, or modify pending on theire given rights

(in normal case you give your link partners edit rights so they can self adjust the link to them in case they watn to give focus on a special part of theire website or even move theire site)

* all accounts can be viewed by visitors but they can never edit remove or rest things (you can also if you want restrickt the vieuwing by visitors or accidental visitors by checking theire (USER_ID) in the linkpartner table but thats not coded yet but will make this this weekend)

Admins can:

Add usersrights to ID's (remove, edit, reset)
Edit remove and reset all ID's
Can add new ID's
etc etc
Logged
Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.

lecock

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: affiliate visited outgoing links viewer
« Reply #8 on: April 07, 2006, 08:10:19 am »

Wow, knew you were working on this.

Like I already told u, LOOKS SWEET !!!  :o
Don't know if this is useful for all af the coppermine users, mabey it's a bit TO advanced.  ;D

But i'm following this thread ! looks interesting !


Logged

xplicit

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 214
Re: affiliate visited outgoing links viewer
« Reply #9 on: April 08, 2006, 01:11:50 am »

Ok got it fully working and tested now :)

But how can I post it here as a package (zip file) and remove the previous splitted parts) ??

People who are interested can PM me for the package and I will send it by email till found a solution for it

Logged
Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: affiliate visited outgoing links viewer
« Reply #10 on: April 08, 2006, 09:11:38 am »

click the "Additional options" link at the bottom left when composing your message, use the "browse" button to add your zip file to your posting.
Logged

xplicit

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 214
Re: affiliate visited outgoing links viewer
« Reply #11 on: April 08, 2006, 08:48:12 pm »

OK I'm done and within my deadline :)

Just changed today the script so it will auto detect the version 1.4x or 1.3x and use the correct database query function, also made all the database requests indepedent by using the $CONFIG functions

Complete code is packed into the zipfile attached at the first post :)

Readme instructions are included and also given here:

To install the affiliate script you have to follow these 4 steps:

1) Unzip the zipfile
2) Change in the redirectcounter.php file the location of $baseurl
3) Copy all the php files to the root of your website.
4) Make a folder in your images folder called redirect and place the images there
5) Look at your init.inc.php file and search for the following:

Code: [Select]
$CONFIG['TABLE_HIT_STATS']  = $CONFIG['TABLE_PREFIX'].'hit_stats';

Add after this :

Code: [Select]
$CONFIG['TABLE_PARTNERLINKS']  = $CONFIG['TABLE_PREFIX'].'partnerlinks';
$CONFIG['TABLE_PARTNERS']  = $CONFIG['TABLE_PREFIX'].'partners';

6) Add to your database the following (change the cpg143_ for your own table prefix)
Code: [Select]
CREATE TABLE `cpg143_partnerlinks` (
  `linkid` int(11) NOT NULL auto_increment,
  `urladres` varchar(255) collate latin1_general_ci NOT NULL default '',
  `urlname` varchar(255) collate latin1_general_ci NOT NULL default '',
  `counter` int(11) NOT NULL default '0',
  `since` date NOT NULL default '0000-00-00',
  PRIMARY KEY  (`linkid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci PACK_KEYS=0;


CREATE TABLE `cpg143_partners` (
  `number` int(11) NOT NULL auto_increment,
  `partnerid` int(11) NOT NULL default '0',
  `linkid` int(11) NOT NULL default '0',
  `remove` char(3) collate latin1_general_ci NOT NULL default '',
  `edit` char(3) collate latin1_general_ci NOT NULL default '',
  `reset` char(3) collate latin1_general_ci NOT NULL default '',
  PRIMARY KEY  (`number`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci PACK_KEYS=0;

7) Add a link in your theme to the file or just visit it directly.

Any comments or found errors welcome.

Enjoy!
Logged
Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.

pelhrimak

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 49
    • satelite photos of world
Re: affiliate visited outgoing links viewer
« Reply #12 on: May 08, 2006, 02:37:59 pm »

Hello i cannot create the table ..
CREATE TABLE IF NOT EXISTS svet_sessions ( session_id varchar(40) NOT NULL default '', user_id int(11) default '0', time int(11) default NULL, remember int(1) default '0', PRIMARY KEY (session_id) ) TYPE=MyISAM COMMENT='Used to store sessions'
.
CREATE TABLE IF NOT EXISTS svet_filetypes ( extension char(7) NOT NULL default '', mime char(30) default NULL, content char(15) default NULL, KEY extension (extension) ) TYPE=MyISAM COMMENT='Used to store the file extensions'
Logged
satellite photos and photos of WORLD
(http://svet.pelhrim.cz/pic.php)

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: affiliate visited outgoing links viewer
« Reply #13 on: May 08, 2006, 06:49:14 pm »

what error message do you get?
Logged

xplicit

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 214
Re: affiliate visited outgoing links viewer
« Reply #14 on: May 08, 2006, 08:46:15 pm »

Hello i cannot create the table ..
CREATE TABLE IF NOT EXISTS svet_sessions ( session_id varchar(40) NOT NULL default '', user_id int(11) default '0', time int(11) default NULL, remember int(1) default '0', PRIMARY KEY (session_id) ) TYPE=MyISAM COMMENT='Used to store sessions'
.
CREATE TABLE IF NOT EXISTS svet_filetypes ( extension char(7) NOT NULL default '', mime char(30) default NULL, content char(15) default NULL, KEY extension (extension) ) TYPE=MyISAM COMMENT='Used to store the file extensions'

This has nothing to do with this topic.

The needed tables are not anything like you posted, so it's irrelevant  comment at this subject.

Please post it at the topic where it belong to
Logged
Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.

thapame

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 72
Re: affiliate visited outgoing links viewer
« Reply #15 on: March 16, 2007, 05:09:14 pm »

I installed as per the instruction but got some error while visiting the redirect or redirectcounter page. Here is what i got:

Quote
Critical error
There was an error while processing a database query
Logged

Nibbler

  • Guest
Re: affiliate visited outgoing links viewer
« Reply #16 on: March 16, 2007, 05:24:04 pm »

Enable debug mode in config and post the mysql error message you get (not the entire debug output) when you replicate the error.
Logged

thapame

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 72
Re: affiliate visited outgoing links viewer
« Reply #17 on: March 16, 2007, 05:36:13 pm »

the problem is solved. Table Prefix was incorrect for the two table.
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 20 queries.