Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 15 Feb 2021, 14:50
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Real name: Ryan
Question Using options in scripts within template

Ok for those who know me know im use to vb3, but I am working on something for vb4 and was wondering why my option wont print within a script in a template...

my code is as follows: (within a template)


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and my img src is printing as "$vboptions[drc_img]" rather than the option.

also another instance of this is that last div I show in the code above.

the div shows, but displays $vboptions[drc_notice] when it should be displaying the Text...


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
If you need custom work done please use Dirt RIF CustUmz
Owner of vBTeam
vBulletin 3.8.14 DRC Edition PHP 7.4 Compatible- NOT a null, NOT complete files Requires a legit copy of vBulletin 3.8.11.
Reply With Quote
  #2  
Old 15 Feb 2021, 17:05
shka shka is offline
 
Join Date: Mar 2016
Originally Posted by Dr.CustUmz View Post

the div shows, but displays $vboptions[drc_notice] when it should be displaying the Text...


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by shka; 15 Feb 2021 at 17:15.
Reply With Quote
  #3  
Old 15 Feb 2021, 17:21
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Real name: Ryan
Originally Posted by shka View Post
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
THANK YOU!

is the vb:raw standard for all $ within templates in vb4 then?
__________________
If you need custom work done please use Dirt RIF CustUmz
Owner of vBTeam
vBulletin 3.8.14 DRC Edition PHP 7.4 Compatible- NOT a null, NOT complete files Requires a legit copy of vBulletin 3.8.11.
Reply With Quote
  #4  
Old 15 Feb 2021, 17:36
shka shka is offline
 
Join Date: Mar 2016
For output/echo values use curly braces and for array use dot syntax instead of square brackets.

https://www.vbulletin.com/docs/html?...rsion=40205500 - search for "template syntax"
Raw Variables

To access variables in the normal, pre-vB4 fashion, use the following syntax:

{vb:raw variable}

This is equivalent to simply accessing $variable in the pre-vB4 syntax. No treatment is applied to the variable. The same dot operator is used to access array elements.
Reply With Quote
  #5  
Old 15 Feb 2021, 17:42
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Real name: Ryan
Thanks shka (thinking in my head ShotKalla) lol
__________________
If you need custom work done please use Dirt RIF CustUmz
Owner of vBTeam
vBulletin 3.8.14 DRC Edition PHP 7.4 Compatible- NOT a null, NOT complete files Requires a legit copy of vBulletin 3.8.11.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 05:42.

Layout Options | Width: Wide Color: