Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-28-2012, 05:14 PM
kkinsey kkinsey is offline
 
Join Date: Oct 2011
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Created new page ... How do I get the footer in it?

Hello,

I'm sorry if this is a FAQ. I've searched a bit and haven't been able to glean an answer from what I've read.

Per management, I've added a new page to a development site. Everything looks great, but the page isn't rendering a footer when displayed.

Here's my render code, including a recent attempt to force a footer to show up...
PHP Code:
$navbits construct_navbits($navbits);
$navbar render_navbar_template($navbits);
$templater vB_Template::create('kdk_pfs');
        
$templater->register_page_templates();
        
$templater->register('navbar'$navbar);
        
$templater->register('checked'$checked);
print_output($templater->render());

// Can't get the footer to show!!  This apparently will NOT work:
$myfooter vB_Template::create('footer');
$myfooter->register_page_templates();
print_output($myfooter->render()); 
If you're experienced w/hacking vB, you can probably tell that I'm clueless. I don't see any logic in content.php, forum.php, etc. regarding the footer, so I'm left at this point to conclude it's Magic(tm). Any thoughts?

I welcome any assistance anyone can offer (apart from suggestions about job hunting ) - thanks!
Reply With Quote
  #2  
Old 02-28-2012, 05:43 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

REmove this stuff:
HTML Code:
// Can't get the footer to show!!  This apparently will NOT work: 
$myfooter = vB_Template::create('footer'); 
$myfooter->register_page_templates(); 
print_output($myfooter->render());
You've already output the page here:
HTML Code:
print_output($templater->render());
Did you require_once the global.php page? If so, your register_page_templates should be rendering the footer (and header and headinclude and headinclude_bottom)

If it's not showing, then perhaps you have some error in it somewhere.
Reply With Quote
  #3  
Old 02-28-2012, 06:02 PM
kkinsey kkinsey is offline
 
Join Date: Oct 2011
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, global.php is required, and we get past that point.

And no lint issues:

$php -l pfs.php
No syntax errors detected in pfs.php

I will check the server logs, though --- thanks.

--------------- Added [DATE]1330456767[/DATE] at [TIME]1330456767[/TIME] ---------------

Nothing in the logs. I can workaround this by pasting the footer template code in the template I'm calling for my new page, but it feels so dirty :erm:

I'll be making one more page/script tomorrow (or perhaps I'll be able to start later today). I'll post if I can make anymore headway.

--------------- Added [DATE]1330456922[/DATE] at [TIME]1330456922[/TIME] ---------------

Quote:
Originally Posted by Lynne View Post
If it's not showing, then perhaps you have some error in it somewhere.
Doesn't seem to be an error in the footer, as it works elsewhere throughout the site. But thanks anyway.....
Reply With Quote
  #4  
Old 02-28-2012, 09:12 PM
Sarteck's Avatar
Sarteck Sarteck is offline
 
Join Date: Mar 2008
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

kkinsey, this might be a stupid thing to ask, but are you certain you have a {vb:raw footer} bit in your template?



Here's what I use as a "generic" template, in cae it might help:

HTML Code:
{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">


<head>
{vb:raw headinclude}
  <title>{vb:raw vboptions.bbtitle}<vb:if condition="$pagetitle"> :: {vb:raw pagetitle}</vb:if></title>
<vb:if condition="$show['sidebar']">
  <script type="text/javascript" src="{vb:stylevar yuipath}/animation/animation-min.js?v={vb:raw vboptions.simpleversion}"></script>
  <script type="text/javascript">
    var sidebar_align = '<vb:if condition="$vboptions['sidebarposition'] == 0">left<vb:else />right</vb:if>';
    var content_container_margin = parseInt('{vb:math {vb:stylevar forum_sidebar_width}+{vb:math {vb:stylevar padding}*2}}');
    var sidebar_width = parseInt('{vb:stylevar forum_sidebar_width}');
  </script>
  <script type="text/javascript" src="{vb:raw vboptions.bburl}/clientscript/vbulletin-sidebar.js?v={vb:raw vboptions.simpleversion}"></script>
</vb:if>

{vb:raw headinclude_bottom}



</head>
<body>
{vb:raw header}
{vb:raw navbar}
  <div id="pagetitle">
    <h1>{vb:raw vboptions.bbtitle}</h1>
    <p id="welcomemessage" class="description">{vb:rawphrase welcome_to_the_x, {vb:raw vboptions.bbtitle}}</p>
  </div>
<vb:if condition="$show['sidebar']">
  <div id="content_container"<vb:if condition="$vboptions['sidebarposition'] == 0"> class="contentright"</vb:if>>
    <div id="content">
</vb:if>








<!-- main -->
{vb:raw main}
<!-- /main -->










<vb:if condition="$show['sidebar']">
    </div>
  </div>
  <div id="sidebar_container"<vb:if condition="$vboptions['sidebarposition'] == 0"> class="sidebarleft"</vb:if>>
    <a id="sidebar_button_link" href="#">
  <vb:if condition="$vboptions['sidebarposition'] == 0">
      <img id="sidebar_button" src="{vb:stylevar imgdir_misc}/tab-collapsed-left.png" alt="" />
  <vb:else />
      <img id="sidebar_button" src="{vb:stylevar imgdir_misc}/tab-collapsed.png" alt="" />
  </vb:if>
    </a>
    <ul id="sidebar">
{vb:raw sidebar}
    </ul>
  </div>
</vb:if>


{vb:raw footer}
</body>
</html>
Reply With Quote
Reply


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 08:57 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03830 seconds
  • Memory Usage 2,216KB
  • 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
  • (3)bbcode_html
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete