Some changes on Version 0.82

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
langerxxx

Some changes on Version 0.82

Post by langerxxx »

Hello,

I made some changes on Version 0.82. Maybe somebody is interested in. Any Suggestions aber welcome.

Code: Select all

Änderungen am System durch Dan (CMS 0.82):
----

Datum: 19.01.2005
Datei: admin/addcontent.php

New Pages set to status inactive.

Neue Seiten werden zunächst auf den Status "inaktiv gesetzt".

Zeile 100:

Original: $contentobj->mActive = True;
Neu:	  $contentobj->mActive = False;

----

Datum: 19.01.2005
Datei: admin/listcontent.php


Befor setting Content-Pages to status active it will be checked if the user is allowed to do this.
Added permission status "Publish Content".

Vor dem freischalten/aktivieren bzw. inaktivieren einer Seite wird zunächst überprüft, ob der Benutzer dazu berechtigt ist. Dazu
wurde der Rechte-Status "Publish Content" eingeführt. Berechtigt sind alle Admin oder User, die diesen Status besitzen.

Zeile 74:

Original: #$permission = ($modifyall || check_ownership($userid,$_GET["setactive"]) || check_authorship($userid,$_GET["setactive"]));
          $permission = true;

Neu:	  $permission = ($modifyall || check_permission($userid, 'Publish Content'));
          #$permission = true;
          
--
Zeile 96:

Original: #$permission = ($modifyall || check_ownership($userid,$_GET["setinactive"]) || check_authorship($userid,$_GET["setinactive"]));
          $permission = true;
          
Neu:      $permission = ($modifyall || check_permission($userid, 'Publish Content'));
          #$permission = true;
          
---

Show only those Contents to a user which he has created or where he is an additional author.

Einem Nutzer sollen nur Seiten angezeigt werden, wenn er Admin-Rechte hat oder falls er die Seite erstellt hat und/oder als zusätzlicher 
Autor für diese Seite hinzugefügt wurde.

--
Zeile 16x:

Hinzugefügt:
          // check the status of the current user. display only the pages for which the has got write/change permisson.
          // to view a page in the list, you must be admin, owner, or additional author
    	  $permission = ($modifyall || check_ownership($userid,$one->Id()) || check_authorship($userid,$one->Id()));

          if($permission)
          {
          
          ...
          
          }
          
----

Datum 19.01.2005
Datei lib/contenttypes/Content.inc.php

Only users with permission status "Publish Content" are allowed to set pages active/inactive or show in menu/show not in menu.

Der Rechtestatus "Publish Content" erlaubt es Seite  aktiv zu schalten und auszuwählen, ob eine Seite im Menü angezeigt werden soll.

Zeile: 136

Original: $text .= '<tr><td>'.lang('active').':</td><td><input type="checkbox" name="active"'.($this->mActive?' checked="checked"':'').' /></td></tr>';
          $text .= '<tr><td>'.lang('showinmenu').':</td><td><input type="checkbox" name="showinmenu"'.($this->mShowInMenu?' checked="checked"':'').' /></td></tr>';


Neu:      $userid = get_userid();
          $permission = check_permission($userid, 'Publish Content');
          if($permission)
          {
                  $text .= '<tr><td>'.lang('active').':</td><td><input type="checkbox" name="active"'.($this->mActive?' checked="checked"':'').' /></td></tr>';
                  $text .= '<tr><td>'.lang('showinmenu').':</td><td><input type="checkbox" name="showinmenu"'.($this->mShowInMenu?' checked="checked"':'').' /></td></tr>';
          
          }
Best regards
Dan
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Some changes on Version 0.82

Post by Ted »

Very nice changes. I actually like the fact that there is some workflow there, however, I'm a bit leary to add it in as it could be confusing to people who are either just getting started, or people who are the only ones who work on their site. I'll bring it up on IRC and see what people think (or any other readers can throw their opinion here as well).

Thanks.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Some changes on Version 0.82

Post by calguy1000 »

sounds like a good idea to me (I hate not having IRC access at the office).

I personally don't use multiple admins (yet) but it is rapidly getting that way and this would be a great feature

though I think it should be optional (wrapped inside of a config item or something).
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Some changes on Version 0.82

Post by Ted »

I'm actually think it might be possible to do this exclusively in the module that you could install, which would probably be included in a default installation. Some things to do this are still not totally there yet in the new API, but I'll keep it in the back of my mind as I continue on.
Locked

Return to “Modules/Add-Ons”