Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Admin Bereich Buttons
#1
Im Adminbereich kann man ja ankündigungen machen und ein Button setzten. Also W1 M1 SDS USDS... Wie kann man ein Button hinzufügen?

Danke im vorraus für eure antworten Big Grin
✝ RiP 
Weiter geht's  Cool
Reply
#2
öffne mal htdocs/admin/templates/index_startpage.tpl

sieht so aus
Code:
<h2>Startseite</h2>

{if !empty($error)}
    <font class="error">{$error}</font><br /><br />
{/if}

<form method="POST" action="index.php?screen=startpage&action=add" onSubmit="this.submit.disabled=true;">
    <table class="vis" width="450">
        <tr>
            <th colspan="2">Ank?ndigung hinzuf?gen</th>
        </tr>
        <tr>
            <td width="50">Text:</td>
            <td><textarea cols="45" rows="3" name="text"></textarea></td>
        </tr>
        <tr>
            <td>Link:</td>
            <td><input type="text" name="link" size="70"></td>
        </tr>
        <tr>
            <td>Grafik:</td>
            <td>
                <table cellspacing="0">
                    <tr>
                        <td>
                            <input type="radio" name="graphic" value="global">
                        </td>
                        <td width="50">
                            <img src="../graphic/minibutton/global.png">
                        </td>
                        
                        <td width="20">
                            <input type="radio" name="graphic" value="sds">
                        </td>
                        <td width="50">
                            <img src="../graphic/minibutton/sds.png">
                        </td>
                    
                        <td width="20">
                            <input type="radio" name="graphic" value="usds">
                        </td>
                        <td width="50">
                            <img src="../graphic/minibutton/usds.png">
                        </td>
                        
                        <td width="20">
                            <input type="radio" name="graphic" value="w1">
                        </td>
                        <td width="50">
                            <img src="../graphic/minibutton/w1.png">
                        </td>
                        
                        <td width="20">
                            <input type="radio" name="graphic" value="m1">
                        </td>
                        <td width="50">
                            <img src="../graphic/minibutton/m1.png">
                        </td>
                    </tr>
                </table>
            </td>    
        </tr>
        <tr>
            <td align="right" colspan="2"><input type="submit" name="submit" value="Ank?ndigung hinzuf?gen"></td>
        </tr>
    </table>
</form>
<br />
<table class="vis" width="450">
    <tr>
        <th colspan="2">Bereits gespeicherte Ank?ndigungen</th>
    </tr>
    {foreach from=$announcement item=item key=f_id}
        <tr>
            <td><img src="../graphic/minibutton/{$announcement.$f_id.graphic}.png"></td>
            <td width="100%">
                {$announcement.$f_id.text}<br />
                <table width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                        {if !empty($announcement.$f_id.link)}
                            <td align="left" style="font-size: xx-small;"><a href="{$announcement.$f_id.link}">&raquo; mehr</a></td>
                        {/if}
                        <td align="right" style="font-size: xx-small;">{$announcement.$f_id.time}</td>
                    </tr>
                </table>
            </td>
            <td><a href="index.php?screen=startpage&action=drop&id={$announcement.$f_id.id}">L?schen</td>
        </tr>
    {/foreach}
</table>
<br /><br />
<form method="POST" action="index.php?screen=startpage&action=locked_login">
<table class="vis">
    <tr>
        <th colspan="2">Login sperren</th>
    </tr>
    <tr>
        <td>Login sperren?</td>
        <td><input type="radio" name="login_locked" value="yes" {if $login.login_locked=='yes'}checked{/if}> JA<br /><input type="radio" name="login_locked" value="no" {if $login.login_locked=='no'}checked{/if}> NEIN</td>
    </tr>
    <tr>
        <td align="right" colspan="2"><input type="submit" value="OK"></td>
    </tr>
</table>
</form>

zum hinzufügen eines buttons musst du diesen teil in der tabelle hinzufügen für jeden button
Code:
<td>
                            <input type="radio" name="graphic" value="{global}">
                        </td>
                        <td width="50">
                            <img src="../graphic/minibutton/{global}.png">
                        </td>

die in {} eingerahmten stellen müssen entsprechend ersetzt werden, die namen findest in graphic/minibutton

mfg

ach ja, ohne garantie, ich vermute, das es so gehen sollte, bin mir aber nciht sicher, da ich es noch nie gemacht habe

//edit: gerade getestet, es geht
Reply




Users browsing this thread: 1 Guest(s)