Author Topic: How can I exclude specific categories in my search  (Read 2722 times)

0 Members and 1 Guest are viewing this topic.

Offline bergblume

  • Sr. Member
  • ****
  • Posts: 463
  • on to the top!
    • View Profile
How can I exclude specific categories in my search
« on: July 13, 2010, 11:08:05 AM »
Hello together.
I already searched here in the forum for an answer to my question how it is possible that certain categories will excluded from my search results...
can somebody help?
thanks a lot!
bergblume

Rembrandt

  • Guest
Re: How can I exclude specific categories in my search
« Reply #1 on: July 13, 2010, 01:40:06 PM »
Hi!
das es dich auch noch gibt :)

suche in der search.php:

AND c.cat_id i.cat_id $cat_id_sql


füge danach ein:
AND i.cat_id NOT IN (".$cat_in.")

oberhalb der sql abfrage ( $sql = "SELECT i.image_id,....) fügst du diese zeile ein:

$cat_in 
"1,2";


in das array schreibst du deine cat_IDs.
alles weitere kannst du in diesen thread nachlesen:
http://www.4homepages.de/forum/index.php?topic=25131.msg137643#msg137643

punkt 3.) bezieht sich in deinen fall halt auf die search.php.

mfg Andi
[EDIT by V@no] little correction, can't use array in sql ;)[/EDIT]
you are right, @V@no....THX!
« Last Edit: July 13, 2010, 02:55:05 PM by Rembrandt »

Offline bergblume

  • Sr. Member
  • ****
  • Posts: 463
  • on to the top!
    • View Profile
Re: How can I exclude specific categories in my search
« Reply #2 on: July 13, 2010, 02:20:09 PM »
Hi Andi,

wie immer vielen vielen Dank...

ja, mich gibt es auch noch... programmiere momentan allerrdings eher wenig (da ja nun alles wie gewünscht funktioniert  :D )
Lese aber immer noch ab und zu mit...
hoffe dir geht es gut und du geniest den Sommer.

Viele Grüße
bergblume

P.S. ach ja.. anbei noch 2 kleine Facebook-Code-Schnipsel mit denen man seine Bilder auf Facebook "verteilen" und "empfehlen" kann

Code: [Select]
<a name="fb_share" type="button_count">Teilen</a> <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
Code: [Select]
<iframe src="http://www.facebook.com/plugins/like.php?href=http://<?php echo urlencode($_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']) ?>&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=75" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:75px; " allowTransparency="true"></iframe>
hat mir einiges an traffic gebracht!