Hello,
I have installed serendipity, and I love it !!!
I have adjusted a lot of it to make it personal, but I want to have a google search bar under the "(Page 1 of 1, totalling 9 entries)" section.
I can't find where this code is generated.
In the source on the site (index) it displays this:
</div>
<div class='serendipity_entryFooter' style="text-align: center">
(Page 1 of 1, totalling 9 entries)
</div>
After this I want to put some code, But I can't find where to put it...
Could someone say where the file is that I should edit to make this happen ?
Creating little piece of Javascript under entries...
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
The footer part is outputted in the file serendipity_functions.inc.php, serendipity_printFooter()
However I suggest you to not change that but instead put the "google-link" inside the "layout.php" of your chosen template. So if you use the default template, the file can be found in templates/default/layout.php
Regards,
Garvin.
However I suggest you to not change that but instead put the "google-link" inside the "layout.php" of your chosen template. So if you use the default template, the file can be found in templates/default/layout.php
Regards,
Garvin.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Owk, I have the mt3-chalkboard template, but the folder does not contain a layout.php file.
The default dir does and I think it redirects there for the layout.php file.
However I wouldn't know how to put the code in that document
My weblog is http://blog.joolz.nl
The layout page =
But, the google footer is big.
Where do I put it exactly ?
The default dir does and I think it redirects there for the layout.php file.
However I wouldn't know how to put the code in that document
My weblog is http://blog.joolz.nl
The layout page =
Code: Select all
<?php # $Id: layout.php,v 1.20 2004/08/25 08:58:18 garvinhicking Exp $
include_once('serendipity_config.inc.php');
include_once(S9Y_INCLUDE_PATH . 'serendipity_plugin_api.php');
include_once(S9Y_INCLUDE_PATH . 'serendipity_sidebar_items.php');
?>
<div id="serendipity_banner">
<h1 align="center"><a class="homelink1" href="<?php echo $serendipity['baseURL']; ?>"><?php echo htmlspecialchars($serendipity['blogTitle']) ?></a></h1>
<?php
$sub = isset($serendipity['blogSubTitle']) ? $serendipity['blogSubTitle'] : $serendipity['blogDescription'];
if (strlen($sub)) {
?>
<h2 align="center"><a class="homelink2" href="<?php echo $serendipity['baseURL']; ?>"><?php echo $sub ?></a></h2>
<?php
}
?>
</div>
<div align="center">
<table id="mainpane">
<tr>
<?php
if (!$serendipity['embed'] || $serendipity['embed'] === 'false' || $serendipity['embed'] === false) {
serendipity_plugin_api::generate_plugins('left', 'td');
}
?>
<td id="content" valign="top">
<?php
if (!isset($serendipity['GET']['range']) || !is_numeric($serendipity['GET']['range'])) {
$serendipity['GET']['range'] = date('Ymd');
}
// The main area
switch ($serendipity['GET']['action']) {
// User wants to read the diary
case 'read':
if (isset($serendipity['GET']['id'])) {
serendipity_printEntries(array(serendipity_fetchEntry('id', $serendipity['GET']['id'])), 1);
} else {
serendipity_printEntries(serendipity_fetchEntries($serendipity['GET']['range'], true, 15));
}
break;
// User searches
case 'search':
$r = serendipity_searchEntries($serendipity['GET']['searchTerm']);
if ( strlen($serendipity['GET']['searchTerm']) <= 3 ) {
echo SEARCH_TOO_SHORT;
break;
}
if ($r === true) {
printf(NO_ENTRIES_BLAHBLAH, $serendipity['GET']['searchTerm']);
break;
}
printf(YOUR_SEARCH_RETURNED_BLAHBLAH, $serendipity['GET']['searchTerm'], count($r));
serendipity_printEntries($r);
break;
// Show the archive
case 'archives':
serendipity_printArchives();
break;
// Welcome screen or whatever
default:
serendipity_printEntries(serendipity_fetchEntries(null, true, 15));
}
?>
</td>
<?php
/* Find any plugins for the RHS */
if (!$serendipity['embed'] || $serendipity['embed'] === 'false' || $serendipity['embed'] === false) {
serendipity_plugin_api::generate_plugins('right', 'td');
}
?>
</tr>
</table>
</div>
Where do I put it exactly ?
Code: Select all
<!-- SiteSearch Google --><center><form method="get" action="http://www.google.nl/custom" target="_top"><table border="0" bgcolor="#ffffff"><tr><td nowrap="nowrap" valign="top" align="left" height="32"><a href="http://www.google.com/"><img src="http://www.google.com/logos/Logo_25wht.gif"border="0" alt="Google"></img></a></td><td nowrap="nowrap"><input type="hidden" name="domains" value="www.nder.be"></input><input type="text" name="q" size="31" maxlength="255" value=""></input><input type="submit" name="sa" value="Zoeken"></input></td></tr><tr><td> </td><td nowrap="nowrap"><table><tr><td><input type="radio" name="sitesearch" value="" checked="checked"></input><font size="-1" color="#000000">Web</font></td><td><input type="radio" name="sitesearch" value="www.nder.be"></input><font size="-1" color="#000000">www.nder.be</font></td></tr></table><input type="hidden" name="client" value="pub-1595042628308415"></input><input type="hidden" name="forid" value="1"></input><input type="hidden" name="ie" value="ISO-8859-1"></input><input type="hidden" name="oe" value="ISO-8859-1"></input><input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1;"></input><input type="hidden" name="hl" value="nl"></input></td></tr></table></form></center><!-- SiteSearch Google -->-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Okay, use this code:
As you can see, I inserted that before the closing </td> of the main body section, just below the footer.
Tell me if that works out for you
Code: Select all
<?php # $Id: layout.php,v 1.20 2004/08/25 08:58:18 garvinhicking Exp $
include_once('serendipity_config.inc.php');
include_once(S9Y_INCLUDE_PATH . 'serendipity_plugin_api.php');
include_once(S9Y_INCLUDE_PATH . 'serendipity_sidebar_items.php');
?>
<div id="serendipity_banner">
<h1 align="center"><a class="homelink1" href="<?php echo $serendipity['baseURL']; ?>"><?php echo htmlspecialchars($serendipity['blogTitle']) ?></a></h1>
<?php
$sub = isset($serendipity['blogSubTitle']) ? $serendipity['blogSubTitle'] : $serendipity['blogDescription'];
if (strlen($sub)) {
?>
<h2 align="center"><a class="homelink2" href="<?php echo $serendipity['baseURL']; ?>"><?php echo $sub ?></a></h2>
<?php
}
?>
</div>
<div align="center">
<table id="mainpane">
<tr>
<?php
if (!$serendipity['embed'] || $serendipity['embed'] === 'false' || $serendipity['embed'] === false) {
serendipity_plugin_api::generate_plugins('left', 'td');
}
?>
<td id="content" valign="top">
<?php
if (!isset($serendipity['GET']['range']) || !is_numeric($serendipity['GET']['range'])) {
$serendipity['GET']['range'] = date('Ymd');
}
// The main area
switch ($serendipity['GET']['action']) {
// User wants to read the diary
case 'read':
if (isset($serendipity['GET']['id'])) {
serendipity_printEntries(array(serendipity_fetchEntry('id', $serendipity['GET']['id'])), 1);
} else {
serendipity_printEntries(serendipity_fetchEntries($serendipity['GET']['range'], true, 15));
}
break;
// User searches
case 'search':
$r = serendipity_searchEntries($serendipity['GET']['searchTerm']);
if ( strlen($serendipity['GET']['searchTerm']) <= 3 ) {
echo SEARCH_TOO_SHORT;
break;
}
if ($r === true) {
printf(NO_ENTRIES_BLAHBLAH, $serendipity['GET']['searchTerm']);
break;
}
printf(YOUR_SEARCH_RETURNED_BLAHBLAH, $serendipity['GET']['searchTerm'], count($r));
serendipity_printEntries($r);
break;
// Show the archive
case 'archives':
serendipity_printArchives();
break;
// Welcome screen or whatever
default:
serendipity_printEntries(serendipity_fetchEntries(null, true, 15));
}
?>
<!-- SiteSearch Google --><center><form method="get" action="http://www.google.nl/custom" target="_top"><table border="0" bgcolor="#ffffff"><tr><td nowrap="nowrap" valign="top" align="left" height="32"><a href="http://www.google.com/"><img src="http://www.google.com/logos/Logo_25wht.gif"border="0" alt="Google"></img></a></td><td nowrap="nowrap"><input type="hidden" name="domains" value="www.nder.be"></input><input type="text" name="q" size="31" maxlength="255" value=""></input><input type="submit" name="sa" value="Zoeken"></input></td></tr><tr><td> </td><td nowrap="nowrap"><table><tr><td><input type="radio" name="sitesearch" value="" checked="checked"></input><font size="-1" color="#000000">Web</font></td><td><input type="radio" name="sitesearch" value="www.nder.be"></input><font size="-1" color="#000000">www.nder.be</font></td></tr></table><input type="hidden" name="client" value="pub-1595042628308415"></input><input type="hidden" name="forid" value="1"></input><input type="hidden" name="ie" value="ISO-8859-1"></input><input type="hidden" name="oe" value="ISO-8859-1"></input><input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1;"></input><input type="hidden" name="hl" value="nl"></input></td></tr></table></form></center><!-- SiteSearch Google -->
</td>
<?php
/* Find any plugins for the RHS */
if (!$serendipity['embed'] || $serendipity['embed'] === 'false' || $serendipity['embed'] === false) {
serendipity_plugin_api::generate_plugins('right', 'td');
}
?>
</tr>
</table>
</div>
Tell me if that works out for you
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/