Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 20 Nov 2009, 02:04
Mythotical Mythotical is offline
 
Join Date: Jun 2004
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:

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

Template with pulling image data through different file other than download.php:

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

Keep in mind the var $cid is pulled in the download.php file while the image pull is a separate file but right now I want to attempt to combine the files into one.

File:

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

Code that is pulling the data for the $cid variable:

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

Any help much appreciated.

Thanks
Steve M

Last edited by Mythotical; 20 Nov 2009 at 06:58.
Reply With Quote
  #2  
Old 20 Nov 2009, 11:55
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Real name: Sven
Where do you register $cid for use in the template in the second chunk of code?
__________________
Please note that there will be no further updates to my addons, especially they will not be upgraded for vB5. I'm leaving vB, since IB choose to go the banana-way yet again.

http://www.roma-antiqua.de
Reply With Quote
  #3  
Old 20 Nov 2009, 19:05
Mythotical Mythotical is offline
 
Join Date: Jun 2004

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

Is that what you mean by registered? Or are you talking about cleaned?
Reply With Quote
  #4  
Old 20 Nov 2009, 20:10
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Real name: Sven
You need to register variables to make them available in templates:
http://www.vbulletin.org/forum/showthread.php?t=228078

I thought you knew all that, since you're already doing it:

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

You need to do the same as in the second line for $catb for $cid.
__________________
Please note that there will be no further updates to my addons, especially they will not be upgraded for vB5. I'm leaving vB, since IB choose to go the banana-way yet again.

http://www.roma-antiqua.de

Last edited by cellarius; 20 Nov 2009 at 20:19.
Reply With Quote
  #5  
Old 20 Nov 2009, 20:21
Mythotical Mythotical is offline
 
Join Date: Jun 2004
$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.
Reply With Quote
  #6  
Old 20 Nov 2009, 20:29
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Real name: Sven
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.
__________________
Please note that there will be no further updates to my addons, especially they will not be upgraded for vB5. I'm leaving vB, since IB choose to go the banana-way yet again.

http://www.roma-antiqua.de
Reply With Quote
  #7  
Old 20 Nov 2009, 20:30
Mythotical Mythotical is offline
 
Join Date: Jun 2004
Ok I can't figure out why this:

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

Is displaying above my results when it should only use those if its starting a new row and ending another.

Last edited by Mythotical; 20 Nov 2009 at 20:48. Reason: Auto-Merged DoublePost
Reply With Quote
  #8  
Old 21 Nov 2009, 00:32
DavidsMods DavidsMods is offline
 
Join Date: Nov 2009
Just a quick note on security


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

Should be cleaned as you are using it here:

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

Reply With Quote
  #9  
Old 21 Nov 2009, 00:36
Mythotical Mythotical is offline
 
Join Date: Jun 2004
Thanks for pointing that out, I was actually starting to think I needed to clean it.
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 08:36.

Layout Options | Width: Wide Color: