vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Forum Home Enhancements - My Recent Posts on Forumhome (https://vborg.vbsupport.ru/showthread.php?t=140940)

Warlord 12-03-2008 10:22 PM

Any idea on when the updated version will be out with the ability to exclude forums from this hack? I may take a stab at editing my forums to do this but if the update will be released soon I will just wait on that. :D

Quote:

Originally Posted by lnxtr (Post 1660085)
hi
i want to my user kontrol panel wiev


If you're asking to put this in your User Control Panel, I did this for my forums. (Hopefully Mistah Roth doesn't mind me posting this variation in here for people. If you do, feel free to have one of the staff delete this post.)

Create a plug in called: Recent Posts in User CP
Hook Location: usercp_complete
Plug in PHP Code:

PHP Code:

if ($vbulletin->userinfo['userid']) {
            global 
$vbulletin

$getposts $db->query_read("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");  

while(
$recentpost $db->fetch_array($getposts)) { 
    
       
$tid $recentpost['threadid']; 
       
$getthreadid $db->query_read("SELECT * FROM "TABLE_PREFIX "thread WHERE threadid = $tid");  
       
$rpthread $db->fetch_array($getthreadid);  
       
$rpthread['date'] = vbdate($vbulletin->options['dateformat'], $rpthread['lastpost'], 1);  
       
$rpthread['time'] = vbdate($vbulletin->options['timeformat'], $rpthread['lastpost']); 

       
$icon fetch_iconinfo($rpthread['iconid']);   
       
$rpthread['threadiconpath'] = $icon['iconpath'];  
       
$rpthread['threadicontitle'] = $icon['title'];  

       
$fid $rpthread['forumid'];  
       
$getforums $db->query_read("SELECT title FROM "TABLE_PREFIX "forum WHERE forumid = $fid");  
       
$rpforum $db->fetch_array($getforums);  

        

       eval(
"\$recentpostbits .= \"".fetch_template('forumhome_recentpostbits')."\";"); 
}
if (
$tid$show['recentposts'] = 1



In template USERCP find:

Code:

<!-- ############## SUBSCRIBED THREADS ##############  -->
Add Above:

Code:

<!-- recent posts -->
<if condition="$show['recentposts']">
<p>
<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 Forums 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-->
</if>


thompson 12-04-2008 08:46 AM

is there a chance o do that:

need a box for forum 1-10 (good topics) say last 10 posts
and
need another box for forum 11+12 (offtopic) say last 5 posts

??

thanks

Warlord 12-04-2008 12:15 PM

Where do you want it to appear? On forumhome or the usercp? I'll try to get you the code you need when I have a little more time.

thompson 12-04-2008 12:30 PM

i want this on forumhome.

i had the alppro ajax plugin, but this only works with one box.

Warlord 12-05-2008 03:57 AM

Well bro, I tried to get this to work for you the way you wanted for over an hour but unfortunately it seems to have kicked my butt.

For some reason the two plug-ins conflict and you get a combination of both plug-ins somehow. I think I was getting close but I'm stumped. I'll attach the Product XML and post the template code I have so far and maybe Mr. Roth can take a look at it for you and find the problem. Sorry I couldn't be of more help.

FORUMHOME TEMPLATE CODE TO ADD (this would replace the forumhome code originally posted by Mr. Roth in this hack):

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>
<br />
</if>
<!-- /recent posts-->


<!-- recent posts customized -->
<if condition="$show['recentposts_offtopic']">
<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_offtopic')"><img id="collapseimg_forumhome_recentposts_offtopic" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_recentposts].gif" alt="" border="0" /></a>
  My Recent Posts (Off Topic)
  </td>
 </tr>
</tbody>
<tbody id="collapseobj_forumhome_recentposts_offtopic" style="$vbcollapse[collapseobj_forumhome_recentposts_offtopic]">
<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>
<br />
</if>
<!-- /recent posts customized-->


thompson 12-05-2008 06:03 AM

thanks bro, i will have a look at it.

lnxtr 12-11-2008 07:14 PM

don't run

metalguy639 06-10-2009 10:20 PM

Hi, I'm trying to get this to show on a different template page. Is there a way to get it to show on a page that is not the forumhome page? I'm using vb 3.8.1 maybe its not working with a different version?

RTMdotORG 06-11-2009 07:26 AM

UPDATED:

https://vborg.vbsupport.ru/showthread.php?t=215898


All times are GMT. The time now is 03:18 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.01128 seconds
  • Memory Usage 1,768KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete