Quick "Public Article" Mod --> jeder darf editi
Posted: Sun 11. Jul 2004, 17:58
So, ich mal wieder (nach längerer Abwesenheit)
Auch ich habe das Problem, das ein Artikel von unterschiedlichen (Backend-) Usern bearbeitet werden soll, ich diesen aber trotzdem keine Admin-Rechte geben moechte.
Daher hier ein kleiner, schneller Hack (Install < 1 Min).
Danach kann bei den Artikeleigenschaften der Artikelbesitzer public ausgewählt werden (vom Admin).
Getestet mit: phpwcms_1.1-RC4_2004-06-08
===============================================
[FILE]
include/inc_tmpl/article.editsummary.tmpl.php
[FIND][268]
<select name="article_uid" id="article_uid" style="width: 300px" class="f11b">
[ADD]
<!-- BoF: public article mod by pixelpeter -->
<option value="9999">public</option>
<!-- EoF: public article mod by pixelpeter -->
[FILE]
include/inc_lib/admin.functions.inc.php
[FIND][90]
if($article[$akey]["article_uid"] == $_SESSION["wcs_user_id"] || $_SESSION["wcs_user_admin"]) {
[REPLACE WITH]
// BoF: public article mod by pixelpeter
// org: if($article[$akey]["article_uid"] == $_SESSION["wcs_user_id"] || $_SESSION["wcs_user_admin"]) {
if($article[$akey]["article_uid"] == $_SESSION["wcs_user_id"] || $_SESSION["wcs_user_admin"] || $article[$akey]["article_uid"] == 9999) {
// EoF: public article mod by pixelpeter
===============================================
Das wars schon. Sollte funktionieren, solange Ihr nicht mehr als 9999 Benutzer im Backend habt
Viel Spaß !!!
Auch ich habe das Problem, das ein Artikel von unterschiedlichen (Backend-) Usern bearbeitet werden soll, ich diesen aber trotzdem keine Admin-Rechte geben moechte.
Daher hier ein kleiner, schneller Hack (Install < 1 Min).
Danach kann bei den Artikeleigenschaften der Artikelbesitzer public ausgewählt werden (vom Admin).
Getestet mit: phpwcms_1.1-RC4_2004-06-08
===============================================
[FILE]
include/inc_tmpl/article.editsummary.tmpl.php
[FIND][268]
<select name="article_uid" id="article_uid" style="width: 300px" class="f11b">
[ADD]
<!-- BoF: public article mod by pixelpeter -->
<option value="9999">public</option>
<!-- EoF: public article mod by pixelpeter -->
[FILE]
include/inc_lib/admin.functions.inc.php
[FIND][90]
if($article[$akey]["article_uid"] == $_SESSION["wcs_user_id"] || $_SESSION["wcs_user_admin"]) {
[REPLACE WITH]
// BoF: public article mod by pixelpeter
// org: if($article[$akey]["article_uid"] == $_SESSION["wcs_user_id"] || $_SESSION["wcs_user_admin"]) {
if($article[$akey]["article_uid"] == $_SESSION["wcs_user_id"] || $_SESSION["wcs_user_admin"] || $article[$akey]["article_uid"] == 9999) {
// EoF: public article mod by pixelpeter
===============================================
Das wars schon. Sollte funktionieren, solange Ihr nicht mehr als 9999 Benutzer im Backend habt
Viel Spaß !!!