View Full Version : Forum ID; if conditions, help requested!
OGZ.Korea
09-19-2010, 04:28 PM
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
Lynne
09-19-2010, 05:14 PM
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.
OGZ.Korea
09-20-2010, 10:17 PM
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 :]
Lynne
09-20-2010, 10:55 PM
If you wish to pay someone to write this for you, you may post in the Requests For Paid Services (https://vborg.vbsupport.ru/forumdisplay.php?f=30) forum.
Alfa1
09-21-2010, 10:31 PM
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:
<fieldset class="statistics_group">
<legend>Wiki entries</legend>
<ul class="list_no_decoration">
<li><a href="search.php?$session[sessionurl]do=finduser&u=$userinfo[userid]&starteronly=1&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.
OGZ.Korea
09-22-2010, 07:07 PM
Where do you want to display this?
In the postbit legend, under $posts[posts]
OGZ.Korea
10-05-2010, 09:21 PM
bump
BirdOPrey5
10-09-2010, 11:13 PM
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.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.