Topic: search problem

Hi, I use cute news 1.53 , and I have problem with search function . I type the word I want in the search box , and give me correct result , but when I click on the result line did not give me full story . Thank you.

Re: search problem

Hi, I use cute news 1.53 , and I have problem with search function . I type the word I want in the search box , and give me correct result , but when I click on the result line did not give me full story . Thank you.


Any Idea about this problem ?

Re: search problem

not closed ... I'm still waiting for any idea ...

4 (edited by 2014-06-18 08:59:22)

Re: search problem

Also had this problem, this was my solution: (Only difference is that I use cutenews 2.0.1, but maybe It will bring you somewhere)

In the php-file put this code first of everything else: (even before <html>, <head> etc.)
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?php

    require_once("cutenews/core/init.php");

    // Play with settings --------------------------------------------------
    $pw = REQ('pw');

    if ($pw['PHP_SELF']) $PHP_SELF = $pw['PHP_SELF'];

?></div>
then, where you want to put the search-box, place this: (I use it inside a <div> that's not necessary as far as I know)

<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>
<div id="search">
                <form action="<?php echo PHP_SELF; ?>" method="GET">
                    <input type="hidden" name="dosearch" value="Y" />
                    <div>
                        <input style="width: 200px; padding: 4px;" class="text" type="text" name="search" value="<?php echo cn_htmlspecialchars(REQ('search')); ?>" />
                        <input style="width: 60px; padding: 4px;"  class="submit" type="submit" value="Zoeken" />
                    </div>
                </form>
</div>
</div>
And finally, put the next piece of code where you want to include your search-results. In my case, it is the same as where I include my news:
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>
<?php
if ($_GET['search'])
{
include ("cutenews/search.php");
}
else
{
$number = "5";
include ("cutenews/show_news.php");
}
?>
</div>
Hope this works for you! Did the trick for me after hours of trying different stuff!

Re: search problem

thank you very much for your answer , I will try it . I hope to solve my problem . http://cutephp.com/forum/style_emoticons/default/rolleyes.gif