Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 01-08-2001 Last Update: Never Installs: 0
 
No support by the author.

Hi,

Can someone provide some insight for me on how to take the Active Topics hack, and modify it so that, rather than the most recently posted in threads, the most recently posted in threads for the current user is displayed?

Obviously, I just need the code contingent on the person being logged in - I should be able to handle the simple conditional involved assuming the user isn't logged in.

Much thanks.

Show Your Support

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

Comments
  #2  
Old 01-09-2001, 12:41 AM
Guest
 
Posts: n/a
Default

You mean something like at the bottom of:
http://sitepointforums.com/member2.p...fo&userid=5584

?
Reply With Quote
  #3  
Old 01-09-2001, 01:03 AM
Guest
 
Posts: n/a
Default

Whoa.. I never saw that before luke.. can I have code? Looks very, very cool.
Reply With Quote
  #4  
Old 01-09-2001, 01:29 AM
Guest
 
Posts: n/a
Default

Well let me get it finished and in production so my own members can use it then we'll go from there.

However most of it is a simple reformatting of the default template.

The "What Others Say" is part of my Karma Hack which will be released for 2.0

The only other code I changed was to add support for MSN, Favorite Sites, and increasing the last posts from 1 to 5.
Reply With Quote
  #5  
Old 01-09-2001, 01:37 AM
Guest
 
Posts: n/a
Default

wluke is going to release the Karma hack and that sweet profile upgrade for v2.0 shortly after release of v2.0 (hint hint)
Reply With Quote
  #6  
Old 01-09-2001, 01:43 AM
Guest
 
Posts: n/a
Default

Like what you've done. Mind if I kind of take the idea and "Parkerize" it to my own likings?
Reply With Quote
  #7  
Old 01-09-2001, 02:02 AM
Guest
 
Posts: n/a
Default

Quote:
Originally posted by freddie
wluke is going to release the Karma hack and that sweet profile upgrade for v2.0 shortly after release of v2.0 (hint hint)
How shortly depends on when I get ahold of the code...


Parker,

I don't mind. I realized that the moment I showed it, people would want to use it themselves. I myself got the idea from screen shots I have seen from Builder, Ebay, Motley Fool and other sites.

However, I might keep a couple of tricks in the bag for SitePoint so what is released might be a little different. But the general feel will be there.
Reply With Quote
  #8  
Old 01-09-2001, 11:51 AM
Guest
 
Posts: n/a
Default

Holy bananas! You've blown me away!

That'd be great, but the idea here was to display links to the X most recent threads a person has posted in: IE...the thread titles and such, not the posts themselves.

I was planning to put something like this on a non-VB page, but unfortunatly am not too good with anything beyond a simple SQL query.

Any help is appreciated, and I'll definintely look forward to that hack!
Reply With Quote
  #9  
Old 01-09-2001, 12:23 PM
Guest
 
Posts: n/a
Default

Basically all I did was modify the code in the getinfo section of member.php but here is what pulls the posts.

Code:
  // get last posts
  $totalposts=$userinfo[posts];
  if ($totalposts!=0 or $userinfo[lastpost]!=0) {
    $getlastposts=$DB_site->query("SELECT thread.title,thread.threadid,thread.forumid,postid,post.dateline,pagetext FROM post,thread WHERE thread.threadid=post.threadid AND post.userid=$userid ORDER BY post.dateline DESC");
    $postctr=0;
    $latestposts="";
    while ($getlastpost=$DB_site->fetch_array($getlastposts)) {

      $getperms=getpermissions($bbuserid,$bbusergroupid,$getlastpost[forumid]);
      if ($getperms[canview]==1) {
        $lastpostdate=date($dateformat,$getlastpost[dateline]+(($timeoffset+$bbtimezoneoffset)*3600));
        $lastposttime=date($timeformat,$getlastpost[dateline]+(($timeoffset+$bbtimezoneoffset)*3600));
        $lastposttitle=$getlastpost[title];
        $lastposturl="showthread.php?postid=$getlastpost[postid]#post$getlastpost[postid]";
        $message=$getlastpost[pagetext];
        if (strlen($message) > 160) {
	  $snippet = substr($message,0,160) . " (<a href=\"".$lastposturl."\">more...</a>)<br>";
	} else {
	  $snippet = $message;
        }
        $postctr++;
        $latestposts.="<p><a href=\"".$lastposturl."\">".$lastposttitle."</a>??".$lastpostdate." at ".$lastposttime."<br><font face=\"verdana,arial,helvetica\" size=\"1\">".$snippet."</font></p>";
        if ($postctr==5) {
          break;
        }  
      }
    }
  } else {
    $lastpostdate=$username." has not made any posts yet.";
  }
It doesn't pull the whole message unless it is less than 160 characters. Normally it just pulls a snippet. I hadn't made it into templates yet so all the HTML is still in the code. If you don't want to use the snippets then just delete the following lines and remove $snippet from the HTML block.

Code:
        $message=$getlastpost[pagetext];
        if (strlen($message) > 160) {
	  $snippet = substr($message,0,160) . " (<a href=\"".$lastposturl."\">more...</a>)<br>";
	} else {
	  $snippet = $message;
        }
All you should have to do to use it outside of vB per se is add:
require (global.php)
Reply With Quote
  #10  
Old 01-09-2001, 01:04 PM
Guest
 
Posts: n/a
Default

woah.. i can't wait to see this in vb2 - hopefully the vb2 member profile area looks as good as what you did
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 10:05 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.04878 seconds
  • Memory Usage 2,270KB
  • Queries Executed 23 (?)
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_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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)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
  • 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