我在vBulletin中使用插件。这个插件存储数组中的镜像链接或类似的东西我不确定我是否想通过单独调用它来显示页面上的每个镜像链接。
在插件中输入以下代码:
{vb:var mirrorid=$i=1}
返回第一个镜像id值1
;和
{vb:var mirror.link}
返回镜像链接的值。
如何直接返回所有镜像链接值或其他值?
我尝试使用示例{vb:var mirror.link=$i=3}
来显示第3个链接值但不适用于我。
答案 0 :(得分:0)
If you are using vb4 then you can loop through array in template like
lets you have an array
$binaries = array(
0 => array(
'subject' => 'Subject 1',
'binaryid' => 1,
'groups' => array('alt.binaries.teevee', 'alt.binaries.multimedia') `enter code here`
),
1 => array(
'subject' => 'Subject 2',
'binaryid' => 2,
'groups' => array('alt.binaries.xvid')
),
);
and in vb4 you can pass array to template by registering variable.Then in your template you can easily access array values like
<vb:each from="binaries" value="binary">
{vb:raw binary.subject}
{vb:raw binary.binaryid}
</vb:each>
if you are using VB 3.8 the you can not loop through array, you have to pass single variable to template or you can loop array in your php plugin code