Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 15 Nov 2009, 00:53
MarkFoster MarkFoster is offline
 
Join Date: Jun 2008
Custom page Script...

From this mod: http://www.vbulletin.org/forum/showthread.php?t=62164

What wuld this script be if I would be to use vB 4.0?

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

I have loads of custom pages and I really need the proper script to change them all.
Reply With Quote
  #2  
Old 15 Nov 2009, 02:16
ForumsMods's Avatar
ForumsMods ForumsMods is offline
 
Join Date: Aug 2007
Real name: Adrian Sacchi

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


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


Last edited by ForumsMods; 15 Nov 2009 at 11:35.
Reply With Quote
  #3  
Old 15 Nov 2009, 02:18
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
 
Join Date: Sep 2008
Real name: Michael Miller Jr
Originally Posted by vB Style View Post
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
Right when I'm about to post LOL but good job!
__________________
Daddy Does Dios and Figs!
https://www.linkedin.com/in/thelastsuperman

Search - Use the search feature to find similar issues/answers.
Information - Include screenshots, copy/pasted error codes, url etc.
Fixed - Please return to your thread/post and let us know how it was fixed!
Thanks - For participating! Click the "Like" on a post if someone helped you!
Reply With Quote
  #4  
Old 15 Nov 2009, 02:24
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Real name: Brooks
Actually, to make a quick correction (if I remember correctly)...

This

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

Should be

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

Reply With Quote
  #5  
Old 15 Nov 2009, 03:25
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
Originally Posted by HMBeaty View Post
Actually, to make a quick correction (if I remember correctly)...
No need to suppress E_DEPRECATED warnings now, as they should be fixed.
__________________
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
  #6  
Old 15 Nov 2009, 03:30
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Real name: Brooks
Originally Posted by Dismounted View Post
No need to suppress E_DEPRECATED warnings now, as they should be fixed.
Ok, sounds good. Thank you Dismounted
Reply With Quote
  #7  
Old 15 Nov 2009, 06:09
Cip Cip is offline
 
Join Date: Jul 2008
vB Style is god vBulletinized.
Reply With Quote
  #8  
Old 15 Nov 2009, 08:41
ragtek's Avatar
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Originally Posted by vB Style View Post
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
1. forgett define('NO_REGISTER_GLOBALS', 1);
2. include the csrf protection


We shouldn't start posting the outdated stuff
__________________
my addons: http://ragtek.github.com
Reply With Quote
  #9  
Old 15 Nov 2009, 08:50
winstone winstone is offline
 
Join Date: Dec 2006
what does following function do?

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

can we include other templates inside it? e.g. $templater->register_page_templates('top_bit', 'side_bit', 'etc');
Reply With Quote
  #10  
Old 15 Nov 2009, 10:28
Shadab's Avatar
Shadab Shadab is offline
 
Join Date: Apr 2007
Location: Bhopal
Real name: Shadab
Originally Posted by winstone View Post
what does following function do?

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
It makes the header, footer and headinclude templates available to the template being evaluated.

Originally Posted by winstone View Post
can we include other templates inside it? e.g. $templater->register_page_templates('top_bit', 'side_bit', 'etc');
No. But you can do that via the register() method.
For example: [untested]


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


This would make the sidebar_1 template accessible via {vb:raw my_sidebar_1}
in your main TEST template.
Reply With Quote
  #11  
Old 15 Nov 2009, 11:33
ForumsMods's Avatar
ForumsMods ForumsMods is offline
 
Join Date: Aug 2007
Real name: Adrian Sacchi
Originally Posted by ragtek View Post
1. forgett define('NO_REGISTER_GLOBALS', 1);
2. include the csrf protection


We shouldn't start posting the outdated stuff
1. Yes, I forgot to remove NO_REGISTER_GLOBALS.
Anyway, vBulletin reverse the effects of register_globals. It automatically unsets the globals.

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

2. Also I forgot it. I only copy and paste header and modifiy the body of the PHP.

I am going to update the script, and will create a tutorial with more things.
Reply With Quote
  #12  
Old 15 Nov 2009, 11:56
winstone winstone is offline
 
Join Date: Dec 2006
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:

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


in the template 'TEST',

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

works fine

in 'sidebar_1' template:

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

doesn't work

and surprisingly

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

works fine, but I guess I shouldn't use it like that

Last edited by winstone; 15 Nov 2009 at 12:56.
Reply With Quote
  #13  
Old 15 Nov 2009, 11:59
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Real name: Sven
Originally Posted by ragtek View Post
1. forgett define('NO_REGISTER_GLOBALS', 1);
2. include the csrf protection


We shouldn't start posting the outdated stuff
I totally agree, and that's why you really should add

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

after

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View 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?
__________________
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
  #14  
Old 15 Nov 2009, 12:51
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
Originally Posted by HMBeaty View Post
Actually, to make a quick correction (if I remember correctly)...

This

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

Should be

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
Originally Posted by Dismounted View Post
No need to suppress E_DEPRECATED warnings now, as they should be fixed.
And even if you do, it should be -E_DEPRECATED , not -8192
__________________
Former vBulletin.org Staff Member


Cable Forum
Please do not PM me about custom work - I no longer undertake any.
Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum.
Reply With Quote
  #15  
Old 15 Nov 2009, 16:15
Shadab's Avatar
Shadab Shadab is offline
 
Join Date: Apr 2007
Location: Bhopal
Real name: Shadab
Originally Posted by winstone View Post
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
Your code was registering the variable with the main (TEST) template, instead of the sidebar template.
Try this:


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

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 09:30.

Layout Options | Width: Wide Color: