MyBB Community Forums

Full Version: Blue text on templates.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi what does the blue text mean that the template is broken? none of my header template's will update, there all showing like this image.

[Image: header.jpg]
Your master header template has been deleted so it's being treated as custom. Run this query in phpMyAdmin:

INSERT INTO mybb_templates (title,template,sid,version) VALUES('header', '<div id="container">
		<a name="top" id="top"></a>
		<div id="header">
			<div class="logo"><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></div>
			<div class="menu">
				<ul>
					<li><a href="{$mybb->settings['bburl']}/search.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/search.gif" alt="" title="" />{$lang->toplinks_search}</a></li>
					<li><a href="{$mybb->settings['bburl']}/memberlist.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/memberlist.gif" alt="" title="" />{$lang->toplinks_memberlist}</a></li>
					<li><a href="{$mybb->settings['bburl']}/calendar.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/calendar.gif" alt="" title="" />{$lang->toplinks_calendar}</a></li>
					<li><a href="{$mybb->settings['bburl']}/misc.php?action=help"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/help.gif" alt="" title="" />{$lang->toplinks_help}</a></li>
				</ul>
			</div>
			<hr class="hidden" />
			<div id="panel">
				{$welcomeblock}
			</div>
		</div>
		<hr class="hidden" />
		<br class="clear" />
		<div id="content">
			{$pm_notice}
			{$bannedwarning}
			{$bbclosedwarning}
			{$unreadreports}
			<navigation>
			<br />
', '-2', '1400');
I don't use phpmyadmin or anything else to run query's I run my site on SQLite.

Any other way too fix it?
Well, you need some sort of query to add the master template to the database again, I don't know SQLite syntax so unless someone else does, you'll need to adapt that query, or find a way to add the data in manually.
Would a plugin to run queries fit? There are two if I'm not wrong.
Possibly but I'm not sure if they would work with SQLite, they may only be built to deal with MySQL, but they're worth a try I guess.
(2009-07-08, 08:08 PM)faviouz Wrote: [ -> ]Would a plugin to run queries fit? There are two if I'm not wrong.

Guess Mini SQL wasn't worth the try after all my site has suddenly froze straight after I ran the query.

But now im pretty darn gutted just lost 3 theme's completely that took me week's.

EDIT: Ok nvm it cameback thank god.
You haven't lost the entire theme, just the header has a problem... doesn't your host give you access to sqlitemanager??
Nope phpmyadmin is banned because it so resource intensive so a few of the high tech people made a custom SQL db manager just waiting on a reply from them now over at my host's forum.

Also i just ran the query again and now give's this error.

http://h.imagehost.org/view/0644/Mini_SQL_Query_Page
Ah... well, I'm not sure if that's because the SQLite query structure is different from MySQL query structure, or because " and ' need to be escaped... try this, this is with " and ' escaped:

INSERT INTO mybb_templates (title,template,sid,version) VALUES('header', '<div id=\"container\">
        <a name=\"top\" id=\"top\"></a>
        <div id=\"header\">
            <div class=\"logo\"><a href=\"{$mybb->settings[\'bburl\']}/index.php\"><img src=\"{$theme[\'logo\']}\" alt=\"{$mybb->settings[\'bbname\']}\" title=\"{$mybb->settings[\'bbname\']}\" /></a></div>
            <div class=\"menu\">
                <ul>
                    <li><a href=\"{$mybb->settings[\'bburl\']}/search.php\"><img src=\"{$mybb->settings[\'bburl\']}/{$theme[\'imgdir\']}/toplinks/search.gif\" alt=\"\" title=\"\" />{$lang->toplinks_search}</a></li>
                    <li><a href=\"{$mybb->settings[\'bburl\']}/memberlist.php\"><img src=\"{$mybb->settings[\'bburl\']}/{$theme[\'imgdir\']}/toplinks/memberlist.gif\" alt=\"\" title=\"\" />{$lang->toplinks_memberlist}</a></li>
                    <li><a href=\"{$mybb->settings[\'bburl\']}/calendar.php\"><img src=\"{$mybb->settings[\'bburl\']}/{$theme[\'imgdir\']}/toplinks/calendar.gif\" alt=\"\" title=\"\" />{$lang->toplinks_calendar}</a></li>
                    <li><a href=\"{$mybb->settings[\'bburl\']}/misc.php?action=help\"><img src=\"{$mybb->settings[\'bburl\']}/{$theme[\'imgdir\']}/toplinks/help.gif\" alt=\"\" title=\"\" />{$lang->toplinks_help}</a></li>
                </ul>
            </div>
            <hr class=\"hidden\" />
            <div id=\"panel\">
                {$welcomeblock}
            </div>
        </div>
        <hr class=\"hidden\" />
        <br class=\"clear\" />
        <div id=\"content\">
            {$pm_notice}
            {$bannedwarning}
            {$bbclosedwarning}
            {$unreadreports}
            <navigation>
            <br />
', '-2', '1400');
Pages: 1 2