View Full Version : New posts or new threads button above quickreplay
hyppa
09-21-2009, 06:59 AM
How can i get a button saying: New posts, or new threads above quickreplay on every end of the thread i am viewing?
Lynne
09-21-2009, 03:22 PM
There is already a Post Reply in the SHOWTHREAD template, so you may copy that code and put it right aboe the Quick Reply code. You can copy the New Thread code from the FORUMDISPLAY template and put it above the Quick Reply code also (you may have to change the variable names). If you get stuck, post the *exact* code you are using and a couple of lines from the default template above and below your lines of code.
hyppa
09-22-2009, 08:22 AM
Thank you for your answer, but coding? I have never done it. How do i find the correct code?
Lynne
09-22-2009, 02:35 PM
Thank you for your answer, but coding? I have never done it. How do i find the correct code?
Sorry, it's very hard to judge just how much experience a user has just from a post. :)
Find this in your SHOWTHREAD template:
<if condition="$show['quickreply']">
<!-- quick reply -->Add ABOVE it:
<!-- controls below postbits -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-top:$stylevar[margin_3px_fix]px">
<tr valign="top">
<if condition="$show['largereplybutton']">
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&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"> </td>
</if>
<td class="smallfont"><if condition="$show['newthreadlink']"><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 /> </if></td>
</tr>
</table>This is NOT tested, but I think it is correct. You may have to change (in the new thread section) $foruminfo[forumid] to $threadinfo[forumid].
hyppa
09-23-2009, 07:17 AM
You are so nice that is trying to help.
Sorry to say, the code did not work, the button does not show up at all.
--------------- Added 1253706707 at 1253706707 ---------------
I also tryed to change (in the new thread section) $foruminfo[forumid] to $threadinfo[forumid], but no button shows up above quickreplay.
Lynne
09-23-2009, 02:24 PM
Try taking the conditions out and see what you get. So try just:
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-top:$stylevar[margin_3px_fix]px">
<tr valign="top">
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&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" /></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></td>
</tr>
</table>
hyppa
09-23-2009, 02:29 PM
Trying this is getting me a fatal error message.
The following error occurred when attempting to evaluate this template:
The conditional on line 284 appears to be missing its end tag (</if>). The template will not function properly unless this is fixed.
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
--------------- Added 1253720710 at 1253720710 ---------------
Is it just to add </if> in the end of that line, that is the first line you have written.
This line:
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&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" /></a></td>
Lynne
09-23-2009, 02:53 PM
In my enthusiasm to remove the conditions, I removed one too many </if>s. try this:
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-top:$stylevar[margin_3px_fix]px">
<tr valign="top">
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&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>
<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></td>
</tr>
</table>
hyppa
09-23-2009, 03:03 PM
You are an angel. :hug:
Yes, that is working for starting a new thread, but what about what i really asked for: a button thas shows new threads.
can you help me?
I think you are very, very nice. :)))
Lynne
09-23-2009, 03:14 PM
Argh! I totally misunderstood what you wanted! I thought you wanted another New Post (New Reply) and New Thread button! Now I see you want a link to the New Posts/New Threads page. This is the code for the New Posts button (the one you see in the navbar):
<a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a>
You can place that above the Quick Reply code either in a table, or by itself (I think).
hyppa
09-23-2009, 03:19 PM
Lynne, it looks so good the other one. So i will keep it. Thank you so very much. :)
Will the one you have posted there show up next to the other one?
--------------- Added 1253722843 at 1253722843 ---------------
Or do you have the code to the same button, that shows me the New Posts/New Threads page?
Lynne
09-23-2009, 03:26 PM
You can put it in the same table if you want:
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-top:$stylevar[margin_3px_fix]px">
<tr valign="top">
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&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>
<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></td>
<td class="smallfont"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
</tr>
</table>
That puts it last. Or you could move the <td> to put it first - whichever you like. You may also want to play with the alignment in the columns (align="left"), or not, it's up to you.
hyppa
09-23-2009, 03:34 PM
Hi again.
Are that code that you put there for both buttons? Yes, i am "blond". Sorry. :lol:
If i put in that i have to remove the other one? otherwise it will be dobbel?
:hug:
--------------- Added 1253723934 at 1253723934 ---------------
I tryed to do that and it shows ut, but no button, perhaps i have to add a button to images. Do ypu know which folder?
--------------- Added 1253724029 at 1253724029 ---------------
And if, what shall i call the button?
--------------- Added 1253724825 at 1253724825 ---------------
I have tryed to use: getnew.gif and i have tryed search.gif..
Trying to sort out in your code what to use.
--------------- Added 1253724949 at 1253724949 ---------------
Hi again.
Are that code that you put there for both buttons? Yes, i am "blond". Sorry. :lol:
If i put in that i have to remove the other one? otherwise it will be dobbel?
:hug:
--------------- Added 23 Sep 2009 at 18:38 ---------------
I tryed to do that and it shows ut, but no button, perhaps i have to add a button to images. Do ypu know which folder?
--------------- Added 23 Sep 2009 at 18:40 ---------------
And if, what shall i call the button?
--------------- Added 23 Sep 2009 at 18:53 ---------------
I have tryed to use: getnew.gif and i have tryed search.gif..
Trying to sort out in your code what to use and i think it is missing the image code for the button?, pst: i have the button here. ;).
.....
--------------- Added 1253727244 at 1253727244 ---------------
Hope you can help me with the imagecode. :)
--------------- Added 1253798488 at 1253798488 ---------------
I have tryed to fix a button code my self, but :(.
hyppa
09-25-2009, 07:43 AM
How can i get a button saying: New posts, or new threads above quickreplay on every end of the thread i am viewing?
Lynn has benn an angel and supplied me with this code, but the show new thread does not show up as a button, just a frase.
Can anyone help me with the code for a button? Last line. Attached: the image for it.
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-top:$stylevar[margin_3px_fix]px">
<tr valign="top">
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&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>
<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></td>
<td class="smallfont"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
</tr>
</table>
hyppa
09-25-2009, 11:42 AM
Here is the code for a button:
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-top:$stylevar[margin_3px_fix]px">
<tr valign="top">
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&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>
<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></td>
<td class="smallfont" align="$stylevar[left]">
<a href="search.php?$session[sessionurl]do=getnew" accesskey="2"><img src="$stylevar[imgdir_button]/nyeinnlegg.gif" alt="$vbphrase[reply]" border="0" /></a>
</td>
</tr>
</table>
problem solved. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.