The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I have been searching all over and can not find the solution, tried to add few conditionals to postbit legacy without any luck.
I need to find a way to set one avatar image for unregistered/guest posts. I tried using a ranks, but ranks do not show on the guest posts any ideas? I also see this question unanswered many times in this forum |
#2
|
|||
|
|||
![]()
Thats because guests should never be allowed to post as 99% are spam bots
|
#3
|
||||
|
||||
![]()
This is untested however..
Edit your "postbit" or "postbit_legacy" template.. Find these lines: Code:
<vb:if condition="$post.avatarurl"> <img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" /> <vb:else /> <img src="{vb:stylevar imgdir_misc}/unknown.gif" /> </vb:if> Code:
<vb:if condition="$post['usergroupid'] == 1"> <img src="http://something/guestavatar.jpg" /> <vb:else /> <vb:if condition="$post.avatarurl"> <img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" /> <vb:else /> <img src="{vb:stylevar imgdir_misc}/unknown.gif" /> </vb:if> </vb:if> |
#4
|
|||
|
|||
![]()
i tried the above code and it did not work, it looks like vbuletin does not keep unregistered posts as part of any usergroup, when I look at my unregistered usergroup, it has zero members and when I assign a rank to that group it does not show in postbit,
--------------- Added [DATE]1396103759[/DATE] at [TIME]1396103759[/TIME] --------------- i do not agree with it, and that is why I am looking for a solution. |
#5
|
||||
|
||||
![]()
Try changing,
Code:
<vb:if condition="$post['usergroupid'] == 1"> Code:
<vb:if condition="$post['usergroupid'] == 0"> Code:
<vb:if condition="$post['usergroupid'] == ' '"> |
#6
|
|||
|
|||
![]()
Thanks i will try, I was thinking about using less than 2? What would be the code for it?
--------------- Added [DATE]1396104661[/DATE] at [TIME]1396104661[/TIME] --------------- @ozzy, thank you so very much, it worked with "0", now I need the code to resize it. |
#7
|
||||
|
||||
![]()
Maybe this:
Code:
<vb:if condition="$post['usergroupid'] <= 1"> |
#8
|
|||
|
|||
![]()
Got it working, thank you so much @ozzy47
This is my final code: <vb:if condition="$post['usergroupid'] == 0"> <center> <img src="http://path/images/avatars/guestavatar.jpg" /> </center> works like a charm |
#9
|
||||
|
||||
![]() Quote:
If you cannot help then perhaps you should move on, not post unhelpful remarks. |
#10
|
|||
|
|||
![]()
Its not unhelpful its a fact everyone here will agree if you allow guests to post then most will be spam bots
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|