Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 06 Jan 2007, 18:13
wIrEs wIrEs is offline
 
Join Date: Dec 2006
include php file

is there an easy way to do this? been trying to include a php on vbulletin 3.6.4 on a custom page but it doesn't work. Howto?
Reply With Quote
  #2  
Old 06 Jan 2007, 20:55
Tuk4 Tuk4 is offline
 
Join Date: Feb 2003
Hmmz... people should explain themselfs better then this.
If Im not misunderstanding you, then what you are trying to do, is adding new costum php file, which will be integreted with the forum itself.

Its easy, include, Global.php (so you'll have vB Functions - DB, etc') and just link it from the board, that way you can use, templates, pharses etc'.. (Not Hooks tho - as far as i know)

Greets,
Reply With Quote
  #3  
Old 06 Jan 2007, 22:22
hjs146 hjs146 is offline
 
Join Date: Dec 2006
To include something in a template file (custom page), follow these steps:
Step 1, create a variable for the include file:

Open global.php

Find:

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

Before add:

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

Save global.php

Step 2, add $yourvariable to your template file (custom page) through Styles Manager:

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

That is how you can include stuff in a template file.
Reply With Quote
  #4  
Old 07 Jan 2007, 10:05
wIrEs wIrEs is offline
 
Join Date: Dec 2006
thank you, i fixed the problem another way, i went the plugin way, i create a plugin with global start the following inside:


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

then i just added the variable to the template called by custom page. I guess my problem was that i didn't named the variable properly in the template, i dont remember, it works now, i had given up what i was doing because it was not working but after your post i just tried again and it worked. :alien:
Reply With Quote
  #5  
Old 07 Jan 2007, 10:52
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
when you use this just in the custom page, you could built the code into your php file
so it must not be on every page includet like you do it now(overload)
Reply With Quote
  #6  
Old 07 Jan 2007, 19:56
wIrEs wIrEs is offline
 
Join Date: Dec 2006
by this do you mean the code i posted? what code and which php file?

custom page mypage.php -> plugin -> index.php
Reply With Quote
  #7  
Old 08 Jan 2007, 20:27
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
something like
http://www.vbulletin.org/forum/showt...79#post1153579
Reply With Quote
  #8  
Old 10 Jan 2007, 02:47
wIrEs wIrEs is offline
 
Join Date: Dec 2006
thanks for that link, here's what i have so far.

custom_page.php looks like this:


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


custom_template looks like this:


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

my_included_php_file plugin looks like this:


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

my custom\index.php file looks like this:


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

Can you please explain me what i should do now?
do you mean i should put custom_page.php code inside custom\index.php then i should delete the plugin instead? then just to create a navbar link to custom\index.php?

thank you
Reply With Quote
  #9  
Old 10 Jan 2007, 17:36
noppid noppid is offline
 
Join Date: Mar 2003
Do the work of the include file in the custom page file before the template eval.


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

and be done with it. No need for a hook it appears.
__________________
Add a photo gallery garage to your auto forum and get noticed by your members. Find out how at the vBulletin Computer Help Forum.
An informed rider makes their first destination the motorcycle forum at rider info.
Reply With Quote
  #10  
Old 13 Jan 2007, 16:25
wIrEs wIrEs is offline
 
Join Date: Dec 2006
thank you.
Reply With Quote
  #11  
Old 13 Jan 2007, 16:37
noppid noppid is offline
 
Join Date: Mar 2003
Let us know how things work out for ya and what worked.

Thanks
__________________
Add a photo gallery garage to your auto forum and get noticed by your members. Find out how at the vBulletin Computer Help Forum.
An informed rider makes their first destination the motorcycle forum at rider info.
Reply With Quote
  #12  
Old 13 Jan 2007, 18:31
wIrEs wIrEs is offline
 
Join Date: Dec 2006
Everything seems to work, i just need to add some new options and make some code changes and some more..
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 16:36.

Layout Options | Width: Wide Color: