PDA

View Full Version : Moving 'largereplybutton' to navbar


obmob
11-21-2007, 03:33 AM
Hello, I'm trying to modify my template to show the reply, closed and new thread buttons inside the navbar. I thought it was working ok, but today i closed a thread and realized the closed button isn't shown, instead, i have the reply button.

This is my navbar table, i want it to look alike webhostingtalk.com forums:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1" width="100%"><div style="font-weight:bold" class="pspace"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /> <a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">$vboptions</a> &raquo; $navbits[breadcrumb] $navbits[lastelement]</div></td>
[B]<if condition="$show['largereplybutton']">
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$FIRSTPOSTID" rel="nofollow"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td>
<else />
<td class="smallfont">&nbsp;</td>
</if>
<if condition="$show['newthreadlink']">
<td class="alt1"><a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else /></td></if>
</tr>
</table>That bold line seems to be my problem, but i don't know if it is because i moved that into the navbar out of showthread template... anyone has an idea on how could i fix this problem?

Thank you in advance :D

Triky
11-22-2007, 09:51 PM
You have inverted the code, as far as I can see..
<if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if> Should be:
<if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /><else /><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /></if>

obmob
11-24-2007, 02:39 PM
Thanks for answering, that's exactly what I thought, so I tried changing that, but if I do it, then every post shows the 'closed thread' button.

This is the default code in showthread template:

<if condition="$show['largereplybutton']">
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$LASTPOSTID" rel="nofollow">
<if condition="$show['closethread']">
<img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" />
<else />
<img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" />
</if></a></td>
<else />
<td class="smallfont">&nbsp;</td>
</if>
Any ideas? :eek:

Triky
11-25-2007, 07:09 PM
Oh, it's right. Zorry.
Then you could try to check your images folder. Maybe you've inverted some buttons.. changing the name.

obmob
11-27-2007, 02:45 AM
Hmm... actually, every image seems to be ok, maybe there is a trick to move that button into the navbar, but haven't been able to make it work as i want. :(

Triky
11-27-2007, 07:19 AM
Zorry but I can't help you, obmob.

gotlinks
11-27-2007, 06:00 PM
Where is your forum? Maybe I can help if I see it.

obmob
11-28-2007, 09:16 PM
Thanks triky.

Oh, thanks gotlinks, there are a couple.

www.anizeen.com in english
www.ositobarrigon.com in spanish

gotlinks
11-29-2007, 11:29 AM
Well what you need to do is somehow define the large reply button only if your viewing a thread, I am not sure how to do that exactly but thats how it should be done.

obmob
12-01-2007, 04:50 PM
Yeah, i took the code from showthread, but it seems it only works inside that template. :(

mulesnx
01-15-2009, 01:58 AM
I am trying to figure this same thing out, and am having the same exact problem.... Can anyone help here?