Post Reply  Post Thread 
awstats button in webtools section
Author Message
macbishop
Junior Member
*


Posts: 50
Group: Registered
Joined: Feb 2007
Status: Offline
Reputation: 5
Post: #1
awstats button in webtools section

Hello.

I attached the files to put a button in webtools for awstats

screenshot:



Files must be placed or replaced in:

webtools.tpl and menu_webtools.tpl -> /var/www/ispcp/gui/themes/omega_original/client
awstatsicon.gif -> /var/www/ispcp/gui/themes/omega_original/images/icons
webtools.php -> /var/www/ispcp/gui/client

Have fun
--
querer es poder



Attached File(s)
.zip File  webtools.zip (Size: 7.1 KB / Downloads: 13)

This post was last modified: 01-16-2008 06:41 AM by macbishop.

01-16-2008 01:23 AM
Find all posts by this user Quote this message in a reply
BeNe
Moderator
*****


Posts: 2,609
Group: Moderators
Joined: Jan 2007
Status: Offline
Reputation: 36
Post: #2
RE: awstats button in webtools section

Fine, looks good!
And is this only displayed if AWStats is active ?

Greez BeNe



In Holiday´s this week :-)
01-16-2008 01:42 AM
Visit this user's website Find all posts by this user Quote this message in a reply
macbishop
Junior Member
*


Posts: 50
Group: Registered
Joined: Feb 2007
Status: Offline
Reputation: 5
Post: #3
RE: awstats button in webtools section

BeNe Wrote:
Fine, looks good!
And is this only displayed if AWStats is active ?

Greez BeNe

mmmh. not thought about... Rolleyes

I will fix it soon Wink

01-16-2008 02:21 AM
Find all posts by this user Quote this message in a reply
gOOvER
Documentation Team
***
Docu Team

Posts: 1,532
Group: Docu Team
Joined: Jul 2007
Status: Offline
Reputation: 13
Post: #4
RE: awstats button in webtools section

Maybe there is a new GUI Dev Smile


OS : Debian 4.0 Etch 64bit
ispCP Version : 1.0.0 r1335 - 27.08.08 (NightlyBuild)
Activated : AWStats dynamic
Mods : update via NightlyUpdateScript

!!! NO SUPPORT VIA PM OR EMAIL !!!
01-16-2008 02:56 AM
Visit this user's website Find all posts by this user Quote this message in a reply
macbishop
Junior Member
*


Posts: 50
Group: Registered
Joined: Feb 2007
Status: Offline
Reputation: 5
Post: #5
RE: awstats button in webtools section

[fixed]

With the fabulous tpl object of vhcs/ispCP,

In /var/www/ispcp/gui/client/webtools.php, in line 30

Code:
$tpl -> define_dynamic('active_awstats', 'page');

In line 47 I have created a new function:

Code:
function gen_page_awstats($tpl) {
    global $cfg;
    $awstats_act = $cfg['AWSTATS_ACTIVE'];
        if ( $awstats_act != 'yes'){
            $tpl->assign('ACTIVE_AWSTATS', '');                        
        }else{
            $tpl -> assign(
                        array(
                            'AWSTATS_PATH' => 'http://'.$_SESSION['user_logged'].'/stats/',
                            'AWSTATS_TARGET' => '_blank'
                        )
                      );
        }
}
gen_page_awstats($tpl);

and

Code:
<!-- BDP: active_awstats -->
<!-- EDP: active_awstats -->

to delimiting the awstas sections in webtools.tpl and menu_webtools.tpl

I have updated the attached files in the first post.

It's a pity that not full seize the tpl object, I think that is the best of ispCP, with it and a chosen CSS code can make a great system of skins.
--
querer es poder

This post was last modified: 01-16-2008 08:15 AM by macbishop.

01-16-2008 07:13 AM
Find all posts by this user Quote this message in a reply
RatS
The Project's Fire Worker
******


Posts: 684
Group: Super Moderators
Joined: Oct 2006
Status: Offline
Reputation: 18
Post: #6
RE: awstats button in webtools section

I've added it into trunk! Thank you for your work!

01-16-2008 07:50 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump:

| All rights reserved : isp-control.net |