2014-03-14, 06:31 PM
Hey guys,
I'm trying to place a logo underneath my header, which depends on the thread id, so with other words: I want a certain logo/image above a selected/certain thread.
I used a simple line underneath the header variable in my showthread template:
This way works, but it puts an image above EVERY thread, and I cant select it only for a certain thread.
That's why I tried an if-statement in the showthread template:
I wanted to test, if I can make it work for the thread #3, while every other thread gets an ivisible logo ("0.png").
Sadly, it didnt work... ^^ And since my programming skills aren't really good enough to call them "skills", I need your help now.
What did I do wrong in the function logo () ? And how can I do it correctly?
Thx Guys
I'm trying to place a logo underneath my header, which depends on the thread id, so with other words: I want a certain logo/image above a selected/certain thread.
I used a simple line underneath the header variable in my showthread template:
{$header}
<center><img src="images/fanclub/{$thread['tid']}.png"></center>
This way works, but it puts an image above EVERY thread, and I cant select it only for a certain thread.
That's why I tried an if-statement in the showthread template:
<script type="text/javascript">
function logo () {var thread = "{$thread['tid']}"; var bild = "0";
if (thread == 3) {bild = "logo"; }
}
</script>
...
<body onload="logo()">
{$header}
<center><img src="images/fanclub/{$bild}.png"></center>
I wanted to test, if I can make it work for the thread #3, while every other thread gets an ivisible logo ("0.png").
Sadly, it didnt work... ^^ And since my programming skills aren't really good enough to call them "skills", I need your help now.
What did I do wrong in the function logo () ? And how can I do it correctly?
Thx Guys