The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
create custom error message
Hi
I just created custom page in my vb 4. Now I need show error message in this page but this error involve to all pages. what should I do? I used this function: PHP Code:
|
#2
|
||||
|
||||
So you want to add a No Permission message only to your custom page but it is showing up on all pages? Where did you put that code you posted above? If it is in your custom php page, then it should only show on that page. We need a little more information here I think.
|
Благодарность от: | ||
MarkFL |
#3
|
|||
|
|||
thanks for your attention Lynne,
yes that's right. in fact I need no permission message with custom message I created a page named quiz.php. as you know I need create a template for it too. in this template I need load some data from database so I created subpage. I used plugin at global_start hook location PHP Code:
I think my hook location made this problem. am I right? |
#4
|
||||
|
||||
If you need to query the database and register the results stored in variables, then what I would do is query the database in "quiz.php", and then register the variables in your custom template immediately afterwards. You don't want to run the query globally, this would cause unnecessary server strain.
As an example, I have a product for reporting profiles. I use a custom template to display the input form, and I use the following code to send that needed data to the template (after querying the database), and then render the template: PHP Code:
|
Благодарность от: | ||
Lynne |
#5
|
|||
|
|||
Quote:
thank you Mark how should I use this variables in template? {vb:raw variablename} for example in your code if I need to use $text_height I should write this code? {vb:raw text_height} |
#6
|
||||
|
||||
Yes, in my custom template "markfl_reportprofile_form" I use that variable in a CSS selector as follows:
Code:
textarea { resize: none; height: {vb:raw text_height}px; width: 100%; font-size: 14px; font-family: Arial; } |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|