Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 09-19-2010, 04:28 PM
OGZ.Korea OGZ.Korea is offline
 
Join Date: Sep 2009
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Forum ID; if conditions, help requested!

Hello, I have a problem.

If conditional are very hard for me to understand and to make especially customized if conditionals.

What I'm trying to do is only show the total amount of posts that a member posted in a specific forum / forum id.

Here's my code:
<br />Off Posts: <if condition="in_array($forum['forumid'], array(2,3,4))">$post[posts]</if>

2,3,4 are my forum id's and $post[posts] only show my amount of posts in every forum id not in the specific ones I specified in the if conditional tag.

Please help me, thank you for your time.

Best Regards,
OGZ.Korea
Reply With Quote
  #2  
Old 09-19-2010, 05:14 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You would need to write a plugin to do a query to get the number of posts only in those forums. You can't do it with just a variable.
Reply With Quote
  #3  
Old 09-20-2010, 10:17 PM
OGZ.Korea OGZ.Korea is offline
 
Join Date: Sep 2009
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
You would need to write a plugin to do a query to get the number of posts only in those forums. You can't do it with just a variable.
How can I do that? Is it possible for you to create one for me.
If so, I can pay via PayPal or you can do it for free, and your help will be greatly appreciated :]
Reply With Quote
  #4  
Old 09-20-2010, 10:55 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you wish to pay someone to write this for you, you may post in the Requests For Paid Services forum.
Reply With Quote
  #5  
Old 09-21-2010, 10:31 PM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where do you want to display this?

Here is what I added to the template memberinfo_block_statistics to add a link to the posts in my wiki forum:
Code:
        <fieldset class="statistics_group">
        <legend>Wiki entries</legend>
        <ul class="list_no_decoration">
            <li><a  href="search.php?$session[sessionurl]do=finduser&amp;u=$userinfo[userid]&amp;starteronly=1&amp;forumchoice[0]=176"  rel="nofollow"><phrase 1="$prepared[username]">Find all wiki's  written by $prepared[username]</phrase></a></li>
As you see it doesn't have any way to display the number of posts made by the member, because there is no conditional for this. This code only shows the layout and the search for a members posts in a specified forum. If you want to use this, then replace 176 by the forumID of your forum, and edit the description accordingly.
To add a conditional, you would need to add a plugin. Review the template memberinfo_block_statistics to see what it should do.

Basically what you need is to create the conditional $prepared[posts_in_forum_x]
If you have that, you can just reuse the code thats already in the template memberinfo_block_statistics, but add that conditional.

I hope that helps somewhat. Sorry for providing the complete answer.

This should be a simple thing for a coder to prepare.
Reply With Quote
  #6  
Old 09-22-2010, 07:07 PM
OGZ.Korea OGZ.Korea is offline
 
Join Date: Sep 2009
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Alfa1 View Post
Where do you want to display this?
In the postbit legend, under $posts[posts]
Reply With Quote
  #7  
Old 10-05-2010, 09:21 PM
OGZ.Korea OGZ.Korea is offline
 
Join Date: Sep 2009
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump
Reply With Quote
  #8  
Old 10-09-2010, 11:13 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why are you bumping this? You got your answer- you need a plugin- if you're willing to pay make a request in the paid requests forum as Lynne pointed out. You will NEVER be able to do this with just a conditional.
Reply With Quote
Reply

Thread Tools
Display Modes

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 05:36 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03877 seconds
  • Memory Usage 2,227KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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_postinfo_query
  • fetch_postinfo
  • 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
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete