Quote:
Originally Posted by JAuthement
J98680B2423E;
I was just wondering if the request that I posted earlier in this discussion was implemented? I know that you are inundated with many request so to refresh you memory, my request was post #508.
Thanks Again!!
|
Hi JAuthement,
The variables are available already.
Code:
$post['nominate_topic_user_amount_formatted'] = vb_number_format($post['nominate_topic_user_amount']);
$post['nominate_topic_nominated_times_formatted'] = vb_number_format($post['nominate_topic_nominated_times']);
$post['nominate_topic_nominated_posts_formatted'] = vb_number_format($post['nominate_topic_nominated_posts']);
$post['nominate_topic_nominated_awards_formatted'] = vb_number_format($post['nominate_topic_nominated_awards']);
The only thing needed is to create the phrases as you wish to use them.
For example, in the template "nominate_topic_postbit_info":
1. If the post has been nominated only once in one post, then the resulting phrase is:
$vbphrase[nominate_topic_time_post]
2. If the post has been submitted for nomination several times in one post, then the resulting phrase is: (check in the phrase definition)
Nominated {1} Times in 1 Post
Here, the "{1}" is meant to be replaced by the actual value that indicates how many times, hence the code:
Code:
<phrase 1="$post[nominate_topic_nominated_times_formatted]">$vbphrase[nominate_topic_times_post]</phrase>
3. If the post has been submitted for nomination several times in several posts, then the resulting phrase is: (check in the phrase definition)
Nominated {1} Times in {2} Posts
Here too, the "{1}" is meant to be replaced by the actual value that indicates how many times and {2} the actual value that indicates how many posts, hence the code:
Code:
<phrase 1="$post[nominate_topic_nominated_times_formatted]" 2="$post[nominate_topic_nominated_posts_formatted]">$vbphrase[nominate_topic_times_posts]</phrase>
You can also construct these phrases in the plugin "postbit_display_complete" using the construct_phrase() function:
Just before the
Code:
eval('$template_hook[postbit_userinfo_right_after_posts] .= " ' . fetch_template('nominate_topic_postbit_info') . '";');
You can add the following
Code:
if ($post['nominate_topic_nominated_times'] == 1){
$nt_times_posts = $vbphrase['nominate_topic_time_post'];
}
else {
if ($post['nominate_topic_nominated_posts'] == 1){
$nt_times_posts = construct_phrase($vbphrase['nominate_topic_times_post'],$post['nominate_topic_nominated_times_formatted']);
}
else {
$nt_times_posts = construct_phrase($vbphrase['nominate_topic_times_posts'],$post['nominate_topic_nominated_times_formatted'],$post[nominate_topic_nominated_posts_formatted]);
}
}
Then use the $nt_times_posts variable subsequently in your postbit.