Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 11-28-2014, 10:32 PM
^SuiCyde^ ^SuiCyde^ is offline
 
Join Date: Dec 2003
Location: Colorado Springs/CincyO
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Having a recent/latest replies block

Hi, I'm looking for a block on the right-hand side of the forum showing the latest replies posted.

I've been using the VietBB Sidebar Column, but this only shows Latest Threads, where it organises the list by most recently replied to, and displays the thread title, but unfortunately the link is to the thread itself (not the post just made in it) and the thread starter is also shown instead of the last poster.

The best I've been able to is add another link below with &goto=newpost

But what I'm looking for is a link to the last post, and to display the username of that post.

Here's what I've got so far:

Code:
<tr>
    <td class="$class">
        <div class="smallfont"><a href="showthread.php?$session[sessionurl]t=$+++++++_sclt[threadid]"><strong>$+++++++_sclt[title]</strong></a></div>
<div class="smallfont"><a href="showthread.php?$session[sessionurl]t=$+++++++_sclt[threadid]&goto=newpost"><img src="/images/theme/buttons/firstnew.gif" alt="Go To First Unread Reply"></a>- $vbphrase[sclt_by] <a href="member.php?$session[sessionurl]u=$+++++++_sclt[postuserid]">$+++++++_sclt[postusername]</a></div>
    </td>
</tr>



So if you can imagine, I'd like to replace $+++++++_sclt[postusername] with whatever variable calls up the name of the very last poster in the thread, and also be able to link to that post instead of the first unread one.

Is there an easy way to accomplish this?

Thanks!

(And why can't I post the variable in this thread, is it filtered as a swear word or something? Even without the $ sigh it's still censored.)
Reply With Quote
  #2  
Old 11-29-2014, 12:58 AM
blind-eddie's Avatar
blind-eddie blind-eddie is offline
 
Join Date: Apr 2006
Location: Michigan
Posts: 2,310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you use vbadvanced? If so, you can achieve what you are after with ease on your forum pages or you can use the following.

Code:
<tr>
<td class="$bgclass">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
	<td class="alt1" style="text-align:justify">
<script type="text/javascript" src="external.php?type=js"></script> <script language="" type="text/javascript"> <!--
		for (var x in threads)
		{
		document.writeln("<a href=\"showthread.php?t="+threads[x].threadid+"&goto=newpost\"><img class=\"inlineimg\" src=\"$stylevar[imgdir_button]/lastpost.gif\" alt=\"$vbphrase[go_to_last_post]\" border=\"0\" /></a> <a href=\"showthread.php?t="+threads[x].threadid+"\">"+threads[x].title+"</a> <br />");
		}
		//--> </script> </td>
</tr>
</table>
</td>
</tr>
Reply With Quote
Благодарность от:
ozzy47
  #3  
Old 11-29-2014, 07:35 PM
^SuiCyde^ ^SuiCyde^ is offline
 
Join Date: Dec 2003
Location: Colorado Springs/CincyO
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your reply.

Where would I paste that code? I tried putting into the Latest Threads block in Edit Templates but it doesn't show up, and the whole block disappears.

I just installed vBadvanced CMPS. If this way is easier, can you show me how to implement it there?
Reply With Quote
  #4  
Old 11-30-2014, 01:02 AM
blind-eddie's Avatar
blind-eddie blind-eddie is offline
 
Join Date: Apr 2006
Location: Michigan
Posts: 2,310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Visit this link, scroll down on left, you will see side column created by vbadvanced and integrated on the forum home or on any other page you wish.

To learn how to integrate vba within your vbulletin pages, please visit this page to learn more.
After learning this, you wont be using VietBB Sidebar Column ever again.

Also, I edited my post above with proper code to show linked latest post as well as thread name.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:09 AM.


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.03437 seconds
  • Memory Usage 2,186KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (1)post_thanks_box_bit
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete