Reimer
20.12.2003, 18:20
Willkommen zu Reimers ersten Tipps für vB-Germany. Ich zeige hier eine Möglichkeit, wie das in jedem Forum eurer Community ein anderes Logo angezeigt wird.
Eine Demo findet ihr unter http://webhostingtalk.de/index.php?s=&styleid=7 und zwar die Grafik oben rechts passt sich entsprechend an.
Als erstes betrachten wir den Standartheader in eurem Forum. Bereits in der fünften Zeile findet ihr das Logo ( <img .... > ). Also dreht sich das Spiel nur um diese kleinen Zeile dort.
<!-- logo -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="$stylevar[left]"><a href="$vboptions[forumhome].php?$session[sessionurl]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
<td align="$stylevar[right]">
</td>
</tr>
</table>
<!-- /logo -->
<!-- content table -->
$spacer_open
$_phpinclude_output
Nun, wir nutzen um dieses Ziel zu erreichen die Funktion der Conditions, welche das ganze sehr einfach macht. Ruft man ein Forum auf, so existiert der Array $foruminfo gespickt mit Daten zu den Forum. Befindet man sich nicht in einem Forum, so existiert auch dieser Array nicht:
Also, wenn $foruminfo existiert, dann ersetze das Logo, sonst nutze das Standartlogo.
<!-- logo -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="$stylevar[left]"><a href="$vboptions[forumhome].php?$session[sessionurl]">
<if condition="$foruminfo[forumid]">
<img src="images/forumlogos/$foruminfo[forumid].gif" border="0" alt="$vboptions[bbtitle]" />
<else />
<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" />
</if>
</a></td>
<td align="$stylevar[right]">
</td>
</tr>
</table>
<!-- /logo -->
<!-- content table -->
$spacer_open
$_phpinclude_output
So, nachdem wir das Template bearbeitet haben, musst du als letztes für jedes Forum und jede Kategorie dies Logos hochladen. Dafür erstellst du im Ordner images den Ordner forumlogos und danach wirst du hinein die Logos kopieren. Die Namen der Grafiken hängen von der Forenid ab: {forumid}.gif
So, viel Spaß.
Eine Demo findet ihr unter http://webhostingtalk.de/index.php?s=&styleid=7 und zwar die Grafik oben rechts passt sich entsprechend an.
Als erstes betrachten wir den Standartheader in eurem Forum. Bereits in der fünften Zeile findet ihr das Logo ( <img .... > ). Also dreht sich das Spiel nur um diese kleinen Zeile dort.
<!-- logo -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="$stylevar[left]"><a href="$vboptions[forumhome].php?$session[sessionurl]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
<td align="$stylevar[right]">
</td>
</tr>
</table>
<!-- /logo -->
<!-- content table -->
$spacer_open
$_phpinclude_output
Nun, wir nutzen um dieses Ziel zu erreichen die Funktion der Conditions, welche das ganze sehr einfach macht. Ruft man ein Forum auf, so existiert der Array $foruminfo gespickt mit Daten zu den Forum. Befindet man sich nicht in einem Forum, so existiert auch dieser Array nicht:
Also, wenn $foruminfo existiert, dann ersetze das Logo, sonst nutze das Standartlogo.
<!-- logo -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="$stylevar[left]"><a href="$vboptions[forumhome].php?$session[sessionurl]">
<if condition="$foruminfo[forumid]">
<img src="images/forumlogos/$foruminfo[forumid].gif" border="0" alt="$vboptions[bbtitle]" />
<else />
<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" />
</if>
</a></td>
<td align="$stylevar[right]">
</td>
</tr>
</table>
<!-- /logo -->
<!-- content table -->
$spacer_open
$_phpinclude_output
So, nachdem wir das Template bearbeitet haben, musst du als letztes für jedes Forum und jede Kategorie dies Logos hochladen. Dafür erstellst du im Ordner images den Ordner forumlogos und danach wirst du hinein die Logos kopieren. Die Namen der Grafiken hängen von der Forenid ab: {forumid}.gif
So, viel Spaß.