vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Number of threads in user profile (https://vborg.vbsupport.ru/showthread.php?t=99530)

Lea Verou 10-27-2005 10:00 PM

Number of threads in user profile
 
This little plugin displays the number of threads that a user has made in his profile.

Instructions
1. Import the attached plugin.
2. In the template MEMBERINFO:
Find:
HTML Code:

<td>
                        $vbphrase[total_posts]: <strong>$userinfo[posts]</strong> (<phrase 1="$postsperday">$vbphrase[x_posts_per_day]</phrase>)
                    </td>

Change with:
HTML Code:

<td>
                        $vbphrase[total_posts]: <strong>$userinfo[posts]</strong> | Total threads: <strong>$threadcount[count] (<phrase 1="$postsperday">$vbphrase[x_posts_per_day]</phrase>)
                    </td>


kittykattjess 10-28-2005 05:34 PM

Well done ;) will this show in the profile in the post as well? lol

kittykattjess 10-28-2005 05:38 PM

Where is the profile.xml in the folders? which one lol.. I am not sure how to do this lol.. can you help a little?

Lea Verou 10-28-2005 05:42 PM

It will only show in the profile. I'll have to make a different plugin for it to show in the postbit.

You just go to plugin Manager > Download/Upload plugins and then upload the threadcount_in_profile.xml . There is no profile.xml involved, where did you see that? :confused:

kittykattjess 10-28-2005 07:05 PM

sorry lol.. I am a bit daft with these things...

Download
threadcount in profile.xml

do I have to make a file called that or add whats in there, as its nothing being downloaded when I click on the link, all I get is a page with some code in it and thats it. How do I add it to what?
lol sorry.

Lea Verou 10-28-2005 07:11 PM

Left click on the link and select "Save target as..." :)

SnowBot 10-28-2005 08:11 PM

hehe i was just working on this :) Thanks man saved me a job :)

kittykattjess 10-28-2005 09:01 PM

its not happening for me.. :( lol

Extreme John 10-28-2005 09:03 PM

That was nice and easy and I love thank you :)

kittykattjess 10-28-2005 09:08 PM

woohoo I loaded it up but I cant find memberinfo anywhere... where is that one?

kittykattjess 10-28-2005 09:38 PM

WOO HOO, I did it, sorry to be such a air head ;)

Lea Verou 10-28-2005 10:37 PM

Quote:

Originally Posted by kittykattjess
WOO HOO, I did it, sorry to be such a air head ;)

No problem. Glad you find it out eventually. Sorry I couldn't help you to do it but I was watching a movie :)

murrtex 10-28-2005 11:27 PM

thanks i installed..and is it possible to do this plugin for postbit_legacy?

Lea Verou 10-28-2005 11:30 PM

I'm currently working on it murrtex ;)
I just have a little problem with the $post[userid] in the query.
I'll send an update when I accomplish it and I will make this into a product to include both ;)

dn lodge 10-28-2005 11:45 PM

Hmm i need help

if you go to http://www.dnlodge.com/member.php?u=1 the thread count isnt showing. Do ya know whats wrong?

Lea Verou 10-28-2005 11:52 PM

Really strange. Does it show for the other members?

edit: Nope it doesn't, I just saw :(
Can you paste here the html code in the template around the threadcount[count] (including it) so that I have a look?

lexx27 10-29-2005 12:02 AM

Thats Great. Thanks

dn lodge 10-29-2005 12:14 AM

hehe... heres my whole file...


PHP Code:

$stylevar[htmldoctype]
<
html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
<
head>
$headinclude
<title>$vboptions[bbtitle] - $vbphrase[view_profile]: $userinfo[username]</title>
</
head>
<
body>
$header
$navbar

<!-- main info avatarprofilepic etc. -->
<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr>
    <
td class="tcat">$vbphrase[view_profile]<span class="normal">: $userinfo[username]</span></td>
</
tr>
<
tr>
    <
td class="alt2">
        <
table cellpadding="0" cellspacing="0" border="0" width="100%">
        <
tr>
            <
td style="border-bottom:1px solid $stylevar[tborder_bgcolor]width="100%" colspan="2">            
                <if 
condition="$userinfo['rank'] OR $userinfo['reputationdisplay']">
                    <
div style="float:$stylevar[right]; padding:4px">
                        <if 
condition="$userinfo['rank']"><div align="center">$userinfo[rank]</div></if>
                        <if 
condition="$userinfo['reputationdisplay']"><div align="center">$userinfo[reputationdisplay]</div></if>
                    </
div>
                </if>            
                <
div style="font-size:18pt">$userinfo[musername$userinfo[onlinestatus]</div>
                <if 
condition="$userinfo['usertitle']"><div class="smallfont">$userinfo[usertitle]</div></if>
            </
td>
            <if 
condition="$show['profilepic']">
            <
td valign="top" align="$stylevar[right]rowspan="2">
                <
img src="$userinfo[profilepicurl]$userinfo[profilepicsizealt="<phrase 1="$userinfo[username]">$vbphrase[xs_picture]</phrase>" border="0" style="border:1px solid $stylevar[tborder_bgcolor]; border-top:none" />
            </
td>
            </if>
        </
tr>
        <
tr valign="top">
            <if 
condition="$show['avatar']">
                <
td><img src="$userinfo[avatarurl]$userinfo[avatarsizealt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" border="0" style="border:1px solid $stylevar[tborder_bgcolor]; border-top:none" /></td>
            <else />
                <
td>&nbsp;</td>
            </if>
            <
td class="smallfont" valign="bottom" align="$stylevar[right]">
                <if 
condition="$show['lastactivity']">
                    <
div>$vbphrase[last_activity]: $userinfo[lastactivitydate] <span class="time">$userinfo[lastactivitytime]</span>&nbsp;</div>
                </if>
                <if 
condition="$show['currentlocation']">
                    <
div>$userinfo[action$userinfo[where]<if condition="$show['detailedtime']"> - <else /> @ </if> $userinfo[time]&nbsp;</div>
                </if>
            </
td>
        </
tr>
        </
table>
    </
td>
</
tr>
</
table>
<!-- / 
main info avatarprofilepic etc. -->

<!-- 
button row -->
<if 
condition="$show['profilelinks']">
<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<
tr align="center">
    <if 
condition="$userinfo['showvcard']">
        <
td class="vbmenu_control"><a href="member.php?$session[sessionurl]do=vcard&amp;u=$userinfo[userid]rel="nofollow">$vbphrase[download_vcard]</a></td>
    </if>
    <if 
condition="$show['member']">
    <
td class="vbmenu_control">
        <if 
condition="$show['addbuddylist']">
        <
a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[add_x_to_buddy_list]</phrase></a>
        <else />
        <
a href="profile.php?$session[sessionurl]do=removelist&amp;userlist=buddy&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[remove_x_from_your_buddylist]</phrase></a>
        </if>
    </
td>
    <
td class="vbmenu_control">
        <if 
condition="$show['addignorelist']">
        <
a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=ignore&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[add_x_to_ignore_list]</phrase></a>
        <else />
        <
a href="profile.php?$session[sessionurl]do=removelist&amp;userlist=ignore&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[remove_x_from_your_ignorelist]</phrase></a>
        </if>
    </
td>
    </if>
    <if 
condition="can_moderate()">
        <
td class="vbmenu_control"><a href="moderator.php?$session[sessionurl]do=useroptions&amp;u=$userinfo[userid]">$vbphrase[user_options]</a></td>
    </if>
</
tr>
</
table>
</if>
<!-- / 
button row -->

<
br />

<if 
condition="$show['signature']">
<!-- 
signature row -->
<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr>
    <
td class="thead">$vbphrase[signature]</td>
</
tr>
<
tr>
    <
td class="alt1" title="$vbphrase[signature]">$userinfo[signature]</td>
</
tr>
</
table>
<!-- / 
signature row -->
<
br />
</if>


<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr>
    <
td class="tcat" width="50%">$vbphrase[forum_info]</td>
    <
td class="tcat" width="50%">$vbphrase[contact_info]</td>
</
tr>
<
tr valign="top">

    <
td class="panelsurround" align="center">
    <
div class="panel">
        <
div align="$stylevar[left]">
        
            <
div class="fieldset">
                <
div style="padding:$stylevar[formspacer]px">
                    
$vbphrase[join_date]: <strong>$userinfo[datejoined]</strong>
                </
div>
            </
div>
            
            <
fieldset class="fieldset">
                <
legend>$vbphrase[posts]</legend>
                <
table cellpadding="0" cellspacing="$stylevar[formspacer]border="0">
                <
tr>
<
td>
                        
$vbphrase[total_posts]: <strong>$userinfo[posts]</strong> | Total threads: <strong>$threadcount[count] (<phrase 1="$postsperday">$vbphrase[x_posts_per_day]</phrase>)
                    </
td>
                </
tr>
                <if 
condition="$vboptions['profilelastpost']">
                <
tr>
                    <
td>
                            
$vbphrase[last_post]:<br />
                            <
a href="$userinfo[lastposturl]">$userinfo[lastposttitle]</a><br />
                            
$userinfo[lastpostdate] <span class="time">$userinfo[lastposttime]</span>
                    </
td>
                </
tr>
                </if>
                <
tr>
                    <
td><a href="search.php?$session[sessionurl]do=finduser&amp;u=$userinfo[userid]rel="nofollow"><phrase 1="$userinfo[username]">$vbphrase[find_all_posts_by_x]</phrase></a></td>
                </
tr>
                <
tr>
                    <
td><a href="search.php?$session[sessionurl]do=process&amp;showposts=0&amp;starteronly=1&amp;exactname=1&amp;searchuser=$userinfo[urlusername]rel="nofollow"><phrase 1="$userinfo[username]">$vbphrase[find_all_threads_started_by_x]</phrase></a></td>
                </
tr>
                </
table>
            </
fieldset>
            
            <if 
condition="$vboptions['usereferrer']">
            <
div class="fieldset">
                <
div style="padding:$stylevar[formspacer]px">
                    
$vbphrase[referrals]: <strong>$referrals</strong>
                </
div>
            </
div>
            </if>
            
            <if 
condition="$show['usernotes']">
            <
div class="fieldset">
                <
div style="padding:$stylevar[formspacer]px">
                    
$vbphrase[user_notes]:
                    <if 
condition="$show['usernoteview']">
                        <
strong>$usernote[total]</strong> [<a href="usernote.php?$session[sessionurl]u=$userinfo[userid]">$vbphrase[view]</a>]
                    </if>
                    <if 
condition="$show['usernotepost']">
                        [<
a href="usernote.php?$session[sessionurl]do=newnote&amp;u=$userinfo[userid]">$vbphrase[post_user_note]</a>]
                    </if>
                    <if 
condition="$show['usernoteview']">
                        <
br />($vbphrase[last_note]: $usernote[lastpostdate] <span class="time">$usernote[lastposttime]</span>)
                    </if>
                </
div>
            </
div>
            </if>
        
        </
div>
    </
div>
    </
td>
    
    <
td class="panelsurround" align="center">
    <
div class="panel">
        <
div align="$stylevar[left]">
        
            <
div class="fieldset">
                <
table cellpadding="0" cellspacing="$stylevar[formspacer]border="0">
                <if 
condition="!$show['contactlinks']">
                <
tr>
                    <
td><strong><phrase 1="$userinfo[username]">$vbphrase[x_has_no_contact_info]</phrase></strong></td>
                </
tr>                
                </if>
                <if 
condition="$show['homepage']">
                <
tr>
                    <
td>
                        
$vbphrase[home_page]:<br />
                        <
a href="$userinfo[homepage]target="_blank" dir="ltr">$userinfo[homepage]</a>
                    </
td>
                </
tr>
                </if>
                <if 
condition="$show['email']">
                <
tr>
                    <
td>
                        
$vbphrase[email]:<br />
                        <
a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$userinfo[userid]rel="nofollow"><phrase 1="$userinfo[username]">$vbphrase[send_message_via_email_to_x]</phrase></a>
                    </
td>
                </
tr>
                </if>
                <if 
condition="$show['pm']">
                <
tr>
                    <
td>
                        
$vbphrase[private_message]:<br />
                        <
a href="private.php?$session[sessionurl]do=newpm&amp;u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[send_private_message_to_x]</phrase></a>
                    </
td>
                </
tr>
                </if>
                </
table>
            </
div>
            
            <if 
condition="$show['hasimicons']">
            <
fieldset class="fieldset">
                <
legend>$vbphrase[instant_messaging]</legend>
                <
table cellpadding="0" cellspacing="$stylevar[formspacer]border="0">
                <if 
condition="$show['textimicons']">
                    <if 
condition="$userinfo['showicq']">
                    <
tr>
                        <
td>$vbphrase[icq]<td>
                        <
td>$userinfo[icq]</td>
                    </
tr>
                    </if>
                    <if 
condition="$userinfo['showaim']">
                    <
tr>
                        <
td>$vbphrase[aim]<td>
                        <
td>$userinfo[aim]</td>
                    </
tr>
                    </if>
                    <if 
condition="$userinfo['showmsn']">
                    <
tr>
                        <
td>$vbphrase[msn]<td>
                        <
td>$userinfo[msn]</td>
                    </
tr>
                    </if>
                    <if 
condition="$userinfo['showyahoo']">
                    <
tr>
                        <
td>$vbphrase[yahoo]<td>
                        <
td>$userinfo[yahoo]</td>
                    </
tr>
                    </if>
                <else />
                    <if 
condition="$userinfo['showicq']">
                    <
tr>
                        <
td>$userinfo[icqicon]</td>
                        <
td><a href="#" dir="ltr" onclick="imwindow('icq', '$userinfo[userid]', 500, 450); return false;">$userinfo[icq]</a></td>
                    </
tr>
                    </if>
                    <if 
condition="$userinfo['showaim']">
                    <
tr>
                        <
td>$userinfo[aimicon]</td>
                        <
td><a href="#" dir="ltr" onclick="imwindow('aim', '$userinfo[userid]', 400, 200); return false;">$userinfo[aim]</a></td>
                    </
tr>
                    </if>
                    <if 
condition="$userinfo['showmsn']">
                    <
tr>
                        <
td>$userinfo[msnicon]</td>
                        <
td><a href="#" dir="ltr" onclick="imwindow('msn', '$userinfo[userid]', 400, 200); return false;">$userinfo[msn]</a></td>
                    </
tr>
                    </if>
                    <if 
condition="$userinfo['showyahoo']">
                    <
tr>
                        <
td>$userinfo[yahooicon]</td>
                        <
td><a href="#" dir="ltr" onclick="imwindow('yahoo', '$userinfo[userid]', 400, 200); return false;">$userinfo[yahoo]</a></td>
                    </
tr>
                    </if>
                </if>
                </
table>
            </
fieldset>
            </if>
            
        
        </
div>
    </
div>
    </
td>
    
</
tr>
<
tr>
    <
td class="tcat" width="50%">$vbphrase[additional_information]</td>
    <
td class="tcat" width="50%">$vbphrase[group_memberships]</td>
</
tr>
<
tr valign="top">

    <
td class="panelsurround" align="center">
    <
div class="panel">
        <
div align="$stylevar[left]">
        
        <
div class="fieldset">
            <if 
condition="$show['extrainfo']">
                <
table cellpadding="0" cellspacing="$stylevar[formspacer]border="0">
                <if 
condition="$show['birthday']">
                <
tr>
                    <
td>
                        <
strong>$vbphrase[birth_date]</strong>:<br />
                        
$userinfo[birthday]
                    </
td>
                </
tr>
                </if>
                <if 
condition="$show['age']">
                <
tr>
                    <
td>
                        <
strong>$vbphrase[age]</strong>:<br />
                        
$userinfo[age]
                    </
td>
                </
tr>
                </if>
                
$customfields
                
</table>
            <else />
                <
em>$vbphrase[n_a]</em>
            </if>
        </
div>
        
        </
div>
    </
div>
    </
td>
    
    <
td class="panelsurround" align="center">
    <
div class="panel">
        <
div align="$stylevar[left]">
        
            <
div class="fieldset">
                <
table cellpadding="0" cellspacing="$stylevar[formspacer]px" border="0">
                <
tr>
                    <if 
condition="$show['membergroups']">
                    <
td></td>
                    <else />
                    <
td><strong><phrase 1="$userinfo[username]">$vbphrase[x_is_not_a_member_of_any_public_groups]</phrase></strong></td>
                    </if>
                </
tr>
                
$membergroupbits
                
</table>
            </
div>
        
        </
div>
    </
div>
    </
td>

</
tr>
</
table>

$footer

</body>
</
html


Gizmo5h1t3 10-29-2005 12:25 AM

instaled, working sweet

/me clicks install

lexx27 10-29-2005 12:28 AM

seems fine to me

Lea Verou 10-29-2005 12:31 AM

dn_lodge is the plugin enabled?

dn lodge 10-29-2005 10:17 AM

yes it is

Lea Verou 10-29-2005 10:24 AM

Then I have no idea what could be wrong... Sorry... :o
Possibly a database issue? dunno :(

kittykattjess 10-29-2005 11:02 AM

Quote:

Originally Posted by Loukrhtia
No problem. Glad you find it out eventually. Sorry I couldn't help you to do it but I was watching a movie :)


I forgive you :D

dn lodge 10-29-2005 11:12 AM

hmm, i'll have to remove it then, sorry, hehe

Lea Verou 10-29-2005 12:01 PM

Here is the plugin for those that want it in the postbit. https://vborg.vbsupport.ru/showthrea...611#post807611
Unfortunately I wasn't able to do it, spongebobrox did it so you'll have to install them seperately :)

Snake 10-29-2005 12:06 PM

Great thanks for the hack. How about adding a lil feature "(x.xx threads per day)" like the posts per day?

Lea Verou 10-29-2005 01:20 PM

Quote:

Originally Posted by Aftermath
Great thanks for the hack. How about adding a lil feature "(x.xx threads per day)" like the posts per day?

Nice idea! I'll look into it :)

apn3a 10-29-2005 07:09 PM

Installed and working like a charm. Thank you man Lea hehe (gosh) :rolleyes:

Snake 01-26-2006 07:50 PM

Quote:

Originally Posted by Michelle
Nice idea! I'll look into it :)

Any luck with that yet?

neutek 01-26-2006 11:43 PM

thanks man :) i like it

Detomah 01-27-2006 06:13 AM

Thanks. :)

Installed and working fine. :)

Thumbs up from me. :up:

Snake 01-27-2006 09:34 AM

Quote:

Originally Posted by Michelle
Nice idea! I'll look into it :)

My guess would be no... :disappointed:

HostileAdam 07-02-2006 12:46 AM

Installed. Thanks

futuredood 07-09-2006 04:26 AM

I installed this hack.. and keep receiving this errore-mail. I'm pretty sure it's from this hack b/c of all the "thread" mentions in it. Everything's running smooth, thought it'd be nice that it was bug free.. please advise.

Quote:

Database error in vBulletin 3.5.4:

Invalid SQL:

UPDATE user AS user
SET user.threads =
(
SELECT COUNT(threadid)
FROM thread AS thread
LEFT JOIN forum AS forum ON forum.forumid = thread.forumid
WHERE visible = 1
AND (forum.options & 4096)
AND user.userid=postuserid
);

MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT COUNT(threadid)
FROM thread AS thread
LEFT JOIN f
Error Number : 1064

Lea Verou 07-09-2006 01:02 PM

My hack does not perform such a query.

Veer 12-06-2006 07:35 AM

will work for 3.6?

s0b 12-12-2006 11:18 PM

Quote:

Originally Posted by Pehchaan (Post 1133042)
will work for 3.6?

works great in 3.6.4 :)


All times are GMT. The time now is 07:58 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.01622 seconds
  • Memory Usage 2,044KB
  • 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
  • (2)bbcode_html_printable
  • (1)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (38)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete