Hello Guest
No Avatar
Sign In to Remove

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - busterone

Pages: [1]
Posts: 
5
Posted: January 21, 2012, 7:36 AM
I like it a lot. Your tutorial has given me some new ideas for new headers and even footers to alter the default SMF theme.  As per my other topic, I am just learning PHP, but am pretty proficient with html and css, so as I learn php better, i see some great ideas in the works.
Thanks for the tutorial.  :)
Yep, I did. It works now.  I need to get away from the computer and go get a cup of coffee.
Thanks much.   :)
ooops  I get a parse error now. I attached the whole file. It seems that I must have missed something elsewhere and adding in your edit brought it out.
Cool. I knew it was a simple and rookie mistake, but I was bashing my brain trying to find it for over 2 hours.  :) I figured I would bring it here and see what I missed. I appreciate it much. I like the header, just had a few preferences for myself. Thanks again.  :)
I hope you can show me what I am missing. I have edited the theme source from the tutorial to change the header on Prince of Darkness by Antechinus. It is a curve variant. I have changed the class on a couple of items, and added it to css. I have also replaced the PM info in topbar to reflect unread posts and unread replies. I added the news to the middle bar div. I also changed the colors of course to match the dark theme. The theme works, sort of. :) There are no parse errors, but the middle div disappears upon logout.
I am sure it has to do with this- if ($context['user']['is_logged']) in the top_bar_guts div. 
When logged in, everything works and is where I want it, and then upon logout, the entire middle, middle_innner, and middle_guts div simply does not display, but everything else does. 
I am an extreme PHP novice, so I am guessing it is something simple.
here is just the portion that I have altered from index.template.php 

Code: [Select]
echo '
</head>
<body>';
}

function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
echo '
<div class="top_bar">
<div class="top_bar_inner" style="width: ', !empty($settings['forum_width']) ? $settings['forum_width'] : '' ,'">
<div class="top_bar_guts">
<div class="floatleft">';
if ($context['user']['is_logged'])
echo '
<span><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> &nbsp;
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></span>

</div>

<div class="floatright">
<span>', $context['current_time'], '</span>
</div>
</div>
</div>
</div>

<div class="middle">
<div class="middle_inner" style="width: ', !empty($settings['forum_width']) ? $settings['forum_width'] : '' ,'">
<div class="middle_guts">
<div class="logo_banner">
<a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>
</div>

<div class="middle_quick_search">
<div class="floatright">
<div class="themenews">
';
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<p>', $txt['news'], ': </p>
<p>', $context['random_news_line'], '</p>';
echo '
</div>
</div>
</div>
</div>
</div>
</div>

<div class="nav_bar">
<div class="nav_bar_inner" style="width: ', !empty($settings['forum_width']) ? $settings['forum_width'] : '' ,'">
<div class="nav_bar_guts">
', template_menu() ,'
</div>
</div>
</div>
';
echo !empty($settings['forum_width']) ? '
<div id="wrapper" style="width: ' . $settings['forum_width'] . '">' : '', '
';
// The main content should go here.
echo '
<div id="content_section"><div class="frame">
<div id="main_content_section">';
Pages: [1]