![]() |
Custom page Script...
From this mod: https://vborg.vbsupport.ru/showthread.php?t=62164
What wuld this script be if I would be to use vB 4.0? Code:
$stylevar[htmldoctype] |
PHP Code:
HTML Code:
{vb:stylevar htmldoctype} |
Quote:
|
Actually, to make a quick correction (if I remember correctly)...
This PHP Code:
PHP Code:
|
Quote:
|
Quote:
|
vB Style is god vBulletinized. :)
|
Quote:
2. include the csrf protection We shouldn't start posting the outdated stuff;) |
what does following function do?
PHP Code:
|
Quote:
Quote:
For example: [untested] PHP Code:
This would make the sidebar_1 template accessible via {vb:raw my_sidebar_1} in your main TEST template. |
Quote:
Anyway, vBulletin reverse the effects of register_globals. It automatically unsets the globals. PHP Code:
I am going to update the script, and will create a tutorial with more things. |
Thanks a lot Shadab, it works the way you coded
however there is one little problem, if I register a variable in the code which is used in 'sidebar_1' template, I can't get it to show in the output using {vb:raw VariableInMySideBar} method this is the code: PHP Code:
in the template 'TEST', Code:
{vb:raw my_sidebar_1} in 'sidebar_1' template: Code:
{vb:raw VariableInMySideBar} and surprisingly Code:
{$ExVariable} |
Quote:
PHP Code:
PHP Code:
Thinking of it - I havn't seen NO_REGISTER_GLOBALS set in vB's core scripts since what, 3.0? I just checked and it vanished with 3.5, and in 4.0 there is no single reference to NO_REGISTER_GLOBALS that I can trace. Could it be that in fact this constant has been outdated for years but still makes it's way into modification codes because it was once needed years ago? |
Quote:
Quote:
|
Quote:
Try this: PHP Code:
|
What would be really cool is if we could have the widgets display on these pages. The CMS is great and I will be using it but it just lacks in a few areas that a couple of quickly made pages using this would work great, then to add some widgets would just be perfect!
|
The new v4 code will be leaning towards that, though it'll be more of a transitional release. I don't see us coding "pages" like this for long... we should be able to tap into the routing, controllers, modules, etc.
AFAIK this part of the code is still highly volatile. |
This hack has saved me from loss of vbAdvanced!
Thanks soooo much. I was tearing up my head trying to figure out how to do this with the CMS. Yes, adding a widget or two would be perfect. |
All times are GMT. The time now is 06:44 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|