vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   1 simple question (https://vborg.vbsupport.ru/showthread.php?t=195162)

org knopper 11-01-2008 03:51 PM

1 simple question
 
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:
Code:

<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>
After that, add:
Code:

<td class="smallfont"><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 />&nbsp;</td>        <else />
                <td class="smallfont">&nbsp;</td>


This is what the section looks like on my template:
Code:

<!-- 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&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>
<td class="smallfont"><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 />&nbsp;</td>        <else />
                <td class="smallfont">&nbsp;</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:

Code:

<!-- 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&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>

<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 />&nbsp;</td>       

        <else />
                <td class="smallfont">&nbsp;</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:

Code:

<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 />&nbsp;</td>

dismas 12-21-2008 03:08 AM

Quote:

Originally Posted by Lynne (Post 1690025)
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. :)


All times are GMT. The time now is 07:14 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01092 seconds
  • Memory Usage 1,744KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete