Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[HSVFORUM] My Thread Sidebar Block Details »»
[HSVFORUM] My Thread Sidebar Block
Version: 1.00, by achoo254 achoo254 is offline
Developer Last Online: Mar 2018 Show Printable Version Email this Page

Category: End-User Options - Version: 4.2.x Rating:
Released: 04-24-2013 Last Update: Never Installs: 9
Template Edits
Translations  
No support by the author.


This is tested and working

Step One: Create a Template
ACP > Style Manager > Add New Template
Title: block_mythread
Code:
<div class="widget_content blockbody floatcontainer">
		<ul id="block_newthreads_1" class="blockrow">
			<li class="avatarcontent floatcontainer widget_post_bit">
				<div class="widget_post_userinfo">
				
				<div class="cms_widget_post_useravatar widget_post_useravatar">
						<a class="smallavatar comments_member_avatar_link" href="member.php?7-tester3">
						<img width="30" title="" src="image.php?u={vb:raw userid}&type=thumb" alt="">
						</a>
				</div>
				
				</div>
				<div class="smallavatartext widget_post_comment">
					<h5 class="widget_post_header"><a href="showthread.php?{vb:raw threadid}" class="title">{vb:raw title}</a></h5>
					<div class="meta">
						
						 Posted By <a href="member.php?{vb:raw userid}">{vb:raw username}</a> ({vb:raw replycount} replies)
						<br><span class="time">{vb:raw dateline}</span> in <a href="forumdisplay.php?{vb:raw forumid}">{vb:raw forumtitle}</a>
						
					</div>
				</div>
			</li>
		</ul>
	</div>
Step Two: Create the Block
ACP > Forums & Moderators > Forum Blocks Manager > Add Block
Select Block Type: Custom HTML/PHP
Title: My Threads
Cache Time (in minutes): 1
Active: Yes
Content Type: PHP
Code:
global $vbulletin;
global $db;

	$sqlketnoi = $vbulletin->db->query_read("
	SELECT *
	FROM " . TABLE_PREFIX . "thread
	WHERE postuserid = ".$vbulletin->userinfo['userid']."
        ORDER BY threadid DESC 
        LIMIT 10 
	");	
while($thread = $vbulletin->db->fetch_array($sqlketnoi))
{
$threadid = $thread['threadid'];
$title = $thread['title'];
$userid = $thread['postuserid'];
$username = $thread['postusername'];
$replycount = $thread['replycount'];
$dateline = date("d/m/Y h:i:s",$thread['dateline']);

//forum name
	$sqlketnoi2 = $vbulletin->db->query_read("
	SELECT *
	FROM " . TABLE_PREFIX . "forum
	WHERE forumid = ".$thread['forumid']."
	");	
	while($forum = $vbulletin->db->fetch_array($sqlketnoi2))
	{
		$forumtitle = $forum['title'];
		$forumid = $forum['forumid'];
			
	}
	// print everything 
		$templater = vB_Template::create('block_mythread');
		$templater->register('threadid', $threadid);
		$templater->register('title', $title);
		$templater->register('userid', $userid);
		$templater->register('username', $username);
		$templater->register('replycount', $replycount);
		$templater->register('dateline', $dateline);
		$templater->register('forumid', $forumid);
		$templater->register('forumtitle', $forumtitle);	
		$content .= $templater->render();		
}
return $content;
Done !

Screenshots

File Type: jpg demo.jpg (67.7 KB, 0 views)
File Type: png demo2.png (47.7 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 05-14-2014, 01:25 PM
Toorak Times's Avatar
Toorak Times Toorak Times is offline
 
Join Date: Jan 2011
Posts: 436
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm over Forum widgets.
Reply With Quote
  #13  
Old 03-28-2023, 03:52 PM
oldfan's Avatar
oldfan oldfan is offline
 
Join Date: Jul 2004
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works on 4.2.5
Reply With Quote
Reply


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 12:16 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04116 seconds
  • Memory Usage 2,244KB
  • Queries Executed 19 (?)
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
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (2)postbit
  • (2)postbit_attachment
  • (3)postbit_onlinestatus
  • (3)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_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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete