27.01.2016, 11:28
Wir haben einfach auf die CSS-Attribute der Standard-Buttons wiederverwendet, damit sie genauso wie die anderen Buttons aussehen. Gerade bei Links spart das einigen Code für :hover, :active, etc.
(29.08.2014, 16:05)MrBrechreiz schrieb: [ -> ]Ja, dann mach aus dem oben genannten Code, dies
PHP-Code:if(basename($_SERVER['PHP_SELF']) == "showthread.php") {
if($thread['threadsolved'] != "1" && ($mybb->user['uid'] != 0 && ($mybb->user['uid'] == $thread['uid'] || $mybb->user['usergroup'] == "4" || $mybb->user['usergroup'] == "3"))) {
$threadsolved_button = "<a href=\"showthread.php?tid=".$thread['tid']."&marksolved=1\" class=\"newthbutton\"><i class=\"fa fa-check\"> Erledigt</i></a> ";
}
if($thread['threadsolved'] == "1" && ($mybb->user['uid'] != 0 && ($mybb->user['uid'] == $thread['uid'] || $mybb->user['usergroup'] == "4" || $mybb->user['usergroup'] == "3"))) {
$threadsolved_button = "<a href=\"showthread.php?tid=".$thread['tid']."&marksolved=0\" class=\"newthbutton\"><i class=\"fa fa-times\"> Nicht Erledigt</i></a> ";
}
}
if(basename($_SERVER['PHP_SELF']) == "showthread.php") {
if($thread['threadsolved'] != "1" && ($mybb->user['uid'] != 0 && ($mybb->user['uid'] == $thread['uid'] || $mybb->user['usergroup'] == "4" || $mybb->user['usergroup'] == "3"|| $mybb->user['usergroup'] == "9" || $mybb->user['usergroup'] == "10" || $mybb->user['usergroup'] == "11" || $mybb->user['usergroup'] == "12" || $mybb->user['usergroup'] == "21" || $mybb->user['usergroup'] == "22" || $mybb->user['usergroup'] == "23" || $mybb->user['usergroup'] == "24"))) {
$threadsolved_button = "<a href=\"showthread.php?tid=".$thread['tid']."&marksolved=1\" class=\"newthbutton\"><i class=\"fa fa-check\"> Erledigt</i></a> ";
}
if($thread['threadsolved'] == "1" && ($mybb->user['uid'] != 0 && ($mybb->user['uid'] == $thread['uid'] || $mybb->user['usergroup'] == "4" || $mybb->user['usergroup'] == "3"|| $mybb->user['usergroup'] == "9" || $mybb->user['usergroup'] == "10" || $mybb->user['usergroup'] == "11" || $mybb->user['usergroup'] == "12" || $mybb->user['usergroup'] == "21" || $mybb->user['usergroup'] == "22" || $mybb->user['usergroup'] == "23" || $mybb->user['usergroup'] == "24"))) {
$threadsolved_button = "<a href=\"showthread.php?tid=".$thread['tid']."&marksolved=0\" class=\"newthbutton\"><i class=\"fa fa-times\"> Nicht Erledigt</i></a> ";
}
}
$mybb->user['usergroup'] == "3"
$mybb->user['usergroup'] == "9" ||
$mybb->user['usergroup'] == "11" ||
$mybb->user['usergroup'] == "21" ||
$mybb->user['usergroup'] == "22" ||
....
if($thread['threadsolved'] != "1" && ($mybb->user['uid'] != 0 && ($mybb->user['uid'] == $thread['uid'] || in_array($mybb->user['usergroup'], array(3,4,9,10,11,12,21,22,23,24)));
...