vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   What about Number of Friends in postbit ?? (https://vborg.vbsupport.ru/showthread.php?t=199818)

mostafa megahed 12-26-2008 11:30 AM

What about Number of Friends in postbit ??
 
Hello,

In this topic :

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

i like this part :

#################### GIFT COUNT ON POSTBIT ####################

To display gifts count on postbit's:

Add new plugin

Hook Location: showthread_postbit_create
Title: Gifts in Postbit Legacy
Execution Order: 5
Plugin PHP Code:
PHP Code:

$num_gifts $db->query_first("  
    SELECT COUNT(*)  
    FROM " 
TABLE_PREFIX "gifts AS gifts  
    WHERE recipientid = " 
$post['userid']  
,
DBARRAY_NUM);  
$post['gifts'] = $num_gifts[0]; 

Plugin is active: yes

Then on the postbit where you want to display it just put

(<a href="member.php?$session[sessionurl]u=$post[userid]">$post[gifts]</a>) gifts

#################### /GIFT COUNT ON POSTBIT ####################

This is For Numbers of the Gifts in postbit !!!

What about Number of Friends ??

can any one help me in this ??

thxxxx..

Lynne 12-26-2008 03:05 PM

Have you tried the variable $post['friendcount'] in the postbit?

mostafa megahed 12-26-2008 08:52 PM

yes and it worked, but with this $post[friendcount] Not $post['friendcount'],

what about Number of Topics ????

--------------- Added [DATE]1230332057[/DATE] at [TIME]1230332057[/TIME] ---------------

and Number of Albums plz ???

Lynne 12-26-2008 09:07 PM

I don't know what you mean by Number of Topics. If you mean number of threads, I think there is a modification to do that.

As for number of albums, you will probably have to add a plugin to join in the query and do a count(album.albumid) of the albums for the user joining on album.userid. The above way of doing it for the gifts adds one query per postbit which is not the best way to go. It's probably better to join in the query when the post information for the user is obtained (but don't ask me if it's a left join or right join or any of that cuz I don't know).

mostafa megahed 12-26-2008 10:58 PM

Quote:

Originally Posted by Lynne (Post 1694362)
I don't know what you mean by Number of Topics. If you mean number of threads, I think there is a modification to do that.

As for number of albums, you will probably have to add a plugin to join in the query and do a count(album.albumid) of the albums for the user joining on album.userid. The above way of doing it for the gifts adds one query per postbit which is not the best way to go. It's probably better to join in the query when the post information for the user is obtained (but don't ask me if it's a left join or right join or any of that cuz I don't know).

Thank U ...

yes i mean number of threads !! but i didn't found this modification ...

and i can't do what you say about the albums count ... so my request is for this :

1- count of user's albums .
2- count of user's friends . [Done]
3- count of user's threads .
4- count of user's referrals .

Any Help ... :)

Lynne 12-26-2008 11:18 PM

Do a search on "postbit*" in "all mods" "titles only" . I saw mods regarding referrals, albums, and threads in there (you will have to look through a few pages of the results).

mostafa megahed 12-26-2008 11:44 PM

thank u, i will :D


All times are GMT. The time now is 08:14 AM.

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.00988 seconds
  • Memory Usage 1,731KB
  • 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
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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