Quicksearch/Suche: Color for border ?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Marcel
Regular
Posts: 22
Joined: Sun Feb 27, 2005 2:56 pm

Quicksearch/Suche: Color for border ?

Post by Marcel »

I'd like to modify the color of the border around the input box of Quicksearch/Suche (in the side bars).
Can anybody tell me what item I have to modify/insert into my template's CSS file?
Thanks!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Quicksearch/Suche: Color for border ?

Post by garvinhicking »

I need to know which Serendipity version you are using and if you are using the 'Livesearch' Event plugin. Then I can give you directions.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post by Guest »

Hi Garvin

I'm using 0.8-beta4 and the standard search plugin (which is installed by default)

Thanks for your help!
Marcel
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Then edit your style.css and use this:

Code: Select all

#serendipityQuickSearchTermField {
 border: 10px solid red;
}
Regards,
garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post by Guest »

Thanks, Garvin!
Regards, Marcel
Marcel
Regular
Posts: 22
Joined: Sun Feb 27, 2005 2:56 pm

Post by Marcel »

The guest above was me, sorry! :roll:
Marcel
destraynor

Post by destraynor »

Hi again,
Quick question, I am trying to get the serendipity livesearch working, but it doesn't display anything after saying "Waiting Sending Request". I have previously edited the look/feel of my input search box, and my question is Could that be the reason?
http://www.minds.may.ie/~dez/blog/

Thanks in advance.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Destraynor,

your problem seems to be that the search function fails. Please open your plugins/serendipity_event_livesearch/serendipity_event_livesearch.php plugin.

Search this code:

Code: Select all

                        case 'ls':
                            $res = serendipity_searchEntries($_REQUEST['s']);

                            if (is_array($res) && count($res) > 0) {
                                echo '<?xml version="1.0" encoding="utf-8" ?>';
                                echo '<div class="serendipity_livesearch_result">';
                                foreach($res AS $id => $entry) {
                                    echo '<div class="serendipity_livesearch_row"><a href="' . serendipity_archiveURL($entry['id'], $entry['title'], 'baseURL', true, array('timestamp' => $entry['timestamp'])) . '">' . htmlspecialchars($entry['title']) . '</a></div>';
                                }
                                echo '</div>';
                            }

                            break;
and modify this to:

Code: Select all

                        case 'ls':
                            header('X-Search: ' . $_REQUEST['s']);
                            $res = serendipity_searchEntries($_REQUEST['s']);

                            echo '<?xml version="1.0" encoding="utf-8" ?>';
                            echo '<div class="serendipity_livesearch_result">';

                            if (is_array($res) && count($res) > 0) {
                                foreach($res AS $id => $entry) {
                                    echo '<div class="serendipity_livesearch_row"><a href="' . serendipity_archiveURL($entry['id'], $entry['title'], 'baseURL', true, array('timestamp' => $entry['timestamp'])) . '">' . htmlspecialchars($entry['title']) . '</a></div>';
                                }
                                echo '</div>';
                            } else {
                                echo '<div class="serendipity_livesearch_row">' . print_r($res, true) . '</div>';
                            }

                            break;
That should give us important new results. You can check the new output by opening this URL:

Code: Select all

http://www.minds.may.ie/~dez/serendipity/index.php?/plugin/ls&s=coffee
Please tell us when you'Ve entered that so that I can have a look at it!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
destraynor

Post by destraynor »

Hi Garvin,
I have done that, my new livesearch.php can be seen here...
http://www.minds.nuim.ie/~dez/serendipi ... earch.phps
(the s at the end is not a typo, its the only way you can see the file)

But for some reason, I amn't seeing anything here:
http://www.minds.may.ie/~dez/serendipit ... s&s=coffee

Garvin, you've been extremely helpful and patient with me so far so thanks.
If it seems like I am asking loads of questions, its because I am the
person responsible for making all the s9y blogs work on Planet Minds.

I'll be picking something off your wishlist for you soon.

Des
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hm, okay. It seems that the URL matching is not doing properly. Please modify the block again to read:

Code: Select all

                        case 'ls':
                            header('X-Search: ' . htmlspecialchars($eventData) . ' leads to ' . preg_replace('@[^a-z0-9 \.\-_]@i', '', $_REQUEST['s']));
                            $res = serendipity_searchEntries($_REQUEST['s']);

                            echo '<?xml version="1.0" encoding="utf-8" ?>';
                            echo '<div class="serendipity_livesearch_result">';

                            if (is_array($res) && count($res) > 0) {
                                foreach($res AS $id => $entry) {
                                    echo '<div class="serendipity_livesearch_row"><a href="' . serendipity_archiveURL($entry['id'], $entry['title'], 'baseURL', true, array('timestamp' => $entry['timestamp'])) . '">' . htmlspecialchars($entry['title']) . '</a></div>';
                                }
                            } else {
                                echo '<div class="serendipity_livesearch_row">' . print_r($res, true) . '</div>';
                            }

                            echo '</div>';

                            break;
That will give me an additional HTTP header output I can use to debug what's going on!

You're not asking too much, so no problem here :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
destraynor

Post by destraynor »

Okay , I have modified the livesearch.php,

http://www.minds.may.ie/~dez/serendipit ... s&s=coffee
This still returns nothing however.

You can see the modified file here:
http://www.minds.nuim.ie/~dez/serendipi ... earch.phps

I'm pretty stumped, is it possible that this could be a permissions issue or something odd like that ?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

I got the error!

Please download http://svn.berlios.de/viewcvs/*checkout ... search.php and replace it with your file.

The change is to replace

Code: Select all

lsbase = "' . $serendipity['baseURL'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . 'plugin/ls' . ($serendipity['rewrite'] == 'none' ? '&' : '?') . '";
with

Code: Select all

lsbase = "' . $serendipity['baseURL'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . 'plugin/ls' . ($serendipity['rewrite'] == 'none' ? '_&' : '?') . '";
Note the "&" getting replaced to "&_". The error could occur like in your case when people are not using any URL rewriting.

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
destraynor

Post by destraynor »

That worked perfectly,
Thanks a million Garvin.
Post Reply