Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 01-15-2004, 01:01 AM
offlead's Avatar
offlead offlead is offline
 
Join Date: Jul 2003
Location: Dallas, Tx
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default added a template, how to call it in global.php?

I need to add something to the navbar on the forum (vb3 rc2). Because I'm using the same chunk of code on NON-forum pages, I created a new template for it. (Yes, it's in the parent style, and all the child styles.) I know that I need to add it into the global.php file so that it will correctly be brought into each page of the forum.

I added to the navbar template:

Code:
<!-- / breadcrumb, login, pm info -->

<!-- vh nav buttons bar -->
<div align="center">
	<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
	<tr align="center">	
		$vh_navbar_contents
	</tr>
	</table>
</div>
<!-- / vh nav buttons bar -->

<!-- nav buttons bar -->
<div align="center">
where vh_navbar_contents is the newly created template.

Poking in the global.php file, I can see where the templates are called, and added the new one in with the other navigation templates:

Code:
	// navbar construction
	'vh_navbar_contents',
	'navbar',
	'navbar_link',
And here's where my lack of knowledge starts kicking in. If I understand correctly, I need to eval the template? I tried adding the eval in under the ones for header, headinclude, and footer, but it still doesn't show up. Tried adding an eval for navbar as well, still nothing. I got the vh_navbar_contents to show up on non-forum pages, where I'm calling it from vh_navbar instead of navbar, but can't seem to get it into the forum. Would someone be so kind as to explain how to include this puppy in the global file?

Thanks!
Jeniffer
Reply With Quote
  #2  
Old 01-15-2004, 02:03 AM
TheAnt TheAnt is offline
 
Join Date: Sep 2003
Location: Iceland
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
eval('$vh_navbar_contents = "' fetch_template('vh_navbar_contents') . '";'); 
Reply With Quote
  #3  
Old 01-15-2004, 02:34 AM
offlead's Avatar
offlead offlead is offline
 
Join Date: Jul 2003
Location: Dallas, Tx
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TheAnt
PHP Code:
eval('$vh_navbar_contents = "' fetch_template('vh_navbar_contents') . '";'); 
TheAnt,

Yes, sorry, I apparently wasn't terribly clear. I understand the syntax for the line, but it isn't working. I've tried placing that line into global.php, just under the eval statement for footer. Doesn't work. Tried putting it into index.php, just above the eval statement for navbar. Doesn't work there either. navbar is showing the row where the new buttons should go, but isn't showing the contents of the row. Just blank space in the html of the page, no errors.

I assumed this was the correct statement to use, but can't figure out where it needs to go in order to work.

Jeniffer
Reply With Quote
  #4  
Old 01-15-2004, 03:30 AM
offlead's Avatar
offlead offlead is offline
 
Join Date: Jul 2003
Location: Dallas, Tx
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by offlead
TheAnt,

Yes, sorry, I apparently wasn't terribly clear. I understand the syntax for the line, but it isn't working. I've tried placing that line into global.php, just under the eval statement for footer. Doesn't work. Tried putting it into index.php, just above the eval statement for navbar. Doesn't work there either. navbar is showing the row where the new buttons should go, but isn't showing the contents of the row. Just blank space in the html of the page, no errors.

I assumed this was the correct statement to use, but can't figure out where it needs to go in order to work.

Jeniffer
Okay, forget I asked a thing. I was sure this should be working. Was convinced I had figured out this much of how to do these things. I was right. It just helps if I'm getting files uploaded to the correct directory! *rolling eyes at self* That's what I get for working from an app I don't use very often, and forgetting that my directory structure on the desktop isn't identical to the structure on the server.

Thanks guys!
Jen
(going back to stand in her corner)
Reply With Quote
  #5  
Old 01-15-2004, 03:37 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

should be placed above footer and header i belive

but glad you found it check my sig for some basics of vB3
Reply With Quote
  #6  
Old 01-15-2004, 03:45 AM
offlead's Avatar
offlead offlead is offline
 
Join Date: Jul 2003
Location: Dallas, Tx
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Faranth, LOL, thanks. Actually, I have that tutorial up in another browser tab, and have most of the day. (And I posted in another thread around here somewhere asking about permissions stuff, which is why I replied over on vbulletin.com when you said you were working on another tutorial.) Like I said, I was sure I'd "gotten it", and understood at least this much, but couldn't figure out why it wasn't working. Sheesh, this is the second time today I've spent a good long while working on something, not figuring it out, only to discover my blatant error immediately after asking for help on it. Ain't that always the way it goes?

Thanks for all the help!
Jeniffer
Reply With Quote
  #7  
Old 01-15-2004, 03:50 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by offlead
Faranth, LOL, thanks. Actually, I have that tutorial up in another browser tab, and have most of the day. (And I posted in another thread around here somewhere asking about permissions stuff, which is why I replied over on vbulletin.com when you said you were working on another tutorial.) Like I said, I was sure I'd "gotten it", and understood at least this much, but couldn't figure out why it wasn't working. Sheesh, this is the second time today I've spent a good long while working on something, not figuring it out, only to discover my blatant error immediately after asking for help on it. Ain't that always the way it goes?

Thanks for all the help!
Jeniffer
belive it or not it sorta is,

im still working on the conditions tutorial, ive poked at it abit but im not as enthused to write it up atm, im hoping to finish it by the weekend
Reply With Quote
  #8  
Old 01-15-2004, 03:59 AM
offlead's Avatar
offlead offlead is offline
 
Join Date: Jul 2003
Location: Dallas, Tx
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, I'll still be working on this stuff come this weekend, so I'll just keep an eye out for it. I've created non-forum pages that list our paid subscriptions, each page only displaying SOME of the available subs, rather than all of them on one page. I need to restrict access to some of the pages to only those users who have already paid for a lower level subscription. This is my workaround to the issue of vb not having tiered subscriptions yet, nor photopost recognizing secondary usergroups.

But it should take me until this weekend to get the rest of the dust cleaned up on the site. Haha!

Jeniffer
Reply With Quote
  #9  
Old 01-15-2004, 04:03 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by offlead
Well, I'll still be working on this stuff come this weekend, so I'll just keep an eye out for it. I've created non-forum pages that list our paid subscriptions, each page only displaying SOME of the available subs, rather than all of them on one page. I need to restrict access to some of the pages to only those users who have already paid for a lower level subscription. This is my workaround to the issue of vb not having tiered subscriptions yet, nor photopost recognizing secondary usergroups.

But it should take me until this weekend to get the rest of the dust cleaned up on the site. Haha!

Jeniffer
if photopost uses vB templates it wouldnt be hard with conditionals
Reply With Quote
  #10  
Old 01-15-2004, 04:18 AM
offlead's Avatar
offlead offlead is offline
 
Join Date: Jul 2003
Location: Dallas, Tx
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Don't know if you saw my detailed post about this integration issue on the .com forum, but the solution could lie either on the vb or the pp side. At the moment it's up to admins to figure out how to handle it. Since I have only the most very basic grasp of php, my solution for the moment (other than bringing it up to the developers on both sides, since this is a very common integration) was to create extra pages and copy the html for the subscriptions form -- in pieces -- into the various pages, then see if I can figure out how to restrict access to those pages.

Little baby steps.

Jeniffer
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump


All times are GMT. The time now is 11:45 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
  • Page Generation 0.02623 seconds
  • Memory Usage 2,258KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete