vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   added a template, how to call it in global.php? (https://vborg.vbsupport.ru/showthread.php?t=60232)

offlead 01-15-2004 01:01 AM

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. :D 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

TheAnt 01-15-2004 02:03 AM

PHP Code:

eval('$vh_navbar_contents = "' fetch_template('vh_navbar_contents') . '";'); 


offlead 01-15-2004 02:34 AM

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

offlead 01-15-2004 03:30 AM

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)

Zachery 01-15-2004 03:37 AM

should be placed above footer and header i belive :)

but glad you found it :) check my sig for some basics of vB3

offlead 01-15-2004 03:45 AM

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

Zachery 01-15-2004 03:50 AM

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 :)

offlead 01-15-2004 03:59 AM

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

Zachery 01-15-2004 04:03 AM

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

offlead 01-15-2004 04:18 AM

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


All times are GMT. The time now is 01:01 PM.

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.01319 seconds
  • Memory Usage 1,751KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete