View Full Version : 1 simple question
org knopper
11-01-2008, 03:51 PM
I just want to know what code to put and which template to get the new thread button on the view forum page over postbit just like below.
https://vborg.vbsupport.ru/external/2008/11/77.jpg
ty in advance.
dismas
11-01-2008, 04:13 PM
Find the SHOWTHREAD template,
In there you'll find:
<!-- controls above postbits -->
Inside that section of code, find:
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&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>
After that, add:
<td class="smallfont"><a href="newthread.php?$session[sessionurl]do=newthread&f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else /> </td> <else />
<td class="smallfont"> </td>
This is what the section looks like on my template:
<!-- controls above postbits -->
<table cellpadding="0" cellspacing="0" border="0" width="25%" style="margin-bottom:3px">
<tr valign="bottom">
<if condition="$show['largereplybutton']">
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&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>
<td class="smallfont"><a href="newthread.php?$session[sessionurl]do=newthread&f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else /> </td> <else />
<td class="smallfont"> </td>
</if>
<if condition="$show['pagenav']"><td align="$stylevar[right]">$pagenav</td></if>
</tr>
</table>
<!-- / controls above postbits -->
org knopper
11-18-2008, 03:00 AM
Looks like this -
https://vborg.vbsupport.ru/external/2008/11/38.jpg
ty.
org knopper
11-22-2008, 06:11 AM
any one ?
org knopper
12-20-2008, 03:19 AM
any answers :-? yet ?
Lynne
12-20-2008, 03:33 AM
That actually saved without any issues? It looks like it has two extra <else /> tags in there that he added.
dismas
12-20-2008, 11:30 PM
It worked on my 3.6 board.
I just now put it into my 3.7 board and tweaked it a bit. The whole thing now looks like this:
<!-- controls above postbits -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px">
<tr valign="bottom">
<if condition="$show['largereplybutton']">
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&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>
<a href="newthread.php?$session[sessionurl]do=newthread&f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else /> </td>
<else />
<td class="smallfont"> </td>
</if>
<if condition="$show['pagenav']"><td align="$stylevar[right]">$pagenav</td></if>
</tr>
</table>
<!-- / controls above postbits -->
Lynne
12-20-2008, 11:38 PM
I have a feeling the html is screwed up because of the added else tag. It's hard to know without seeing the real browser page source for that area.
dismas
12-20-2008, 11:49 PM
Initially I had the space between the 'Reply' and 'New' buttons just like org knopper but I took out the extraneous "else" as well as the second td class=smallfont tag. Now mine line up perfect. One right next to the other.
One odd thing though, I didn't get the usual "This template has been updated in the following styles..." type message. The one where it lists each template and has Done at the end. Instead, the edit template page simply reloaded and that was it.
You can check what it looks like at www.vermontoutdoors.net
Lynne
12-21-2008, 02:59 AM
Yeah, the <else /> is screwing it up for you - you are missing the </td> after the newthread image/link (the browser is smart enough to interpret it correctly, but you'd get errors if you tried to validate the html). I think you can change this line by removing the stuff in red:
<a href="newthread.php?$session[sessionurl]do=newthread&f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else /> </td>
dismas
12-21-2008, 03:08 AM
you are missing the </td> after the newthread image/link (the browser is smart enough to interpret it correctly, but you'd get errors if you tried to validate the html).
I removed the stuff in red but I don't understand what you mean about the </td>
Lynne
12-21-2008, 03:30 AM
The html looks correct now.
Just like most html tags, you have a beginning and end tag. For columns, the tag is <td>. So, every time you have a beginning <td>, you must have an ending td </td>. You were missing the end td tag, </td>.
dismas
12-21-2008, 04:34 AM
Thanks for taking a look. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.