Welcome, Guest. Please login or register.
Did you miss your activation email?
February 13, 2012, 02:20:28 AM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
149700 Posts in 21103 Topics by 7538 Members
Latest Member: ionline
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Google search bar code does not display properly  (Read 1869 times)
bakerbuddy

Offline Offline

Posts: 28



« on: February 23, 2007, 11:12:34 PM »

I am using the Architekt template for my website.  I downloaded html code that displays a Google search bar.  I know the code works because I used it on a non-WebsiteBaker site.  However, the same code will not display properly in my WebsiteBaker built site. The search bar is truncated. Does anyone have any ideas how to make it work?  Following is the code:

<!-- Search Google -->
<center>
<form method="get" action="http://www.google.com/custom" target="google_window">
<table 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" align="middle"></img></a>
<br/>
<label for="sbi" style="display: none">Enter your search terms</label>
<input type="text" name="q" size="31" maxlength="255" value="" id="sbi"></input>
<label for="sbb" style="display: none">Submit search form</label>
<input type="submit" name="sa" value="Search" id="sbb"></input>
<input type="hidden" name="client" value="pub-8385042523435584"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="windows-1252"></input>
<input type="hidden" name="oe" value="windows-1252"></input>
<input type="hidden" name="safe" value="active"></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="en"></input>
</td></tr></table>
</form>
</center>
<!-- Search Google -->
Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6823


WWW
« Reply #1 on: February 23, 2007, 11:50:40 PM »

I think you can change the output by changing this line here:

Code:
<input type="text" name="q" size="31" maxlength="255" value="" id="sbi"></input>

change the "size="31"" to something smaller and test ...

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

bakerbuddy

Offline Offline

Posts: 28



« Reply #2 on: February 24, 2007, 12:34:54 AM »

I tried that suggestion, but it made no difference.  There is something in the code that is conflicting with some constraint in the template.  When you view the search bar in the WYSIWYG editor, it really spreads out across the page.
Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7665



WWW
« Reply #3 on: February 24, 2007, 06:36:55 AM »

Hello,

where did you put in the cod in the WYSIWYG Editor. Did you use the normal Window or the source code window of th WYSIWYG Editor and wich WYSIWYG Editor did you use?

Isn't it better to add the code in the index.php of the template or did you not want to have the code on every page?

Matthias
Logged
Hans aus Berlin

Offline Offline

Posts: 88



« Reply #4 on: February 24, 2007, 10:44:57 AM »

Hi,

if you want the Google-Search include in the Architekt-Template, have a look at this Code:
<?php if(SHOW_SEARCH) { ?>
         <form name="search" action="<?php echo WB_URL.'/search/index'.PAGE_EXTENSION; ?>" method="post">
         <input type="text" name="string" />
         <input type="submit" name="submit" value="Search" class="button" />
         </form>
      <?php } ?>

and change to:

<!-- Search Google -->

<form method="get" action="http://www.google.com/custom" target="google_window">
<table bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" width="110"height="32">
<a href="http://www.google.com/">
<img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"></img></a>
<br/>
<label for="sbi" style="display: none">Enter your search terms</label>
<input type="text" name="q" size="31" maxlength="255" value="" id="sbi"></input>
<label for="sbb" style="display: none">Submit search form</label>
<input type="submit" name="sa" value="Search" id="sbb"></input>
<input type="hidden" name="client" value="pub-8385042523435584"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="windows-1252"></input>
<input type="hidden" name="oe" value="windows-1252"></input>
<input type="hidden" name="safe" value="active"></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="en"></input>
</td></tr></table>
</form>

<!-- Search Google -->

Cheers Hans from Berlin
Logged
bakerbuddy

Offline Offline

Posts: 28



« Reply #5 on: February 26, 2007, 04:06:06 PM »

I only need the Google search bar on one or two pages, therefore I would not want to add this to the index.php.  As for the WYSIWYG editor, I'm using the one that comes with websitebaker.


Hello,

where did you put in the cod in the WYSIWYG Editor. Did you use the normal Window or the source code window of th WYSIWYG Editor and wich WYSIWYG Editor did you use?

Isn't it better to add the code in the index.php of the template or did you not want to have the code on every page?

Matthias
Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6823


WWW
« Reply #6 on: February 26, 2007, 04:14:47 PM »

if you don't want the search bar on every page, make a second template, where it (the code) is included and then assign this second template to the pages, where you want the google search to be visible.

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

bakerbuddy

Offline Offline

Posts: 28



« Reply #7 on: February 26, 2007, 04:22:14 PM »

Hi Hans,

Thanks for the suggestion.  Removing the <center> tag did seem to help a bit, but the search bar is still being squeezed into a narrow square.



Hi,

if you want the Google-Search include in the Architekt-Template, have a look at this Code:
<?php if(SHOW_SEARCH) { ?>
         <form name="search" action="<?php echo WB_URL.'/search/index'.PAGE_EXTENSION; ?>" method="post">
         <input type="text" name="string" />
         <input type="submit" name="submit" value="Search" class="button" />
         </form>
      <?php } ?>

and change to:

<!-- Search Google -->

<form method="get" action="http://www.google.com/custom" target="google_window">
<table bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" width="110"height="32">
<a href="http://www.google.com/">
<img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"></img></a>
<br/>
<label for="sbi" style="display: none">Enter your search terms</label>
<input type="text" name="q" size="31" maxlength="255" value="" id="sbi"></input>
<label for="sbb" style="display: none">Submit search form</label>
<input type="submit" name="sa" value="Search" id="sbb"></input>
<input type="hidden" name="client" value="pub-8385042523435584"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="windows-1252"></input>
<input type="hidden" name="oe" value="windows-1252"></input>
<input type="hidden" name="safe" value="active"></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="en"></input>
</td></tr></table>
</form>

<!-- Search Google -->

Cheers Hans from Berlin
Logged
Hans aus Berlin

Offline Offline

Posts: 88



« Reply #8 on: February 26, 2007, 07:11:52 PM »

Hi bakerbuddy,

please see to the picture in the Attach on. With me it looks good. Which PHP version do you have?

Greeting Hans
Logged
bakerbuddy

Offline Offline

Posts: 28



« Reply #9 on: February 26, 2007, 09:10:28 PM »

Hi Hans,

It seems to work for you.  I'll try giving it another shot.  The webhosting site I am using has version 4.2.3.11 of PHP installed.  That should be recent enough to support the template I am using.  I believe that part of my problem may be the default WYSIWYG editor that comes with websitebaker.  I notice that when I cut a paste the HTML code into the text mode of the editor, it changes some information and drops entire lines of code.  Any recommendations for a better editor that will work with websitebaker?

Hi bakerbuddy,

please see to the picture in the Attach on. With me it looks good. Which PHP version do you have?

Greeting Hans
Logged
doc
Guest
« Reply #10 on: February 26, 2007, 09:16:36 PM »

You may try the FCKEditor available on the addons repository.

Regards Christian
Logged
bakerbuddy

Offline Offline

Posts: 28



« Reply #11 on: February 26, 2007, 09:34:16 PM »

Thanks, Christian.  I'll give that a try.  The default editor does not seem to be working for me.

You may try the FCKEditor available on the addons repository.

Regards Christian
Logged
bakerbuddy

Offline Offline

Posts: 28



« Reply #12 on: February 26, 2007, 09:36:16 PM »

I edited the index.php as per your suggestion.  It works!  Thanks very much for your help.  Much appreciated. smiley

Hi bakerbuddy,

please see to the picture in the Attach on. With me it looks good. Which PHP version do you have?

Greeting Hans
Logged
Hans aus Berlin

Offline Offline

Posts: 88



« Reply #13 on: February 26, 2007, 09:48:09 PM »

Sorry for my english, I am not sure whether I understand you correctly. To work  with the template-code, you need Template-Edit from the addons repository. Did you install it?

To contents edit use I also the FCKEditor. Greeting and now a lot of fun with WB wink
Logged
bakerbuddy

Offline Offline

Posts: 28



« Reply #14 on: February 26, 2007, 10:33:27 PM »

Your english is just fine.  Yes, I have the template editor.  I did attempt to use it, but it would not save the changes.  I ended up editing the index.php with a simple text editor and FTPing it back to the template folder.  That worked.  I installed the FCKEditor, but for some reason it is not showing up under the Administration Tools on the Settings page.  Maybe I need to re-install it. 

Sorry for my english, I am not sure whether I understand you correctly. To work  with the template-code, you need Template-Edit from the addons repository. Did you install it?

To contents edit use I also the FCKEditor. Greeting and now a lot of fun with WB wink
Logged
Hans aus Berlin

Offline Offline

Posts: 88



« Reply #15 on: February 26, 2007, 11:17:26 PM »

correct permission?
Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7665



WWW
« Reply #16 on: February 27, 2007, 06:33:49 AM »

Hello,

Quote
Yes, I have the template editor.  I did attempt to use it, but it would not save the changes.

Set the folders and files of your template to chmod 777 then template edit has permission to save changes too.

Quote
I installed the FCKEditor, but for some reason it is not showing up under the Administration Tools on the Settings page.

To activate FCKEDitor as default WYSIWYG Editor go to settings - show advanced options and change in the field WYSIWYG Editor from HtmlArea to FCKEditor.

Matthias
Logged
bakerbuddy

Offline Offline

Posts: 28



« Reply #17 on: February 27, 2007, 01:40:33 PM »

Thanks, Matthias.  The FCKEditor works great.  I'll also make the chmod 777 change to the template folder.  Much appreciated.

Hello,

Quote
Yes, I have the template editor.  I did attempt to use it, but it would not save the changes.

Set the folders and files of your template to chmod 777 then template edit has permission to save changes too.

Quote
I installed the FCKEditor, but for some reason it is not showing up under the Administration Tools on the Settings page.

To activate FCKEDitor as default WYSIWYG Editor go to settings - show advanced options and change in the field WYSIWYG Editor from HtmlArea to FCKEditor.

Matthias
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!