[TYPO3] configuring TOOL module for a BE group (not admin)

Katja Lampela katja.lampela at lieska.net
Wed May 28 17:46:10 CEST 2008


Hi Canè,
Here is an old thread has helped me in situations where I wanted to add 
a Tool module for be group. If there is a ts config way, I'd be glad to 
hear (haven't checked this lately).
- Katja

***********************************

FAQ/HOWTO items for this thread:

[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.)

*-------- EDITED BY Luite van Zelst -----------
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.

*

IN EXTENSION:

*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))

*

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

4. clear cache.
-------- END - EDITED BY Luite van Zelst -----------*







CAnet // Canè Alessandro kirjoitti:
> thanks Peter,
> you mean is there a way with TSconfig to do that? I didn't knew that :-(
> I hope I do not have to modify the extension itself!
>
> thanks again!
>
>
>
> ----- Original Message ----- From: "Peter Klein" <peter at umloud.dk>
> Newsgroups: typo3.english
> To: <typo3-english at lists.netfielders.de>
> Sent: Wednesday, May 28, 2008 4:34 PM
> Subject: Re: [TYPO3] configuring TOOL module for a BE group (not admin)
>
>
> On Wed, 28 May 2008 15:04:55 +0200, CAnet // Canè Alessandro
> <canet at canet.it> wrote:
>
>> Anyone knows why? Are tool modules exclusive of admins?
>
> Yes, but you can modify the extensions in question, so that they
> appear under Web (which is for all users)
>
> -- 
> Peter Klein
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english


More information about the TYPO3-english mailing list