PDA

View Full Version : Hide administrator post count in post bit.


dlewisr
05-01-2013, 06:49 AM
Some one please put me out of my misery. I have installed the latest patch and am now on vb4.2.1. I had a security token issue on 'Mark Forums Read' and after reading through solutions on here, thought it was because two templates needed reverting. I reverted ALL templates and that seemed to do the trick. I'm now wanting to hide the admin post count in the postbit legacy, but though I've tried more times than I care to count. I'm doing something wrong.

I change (should say 'have' been changing:

<dt>{vb:rawphrase posts}</dt><dd>{vb:raw post.posts}</dd>

to:

<vb:if condition="$post['userid'] == '6'"><dt>{vb:rawphrase posts}</dt><dd>??</dd><vb:else /><dt>{vb:rawphrase posts}</dt><dd>{vb:raw post.posts}</dd></vb:if>

This worked for me before installing the patch. Could anyone point me in the right direction please?

Cheers in advance.

John Lester
05-01-2013, 06:53 AM
The code is written for one user with a userid of 6. It should be usergroupid vs userid, although I'm not at home to test it on my test site.

dlewisr
05-01-2013, 07:19 AM
Thank you for the reply John, I have tried user ID 1 also, which is mine, but it won't work with that either. I did get the original code from this thread:

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

post 6 was my query and it did work at that time.

--------------- Added 1367409964 at 1367409964 ---------------

I've sorted the issue out. I have the horizontal post bit not the vertical and so needed to add the changes to the postbit template NOT the postbit legacy. You were right too about the ID, I changed it to ID 1 and it worked. Thank you John.