Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 31 Jul 2007, 22:56
Osterling Osterling is offline
 
Join Date: Jan 2004
Pulling Templates

I am developing a File Sharing system, which after it's done, I would like to release it here. I have only one problem, vbulletin template based system. I need a way to retrieve the header, headinclude, and footer. I started doing it my way, which was this.

I'd search the table user for the persons username, and then check out what their default style was. After that, I did a search in the table template with the conditions being styleid, and searching for the specific template I wanted (eg navbar). Once I did that, I saw that I would need to search the phrase table in order to replace things like, $vbphrase[members_list].

I think I could eventually get it to work right, but I think it would be a heck of a lot of code, and querying. I'm hoping someone could show me a easier way in retrieving templates. So if someone wouldn't mind taking me under the wing, I'd really appreciate it.

p.s. I'll give recognition to who ever helps me when I release the File Sharing system

Thank you,
Osterling.
Reply With Quote
  #2  
Old 31 Jul 2007, 23:14
Opserty Opserty is offline
 
Join Date: Apr 2007
I'm still a bit of a coding rookie but using:


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

Should automatically select the template from the users selected style and replace the phrases if you have set them in the templates.

Source: http://www.vbulletin.org/forum/showthread.php?t=98009
Reply With Quote
  #3  
Old 31 Jul 2007, 23:56
Osterling Osterling is offline
 
Join Date: Jan 2004
Thank you, that got line of code got me a bit further but still having problems. It displays the header, but it doesn't display the navbar or footer. It is almost like it stops loading after that line.


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


Last edited by Osterling; 01 Aug 2007 at 00:07.
Reply With Quote
  #4  
Old 01 Aug 2007, 00:08
Opserty Opserty is offline
 
Join Date: Apr 2007
Look at the source link I provided in the first post. If you follow it through it should show you how to use templates to create custom vBulletin pages.
Reply With Quote
  #5  
Old 01 Aug 2007, 00:17
Osterling Osterling is offline
 
Join Date: Jan 2004
I did check it out. Though the page I am creating, I don't want to call it from the template system, instead call it from a flat file using PHP. So I want to display the Header, Navbar, then have it load my file, followed by the footer.

For some reason, it just stops loading after


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

When I swap it with footer, or navbar, it will display. For some reason it just stops loading after the first eval() statement.

I did check it out. Though the page I am creating, I don't want to call it from the template system, instead call it from a flat file using PHP. So I want to display the Header, Navbar, then have it load my file, followed by the footer.

For some reason, it just stops loading after


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

When I swap it with footer, or navbar, it will display. For some reason it just stops loading after the first eval() statement.

Last edited by Osterling; 01 Aug 2007 at 00:22. Reason: Automerged Doublepost
Reply With Quote
  #6  
Old 01 Aug 2007, 00:26
Opserty Opserty is offline
 
Join Date: Apr 2007
Try to change the print_output to just print then as the print_output stops the execution. Also I don't think you need the echo function at the start.
Reply With Quote
  #7  
Old 01 Aug 2007, 08:11
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
Take a look at the article about creating vBulletin-powered pages.
__________________
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
  #8  
Old 01 Aug 2007, 08:32
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Here's your general problem:


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

Stops executing the script, and prints (evaluates) that template. So, before you call that, you'll need to set the other templates as variables like this:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Then $navbar will be available in your MAIN_TEMPLATE.

Prior to including global.php, be sure to populate an array of all the templates you plan to use and name it $globaltemplates, so vBulletin can cache them for you.

(Do read that tutorial)
Reply With Quote
  #9  
Old 20 Aug 2007, 18:15
utw-Mephisto utw-Mephisto is offline
 
Join Date: Feb 2005
I subscribe to this thread .. I am exactly in the same position and I have the exact same reason why I need header, footer etc.
Reply With Quote
  #10  
Old 21 Aug 2007, 14:55
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Real name: Hanson
Did you read the replies to the thread?
__________________
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 03:14.

Layout Options | Width: Wide Color: