Join 109,295 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,210 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!
On the following web page and all those pages associated with this software, there is no image showing for "Advanced Search". You can see the little red "x" caused by the missing image file or missing link to an image file. I want to remove the button entirely from the application since I have other links to get the user to an advanced search page. I am not sure, but think I have posted the code that creates the button with the red "x". How do I remove the button and consequently thered "x"? If this code is not what is needed to answer the question, please advise. Thank you in advance for your time and replies.
Web page showing button with missing graphics file.
$buttons.=makeButtons("$formatting_buttons/clear_form.$type","java script:clearForm()","Clear form"); $buttons.=makeButtons("$formatting_buttons/edit_search.$type","java script:last(\"$lookup\", \"$search\", \"$searchtype\", \"$wholeword\")","Edit last search"); //$buttons.=makeButtons("search_within.jpg","","Search within last search"); $buttons.=makeButtons("$formatting_buttons/help.$type","bible_supersearch_user_guide.html","Help","_new");
It is basically telling the script that if the search type is not advance post a link saying this. Granted we don't have enough of the code to disable it, we could give the image as something link "blank.gif" where the fileis a 1x1 fully transparent square.
If you post more of the code form the file I think we may be able to disable it altogether.
// File Version $bible_init_version=1.6; // Bible SuperSearch Short Version // Included in this file for convenience require_once("bible_system.php"); require_once("bible_config.php"); // Official Version is in "bible_lookup.php" $bss_version_short=$prod_version_short;
//error_reporting(E_ALL); //get submitted data if ($_POST!=null){$sub=$_POST;} else {$sub=$HTTP_POST_VARS;}
if ($sub==null){
if ($_GET!=null){$sub=$_GET;} else {$sub=$HTTP_GET_VARS;}
}// end if
require_once("bible_misc.php");
// retrieve the form variables from $sub $lookup=$sub["lookup"]; $search=$sub["search"]; $searchtype=$sub["searchtype"]; $submit=$sub["submit"];
if ((empty($submit))&&(!empty($prox))){ $search=$prox; $submit=true; $searchtype="proximity"; }
if (empty($lookup)){$lookup=$sub["lookup2"];} if ((empty($lookup))&&($sub["lookup3"]!="New Testament")){$lookup=$sub["lookup3"];}
if ((empty($lookup))&(!empty($chap2chap))){ $lookup="$chap2chap $chapter1"; if((!empty($verse1))&(!empty($chapter1))){$lookup.=":$verse1"; if(!empty($chapter2)){$lookup.="-$chapter2";} if (empty($search)){ $search=$sub["search2"]; if(!empty($verse2)){$lookup.=":$verse2";} }// end if }// end if }// end if
// THIS CONTROLS WHERE THE FORM LINKS TO // IN MOST CASES YOU DO NOT NEED TO MODIFY IF YOU ARE // RUNNING BIBLE SUPERSEARCH INDEPENDENTLY ON YOUR WEBSITE // Gets url for form submission // This insures that the form will submit properly even if the // user changes the filename from "bible_supersearch.php"
if ($HTTP_SERVER_VARS!=null){$url=$HTTP_SERVER_VARS['PHP_SELF'];} else {$url=$_SERVER['PHP_SELF'];}
// Uncomment the following code ONLY if you need to link this form // to another page other than itself. Edit the url to meet this need. // $url="http://www.biblesupersearch.com";
// defaultValue // sets default value if variable is empty // @ param variable - the variable // @ param default - the default value // @ return value - the value of the variable // Equals variable if variable is not empty // Equals defalut if variable is empty function defaultValue($variable, $default){
if (empty($variable)){return $default;} else {return $variable;}
}// end defaultValue
// youRequested // displays entered lookup and search querys // gives option of editing (repeating) last search // @ param - globals lookup and search // @ returns - none
function youRequested(){ global $lookup,$search,$searchtype,$wholeword,$within;
$exp.="$wh searched for <b>$search_noquoteexcape</b>";
} }//end if elseif(!empty($search)){$exp="$wh<b> $search_noquoteexcape</b>";} if (!empty($exp)){ return"<div style=\"left:auto; right:auto; width:auto;\"><div class=request>You requested: <a href='java script:last(\"$lookup\", \"$search\", \"$searchtype\", \"$wholeword\")' title='Edit this request' class=request>$exp</a></div></div>";} }//end youRequested
// editSearch // provides a html button that reinserts their last search into the form // @ param - none (uses global variables) // @ returns - none function editSearch($value="edit search"){
global $lookup,$search,$searchtype,$wholeword, $submit;
$options=array("All Words","Any Word", "Exact Phrase","Words Within 5 Verses","Words Within Same Chapter","Boolean Expression","Regular Expression"); $value=array("All Words","Any Word", "Exact Phrase","proximity","chapter","Boolean Search","regexp");
$i=0; while($op=$options[$i]){
$text.="<option value=\"".$value[$i]."\""; if ($value[$i]==$select){$text.=" selected>";} else{$text.=">";} $text.=" $op </option>";
$i++; }// end while $text.="</select>";
return $text; }// end searchOptions
function bibleversions($select="",$number=""){ global $version,$default_version; if (($select=="")&&($number=="")){$select=$default_version;}
//echo("||$select");
$query="select * from `bible_versions` order by `index`"; $res=mysql_query($query); //echo("|$select|"); $list=array(); while($list[]=mysql_fetch_array($res)){}// end while
//echo(count($list)); // only one Bible if (count($list)==2){ $v=$list[0]; return $v["fullname"]."<input type=hidden name=version value='".$v["shortname"]."'>"; //return; }// end if
// NO BIBLES if (count($list)==1){ return "ERROR: NO BIBLE INSTALLED";
$text=''; // generates drop down list using PHP and MySQL // don't use exept for generating the HTML for a list /* if ($testament=="ot"){ $res=mysql_query("SELECT * FROM `bible_books_$language` ORDER BY `number` LIMIT 39;");}
if ($testament=="nt"){ $res=mysql_query("SELECT * FROM `bible_books_$language` ORDER BY `number` LIMIT 39,27;");}
if ($testament=="all"){$res=mysql_query("SELECT * FROM `bible_books` ORDER BY `number`;");} */
if ($testament=="nt"){$lk="3";} else{$lk="2";} $text.="<select name=\"lookup".$lk."\" class='book_list'>";
if ($testament=="nt"){$text.="<option value=''> New Testament </option>";} else {$text.="<option value=''> Old Testament </option>";
$text.=otDropDown(); }// end else
if ($testament!="ot"){
if ($testament=="all"){$text.="<option value=''> New Testament </option>";}
$text.=ntDropDown();
}// end if
// generates drop down list using PHP and MySQL // don't use exept for generating the HTML for a list /* $i=0; while ($b=mysql_fetch_array($res)){
if ($i==39){echo("<option value=''> New Testament </option>");}
$buttons.=makeButtons("$formatting_buttons/clear_form.$type","java script:clearForm()","Clear form"); $buttons.=makeButtons("$formatting_buttons/edit_search.$type","java script:last(\"$lookup\", \"$search\", \"$searchtype\", \"$wholeword\")","Edit last search"); //$buttons.=makeButtons("search_within.jpg","","Search within last search"); $buttons.=makeButtons("$formatting_buttons/help.$type","bible_supersearch_user_guide.html","Help","_new");
// displays a tip about searching within specified passages function searchTip(){
global $submit;
if($submit!="true"){$text="<br><br><small>Tip: Entering both a passage and a search query will result in the limitation of the search to the specified passage(s).</small>";} else{$text="";}
global $version1, $version2, $version3, $version4;
$res=mysql_query("select count(*) from `bible_versions`"); $numbib=mysql_fetch_array($res); $numbib=$numbib["count(*)"];
//echo($numbib);
$text=bibleversions($version1,1);
if ($numbib>1){$text.=" ".bibleversions($version2,2)."<br>";} if ($numbib>2) {$text.=bibleversions($version3,3);} if ($numbib>3){$text.=" ".bibleversions($version4,4);}
Thank you. I tried both suggestions but we have a problem. When I inserted the new line, all I got was a white screen when I tried to bring up the web page. Then I tried inserting both the new line and getting rid of the else statement which also created only a white page when I tried to bring up the web page. Any suggestions?
One other note...
A bit off topic here, but the image that is supposed to be loaded onto the page, that is the image that does not load creating the red "x" is in the directory of images. The image is not being called properly.
I got some of the display issues resolved in that I got the graphic, a button saying "Advanced" to display. If there is no way to make that button disappear, I will close out the thread later on.
For archival purposes in case anyone else in the future encounters a similar issue, here is how the issue was resolved.
First, as Beta War suggested earlier in the thread, I made a blank jpg file and made that jpg file the target within the makebuttons code line. This erased the visible button but left an invisible hyperlink. To get rid of both of the visible button and the invisible hyperlink, I commented out the make button code line and made all the $ variables equal to nothing as is shown below.