Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 22 Apr 2008, 20:53
ChU v2 ChU v2 is offline
 
Join Date: May 2007
Real name: Nick
bbquote template

For my hack: http://www.vbulletin.org/forum/showthread.php?t=175282



I'm trying to get the font code to display within the quote box, but I can't get this to work. Here is my code within the bbcode_quote template:




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

Reply With Quote
  #2  
Old 22 Apr 2008, 21:37
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Lack of quotes here maybe?

<if condition="$userinfo[field10]

Should be..

<if condition="$userinfo['field10']



What is it doing exactly? Nothing for the quotes at all? Or just some? Is it in the source code incorrectly or not at all?
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #3  
Old 22 Apr 2008, 21:47
MoT3rror MoT3rror is offline
 
Join Date: Mar 2007
Originally Posted by Lynne View Post
Lack of quotes here maybe?

<if condition="$userinfo[field10]

Should be..

<if condition="$userinfo['field10']



What is it doing exactly? Nothing for the quotes at all? Or just some? Is it in the source code incorrectly or not at all?
The single quotes will cause a parse error.

Your css won't work right if the user doesn't provide all the fields.

You might be able to try something like this but it will get complex.

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

Reply With Quote
  #4  
Old 22 Apr 2008, 21:58
ChU v2 ChU v2 is offline
 
Join Date: May 2007
Real name: Nick
Originally Posted by MoT3rror View Post
The single quotes will cause a parse error.

Your css won't work right if the user doesn't provide all the fields.

You might be able to try something like this but it will get complex.

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

Yes the quotes did give me an error, I will try your suggestion though, thanks.
Reply With Quote
  #5  
Old 22 Apr 2008, 22:02
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Originally Posted by MoT3rror View Post
The single quotes will cause a parse error.
How do you memorize this stuff. I can never remember. I just try it and if it works, great! If not, I try it without. It seems to be one way in php and the other in the templates.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #6  
Old 22 Apr 2008, 22:19
ChU v2 ChU v2 is offline
 
Join Date: May 2007
Real name: Nick
Ya I can't get it to work with either way. It seems it does not like variable $userinfo. $bbuserinfo works fine, but obvisously that just displays what the browsing user has entered in his/her profile NOT what the acually user that is displayed has selected. I don't know why that is, php works differently between each template.
Reply With Quote
  #7  
Old 22 Apr 2008, 22:21
MoT3rror MoT3rror is offline
 
Join Date: Mar 2007
Yeah $userinfo isn't a variable in the template system. Sorry didn't catch that.

$bbuserinfo contains all the userinfo.
Reply With Quote
  #8  
Old 22 Apr 2008, 23:15
ChU v2 ChU v2 is offline
 
Join Date: May 2007
Real name: Nick
Originally Posted by MoT3rror View Post
Yeah $userinfo isn't a variable in the template system. Sorry didn't catch that.

$bbuserinfo contains all the userinfo.
but $bbuserinfo doesn't display the poster's fields, it displays the user that is browsing, what they have entered into the fields.

So what variable could I use? $post doesn't work either

Last edited by ChU v2; 22 Apr 2008 at 23:22.
Reply With Quote
  #9  
Old 23 Apr 2008, 00:00
MoT3rror MoT3rror is offline
 
Join Date: Mar 2007
When the quote is parsed in vB_BbCodeParser::handle_bbcode_quote, it only globalize these variables.

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

So a way to get around this might be to globalize $post or whatever is used in the location you need but this will take a file edit because there is no hook in this location.
Reply With Quote
  #10  
Old 23 Apr 2008, 01:16
ChU v2 ChU v2 is offline
 
Join Date: May 2007
Real name: Nick
Originally Posted by MoT3rror View Post
When the quote is parsed in vB_BbCodeParser::handle_bbcode_quote, it only globalize these variables.

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

So a way to get around this might be to globalize $post or whatever is used in the location you need but this will take a file edit because there is no hook in this location.
How would I go about globalizing the variable?
Reply With Quote
  #11  
Old 23 Apr 2008, 01:38
MoT3rror MoT3rror is offline
 
Join Date: Mar 2007

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

Reply With Quote
  #12  
Old 23 Apr 2008, 02:42
ChU v2 ChU v2 is offline
 
Join Date: May 2007
Real name: Nick
so for example: <if condition="global $post[field6]">

Where do I put that code
Reply With Quote
  #13  
Old 23 Apr 2008, 03:14
MoT3rror MoT3rror is offline
 
Join Date: Mar 2007
Find the function handle_bbcode_quote in the class_bbcode.php file in the includes folder.

In this function add

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

These will allow you use $post in the that template. I would suggest you find a way around it if you can if you are using this in a mod.
Reply With Quote
  #14  
Old 23 Apr 2008, 11:57
ChU v2 ChU v2 is offline
 
Join Date: May 2007
Real name: Nick
Originally Posted by MoT3rror View Post
Find the function handle_bbcode_quote in the class_bbcode.php file in the includes folder.

In this function add

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

These will allow you use $post in the that template. I would suggest you find a way around it if you can if you are using this in a mod.
Well If I knew a way around it, we wouldn't be having this discussion Does it propose a security risk?

Thanks for your help
Reply With Quote
  #15  
Old 23 Apr 2008, 12:08
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
Globalising variables should not have any impact on security.
__________________
Former vBulletin.org Staff Member

View My Modifications
29 Releases and Counting... Latest Modification: dmActivityStream - vBookie Integration (4.x)

Please do not PM me to ask for support - please use the relevant thread or forum.
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 19:49.

Layout Options | Width: Wide Color: