Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

Reply
 
Thread Tools
My Recent Posts on Forumhome Details »»
My Recent Posts on Forumhome
Version: 0.14, by Mistah Roth Mistah Roth is offline
Developer Last Online: Aug 2009 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 3.6.4 Rating:
Released: 03-01-2007 Last Update: 03-13-2007 Installs: 36
Uses Plugins Template Edits
Is in Beta Stage  
No support by the author.

This is my first released hack, so if you have any constructive suggestions or feedback, it'd be greatly appreciated. This is still a beta version of the hack, it doesnt support phrases or have any admin options yet, and needs a bit of optimization, I will add those in a later version.

DESCRIPTION

This adds a table onto your forumhome that shows information the last 5 threads the user has posted in, including the thread title, thread starter, last post date, last post username, replies, views, and what forum it is in.


INSTALL

1) Upload product-recentposts.xml
2) Add the following code to FORUMHOME:

Find:
Code:
<!-- what's going on box -->
Replace With:
Code:
<!-- recent posts -->
<if condition="$show['recentposts']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"><tbody>
 <tr>
  <td class="tcat" colspan="6">
   <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_recentposts')"><img id="collapseimg_forumhome_recentposts" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_recentposts].gif" alt="" border="0" /></a>
   My Recent Posts
  </td>
 </tr>
</tbody>
<tbody id="collapseobj_forumhome_recentposts" style="$vbcollapse[collapseobj_forumhome_recentposts]">
<tr class="thead">
            <td width="20"></td>
            <td class="thead" width="40%"><b>Thread</b></td>
            <td class="thead"><b>Last Post</b></td>
            <td class="thead" align="center"><b>Replies</b></td>
            <td class="thead" align="center"><b>Views</b></td>
            <td class="thead" align="right"><b>Forum</b></td>
</tr>
 $recentpostbits
</tbody>
</table>
<!-- /recent posts-->
<br />
</if>
<!-- what's going on box -->

This will place it above the What's Going On? box, you can put this anywhere you like really.

This has only been tested on vb 3.6.4

DEMO / EXAMPLE

http://forums.ffextreme.com/
You will have to register and post to actually see it working unfortunately hehe.


MODIFY NUMBER OF THREADS SHOWN (TEMP)

I will add admin cp options in the next update, but if you want to modify how many threads are shown on the list:

1) Goto the Plugin Manager
2) Click [Edit] for the Recent Posts by You on ForumHome plugin
3) In the text box, find where it says:
PHP Code:
$getposts $db->query_read("SELECT distinct threadid FROM post WHERE userid = $userid ORDER BY postid DESC LIMIT 5"); 
4) Change the end where it says DESC LIMIT 5, to whatever number you want to show (DESC LIMIT 10 etc)


BUGS / FIXES

0.14 --> Fixed font issues, issues involving deleted threads showing up.
0.13 --> Change font size to smallfont
0.12 --> Changed userid variable to proper variable, added alternating column colours.
0.11 --> Added TABLE_PREFIX to the queries

Show Your Support

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

Comments
  #12  
Old 03-04-2007, 05:31 PM
KrisP KrisP is offline
 
Join Date: Jun 2002
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good work,
Reply With Quote
  #13  
Old 03-04-2007, 06:11 PM
perfphysio's Avatar
perfphysio perfphysio is offline
 
Join Date: Sep 2006
Location: London, UK
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Tom_S View Post
Nice job..I just would like the font to be sized down
I agree with this one. The font on the rest of my board is smaller than this one. Is there a way that the code can assumen that which is the default already on the board?

Also an ability to colout the backround colour specifically for the title part would also be cool. E.g. my forum has everything with a blue background. To make this stand out it might be nice to add a different colour to the title background for this mod.

nice hack though
Reply With Quote
  #14  
Old 03-04-2007, 06:48 PM
Mistah Roth's Avatar
Mistah Roth Mistah Roth is offline
 
Join Date: Jul 2003
Location: Ottawa, Ontario
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Updated the font size.

I will add the option to excluse forum id's once I create the admincp options for it.

Also the title background colour is just set to match the rest of the layout, theres no real need to make it stand out.
Reply With Quote
  #15  
Old 03-04-2007, 07:35 PM
perfphysio's Avatar
perfphysio perfphysio is offline
 
Join Date: Sep 2006
Location: London, UK
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks, the font is better but still doesn't match the boards default one being used.
Reply With Quote
  #16  
Old 03-05-2007, 12:16 AM
Mistah Roth's Avatar
Mistah Roth Mistah Roth is offline
 
Join Date: Jul 2003
Location: Ottawa, Ontario
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm its fine for all of the forums I've tested it on, can you show me your forum?
Reply With Quote
  #17  
Old 03-06-2007, 04:13 AM
Mistah Roth's Avatar
Mistah Roth Mistah Roth is offline
 
Join Date: Jul 2003
Location: Ottawa, Ontario
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay I've found a bug in the first query of the script, and after working on it for two days I am officially stumped.

The following query:
SELECT distinct threadid FROM ". TABLE_PREFIX . "post WHERE userid = " . $vbulletin->userinfo['userid'] . " ORDER BY postid DESC LIMIT 5

Does not return the last 5 threads posted in. For some reason it skips any older thread. If I remove the distinct from the query, it shows the last 5 posts properly. The problem is we can't have repeats, so DISTINCT is supposed to solve that.

Anyone have any idea whats going wrong? If all else fails I'll just make it so that it filters out doubles with PHP code.... not as efficient as I'd like it though, there should be no reason the query doesnt work.
Reply With Quote
  #18  
Old 03-06-2007, 07:43 AM
kafi kafi is offline
 
Join Date: Apr 2004
Posts: 379
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed thank you.

Small font update is not working for me though. Everything is in regular font.
Reply With Quote
  #19  
Old 03-06-2007, 08:58 AM
kafi kafi is offline
 
Join Date: Apr 2004
Posts: 379
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

FEATURE REQUEST: add "show all my posts" link/button at the end (somewhere) .-)
Reply With Quote
  #20  
Old 03-08-2007, 11:53 AM
perfphysio's Avatar
perfphysio perfphysio is offline
 
Join Date: Sep 2006
Location: London, UK
Posts: 212
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mistah Roth View Post
Hmmm its fine for all of the forums I've tested it on, can you show me your forum?
My board can be seen at http://www.physiochat.com. The header fonts are OK, it is the description of the forum that doesn't match i.e. that last post part and the username, e.g. Today at 01:33 PM, by physiobobGo to last post
Reply With Quote
  #21  
Old 03-12-2007, 07:40 PM
vbuser99 vbuser99 is offline
 
Join Date: Jul 2004
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This also displays deleted threads.

To Fix, change the query in XML file:

from:
Quote:
SELECT distinct threadid FROM ". TABLE_PREFIX . "post WHERE userid = " . $vbulletin->userinfo['userid'] . " ORDER BY postid DESC LIMIT 5
to:
Quote:
SELECT distinct b.threadid FROM ". TABLE_PREFIX . "post a, ". TABLE_PREFIX . "thread b WHERE a.userid = " . $vbulletin->userinfo['userid'] . " AND b.visible = 1 AND a.threadid = b.threadid ORDER BY a.postid DESC LIMIT 5
Reply With Quote
Reply

Thread Tools

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 11:19 PM.


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.04871 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
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)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete