Seite 1 von 2

Probleme mit Code ersetzen...

Verfasst: 12.06.2004 13:58
von Kiss News
Hallo! Ich möchte einen Code ersetzen laut Anleitung, habe dies auch gemacht, meiner Meinung nach richtig, funktioniert aber nicht. ("on mouse over, cell colour changes)
Hier die Anleitung:
-------- >>> Open templates/template-xxx/index-body.tpl --------

------------------------
Find:
------------------------

<td class="row1" width="100%"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br />

------------------------
Replace with:
------------------------

<td class="row1" width="100%" onMouseOver="this.style.backgroundColor='#--01--'; this.style.cursor='default';" onMouseOut="this.style.backgroundColor='#--02--';"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br />
und hier mein original-Code der Datei:
<!-- BEGIN forumrow -->
<tr>
<td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>
<td class="row1" width="100%" height="50"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br />
</span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br />
</span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOPICS}</span></td>
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.POSTS}</span></td>
<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td>
</tr>
<!-- END forumrow -->

ZWEITE DATEI:
-------- >>> Open templates/template-xxx/viewforum_body.tpl --------

------------------------
Find:
------------------------

<td class="row1" width="100%"><span class="gensmall"><b>{topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" class="gensmall">{topicrow.TOPIC_TITLE}</a></b></span><span class="gensmall"><br />
------------------------
Replace with:
------------------------

<td class="row1" width="100%" onMouseOver="this.style.backgroundColor='#--01--'; this.style.cursor='default';" onMouseOut="this.style.backgroundColor='#--02--';"><span class="gensmall"><b>{topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" class="gensmall">{topicrow.TOPIC_TITLE}</a></b></span><span class="gensmall"><br />
hier meine original-Datei:
<!-- BEGIN topicrow -->
<tr>
<td class="row1" align="center" valign="middle" ><img src="{topicrow.TOPIC_FOLDER_IMG}" alt="{topicrow.L_TOPIC_FOLDER_ALT}" title="{topicrow.L_TOPIC_FOLDER_ALT}" /></td>
<td class="row1" width="100%"><span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a></span><span class="gensmall"><br />
{topicrow.GOTO_PAGE}</span></td>
<td class="row2" align="center" valign="middle"><span class="postdetails">{topicrow.REPLIES}</span></td>
<td class="row3" align="center" valign="middle"><span class="name">{topicrow.TOPIC_AUTHOR}</span></td>
<td class="row2" align="center" valign="middle"><span class="postdetails">{topicrow.VIEWS}</span></td>
<td class="row3Right" align="center" valign="middle" nowrap="nowrap"><span class="postdetails">{topicrow.LAST_POST_TIME}<br />{topicrow.LAST_POST_AUTHOR} {topicrow.LAST_POST_IMG}</span></td>
</tr>
<!-- END topicrow -->
ich habe natürlich auch den Farbcode eingesetzt etc... aber die Datei erscheint fehlerhaft. Genau den Code gibt es nicht in meiner original-Datei zu finden, habe ihn aber dorthin gesetzt, wo er meiner Meinung nach hingehört (bzw. habe nur den "mouseover..."-Teil dort eingefügt). Da ich nicht weiss, an welcher Datei der Fehler sein soll, habe ich beide hier aufgeführt. Könnte mir vielleicht jemand den richtigen Endcode bekanntgeben? Danke!

Verfasst: 12.06.2004 23:48
von Markus67
Hi ....

Erste Datei ....

Code: Alles auswählen

<!-- BEGIN forumrow --> 
<tr> 
<td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td> 
<td class="row1" width="100%" height="50" onMouseOver="this.style.backgroundColor='#FF0000'; this.style.cursor='default';" onMouseOut="this.style.backgroundColor='#FF0000';"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br /> 
</span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br /> 
</span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td> 
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOPICS}</span></td> 
<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.POSTS}</span></td> 
<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td> 
</tr> 
<!-- END forumrow -->
Zweite Datei ....

Code: Alles auswählen

<!-- BEGIN topicrow --> 
<tr> 
<td class="row1" align="center" valign="middle" ><img src="{topicrow.TOPIC_FOLDER_IMG}" alt="{topicrow.L_TOPIC_FOLDER_ALT}" title="{topicrow.L_TOPIC_FOLDER_ALT}" /></td> 
<td class="row1" width="100%" onMouseOver="this.style.backgroundColor='#FF0000'; this.style.cursor='default';" onMouseOut="this.style.backgroundColor='#FF0000';"><span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a></span><span class="gensmall"><br /> 
{topicrow.GOTO_PAGE}</span></td> 
<td class="row2" align="center" valign="middle"><span class="postdetails">{topicrow.REPLIES}</span></td> 
<td class="row3" align="center" valign="middle"><span class="name">{topicrow.TOPIC_AUTHOR}</span></td> 
<td class="row2" align="center" valign="middle"><span class="postdetails">{topicrow.VIEWS}</span></td> 
<td class="row3Right" align="center" valign="middle" nowrap="nowrap"><span class="postdetails">{topicrow.LAST_POST_TIME}<br />{topicrow.LAST_POST_AUTHOR} {topicrow.LAST_POST_IMG}</span></td> 
</tr> 
<!-- END topicrow -->
FF0000 --> mit der von dir gewünschten Farbe ersetzen ...

Markus

Verfasst: 12.06.2004 23:49
von Crack02
falls das des zeug von mir is hätte ich erwähnen sollen dass der code fürs smartdark style is......normalerweise^^

Verfasst: 13.06.2004 01:02
von Kiss News
@Markus Danke für Deine Antwort. Ganz genauso hatte ich es auch gemacht, funktioniert aber nicht, es sieht dann so aus:
[ externes Bild ] wüsste auch nicht, wie ich den Code anders einsetzen sollte... :cry: :cry: :-? :(

@Crack02: stammt von einem Holländer...:
#################################################################
## Mod Title: PhpBB - OnMouseOver Hack
## Mod Version: 1.0.0
## PhpBB Version: 2.xx
## Author: Robin de Boer <webbie@chibitrunks.nl> - http://www.chibitrunks.nl
##
## Installation Level: (easy)
## Installation Time: 1 Minutes
## Files To Edit:
## forumroot/templates/template-xxx/index-body.tpl
## forumroot/templates/template-xxx/viewforum_body.tpl
##
## Included Files: (n/a, or list of included/required files)
#################################################################
## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites
#################################################################
##

Verfasst: 13.06.2004 01:09
von Leuchte
Probiers mal damit:

Code: Alles auswählen

onMouseOver=this.style.backgroundColor="#F5F4F4" onMouseOut=this.style.backgroundColor=""

Verfasst: 13.06.2004 01:22
von Kiss News
wenn ich den Befehl
this.style.cursor='default';"
weglasse (auf beiden Dateien), ist es trotzdem das gleiche Ergebnis (ausser, dass halt dieser Befehls-Text dann natürlich Fehlt auf dem Bild...) :cry:

Verfasst: 13.06.2004 01:47
von Leuchte
Leuchte hat geschrieben:Probiers mal damit:

Code: Alles auswählen

onMouseOver=this.style.backgroundColor="#F5F4F4" onMouseOut=this.style.backgroundColor=""
:roll:

Verfasst: 13.06.2004 01:56
von Kiss News
:o ist ja der gleiche Code... den habe ich schon probiert, funktioniert ja auch nicht :(

Verfasst: 13.06.2004 01:58
von Leuchte
Bei mir funktioniert er :roll:
Gib mal einen Link auf die beiden entsprechenden Dateien

Verfasst: 13.06.2004 02:08
von Kiss News