The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Image displaying from database
I came up with my own way to pull images but the thing about is that it won't pull the image on vB4.0, here is the template and file.
Template: HTML Code:
<img src="download.php?catimg={vb:var cid}" height="50">
HTML Code:
<img src="cat.php?img={vb:var cid}" height="50">
File: PHP Code:
PHP Code:
Thanks Steve M |
#2
|
||||
|
||||
Where do you register $cid for use in the template in the second chunk of code?
|
#3
|
|||
|
|||
PHP Code:
|
#4
|
||||
|
||||
You need to register variables to make them available in templates:
https://vborg.vbsupport.ru/showthread.php?t=228078 I thought you knew all that, since you're already doing it: PHP Code:
|
#5
|
|||
|
|||
$cid is not a template or do all variables you use no matter if they are a template or not need to be registered?
I knew about templates but was unaware of having to do it for data variables such as $cid. |
#6
|
||||
|
||||
bfc_download_cat_bit is the template. You create it by calling the vB_Template:create method, and then you need to register every variable you want to use inside that template, no matter what's saved inside that variable. It can contain a rendered template, or it can contain just a simple boolean false or true. That does not matter, you need to register it to be able to use it. Then, in the next step, you render the template.
|
#7
|
|||
|
|||
Ok I can't figure out why this:
HTML Code:
</td> </td></tr><tr> |
#8
|
|||
|
|||
Just a quick note on security
PHP Code:
PHP Code:
|
#9
|
|||
|
|||
Thanks for pointing that out, I was actually starting to think I needed to clean it.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|