Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Themes
Author Message
christianb
Worker
Worker



Joined: Nov 24, 2004
Posts: 131
Location: Batesville, AR

PostPosted: Thu May 26, 2005 2:36 pm Reply with quote

My default theme is Kaput, mainly because it's an easy-on-the-eyes color scheme. My issue... I can't find a place on the web that details how to modify the search in the themeheader to search google, rather than topics. I've tried and failed in the past to incorporate this, as I would rather have it in one spot rather than two or thee. I wish to have a function similar to the google block I've seen before with a search box and two options, one for the website, one for the internet. It would be nice for it to open in a new window as well, rather than leave the site and have users wondering where the site is. I hope this has been asked before. If not, I appreciate the help just the same.

I've displayed the themeheader information below.

Code:
function themeheader() {

    global $user, $sitename;
    cookiedecode($user);
    $username = $cookie[1];
    if ($username == "") {
        $username = "Anonymous";
    }
    echo "<body bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#363636\" vlink=\"#363636\" alink=\"#d5ae83\">\n"
   ."<br>\n";
    if ($banners) {
   include("banners.php");
    }
    OpenTable();
    echo "<table border=\"0\"><tr><td rowspan=\"2\">"
   ."<a href=\"index.php\"><img src=\"themes/Kaput/images/logo.gif\" border=\"0\" alt=\""._WELCOMETO." $sitename\" align=\"left\"></a></td>"
   ."<td align=right width=100%>"
        ."<form action=\"search.html\" method=\"post\">"
        ."<font class=\"content\" color=\"#000000\"><b>"._SEARCH." </b>"
        ."<input type=\"text\" name=\"query\" size=\"14\"></font></form>"
        ."</td></tr><tr>"
        ."<td align=\"right\" valign=\"bottom\" width=\"100%\">"
        ."<font class=\"content\"><b>"
   ."<A href=\"/\">Home</a>&nbsp;&middot;&nbsp;<A href=\"topics.html\">Topics</a>&nbsp;&middot;&nbsp"
        ."<A href=\"downloads.html\">Downloads</a>&nbsp;&middot;&nbsp;<A href=\"account.html\">Your Account</a>"
        ."&nbsp;&middot;&nbsp;<A href=\"forums.html\">Forums</a>&nbsp;&middot;&nbsp;<A href=\"top.html\">Top 10</a>"
        ."</b></font></td></tr></table>\n";
    CloseTable();
    $public_msg = public_message();
    echo "$public_msg<br>";   
    echo "<table cellpadding=\"0\" cellspacing=\"0\" width=\"99%\" border=\"0\" align=\"center\" bgcolor=\"#ffffff\">\n"
   ."<tr><td bgcolor=\"#ffffff\" valign=\"top\">\n";
    blocks(left);
    echo "</td><td><img src=\"themes/NukeNews/images/pixel.gif\" width=\"15\" height=\"1\" border=\"0\" alt=\"\"></td><td width=\"100%\" valign=top>\n";
}

I am working on this, however, if there is a mod out there I would be more than happy to try it out.
Thanks!
 
View user's profile Send private message Visit poster's website
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Fri May 27, 2005 2:38 pm Reply with quote

Im no coder so I cannot help with that part of it but you might want to consider stripping the search function out completely and replacing it with one of googles newer search boxes, they now have one that will search the site or the web.
 
View user's profile Send private message Send e-mail
Deseroka
Client



Joined: Apr 15, 2003
Posts: 466
Location: FL

PostPosted: Fri May 27, 2005 9:01 pm Reply with quote

With Nukeum's help I put a Google search on all my pages by adding it into my header file & it shows on all pages. I had the site search in it also, but it stopped functioning properly & I've not had time to sit down and find out why, so I do still have the default search in action also.
Couldn't you just comment out the search box that is in your current header if you don't want to go messing with the code.
In the same line, I would am wanting to sit down and figure out how to remove all the alternate searches that come up after a 'from the box' search (alta vista, hot bot etc) and replace it with just a link for my google search.
If someone can tell me from the top of their head where exactly I can change that (so I don't have to go in search of) it would be much appreciated.
 
View user's profile Send private message
christianb







PostPosted: Tue May 31, 2005 11:49 am Reply with quote

I would like to get rid of the current search box, because that one only searches Topics. I would like to just use a google box up there instead of the current search box. I'll play with some code today and see what I get - If I get it working, I'll post the code so others can enjoy.
 
christianb







PostPosted: Tue May 31, 2005 1:30 pm Reply with quote

This is what I have so far,
Code:
   // Google Search Replacement <!-- Search Google -->

   ."<td align=right width=100%>"
   ."<FORM method=GET action=\"http://www.google.com/custom\">"
   ."<TABLE bgcolor=\"#FFFFFF\" cellspacing=\"0\" border=\"0\">"
   ."<tr valign=\"top\"><td>"
   ."<A HREF=\"http://www.google.com/search\">"
   ."<IMG SRC=\"http://www.google.com/logos/Logo_40wht.gif\" border=\"0\" ALT=\"Google\" align=\"middle\"></A>"
   ."</td>"
   ."<td>"
   ."<INPUT TYPE=\"text\" name=\"q\" size=\"31\" maxlength=\"255\" value=\"\">"
   ."<INPUT type=\"submit\" name=\"sa\" VALUE=\"Google Search\">"
   ."<INPUT type=\"hidden\" name=\"cof\" VALUE=\"S:http://www.christianboards.org;AH:center;LH:64;L:http://www.google.com;LW:320;AWFID:a9e70396ae9bc566;\">"
   ."<input type=\"hidden\" name=\"domains\" value=\"www.christianboards.org\"><br><input type=\"radio\" name=\"sitesearch\" value=\"\"> %(domain)s <input type=\"radio\" name=\"sitesearch\" value=\"www.christianboards.org\" checked> %(domain)s "
   ."</td></tr></TABLE>"
   ."</FORM>"
   // <!-- Search Google -->


EDIT: Replaced last code with this code - this works with a couple minor bugs

It can be viewed here: [ Only registered users can see links on this board! Get registered or login! ]
 
christianb







PostPosted: Tue May 31, 2005 2:49 pm Reply with quote

Ok, everything is working great now.

Here is the updated code:

Code:
   // Google Search Replacement <!-- Search Google -->

   ."<td align=right width=100%>"
   ."<FORM method=GET action=\"http://www.google.com/custom\">"
   ."<TABLE bgcolor=\"#FFFFFF\" cellspacing=\"0\" border=\"0\">"
   ."<tr valign=\"top\"><td>"
   ."<A HREF=\"http://www.google.com/search\">"
   ."<IMG SRC=\"http://www.google.com/logos/Logo_25wht.gif\" border=\"0\" ALT=\"Google\" align=\"middle\"></A>"
   ."</td>"
   ."<td>"
   ."<INPUT TYPE=\"text\" name=\"q\" size=\"23\" maxlength=\"255\" value=\"\">"
   ."<INPUT type=\"submit\" name=\"sa\" VALUE=\"Search\">"
   ."<INPUT type=\"hidden\" name=\"cof\" VALUE=\"S:http://www.christianboards.org;GL:0;AH:center;LH:64;L:http://www.christianboards.org/images/logo.gif;LW:320;AWFID:a9e70396ae9bc566;\">"
   ."<input type=\"hidden\" name=\"domains\" value=\"www.christianboards.org\"><br><input type=\"radio\" name=\"sitesearch\" value=\"\"> The Web <input type=\"radio\" name=\"sitesearch\" value=\"www.christianboards.org\" checked> Christianboards.org "
   ."</td></tr></TABLE>"
   ."</FORM>"
   // <!-- Search Google -->


What one needs to do if they want this in their header or whatever is to go here: [ Only registered users can see links on this board! Get registered or login! ] and register their site with Google, assuming you want this to work correctly. Then change the value code and website name after and including this line:
Code:
VALUE=\"S:http://www.christianboards.org;GL:0;AH:center;LH:64;L:http://www.christianboards.org/images/logo.gif;LW:320;AWFID:a9e70396ae9bc566;\">"
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Themes

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©