|
|
Latest News |
Latest Threads |
|
 |
55.769 Posts & 4.945 Themen in 78 Foren |
|
|
|
 |
Forensuche |
|
Suchbegriff |
Benutzerauswahl |
Ergebnisse anzeigen |
 |
 |
Editieren von Beiträgen in bestimmten Forenkategorien ausschalten 7 Beiträge in diesem Thema |
|
|
 |
|
 |
16.03.2013 - 16:00 Uhr |
|
|
|
Hallo ich mal wieder. 
Der Titel sagt eigentlich alles. Da in unserer Online Liga ein Transfermarkt über das Forum läuft ist es unschön, wenn in dieser Kategorie User ihre Beiträge editieren. Ist es irgendwie möglich das für bestimmte Kategorien auszuschalten?
Wenn ja wie ...
Wäre über Hilfe sehr erfreut. 
LG und ein schönes WE.
|
|
|
|
|
|
|
 |
|
 |
17.03.2013 - 14:26 Uhr |
|
|
|
- pkinc/admin/forumcategory.php
Hier klicken zum aufklappen- Öffne o.g. Datei und suche das:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | | PHP-Quelltext $SQL->query("UPDATE ".pkSQLTAB_FORUM_CATEGORY."
SET forumcat_subcat='".$SQL->f($_POST['cat_push'])."',
forumcat_name='".$SQL->f($_POST['cat_name'])."',
forumcat_description='".$SQL->f($_POST['cat_description'])."',
forumcat_description_show='".$SQL->f($_POST['cat_description_show'])."',
forumcat_option='".$SQL->f($_POST['cat_option'])."',
forumcat_status='".$SQL->f($_POST['cat_status'])."',
forumcat_rrights='".$SQL->f($_POST['cat_rrights'])."',
forumcat_wrights='".$SQL->f($_POST['cat_wrights'])."',
forumcat_trights='".$SQL->f($_POST['cat_trights'])."',
forumcat_threads_option='".$SQL->f($_POST['cat_threads_option'])."',
forumcat_replys='".$SQL->f($_POST['cat_replys'])."',
forumcat_views='".$SQL->f($_POST['cat_views'])."',
forumcat_threads='".$SQL->f($_POST['cat_threads'])."',
forumcat_posts='".$SQL->f($_POST['cat_posts'])."',
forumcat_mods='".$SQL->f($cat_mods)."',
forumcat_user='".$SQL->f($cat_user)."'
WHERE forumcat_id='".$editcat."'"); | |  |
Und füge darunter das ein:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | | PHP-Quelltext # pkPostCanEdit
$pkPostCanEdit =$SQL->fetch_assoc($SQL->query("SELECT forumcat_access_post FROM ".pkSQLTAB_FORUM_CATEGORY." LIMIT 1"));
if ($pkPostCanEdit!==NULL)
{
$SQL->query("
UPDATE
".pkSQLTAB_FORUM_CATEGORY."
SET
forumcat_access_post='".$SQL->f(intval($_POST['pkPostCanEdit']))."'
WHERE
forumcat_id='".$editcat."'
");
}
unset(
$pkPostCanEdit
);
# pkPostCanEdit | |
- Suche weiter:
| PHP-Quelltext if($forumcat['forumcat_threads_option']==1)
$threads_option1=" selected";
else
$threads_option0=" selected"; | |
Und füge darunter das ein:
| PHP-Quelltext # pkPostCanEdit
$pkPostCanEdit =$SQL->fetch_assoc($SQL->query("SELECT forumcat_access_post FROM ".pkSQLTAB_FORUM_CATEGORY." LIMIT 1"));
if ($pkPostCanEdit!==NULL)
{
$pkPostCanEdit[intval($forumcat['forumcat_access_post'])]
=
' selected="selected"'
;
}
# pkPostCanEdit | |
- pkinc/admintpl/forum/editcat_form.htm
Hier klicken zum aufklappen- Öffne o.g. Datei und suche das:
| PHP-Quelltext <tr>
<td class="left">Themen erlauben<br />
<font class="small">Legt fest ob das Eröffnen von Themen möglich ist.</font></td>
<td class="right">
<select name="cat_threads_option" size="2" class="w90">
<option value="0" $threads_option0>nein</option>
<option value="1" $threads_option1>ja</option>
</select>
</td>
</tr> | |
Und füge darunter das ein:
| PHP-Quelltext <!-- pkPostCanEdit -->
<tr>
<td class="left">
Editieren von Posts erlauben
<br />
<font class="small">Legt fest ob das editieren von Posts möglich ist.</font>
</td>
<td class="right">
<select name="pkPostCanEdit" size="2" class="w90">
<option value="0" $pkPostCanEdit[0]>nein</option>
<option value="1" $pkPostCanEdit[1]>ja</option>
</select>
</td>
</tr>
<!-- pkPostCanEdit --> | |
- pkinc/public/forumsthread.php
Hier klicken zum aufklappen- Öffne o.g. Datei und suche das:
| PHP-Quelltext if((pkGetUservalue('id') && $forumpost['forumpost_autorid']==pkGetUservalue('id') && ($forumthread['forumthread_status']==1 || $forumthread['forumthread_status']==2)) || userrights($forumcat['forumcat_mods'])=="true")
eval("\$post_edit= \"".pkTpl("forum/showthread_edit")."\";"); | |
Und füge darunter das ein:
| PHP-Quelltext # pkPostCanEdit
$pkPostCanEdit =$SQL->fetch_assoc($SQL->query("SELECT forumcat_access_post FROM ".pkSQLTAB_FORUM_CATEGORY." WHERE forumcat_id='".$SQL->f(intval($forumthread['forumthread_catid']))."' LIMIT 1"));
if ($pkPostCanEdit!==NULL && isset($post_edit))
{
$post_edit
=
intval($pkPostCanEdit['forumcat_access_post'])===1
|| userrights($forumcat['forumcat_mods'])===TRUE
? $post_edit
: NULL
;
}
# pkPostCanEdit | |
- pkinc/public/forumseditpost.php
Hier klicken zum aufklappen- Öffne o.g. Datei und suche das:
| PHP-Quelltext if(!userrights($forumcat['forumcat_mods']) && ($forumpost['forumpost_autorid']>0 && $forumpost['forumpost_autorid']!=pkGetUservalue('id')))
{
pkEvent('access_refused');
include(pkDIRPUBLICINC.'forumsfooter'.pkEXT);
return;
} | |
Und füge darunter das ein:
| PHP-Quelltext # pkPostCanEdit
$pkPostCanEdit =$SQL->fetch_assoc($SQL->query("SELECT forumcat_access_post FROM ".pkSQLTAB_FORUM_CATEGORY." LEFT JOIN ".pkSQLTAB_FORUM_THREAD." ON forumthread_catid=".pkSQLTAB_FORUM_CATEGORY.".forumcat_id WHERE forumthread_id='".$SQL->f(intval($forumpost['forumpost_threadid']))."' LIMIT 1"));
if ($pkPostCanEdit!==NULL && userrights($forumcat['forumcat_mods'])===FALSE && intval($pkPostCanEdit['forumcat_access_post'])===0)
{
pkEvent('access_refused');
include(pkDIRPUBLICINC.'forumsfooter'.pkEXT);
return;
}
# pkPostCanEdit | |
- pkinc/public/install.php
Sobald du alle Änderungen eingepflegt hast, kannst du die Installation durchführen. Diese kannst du als Administrator normal aufrufen,
http://www.deineSeite.de/?path=install
Die Installation selbst erweitert nur die Datenbank, bzw. kann die Änderung auch rückgängig machen. Jede Art von Fehlermeldung, die auftreten könnte, kann ignoriert werden. Mehr als ein - Can't DROP 'forumcat_access_post'; check that column/key exists oder
- Duplicate column name 'forumcat_access_post'
kann eh nicht kommen. Und diese sagen eh nur aus, das die genannte Spalte nicht existiert und deswegen nicht gelöscht werden kann (#1), bzw. das jene Spalte existiert und deswegen nicht nochmal gespeichert werden kann (#2). Also alles nicht so tragisch dann ;o
Auch brauchst du dir keine Sorgen machen, wenn du (oder ein anderer Adminstrator) mal die Deinstallation durchführt - die Änderungen arbeiten nur, wenn in der Datenbank die Erweiterung drin ist. Nur im AdminCenter unter Foren-Kategorien bearbeiten steht die Änderung fest drin, hat aber im Falle einer Deinstallation keine Funktion / Wirkung.
Standard ist eingestellt, das Beiträge bearbeitet werden können - also nach dem Muster, als wenn es diese Erweiterung nicht gäbe.
Sollte noch irgendetwas sein .. Ich wars nicht 
|
|
|
|
|
|
|
 |
|
 |
|
 |
18.03.2013 - 16:42 Uhr |
|
|
|
Zitat Original geschrieben von Obumba
1.) pkinc/admintpl/editcat_form.htm muss zu pkinc/admintpl/forum/editcat_form.htm oder? |
Stimmt, ist oben geändert ^^""
---
Zitat Original geschrieben von Obumba
2.) In der Datei pkinc/public/forumseditpost.php ist durch den Sammelpatch von Pimpyoukit eine kleine Änderung drin.
Das wird dadurch nicht beeinflusst oder? |
Nein, wird es nicht. Ist halt ein Fix, keine gravierende Änderung in der Funktion selbst ;o Kannst den neuen Code einfach darunter packen.
---
Zitat Original geschrieben von Obumba
3.)
Ist es vielleicht noch irgendwie möglich, dass wir Admins die Möglichkeit haben trotzdem alles zu editieren? Könnte vielleicht dann doch nützlicher sein. xD |
Immer diese extra-wünsche .. Ney, ney
Nun gut, gehe wie folgt vor:
- pkinc/public/forumsthread.php
Hier klicken zum aufklappen- Öffne o.g. Datei und suche das:
| PHP-Quelltext $post_edit
=
intval($pkPostCanEdit['forumcat_access_post'])===1
? $post_edit
: NULL
; | |
Und mache daraus das:
| PHP-Quelltext $post_edit
=
intval($pkPostCanEdit['forumcat_access_post'])===1
|| userrights($forumcat['forumcat_mods'])===TRUE
? $post_edit
: NULL
; | |
- pkinc/public/forumseditpost.php
Hier klicken zum aufklappen- Öffne o.g. Datei und suche das:
| PHP-Quelltext $pkPostCanEdit =$SQL->fetch_assoc($SQL->query("SELECT forumcat_access_post FROM ".pkSQLTAB_FORUM_CATEGORY." LEFT JOIN ".pkSQLTAB_FORUM_THREAD." ON forumthread_catid=".pkSQLTAB_FORUM_CATEGORY.".forumcat_id WHERE forumthread_id='".$SQL->f(intval($forumpost['forumpost_threadid']))."' LIMIT 1"));
if ($pkPostCanEdit!==NULL && userrights($forumcat['forumcat_mods'])===FALSE && intval($pkPostCanEdit['forumcat_access_post'])===0) | |
Und mache daraus das:
| PHP-Quelltext $pkPostCanEdit =$SQL->fetch_assoc($SQL->query("SELECT forumcat_access_post FROM ".pkSQLTAB_FORUM_CATEGORY." LEFT JOIN ".pkSQLTAB_FORUM_THREAD." ON forumthread_catid=".pkSQLTAB_FORUM_CATEGORY.".forumcat_id WHERE forumthread_id='".$SQL->f(intval($forumpost['forumpost_threadid']))."' LIMIT 1"));
if ($pkPostCanEdit!==NULL && userrights($forumcat['forumcat_mods'])===FALSE && intval($pkPostCanEdit['forumcat_access_post'])===0) | |
Damit können alle, die Administrator oder Moderator (oder User, aber Moderator in jeweiligen Forum) sind, Beiträge editieren, egal was eingestellt ist.
Die Änderungen sind nochmal im Post weiter oben eingetragen.
|
|
|
|
|
|
|
 |
|
 |
19.03.2013 - 06:44 Uhr |
|
|
|
Funktioniert bestens.
Vielen Dank ! 
Habe allerdings noch eine kleine Frage ... diese 'Fehlermeldungen' ... Sehen die User die dann oder kommt die im Adminmenü?
|
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von Obumba - 19.03.2013 - 09:03 Uhr |
|
|
|
|
|
|
|
 |
|
 |
19.03.2013 - 16:36 Uhr |
|
|
|
Die genannten Fehlermeldungen kommen nur bei der Installations-Datei, die widerum nur Administratoren benutzen können. Ich wollt es nur erwähnen, nicht das es auf einmal eine Überraschung gibt ^^""
In den Dateien, die bearbeitet wurden, ist eine Abfrage, ob die Installation stattgefunden hat - nur dann wird die neue Funktion ausgeführt. Und diese Meldungen bei der Installations-Datei kann man mehr als Notiz betrachten. Mehr als diese Meldung kann eh nicht kommen:
Zitat Original geschrieben von k!r!ka
- Can't DROP 'forumcat_access_post'; check that column/key exists oder
- Duplicate column name 'forumcat_access_post'
|
|
|
|
|
|
|
|
 |
|
 |
20.03.2013 - 09:58 Uhr |
|
|
|
|
|
|
 |
Ähnliche Themen |
|
|
|
|
|
|
|
|