Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Laikas ant redagavimo (Forumas)

Parašė Rasmitas· 2008 Rugp. 11 23:08:13
#1

Pamaciau, kad forume daug zmoniu redaguoja savo postus, trina!
Gal ir nelabai gerai ...

Vienu zodziu istriniau linka "REDAGUOTI"
Padariau taip, kad po publikacijos posto arba temos butu galima redaguot 10min, manau uztenka atredaguot jeigi kas netaip...

Atidarom: /forum/viewthread.php

Ieskom:
~150 eilute

if (iMEMBER && $can_post) {
if (!$tdata['thread_locked']) {
if ( $userdata['user_id'] == $data['post_author'] || iMOD || iSUPERADMIN) {
echo "<a href='post.php?action=edit&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><img src='".THEME."forum/edit.gif' alt='".$locale['568']."' style='border:0px;'></a>\n";
}
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id'].""e=".$data['post_id']."'><img src='".THEME."forum/quote.gif' alt='".$locale['569']."' style='border:0px;'></a>\n";
if (iMOD || iSUPERADMIN && $data['post_ip'] != "0.0.0.0" && file_exists(THEME."forum/ip.gif")) echo "<img src='".THEME."forum/ip.gif' alt='".$locale['570']."' title='".$data['post_ip']."' style='border:0px;'>\n";
} else {
if (iMOD || iSUPERADMIN) {
echo "<a href='post.php?action=edit&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><img src='".THEME."forum/edit.gif' alt='".$locale['568']."' style='border:0px;'></a>\n";
if ($data['post_ip'] != "0.0.0.0" && file_exists(THEME."forum/ip.gif")) echo "<img src='".THEME."forum/ip.gif' alt='".$locale['570']."' title='".$data['post_ip']."' style='border:0px;'>\n";
}
}
}




Pakeiciam ant:

if (iMEMBER && $can_post) {
if (!$tdata['thread_locked']) {
if (($userdata['user_id'] == $data['post_author']&& (time()-$data['post_datestamp'])<600) || iMOD || iSUPERADMIN) {
echo "<a href='post.php?action=edit&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><img src='".THEME."forum/edit.gif' alt='".$locale['568']."' style='border:0px;'></a>\n";
}
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id'].""e=".$data['post_id']."'><img src='".THEME."forum/quote.gif' alt='".$locale['569']."' style='border:0px;'></a>\n";
if (iMOD || iSUPERADMIN && $data['post_ip'] != "0.0.0.0" && file_exists(THEME."forum/ip.gif")) echo "<img src='".THEME."forum/ip.gif' alt='".$locale['570']."' title='".$data['post_ip']."' style='border:0px;'>\n";
} else {
if (iMOD || iSUPERADMIN) {
echo "<a href='post.php?action=edit&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><img src='".THEME."forum/edit.gif' alt='".$locale['568']."' style='border:0px;'></a>\n";
if ($data['post_ip'] != "0.0.0.0" && file_exists(THEME."forum/ip.gif")) echo "<img src='".THEME."forum/ip.gif' alt='".$locale['570']."' title='".$data['post_ip']."' style='border:0px;'>\n";
}
}
}





Sekmes;)