mightyudis
09-22-2014, 03:27 PM
Hey,
i am trying to change the content of the author div in threadbit, base on whether the user is deleted or not.
This is the default threadbit author div of the template i use (and also the default vbulletin4 i belive)
{vb:rawphrase started_by_x_y_z_a, {vb:link member, {vb:raw thread}, null, 'postuserid', 'postusername'}, {vb:raw thread.postusername}, {vb:raw thread.startdate}, {vb:raw thread.starttime}, {vb:stylevar dirmark}}
This results in
Started by Username, 31.12.2014 23:59
Which is fine for existing users, but if the user is deleted the query results in
Started by , 31.12.2014 23:59
So i tried to get the username from {vb:raw post.username}
{vb:rawphrase started_by_x_y_z_a, {vb:raw post.username}, {vb:raw thread.postusername}, {vb:raw thread.startdate}, {vb:raw thread.starttime}, {vb:stylevar dirmark}}
Which works fine, but there is no markup for the usernames and vbulletin is making the username linking to root dir.
Started by Deletedusername[marked as link to root dir /], 31.12.2014 23:59
I tried hard-linking the variables, which works too
Started by {vb:raw thread.postusername}, {vb:raw thread.startdate} {vb:raw thread.starttime}
but has no phrase support for non-english users and i still lack the if condition.
My questions are:
- How can i test in the template whether the user still exists or not with some <vb:if> (or something else)
IF user exists
Started by Username with markup and all
ELSE
Started by Deletedusername just plain text
- and how can i then use phrase replacements without vbulletin marking the deleted usernames as links?
Any suggestions?
Regards
i am trying to change the content of the author div in threadbit, base on whether the user is deleted or not.
This is the default threadbit author div of the template i use (and also the default vbulletin4 i belive)
{vb:rawphrase started_by_x_y_z_a, {vb:link member, {vb:raw thread}, null, 'postuserid', 'postusername'}, {vb:raw thread.postusername}, {vb:raw thread.startdate}, {vb:raw thread.starttime}, {vb:stylevar dirmark}}
This results in
Started by Username, 31.12.2014 23:59
Which is fine for existing users, but if the user is deleted the query results in
Started by , 31.12.2014 23:59
So i tried to get the username from {vb:raw post.username}
{vb:rawphrase started_by_x_y_z_a, {vb:raw post.username}, {vb:raw thread.postusername}, {vb:raw thread.startdate}, {vb:raw thread.starttime}, {vb:stylevar dirmark}}
Which works fine, but there is no markup for the usernames and vbulletin is making the username linking to root dir.
Started by Deletedusername[marked as link to root dir /], 31.12.2014 23:59
I tried hard-linking the variables, which works too
Started by {vb:raw thread.postusername}, {vb:raw thread.startdate} {vb:raw thread.starttime}
but has no phrase support for non-english users and i still lack the if condition.
My questions are:
- How can i test in the template whether the user still exists or not with some <vb:if> (or something else)
IF user exists
Started by Username with markup and all
ELSE
Started by Deletedusername just plain text
- and how can i then use phrase replacements without vbulletin marking the deleted usernames as links?
Any suggestions?
Regards