Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

How to add a panel with your/my code?

go to includes/multisite.php - include in the code.

Quote

define("SCORE", DB_PREFIX."scores_0"wink;



Now, use ".SCORE." to represent your connection to the new addition of the table.

so your query will be...

Quote


$result = dbquery("SELECT * FROM ".SCORE." ORDER BY $scorea ASC"wink;
if (dbrows($result) !=="0"wink {

echo "<div>";
while ($data = dbarray($result)) {
echo "<p>".$row['ip']."</p>";
echo "....";
}

} else { echo "Did not find anything"; }


Do not need open or close. Our core does that automatically on end of the page.

P.S: Learn our documentation please. Check the syntax we build. It's very easy once you get to know them.
This one has me stumped. I am trying to make a search panel which will search for ALL words, not ANY word. This is displaying on a custom page with instructions for using search within ARTICLES. (Articles and custom pages are the only features I am using) Here is the code for my panel:
CodeDownload  
    
    openside("my search");
    echo "<form id='searchform' name='searchform' method='get' action='".BASEDIR."search.php'>\n";
    echo "<input type='text' name='stext' value='".urldecode($_GET['stext'])."' class='textbox' style='width:875px' />\n";
    echo "<label><input type='hidden' name='stype' value='articles'".($_GET['stype'] == "news" ? " checked='checked'" : "")." onclick=\"display(this.value)\" /></label><br>\n";
    echo "<input type='submit' name='search' value='Search' class='button' /> &nbsp;<input type='reset' name='reset' value='Reset' class='button' />\n</form>\n";
    closeside();
    ?>


I am sure it is a simple line of code I am missing. What would be ideal is to have radio buttons on the search panel one for "Any word" and one for "All words". Any help in this matter would be greatly appreciated.
What is exactly the problem?

When I paste your code in an panel and enable it, the panel shows up.

PHP-Fusion 7.02.7.
Correct... when I do a search it looks for ANY word. I want it to look for ALL words. Example:
A search for "Apples Oranges" will list results for all pages containing at least ONE of those words. I want my search panel to show results for pages which only contain BOTH words.

UPDATE: I figured out how to get what I wanted.
CodeDownload  

include LOCALE.LOCALESET."search.php";
openside("Distro Hub Search");
echo "<center><form id='searchform' name='searchform' method='get' action='".BASEDIR."search.php'>\n";
echo "<center><input type='text' name='stext' value='".urldecode($_GET['stext'])."' class='textbox' style='width:500px' />\n";
echo "<center><label><input type='hidden' name='method' value='AND'".($_GET['method'] == "articles" ? " checked='checked'" : "")." onclick=\"display(this.value)\" /></label><br>\n";
echo "<label><input type='hidden' name='stype' value='articles'".($_GET['stype'] == "articles" ? " checked='checked'" : "")." onclick=\"display(this.value)\" /></label><br>\n";
echo "<center><input type='submit' name='search' value='Search' class='button' /> &nbsp;<input type='reset' name='reset' value='Reset' class='button' />\n</form>\n";
closeside();
?>


Originally I added these lines:
CodeDownload  

echo "<label><input type='radio' name='method' value='OR'".($_GET['method'] == "OR" ? " checked='checked'" : "")." /> ".$locale['403']."</label><br />\n";
echo "<label><input type='radio' name='method' value='AND'".($_GET['method'] == "AND" ? " checked='checked'" : "")." /> ".$locale['404']."</label></td>\n";


but they messed up my panel appearance. The first set of code is working to my satisfaction so I am a happy camper.
Thread Information
Author
Replies
24 posts
Views
25,285 times
Last Post
Last updated on 5 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.