Php vbulletin插件调用值

Php vbulletin插件调用值,php,vbulletin,Php,Vbulletin,我正在使用vBulletin中的插件。这个插件在数组中存储镜像链接或者类似的东西,我不确定我是否真的想通过单独调用来显示页面上的每个镜像链接 插件中包含以下代码: {vb:var mirrorid=$i=1} 正在返回第一个镜像id值,该值为1;以及: {vb:var mirror.link} 正在返回镜像链接的值 如何直接返回所有镜像链接值或其他值 例如,我尝试了{vb:var mirror.link=$I=3}来显示第三个链接值,但对我不起作用。如果您使用的是vb4,那么您可以像 If

我正在使用vBulletin中的插件。这个插件在数组中存储镜像链接或者类似的东西,我不确定我是否真的想通过单独调用来显示页面上的每个镜像链接

插件中包含以下代码:

{vb:var mirrorid=$i=1}
正在返回第一个镜像id值,该值为
1
;以及:

{vb:var mirror.link}
正在返回镜像链接的值

如何直接返回所有镜像链接值或其他值

例如,我尝试了
{vb:var mirror.link=$I=3}
来显示第三个链接值,但对我不起作用。

如果您使用的是vb4,那么您可以像
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
让您拥有一个数组 $binaries=数组( 0=>数组( “主题”=>“主题1”, “binaryid”=>1, 'groups'=>array('alt.binaries.teevee','alt.binaries.multimedia')`在此处输入代码` ), 1=>数组( “主题”=>“主题2”, 'binaryid'=>2, 'groups'=>array('alt.binaries.xvid') ), ); 在vb4中,您可以通过注册变量将数组传递给模板 {vb:raw binary.subject} {vb:raw binary.binaryid} 如果您使用的是VB3.8,则不能循环数组,必须将单个变量传递给模板,或者可以在php插件代码中循环数组