31
McDonald
Re: Revolution of Xoops Banners System
  • 2008/3/21 11:22

  • McDonald

  • Home away from home

  • Posts: 1072

  • Since: 2005/8/15


I just added the functions to /include/functions.php and added the following to /admin/category.php:

$client_select = new XoopsFormSelect_AM_WFL_CATSPONSOR'client_id'$client_idfalse);
    
$sql5 "SELECT cid, name FROM " $xoopsDB->prefix('bannerclient') . " ORDER BY name ASC";
    
$result5 $xoopsDB -> query($sql5);
    
$client_array = array();
    
$client_array[0] = ' ';
    while (
$myrow $xoopsDB -> fetchArray($result5)) {
        
$client_array[$myrow['cid']] = $myrow['name'];
    }
    
$client_select -> addOptionArray($client_array);
    
$sform -> addElement$client_select );


In viewcat.php I have

if ($head_arr['client_id'] > 0){
  
$catarray['imageheader'] = wfl_getbanner_from_id_client$head_arr['client_id'] );
} else {
  
$catarray['imageheader'] = wfl_imageheader();
}


to display the banner or the index page logo if no banner is selected.
Probably have to do some more fine tuning.

Now I need a block to show the clients the stats....

32
McDonald
Re: Revolution of Xoops Banners System
  • 2008/3/22 10:52

  • McDonald

  • Home away from home

  • Posts: 1072

  • Since: 2005/8/15


When adding a banner there are 2 ways to do so:
1. Enter url to the banner image + url to link to
2. Select 'Use HTML' and enter HTML code in the box (ie. code of Link-to-us).

In both cases the banner appears, but clicks are not counted when using the (2) HTML option. Only when using the 1st method clicks are counted.

Impressions seem to work in both cases.


Is this a bug in the banner hack or a more general XOOPS bug?

33
slyss
Re: Revolution of Xoops Banners System
  • 2008/3/22 11:04

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


is not a bug... is correct...

when you add HTML code, click usually are counted by html code script (on ad server)
[size=x-large]2008 Xoops Book[/size]

34
McDonald
Re: Revolution of Xoops Banners System
  • 2008/3/22 12:32

  • McDonald

  • Home away from home

  • Posts: 1072

  • Since: 2005/8/15


Thanks for the quick response.

You're hack works well. In WF-Links I've made the option for categories that a client (id) can be choosen or a banner-id.
Further I've created a block to display the statistics of banners used in WF-Links which shows the impressions and clicks like in control panel.
Might take a while for the next WF-Links release 'cause there's still a lot to do.

35
slyss
Re: Revolution of Xoops Banners System
  • 2008/3/22 12:48

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


good ;)
[size=x-large]2008 Xoops Book[/size]

36
McDonald
Re: Revolution of Xoops Banners System
  • 2008/3/24 23:19

  • McDonald

  • Home away from home

  • Posts: 1072

  • Since: 2005/8/15


Oke, WF-Links 1.05 RC5 has been released with the banner hack.
Banners can be added to categories in 2 ways:
1. by choosing a client
2. by banner id.
Option 1 overrules option 2.
Categories that have no sponsor banner assigned will have the logo displayed as set in Index Page Management.

The statistics of the category sponsors can be monitored in a special block which is similar to the info in Banners Management of XOOPS Control Panel. The block shows only info relevant to WF-Links.

On my production website I don't use any logo, not set for Index Page.
For 1 category I've assigned a sponsor, see here.

37
ajeeb
Re: Revolution of Xoops Banners System
  • 2008/3/25 5:20

  • ajeeb

  • Just popping in

  • Posts: 34

  • Since: 2008/3/22


hi slyss
can u help me...?

i juz want to know where usually our banner client login?

I already created a client username and password, and try to login at http://www.mysite.com/banners.php

but the login is failed? Instead, i got a msg like "Taking u back to where u were..."

help me slyss :(
Still learning

38
slyss
Re: Revolution of Xoops Banners System
  • 2008/3/25 7:56

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


Quote:

ajeeb wrote:
hi slyss
can u help me...?

i juz want to know where usually our banner client login?

I already created a client username and password, and try to login at http://www.mysite.com/banners.php

but the login is failed? Instead, i got a msg like "Taking u back to where u were..."

help me slyss :(


i think is a bug of your XOOPS version.

What version do you use? 2.0.18.1 ?
[size=x-large]2008 Xoops Book[/size]

39
ajeeb
Re: Revolution of Xoops Banners System
  • 2008/3/25 8:16

  • ajeeb

  • Just popping in

  • Posts: 34

  • Since: 2008/3/22


my XOOPS version is 2.0.18
Still learning

40
McDonald
Re: Revolution of Xoops Banners System
  • 2008/3/25 10:04

  • McDonald

  • Home away from home

  • Posts: 1072

  • Since: 2005/8/15


Why don't you create a User Group called Clients and assign the right permissions to this group?

Login

Who's Online

204 user(s) are online (72 user(s) are browsing Support Forums)


Members: 0


Guests: 204


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits