[TYPO3-UG Oesterreich] Re: cl_awstats_grouppermission zerschießt mein awstats

Stefan sp at kreakom.de
Wed Jul 26 19:32:56 CEST 2006


Hallo Andy

Das kaannst Du mit folgender anleitung machen:

[Typo3] AwStats for BE Users.

Question:
What do I have to do to customise the awstats for "normal" BE users?

Answer:
You have to move the awstats from tools to web section:

- go to ext manager
- edit files

1. mod1/conf.php
change...
$MCONF["name"]="tools_txccawstatsM1";
to...
$MCONF["name"]="web_txccawstatsM1";
and...
$MCONF["access"]="admin";
to...
$MCONF["access"]="user,group";

2. ext_tables.php
change...
t3lib_extMgm::addModule("tools","txccawstatsM1","",t3lib_extMgm::extPath($_EXTKEY)."mod1/");
to...
t3lib_extMgm::addModule("web","txccawstatsM1","",t3lib_extMgm::extPath($_EXTKEY)."mod1/");

3. mod1/index.php
change...
// Access check!
// The page will show only if there is a valid page and if this page may 
be viewed by the user
$this->pageinfo = 
t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);
$access = is_array($this->pageinfo) ? 1 : 0;

if (($this->id && $access) || ($BE_USER->user["admin"] && !$this->id))
to...
if (($this->id && $access) || ($BE_USER->user["admin"] && !$this->id) || 
($BE_USER->user["uid"] && !$this->id))

4. Clear all caches

Now you can assign tx.awstats as a module to user and /or group (user 
admin.)

The same thing can be archived in fewer steps, preserving the the module 
as a tools-submodule. This applies to other tools-submodules as well.

1. mod1/conf.php
change...
$MCONF["access"]="admin";
to...
$MCONF["access"]="user,group";

2. mod1/index.php
change...
if (($this->id && $access) || ($BE_USER->user["admin"] && !$this->id))
to...
if (($this->id && $access) || ($BE_USER->user["admin"] && !$this->id) || 
($BE_USER->user["uid"] && !$this->id))

3) typo3/mod/tools/conf.php
change...
$MCONF["access"]="admin"
to...
$MCONF["access"]="group,user"


Gruß
Stefan


Andreas Pacher schrieb:
> Hi leute,
> möchte bei einer Seite awstats als Statistikmodul nutzen und das auch
> Nicht-Administratoren zugänglich machen.
> Leider bewirkt die Extension " cl_awstats_grouppermission	 " aber nur,
> dass folgende Meldung beim Aufruf des Logs kommt: 
> ***********
> DEBUG OUTPUT
> 
> There was something wrong with the call of the AWStats script!
> This debug information may help to find the reason.
> ***********
> 
> Hab schon in Google gesucht und diverse Foren durchforstet, aber ich steh
> irgendwie an. Kann jemand helfen?
> 
> Danke, lg andy
> 
> 	



More information about the TYPO3-at mailing list