Hallo, Gast! (Registrieren)

Letzte Ankündigung: MyBB 1.8.37 veröffentlicht (04.11.23)


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste
Moderationsoptionen Button "Los" in CSS
#31
Keine Ahnung.
Habe die Button in: http://www.cssbuttongenerator.com/ erstellt und denn Code dann in global.css eingefügt!

Code:
.postbit {
    -moz-box-shadow:inset 0px 1px 0px 0px #000000;
    -webkit-box-shadow:inset 0px 1px 0px 0px #000000;
    box-shadow:inset 0px 1px 0px 0px #000000;
    background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #636163), color-stop(1, #000000) );
    background:-moz-linear-gradient( center top, #636163 5%, #000000 100% );
    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#636163', endColorstr='#000000');
    background-color:#636163;
    -moz-border-radius:6px;
    -webkit-border-radius:6px;
    border-radius:6px;
    border:1px solid #127380;
    display:inline-block;
    color:#21b8a4;
    font-family:arial;
    font-size:11px;
    font-weight:bold;
    padding:3px 8px;
    text-decoration:none;
    text-shadow:1px 1px 0px #096470;
}

.postbit:hover {
    background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #000000), color-stop(1, #636163) );
    background:-moz-linear-gradient( center top, #000000 5%, #636163 100% );
    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#000000', endColorstr='#636163');
    background-color:#000000;
}

.postbit:active {
    position:relative;
    top:1px;
}
[Bild: ol8kwrt8.gif]
Zitieren
#32
Ok. Also all deine CSS Buttons haben die class="postpit" und Du suchst nun den Button für die Attachmentauswahl. Richtig ?
Mit freundlichen Grüßen

MrBrechreiz
Zitieren
#33
(18.10.2012, 20:45)MrBrechreiz schrieb: Ok. Also all deine CSS Buttons haben die class="postpit" und Du suchst nun den Button für die Attachmentauswahl. Richtig ?

Genau Richtig. Shy
[Bild: ol8kwrt8.gif]
Zitieren
#34
Den kannst Du nicht mit einem CSS Button zuweisen, da dieses Auswahlfeld + Durchsuchen Button vom type="file" definiert ist.

Sorry für die verspätete Antwort. Ich war was essen ^^.
Mit freundlichen Grüßen

MrBrechreiz
Zitieren
#35
(18.10.2012, 21:42)MrBrechreiz schrieb: Den kannst Du nicht mit einem CSS Button zuweisen, da dieses Auswahlfeld + Durchsuchen Button vom type="file" definiert ist.

Sorry für die verspätete Antwort. Ich war was essen ^^.

Das ist ja schade..

Ist nicht schlimm das du so spät geantwortet hast.

Könntest du mir evt noch sagen wo ich denn button in CSS ändern kann für Thema Erledigt?


Mfg
[Bild: ol8kwrt8.gif]
Zitieren
#36
Dies ist zwar wieder ein anderes Thema, aber ich sags dir ^^. Finden kannst Du es im Plugin und musst dann die img Ausgabe löschen und die Link Ausgabe mit der class postpit (in deinem Fall) ergänzen.
Mit freundlichen Grüßen

MrBrechreiz
Zitieren
#37
So sieht es aus:


Code:
    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']."&amp;marksolved=1\"><img src=\"".$theme['imglangdir']."/solved.gif\" border=\"0\" alt=\"\" /></a>&nbsp;";
    }
    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']."&amp;marksolved=0\"><img src=\"".$theme['imglangdir']."/notsolved.gif\" border=\"0\" alt=\"\" /></a>&nbsp;";
    }


Was muss ich dort ändern? Wegmachen?
[Bild: ol8kwrt8.gif]
Zitieren
#38
Hatte ich bereits erwähnt, aber mach in deinem Fall eine Ausnahme und mach´s für dich.

Deinen Code gegen meinen austauschen, dann sollte es klappen.

PHP-Code:
if(basename($_SERVER['PHP_SELF']) == "showthread.php") {
        if(
$thread['threadsolved'] != "1" && ($mybb->user['uid'] != && ($mybb->user['uid'] == $thread['uid'] || $mybb->user['usergroup'] == "4" || $mybb->user['usergroup'] == "3"))) {
            
$threadsolved_button "<a class=\"postpit\" href=\"showthread.php?tid=".$thread['tid']."&amp;marksolved=1\">Erledigt</a>&nbsp;";
        }
        if(
$thread['threadsolved'] == "1" && ($mybb->user['uid'] != && ($mybb->user['uid'] == $thread['uid'] || $mybb->user['usergroup'] == "4" || $mybb->user['usergroup'] == "3"))) {
            
$threadsolved_button "<a class=\"postpit\" href=\"showthread.php?tid=".$thread['tid']."&amp;marksolved=0\">Nicht Erledigt</a>&nbsp;";
        }
    } 



Nachtrag:


Das es nicht zu verwirrungen kommt, hier der komplette Plugin Code.

PHP-Code:
<?php
/*
Plugin "Thread solved" 1.1
2008 (c) MyBBoard.de
*/

// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB")) {
    die(
"Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

$plugins->add_hook("forumdisplay_thread""threadsolved");
$plugins->add_hook("search_results_thread""threadsolved");
//$plugins->add_hook("search_results_post", "threadsolved");
$plugins->add_hook("showthread_linear""threadsolved");
$plugins->add_hook("showthread_threaded""threadsolved");

function 
threadsolved_info() {
    return array(
        
"name"            => "Thema erledigt",
        
"description"    => "Themen k&ouml;nnen als erledigt markiert werden.",
        
"website"        => "https://www.mybb.de",
        
"author"        => "MyBBoard.de",
        
"authorsite"    => "https://www.mybb.de",
        
"version"        => "1.1.1",
    );
}

function 
threadsolved_install() {
    global 
$db;
    if(!
$db->field_exists('threadsolved'"threads")) {
        
$db->query("ALTER TABLE `".TABLE_PREFIX."threads` ADD `threadsolved` INT( 1 ) NOT NULL DEFAULT '0';");
    }
}

function 
threadsolved_uninstall() {
    global 
$db;
    
$db->query("ALTER TABLE `".TABLE_PREFIX."threads` DROP `threadsolved`;");
}

function 
threadsolved_activate() {
    require 
MYBB_ROOT."/inc/adminfunctions_templates.php";
    
find_replace_templatesets("forumdisplay_thread"'#{\$gotounread}#'"{\$gotounread} {\$threadsolved} ");
    
find_replace_templatesets("search_results_threads_thread"'#{\$gotounread}#'"{\$gotounread} {\$threadsolved} ");
    
find_replace_templatesets("search_results_posts_post"'#{\$lang->post_thread}#'"{\$lang->post_thread} {\$threadsolved}");
    
find_replace_templatesets("showthread"'#<strong>{\$thread#'"{\$threadsolved} <strong>{\$thread");
    
find_replace_templatesets("showthread"'#{\$newreply}#'"{\$threadsolved_button}{\$newreply}");
}

function 
threadsolved_deactivate() {
    require 
MYBB_ROOT."/inc/adminfunctions_templates.php";
    
find_replace_templatesets("forumdisplay_thread"'# {\$threadsolved} #'""0);
    
find_replace_templatesets("search_results_threads_thread"'# {\$threadsolved} #'""0);
    
find_replace_templatesets("search_results_posts_post"'# {\$threadsolved}#'""0);
    
find_replace_templatesets("showthread"'#{\$threadsolved} #'""0);
    
find_replace_templatesets("showthread"'#{\$threadsolved_button}#'""0);
}

function 
threadsolved_is_installed() {
    global 
$db;
    if(
$db->field_exists('threadsolved'"threads")) {
        return 
true;
    } else {
        return 
false;
    }
}

function 
threadsolved() {

    global 
$threadsolved$thread$post$templates$mybb$threadsolved_button$db$theme;

    if(
$mybb->user['uid'] != && ($mybb->user['uid'] == $thread['uid'] || $mybb->user['usergroup'] == "4" || $mybb->user['usergroup'] == "3")) {
        if(
$mybb->input['marksolved'] == "1") {
            
$db->query("UPDATE ".TABLE_PREFIX."threads SET threadsolved = '1' WHERE tid = '".$thread['tid']."';");
            
$thread['threadsolved'] = "1";
        }
        if(
$mybb->input['marksolved'] == "0") {
            
$db->query("UPDATE ".TABLE_PREFIX."threads SET threadsolved = '0' WHERE tid = '".$thread['tid']."';");
            
$thread['threadsolved'] = "0";
        }
    }

    
$threadsolved $threadsolved_button "";

    if(
$thread['threadsolved'] == "1") {
        
$threadsolved "<img src=\"images/solved.png\" border=\"0\" alt=\"\" style=\"vertical-align: middle;\" />";
    }

    if(
basename($_SERVER['PHP_SELF']) == "showthread.php") {
        if(
$thread['threadsolved'] != "1" && ($mybb->user['uid'] != && ($mybb->user['uid'] == $thread['uid'] || $mybb->user['usergroup'] == "4" || $mybb->user['usergroup'] == "3"))) {
            
$threadsolved_button "<a class=\"postpit\" href=\"showthread.php?tid=".$thread['tid']."&amp;marksolved=1\">Erledigt</a>&nbsp;";
        }
        if(
$thread['threadsolved'] == "1" && ($mybb->user['uid'] != && ($mybb->user['uid'] == $thread['uid'] || $mybb->user['usergroup'] == "4" || $mybb->user['usergroup'] == "3"))) {
            
$threadsolved_button "<a class=\"postpit\" href=\"showthread.php?tid=".$thread['tid']."&amp;marksolved=0\">Nicht Erledigt</a>&nbsp;";
        }
    }
}
?>
Mit freundlichen Grüßen

MrBrechreiz
Zitieren
#39
Sehr Schön ich Danke dir Vielmals.

Habe gerade ein Fehler entdeckt "postpit" sondern "postbit".

Aber ist nicht Schlimm Wink Ich Danke dir Trotzdem für alles Smile
[Bild: ol8kwrt8.gif]
Zitieren
#40
Ok sorry ^^, gern getan.
Mit freundlichen Grüßen

MrBrechreiz
Zitieren