Topic: Search Box Madness

Hi
After spending countless hours I have finally managed to get Cutenews V2 correctly running on my two websites, having changed from previous versions.

The latest version is installed - the only changes I have made are to add extra links at the top of the control panel via default.skin.php. This does not impact at all on any other functions.

However, no matter what I try I am unable to place a working search box on my main news page.

I have tried all recommended versions of the search code without success.

I would greatly appreciate any help.

The pages have two show_news.php includes on the pages, one to show the short story and one to show the headlines only.

The pages can be seen at these links:

http://www.newsmedianews.com/headlines.php
and
http://www.thetruth.ie


I would like the seach box ( and results) to appear beneath the text

This page shows all items filed for the current month.


in the middle section of the page.

Thanks in advance for any help that can be given.

Re: Search Box Madness

Iam not shure if i get it right..
try this:

In the same page like index.php:

    <form  method="get" id="searchform" action="index.php">
    <input type="hidden" name="dosearch" value="Y" />
            
    <input type="text" value="Suche..." name="search" id="s" onfocus="defaultInput(this)" onblur="clearInput(this)" />
    <input type="submit" id="searchsubmit" value=" " />
    </form>

<?php

                /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                Here we decide what page to include
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
                if ($_GET['search'])
                {
                    include ("admin/search.php");
                }
                elseif ($_GET['do'] == 'archives')
                {
                    include ("admin/show_archives.php");
                }
                elseif ($_GET['do'] == "stats")
                {
                    echo "You can download the stats addon and include it here to show how many news, comments ... you have"; // include("$path/stats.php");
                }
                else
                {
                    include ("admin/show_news.php");
                }

                ?>


How did you fix the problem with Default Template
if i use my own template, it works for the Short Story but it use the default template if i want to see the full Story.


Hi

Thanks for your reply - tried it with the correct changes for file names, box shows OK but no search results returned.

Re: Search Box Madness

How did you fix the problem with Default Template
if i use my own template, it works for the Short Story but it use the default template if i want to see the full Story

Check the full story code section of your own template - if it works on the short story there is some code error of some sort.

Can you post the code of the template here ?

Re: Search Box Madness

May I come in to ask you how do you get your archives working properly if you are using CuteNews 2.0? https://cutephp.com/forum/style_emoticons/default/tongue.gif Thanks

Re: Search Box Madness

I made a test Template:
Short Story:

<!-- post -->
<div class="post">
<h1>[url={phpself}?id={page_alias}]{title}[/url]</h1>
<div class="n-comments">News</div>

<!-- shadow -->
<div class="thumb-shadow">

<!-- post-thumb -->
<div class="post-thumbnail">
<!-- meta -->
<ul class="meta">
 * <strong>Posted on</strong> {Date} 

 * <strong>By</strong> [url=#]Ansimuz[/url]
 
 *  <strong>Posted in</strong> 
<div class="meta-tags">
{tagline}
</div>


</ul>
<!-- ENDS meta -->
[url={phpself}?id={page_alias}][img]{NewsImage_Big}[/img][/url]
</div>
<!-- ENDS post-thumb -->

<div class="the-excerpt">
{short-story}
</div>
[url={phpself}?id={page_alias}]<span>Read more</span>[/url]

</div>
<!-- ENDS shadow -->
</div>
<!-- ENDS post -->


FULL Stroy:

<!-- Posts -->
<div id="posts" class="single">

<!-- post -->
<div class="post">
<h1>[url={phpself}?id={page_alias}]{title} TEST[/url]</h1>
                                
<!-- shadow -->
<div class="thumb-shadow">
                                
<!-- post-thumb -->
<div class="post-thumbnail">
[img]{NewsImage_Big}[/img]
</div>
<!-- ENDS post-thumb -->
 <div>
<p>{full-story}</p>
 </div>
 </div>
<!-- ENDS shadow -->
                                                    
<!-- meta -->
<ul class="meta">
 * <strong>Posted on</strong> {date} 

 * <strong>By</strong> [url=#]Ansimuz[/url]
 
 *  <strong>Posted in</strong> 
<div class="meta-tags">
{tagline}
</div>


</ul>
<!-- ENDS meta -->    
</div>
</div>

in my PHP iam using:

    $category = "4";
    $number = "10"; 
    $PHP_SELF = "testing.php";
    $template = "test";                                     
    include("admin/show_news.php");

the problem is, that it use the Default Template for the FULL STORY

Thanks for posting the code - sorry I can't help.

This looks like an issue with use of a page alias and probably needs to be addressed by the script coders.

Re: Search Box Madness

This bug has been fixed in the latest version which you can download from GitHub.

Best regards,
CN Support team

Posts: 10

Pages 1

You must login or register to post a reply

CutePHP Forums → Problem Solving / Help & Support → Search Box Madness