Results 1 to 4 of 4

Thread: Latest 5 dynamic entries in profile

  1. #1
    Join Date
    Jan 2004
    Location
    Miami
    Posts
    1,040

    Default Latest 5 dynamic entries in profile

    This is a very simple hack that will display the latest 5 entries in member info.

    1- Create a template (replace blogs/ with your folder name)
    adv_dyna_last_entrybit
    <li><a class="smallfont" href="blogs/showentry.php?$session[sessionurl]?e=$lastentry[entryid]">$lastentry[title]</a> <span class="smallfont">($lastentry[entrydate])</span></li>
    2- Create a plugin at member_complete and put in there
    PHP Code:
    $who=$vbulletin->GPC['userid'];
    $blogs$db->query_read("SELECT *  FROM " TABLE_PREFIX "_adv_dyna_entries WHERE userid='$who' AND valid='1' AND private='0'  ORDER BY dateline DESC LIMIT 5");

    if (
    $db->num_rows($blogs)==0)
    {
        
    $show['bloginfo'] = false;
    }
    else
    {
        
    $show['bloginfo'] = true;
        
            while (
    $lastentry $db->fetch_array($blogs))
            {
                
    $lastentry['entrydate']= vbdate($vbulletin->options['dateformat'] ,$lastentry['dateline'], 1);
                eval(
    '$last_five_entries .= "' fetch_template('adv_dyna_last_entrybit') . '";');
            }


    3-Finally, in memberinfo template (put in table as per your taste) add where you want to display it

    <if condition="$show[bloginfo]">
    <ul>$last_five_entries</ul>
    </if>
    Last edited by Lionel; 09-11-2007 at 12:12 AM.

  2. #2
    Join Date
    Aug 2004
    Posts
    353

    Default Re: Latest 5 dynamic entries in profile

    Any instructions on how to use this for multiple instances, so you could pull blogs, other types of entries, etc etc, into different blocks?

    And, thanks!

  3. #3
    Join Date
    Jan 2004
    Location
    Miami
    Posts
    1,040

    Default Re: Latest 5 dynamic entries in profile

    I would assume that you would have to duplicate the plugin, template etc and call the correct table from db.

    I would also change all names to avoid conflict e.g. $blogs2, $lastentry2, $show['bloginfo2'] etc... etc ...

  4. #4
    Join Date
    Aug 2005
    Location
    Durham, UK
    Posts
    177

    Default

    This is weird. I'm getting an error that the table adv_dyna_entries doesn't exist, even though it does!
    Sim Fans UK - Sims downloads and discussion

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Randon entries
    By attroll in forum Feedback & Suggestions
    Replies: 0
    Last Post: 08-03-2007, 02:21 AM
  2. About me [My Entries]
    By attroll in forum Feedback & Suggestions
    Replies: 0
    Last Post: 05-21-2007, 08:36 PM
  3. Some latest threads module entries are always bold
    By jluerken in forum Troubleshooting & Problems
    Replies: 4
    Last Post: 04-13-2007, 05:10 AM
  4. Latest Updated Profile
    By maniac in forum Add-On Modules & Modifications
    Replies: 3
    Last Post: 02-03-2005, 07:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •