Posted on: 04/22/08 02:36am
By: grant
I'm working on a theme and in my functions.php I have:
Text Formatted Code
$_CONF['left_blocks_in_footer'] = 1;
I'm not sure if that's the right way to do it?
Since template variables {button_advsearch} and {button_search} are apparently only available in header.thtml, how do I go about defining these in functions.php so they work in the footer template?
Thanks.
Re: Theme with left blocks in footer.
Posted on: 04/22/08 05:50am
By: Anonymous (ironmax)
The information you might be looking for is located in the leftblocks.thtml file of the professional theme. See file contents below. You should be able to use the information between the form tags and not have a problem. Unless of course I misunderstood the question above.
Michael
Text Formatted Code
<!-- Start of Left blocks -->
<td class="block-featured-left" style="vertical-align:top;">
<div class="searchform-box">
<form class="searchform-elements" action="{site_url}/search.php" method="GET">
<input type="text" name="query" size="28" maxlength="255"><br>
<input type="hidden" name="type" value="all">
<a href="{site_url}/search.php" class="advancedsearch">{button_advsearch}</a>
<input type="hidden" name="mode" value="search">
<input type="submit" value="{button_search}">
</form>
</div>
<div class="block-bg-left">
{geeklog_blocks}
<div class="block-bg-spreader"></div>
</div>
</td>
<td class="block-outerborder-left">
<div style="background:transparent; width:10px; height:1px;"></div>
</td>
Re: Theme with left blocks in footer.
Posted on: 04/22/08 02:39pm
By: grant
My leftblocks.thtml is called from the footer, the variables I listed are set in COM_siteHeader() I think.
Anyway the two variables don't work in my theme. My leftblocks.thtml looks pretty similar to the default one.
Re: Theme with left blocks in footer.
Posted on: 04/23/08 01:16am
By: geiss
Hi grant,
You might want to check out our
custom functions.php file which powers our upcoming theme release called
Nouveau[*2] . I think it might help you solve your issues.
Thx!
Eric
Re: Theme with left blocks in footer.
Posted on: 04/23/08 12:34pm
By: beewee
You can use also use normal html for the search function, a simple copy-paste of one of my sites:
Text Formatted Code
<form action="/search.php" method="get" style="display: inline;">
<input name="query" size="40" maxlength="50" type="text">
<input value=" Search " type="submit">
<input name="type" value="all" type="hidden">
<input name="mode" value="search" type="hidden"> <a href="/search.php" title="Extended search">(Extended search)</a></form>
Edit: when I find some time this summer, I'll make this theme a Geeklog theme, with the left blocks on the right:
http://www.waddenpromotie.nl[*3] . We've decided it didn't fit our purposes right, but since it's quite a nice and easy to adapt theme, it's a waste of time if nobody will use it.
BTW: nice theme, Geiss!
Re: Theme with left blocks in footer.
Posted on: 04/23/08 12:51pm
By: geiss
Quote by: grantMy leftblocks.thtml is called from the footer, the variables I listed are set in COM_siteHeader() I think.
Anyway the two variables don't work in my theme. My leftblocks.thtml looks pretty similar to the default one.
Ah, I think I understand what you're getting at now. Open lib-common.php and on line 1083-1084 copy:
Text Formatted Code
$header->set_var( 'button_search', $LANG_BUTTONS[9] );
$header->set_var( 'button_advsearch', $LANG_BUTTONS[10] );
and paste it into the COM_siteFooter function around line 1246, and make sure to change $header to $footer, like this:
Text Formatted Code
$footer->set_var( 'button_search', $LANG_BUTTONS[9] );
$footer->set_var( 'button_advsearch', $LANG_BUTTONS[10] );
I haven't tested this, but I think that should add the variables to the footer function.
Hope this helps!
Eric
Re: Theme with left blocks in footer.
Posted on: 04/23/08 05:51pm
By: grant
Eric, that is exactly what I was looking for, but want to know if I can do that in functions.php so I don't have to worry about upgrades. Of course, I could just hard code those things into the template file, I doubt anyone else will want to use this theme.
Thanks.
Re: Theme with left blocks in footer.
Posted on: 04/23/08 06:56pm
By: geiss
If you use the Caching Template Library with your theme, you can reference Language files directly. See the
CTL documentation[*4] for more info.
The community is always starved for themes. I would say share away! You'd be surprised at how many will download and use your work. I always am!
Thx!
Eric
Re: Theme with left blocks in footer.
Posted on: 04/25/08 01:26am
By: grant
The goal is an xhtml table-less valid theme, which based on experience and reading stuff here is hard. I went with a two column deal, header and stories on the left and blocks and the footer on the right. Pretty much just solid borders around everything.
If you can handle my shit upload speed I'll let you see it, feedback is always good, bad, or neutral so let's read (hear) it.
Issues:
- A million validation errors.
- Mismatched character encoding (I have no clue what I'm doing with IIS)
- Looks very Web 0.2!?
Have at it.
http://j.4xj.org/vinyl/[*5]
Re: Theme with left blocks in footer.
Posted on: 04/25/08 06:10am
By: beewee
Template Error: set_root: C:/Inetpub/wwwroot/vinyl/layout/vinyl is not a directory.
Halted.
Hmm, looks like you're working on it at the moment...
A small hint: Geeklog still generates the old < br > tags, and XHTML uses < br / > tags, so you better code your markup in HTML4.01 transitional to prevent errors. You can still make your semantic CSS theme of course
Re: Theme with left blocks in footer.
Posted on: 04/25/08 10:09am
By: geiss
The goal is an xhtml table-less valid theme, which based on experience and reading stuff here is hard.
Not anymore! The upcoming
Nouveau[*2] theme is all tableless (div/css) based. If you'll read about the new
functions.php[*1] file included with Nouveau, you'll find that all of those issues have been solved.
Thanks to this new functions.php file Mark coded:
- We now have SEO code, where the content column is rendered first in the code, followed by the left and right blocks. This, while also keeping the ability to dynamically show/hide the right blocks, no blocks, etc. structure that Geeklog is known for.
- We have already implemented the upcoming {xhtml} switch tag that is coming with Geeklog v1.5.
- Many other features which I'm too lazy to type here!
I encourage you to check out the
documentation[*6] we've been slaving over. That should whet your appetite. Feel free to email me if you would like to get a pre-release copy to test, and for your reference in working on your theme.
Like beewee, I wasn't able to resolve your site as well. But you're probably working away at it, so I'll check back periodically to take a peek. I look forward to seeing what you've done!
Thx!
Eric
Re: Theme with left blocks in footer.
Posted on: 04/25/08 11:07am
By: mevans
Quote by: geissThe goal is an xhtml table-less valid theme, which based on experience and reading stuff here is hard.
Not anymore! The upcoming
Nouveau[*2] theme is all tableless (div/css) based. If you'll read about the new
functions.php[*1] file included with Nouveau, you'll find that all of those issues have been solved.
Keep in mind, doing a XHTML table-less theme in Geeklog is not difficult, the difficult part is having a
dynamic 1, 2, and 3 column theme where it is 3 columns on one page and 2 columns on another page and possibly 1 on another. This is what the custom functions.php really enables.
If you are happy with a static 2 or 3 column layout throughout your site, making a standard Geeklog theme that is pure CSS based is pretty straight forward.
Thanks!
Mark
Re: Theme with left blocks in footer.
Posted on: 04/25/08 11:14am
By: geiss
Yeah, that's what I meant with:
This, while also keeping the ability to dynamically show/hide the right blocks, no blocks, etc. structure that Geeklog is known for.
But Mark phrases it much more eloquantly that I could. ...it's proabably because he's from Texas! :wink:
Thx!
Eric
Re: Theme with left blocks in footer.
Posted on: 04/25/08 12:51pm
By: grant
Quote by: beeweeTemplate Error: set_root: C:/Inetpub/wwwroot/vinyl/layout/vinyl is not a directory.
Halted.
Hmm, looks like you're working on it at the moment...
A small hint: Geeklog still generates the old < br > tags, and XHTML uses < br / > tags, so you better code your markup in HTML4.01 transitional to prevent errors. You can still make your semantic CSS theme of course
Should work now, thanks for pointing that out. I deleted that directory last night which was set as the default theme.
Many of those <br> tags are in the templates.
I'm aware two columns is pretty easy, the 3 column with header and footer is where I was having problems. I just can't get that working and stopped caring.
Thanks.