The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
Is $bbuserinfo['x'] limited to certain templates? If so, how does one incorperate user options / profile options into other templates?
For example, a user has requested the ability to force attachments to open in new windows. I've added a set of radio buttons with the options "No" and "Yes" (with No being the default) under field9. I've checked that it in indeed the correct field by adding "$bbuserinfo['field9']" to the forum header (it echo's "No" or "Yes" respectively). I then edited the postbit_attachment template: HTML Code:
<tr> <td> <img class="inlineimg" src="$stylevar[imgdir_attach]/$attachment[attachmentextension].gif" alt="<phrase 1="$attachment[attachmentextension]">$vbphrase[file_type_x]</phrase>" width="16" height="16" border="0" style="vertical-align:baseline" /></td> <td><a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&d=$attachment[dateline]"<if condition="($show['newwindow']) OR ($bbuserinfo['field9'] == 'Yes')"> target="_blank"</if>>$attachment[filename]</a> ($attachment[filesize], <phrase 1="$attachment[counter]">$vbphrase[x_views]</phrase>)</td> </tr> |
#2
|
||||
|
||||
![]()
$bbuserinfo refers to the logged in user. In posts, the data for each poster is in $post.
|
#3
|
||||
|
||||
![]()
Mmm still no luck using "$postuserinfo['field9'] == 'Yes'". I am making a stupid mistake? Thanks for the quick reply by the way Paul.
|
#4
|
|||
|
|||
![]()
You would use:
HTML Code:
$post[fieldX] |
#5
|
||||
|
||||
![]() Quote:
![]() I said $post, not $postuserinfo ![]() |
#6
|
||||
|
||||
![]()
Heh heh, I sure do feel foolish now
![]() Mmm I've now made the above changes, and they seem to be working correctly. However older attachments do not open in a new window.... ... I've not got any hacks/plugins that cache posts. Is there anything in standard vB 3.5.4 which may cause problems? |
#7
|
||||
|
||||
![]()
Shameless bump.
|
#8
|
|||
|
|||
![]()
check in your attachment types in the ACP. you can set which open in new windows and which don't.
|
#9
|
||||
|
||||
![]() Quote:
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|