Reklama

Poniżej wklejam jedno z zapytań, które wiesz bazę. Może to coś podpowie PHP-owcom.

SELECT comments.cid AS cid,
comments.subject AS comments_subject,
comments.nid AS comments_nid,

Poniżej wklejam jedno z zapytań, które wiesz bazę. Może to coś podpowie PHP-owcom.

SELECT comments.cid AS cid,
comments.subject AS comments_subject,
comments.nid AS comments_nid,
comments.pid As comments_pid,
comments.timestamp AS comments_timestamp,
comments.name AS comments_name,
comments.uid AS comments_uid,
comments.homepage AS comments_homepage,
comments.comment AS comments_comment,
comments.format AS comments_format,
history_user.timestamp AS history_user_timestamp,
history_user.nid AS history_user_nid,
node_comments.created AS node_comments_created,
node_comments.changed AS node_comments_changed,
node_comments__node_comment_statistics.last_comment_timestamp AS node_comments__node_comment_statistics_last_comment_timestamp,
node_comments.nid AS node_comments_nid FROM root_comments comments LEFT JOIN root_node node_comments ON comments.nid = node_comments.nid LEFT JOIN root_history history_user ON node_comments.nid = history_user.nid AND history_user.uid = 0 LEFT JOIN root_node_comment_statistics node_comments__node_comment_statistics ON node_comments.nid = node_comments__node_comment_statistics.nid and last_comment_uid<>519 WHERE (node_comments.status <> 0 OR node_comments.uid = 0) AND (UPPER(comments.name) != UPPER(‘Lustro’)) AND (UPPER(comments.name) != UPPER(‘MaciekS’)) AND (UPPER(comments.name) != UPPER(‘Leyte’)) and comments.nid<>201 and comments.nid<>292 and comments.nid<>344 and comments.nid<>355 and comments.nid<>380 and comments.nid<>450 and comments.nid<>465 and comments.nid<>520 and comments.nid<>522 and comments.nid<>526 and comments.nid<>554 and comments.nid<>579 and comments.nid<>586 and comments.nid<>604 and comments.nid<>624 and comments.nid<>707 and comments.nid<>738 and comments.nid<>739 and comments.nid<>740 and comments.nid<>784 and comments.nid<>800 and comments.nid<>801 and comments.nid<>802 and comments.nid<>803 and comments.nid<>815 and comments.nid<>898 and comments.nid<>934 and comments.nid<>966 and comments.nid<>985 and comments.nid<>1013 and comments.nid<>1022 and comments.nid<>1025 and comments.nid<>1048 and comments.nid<>1059 and comments.nid<>1062 and comments.nid<>1075 and comments.nid<>1091 and comments.nid<>1103 and comments.nid<>1112 and comments.nid<>1118 and comments.nid<>1131 and comments.nid<>1136 and comments.nid<>1158 and comments.nid<>1196 and comments.nid<>1198 and comments.nid<>1219 and comments.nid<>1228 and comments.nid<>1233 and comments.nid<>1237 and comments.nid<>1247 and comments.nid<>1254 and comments.nid<>1279 and comments.nid<>1308 and comments.nid<>1316 and comments.nid<>1330 and comments.nid<>1382 and comments.nid<>1439 and comments.nid<>1467 and comments.nid<>1512 and comments.nid<>1531 and comments.nid<>1595 and comments.nid<>1609 and comments.nid<>1620 and comments.nid<>1828 and comments.nid<>1836 and comments.nid<>1910 and comments.nid<>2112 and comments.nid<>2131 and comments.nid<>2263 and comments.nid<>2316 and comments.nid<>2319 and comments.nid<>2320 and comments.nid<>2323 and comments.nid<>2324 and comments.nid<>2334 and comments.nid<>2335 and comments.nid<>2341 and comments.nid<>2347 and comments.nid<>2348 and comments.nid<>2349 and comments.nid<>2359 and comments.nid<>2360 and comments.nid<>2361 and comments.nid<>2369 and comments.nid<>2371 and comments.nid<>2372 and comments.nid<>2380 and comments.nid<>2381 and comments.nid<>2382 and comments.nid<>2391 and comments.nid<>2392 and comments.nid<>2393 and comments.nid<>2404 and comments.nid<>2405 and comments.nid<>2406 and comments.nid<>2420 and comments.nid<>2421 and comments.nid<>2422 and comments.nid<>2434 and comments.nid<>2435 and comments.nid<>2436 and comments.nid<>2438 and comments.nid<>2440 and comments.nid<>2447 and comments.nid<>2451 and comments.nid<>2452 and comments.nid<>2453 and comments.nid<>2455 and comments.nid<>2459 and comments.nid<>2460 and comments.nid<>2467 and comments.nid<>2469 and comments.nid<>2470 and comments.nid<>2476 and comments.nid<>2477 and comments.nid<>2480 and comments.nid<>2483 and comments.nid<>2484 and comments.nid<>2485 and comments.nid<>2497 and comments.nid<>2498 and comments.nid<>2499 and comments.nid<>2509 and comments.nid<>2510 and comments.nid<>2511 and comments.nid<>2520 and comments.nid<>2521 and comments.nid<>2522 and comments.nid<>2525 and comments.nid<>2528 and comments.nid<>2529 and comments.nid<>2530 and comments.nid<>2533 and comments.nid<>2534 and comments.nid<>2535 and comments.nid<>2541 and comments.nid<>2542 and comments.nid<>2543 and comments.nid<>2548 and comments.nid<>2549 and comments.nid<>2550 and comments.nid<>2557 and comments.nid<>2558 and comments.nid<>2559 and comments.nid<>2567 and comments.nid<>2568 and comments.nid<>2570 and comments.nid<>2577 and comments.nid<>2578 and comments.nid<>2579 and comments.nid<>2585 and comments.nid<>2588 and comments.nid<>2589 and comments.nid<>2590 and comments.nid<>2592 and comments.nid<>2593 and comments.nid<>2599 and comments.nid<>2600 and comments.nid<>2601 and comments.nid<>2602 and comments.nid<>2608 and comments.nid<>2609 and comments.nid<>2610 and comments.nid<>2616 and comments.nid<>2617 and comments.nid<>2618 and comments.nid<>2629 and comments.nid<>2630 and comments.nid<>2631 and comments.nid<>2637 and comments.nid<>2638 and comments.nid<>2639 and comments.nid<>2643 and comments.nid<>2644 and comments.nid<>2645 and comments.nid<>2646 and comments.nid<>2654 and comments.nid<>2655 and comments.nid<>2656 and comments.nid<>2659 and comments.nid<>2660 and comments.nid<>2661 and comments.nid<>2670 and comments.nid<>2671 and comments.nid<>2672 and comments.nid<>2673 and comments.nid<>2679 and comments.nid<>2680 and comments.nid<>2681 and comments.nid<>2688 and comments.nid<>2689 and comments.nid<>2690 and comments.nid<>2704 and comments.nid<>2705 and comments.nid<>2706 and comments.nid<>2713 and comments.nid<>2714 and comments.nid<>2715 and comments.nid<>2716 and comments.nid<>2723 and comments.nid<>2724 and comments.nid<>2725 and comments.nid<>2732 and comments.nid<>2733 and comments.nid<>2734 and comments.nid<>2743 and comments.nid<>2744 and comments.nid<>2745 and comments.nid<>2748 and comments.nid<>2752 and comments.nid<>2753 and comments.nid<>2754 and comments.nid<>2762 and comments.nid<>2763 and comments.nid<>2764 and comments.nid<>2776 and comments.nid<>2777 and comments.nid<>2778 and comments.nid<>2787 and comments.nid<>2788 and comments.nid<>2789 and comments.nid<>2794 and comments.nid<>2795 and comments.nid<>2796 and comments.nid<>2807 and comments.nid<>2816 and comments.nid<>2817 and comments.nid<>2818 and comments.nid<>2829 and comments.nid<>2830 and comments.nid<>2831 and comments.nid<>2842 and comments.nid<>2844 and comments.nid<>2845 and comments.nid<>2848 and comments.nid<>2861 and comments.nid<>2862 and comments.nid<>2863 and comments.nid<>2888 and comments.nid<>2890 and comments.nid<>2891 and comments.nid<>2892 and comments.nid<>2893 and comments.nid<>2894 and comments.nid<>2896 and comments.nid<>2897 and comments.nid<>2905 and comments.nid<>2906 and comments.nid<>2907 and comments.nid<>2912 and comments.nid<>2913 and comments.nid<>2914 and comments.nid<>2920 and comments.nid<>2921 and comments.nid<>2922 and comments.nid<>2923 and comments.nid<>2928 and comments.nid<>2937 and comments.nid<>2938 and comments.nid<>2939 and comments.nid<>2942 and comments.nid<>2947 and comments.nid<>2949 and comments.nid<>2950 and comments.nid<>2951 and comments.nid<>2955 and comments.nid<>2956 and comments.nid<>2957 and comments.nid<>2969 and comments.nid<>2970 and comments.nid<>2971 and comments.nid<>2976 and comments.nid<>2977 and comments.nid<>2978 and comments.nid<>2997 and comments.nid<>2998 and comments.nid<>2999 and comments.nid<>3000 and comments.nid<>3001 and comments.nid<>3010 and comments.nid<>3011 and comments.nid<>3012 and comments.nid<>3013 and comments.nid<>3014 and comments.nid<>3015 and comments.nid<>3016 and comments.nid<>3017 and comments.nid<>3018 and comments.nid<>3019 and comments.nid<>3020 and comments.nid<>3021 and comments.nid<>3022 and comments.nid<>3023 and comments.nid<>3026 and comments.nid<>3027 and comments.nid<>3028 and comments.nid<>3037 and comments.nid<>3050 and comments.nid<>3051 and comments.nid<>3052 and comments.nid<>3064 and comments.nid<>3065 and comments.nid<>3066 and comments.nid<>3078 and comments.nid<>3080 and comments.nid<>3081 and comments.nid<>3082 and comments.nid<>3095 and comments.nid<>3096 and comments.nid<>3097 and comments.nid<>3114 and comments.nid<>3115 and comments.nid<>3116 and comments.nid<>3134 and comments.nid<>3135 and comments.nid<>3136 and comments.nid<>3141 and comments.nid<>3151 and comments.nid<>3153 and comments.nid<>3154 and comments.nid<>3164 and comments.nid<>3165 and comments.nid<>3166 and comments.nid<>3194 and comments.nid<>3195 and comments.nid<>3196 and comments.nid<>3212 and comments.nid<>3213 and comments.nid<>3214 and comments.nid<>3233 and comments.nid<>3234 and comments.nid<>3235 and comments.nid<>3242 and comments.nid<>3243 and comments.nid<>3244 and comments.nid<>3264 and comments.nid<>3265 and comments.nid<>3266 and comments.nid<>3275 and comments.nid<>3276 and comments.nid<>3277 and comments.nid<>3292 and comments.nid<>3293 and comments.nid<>3294 and comments.nid<>3306 and comments.nid<>3307 and comments.nid<>3308 and comments.nid<>3321 and comments.nid<>3322 and comments.nid<>3323 and comments.nid<>3329 and comments.nid<>3330 and comments.nid<>3331 and comments.nid<>3342 and comments.nid<>3343 and comments.nid<>3344 and comments.nid<>3351 and comments.nid<>3353 and comments.nid<>3354 and comments.nid<>3355 and comments.nid<>3363 and comments.nid<>3364 and comments.nid<>3365 and comments.nid<>3375 and comments.nid<>3376 and comments.nid<>3377 and comments.nid<>3387 and comments.nid<>3388 and comments.nid<>3389 and comments.nid<>3390 and comments.nid<>3404 and comments.nid<>3405 and comments.nid<>3406 and comments.nid<>3413 and comments.nid<>3414 and comments.nid<>3415 and comments.nid<>3422 and comments.nid<>3423 and comments.nid<>3424 and comments.nid<>3438 and comments.nid<>3439 and comments.nid<>3440 and comments.nid<>3454 and comments.nid<>3455 and comments.nid<>3456 and comments.nid<>3462 and comments.nid<>3463 and comments.nid<>3464 and comments.nid<>3474 and comments.nid<>3475 and comments.nid<>3476 and comments.nid<>3487 and comments.nid<>3488 and comments.nid<>3489 and comments.nid<>3497 and comments.nid<>3498 and comments.nid<>3499 and comments.nid<>3505 and comments.nid<>3506 and comments.nid<>3507 and comments.nid<>3509 and comments.nid<>3526 and comments.nid<>3527 and comments.nid<>3528 and comments.nid<>3543 and comments.nid<>3544 and comments.nid<>3545 and comments.nid<>3562 and comments.nid<>3567 and comments.nid<>3569 and comments.nid<>3570 and comments.nid<>3571 and comments.nid<>3588 and comments.nid<>3589 and comments.nid<>3590 and comments.nid<>3616 and comments.nid<>3617 and comments.nid<>3618 and comments.nid<>3671 and comments.nid<>3672 and comments.nid<>3673 and comments.nid<>3696 and comments.nid<>3697 and comments.nid<>3698 and comments.nid<>3711 and comments.nid<>3721 and comments.nid<>3722 and comments.nid<>3723 and comments.nid<>3751 and comments.nid<>3752 and comments.nid<>3753 and comments.nid<>3787 and comments.nid<>3788 and comments.nid<>3789 and comments.nid<>3817 and comments.nid<>3832 and comments.nid<>3833 and comments.nid<>3834 and comments.nid<>3858 and comments.nid<>3859 and comments.nid<>3860 and comments.nid<>3884 and comments.nid<>3885 and comments.nid<>3886 and comments.nid<>3979 and comments.nid<>3980 and comments.nid<>3981 and comments.nid<>4038 and comments.nid<>4039 and comments.nid<>4040 and comments.nid<>4072 and comments.nid<>4075 and comments.nid<>4077 and comments.nid<>4091 and comments.nid<>4115 and comments.nid<>4116 and comments.nid<>4117 and comments.nid<>4119 and comments.nid<>4135 and comments.nid<>4143 and comments.nid<>4144 and comments.nid<>4145 and comments.nid<>4153 and comments.nid<>4219 and comments.nid<>4227 and comments.nid<>4250 and comments.nid<>4267 and comments.nid<>4268 and comments.nid<>4269 and comments.nid<>4281 and comments.nid<>4282 and comments.nid<>4291 and comments.nid<>4303 and comments.nid<>4328 and comments.nid<>4329 and comments.nid<>4330 and comments.nid<>4331 and comments.nid<>4365 and comments.nid<>4368 and comments.nid<>4369 and comments.nid<>4372 and comments.nid<>4374 and comments.nid<>4375 and comments.nid<>4376 and comments.nid<>4377 and comments.nid<>4408 and comments.nid<>4426 and comments.nid<>4466 and comments.nid<>4469 and comments.nid<>4506 and comments.nid<>4516 and comments.nid<>4532 and comments.nid<>4533 and comments.nid<>4534 and comments.nid<>4538 and comments.nid<>4602 and comments.nid<>4635 and comments.nid<>4636 and comments.nid<>4637 and comments.nid<>4670 and comments.nid<>4691 and comments.nid<>4692 and comments.nid<>4693 and comments.nid<>4737 and comments.nid<>4738 and comments.nid<>4739
ORDER BY comments_timestamp DESC limit 5

Reklama
Poprzedni artykułWpis osobisty cz.2
Następny artykułpomidorek
Matka Kurka
Młody, wysportowany, inteligentny, przystojny, czuły mąż i ojciec. Geniusz i wirtuoz klawiatury, błyskotliwy analityk rzeczywistości wszelakiej. Kochany i rozchwytywany, bezkompromisowy, skromny, wyrozumiały. 1. Ulubiona potrawa: żur na zakwasie. 2. Ulubiona kapela: muzyka z tamtych lat. 3. Ulubiony kolor: brak danych. 4. Ulubione słowo: ja. Wolny, żonaty, pijący daltonista.

103 KOMENTARZE

  1. Bez znajomości tablic niewiele mogę…
    Ale możesz pominąć generowanie tych setek warunków.
    Fragment
    $query = “SELECT node.nid AS nid,
    node.uid as uid
    FROM {node} node
    LEFT JOIN {term_node} term_node_174 ON node.vid = term_node_174.vid AND term_node_174.tid = 174
    WHERE (term_node_174.tid = 174) and node.nid >50″;

    $queryResult = db_query($query);

    while ($nodescount = db_fetch_object($queryResult)) {

    $comments_priv .= ” and comments.nid<>“.$nodescount->nid.” “;

    }

    w ostatnio prezentowanym pliku PHP zastąp przez
    $comments_priv .= ”;

    – z zapytania znikną waruki “and comments.id<> …” –
    i przyjrzyj się, jak to wpłynęło na wybór ostatnich komentarzy.
    Być może zniknie blokowanie komentarzy z indywidualnych ignorów – jeżeli tak, trzeba przebudować ten mechanizm.

    EDIT: fragment do usunięcia aż do zamykającego “}”

    • Inaczej. Czy ktoś potrafi
      Inaczej. Czy ktoś potrafi napisać nowy kod, który odpowiadałby za zrzut komentarzy na SG w tkim ostylowaniu jak było? Bo to nic innego ten fragemnt upierdliwy jak blok z komentarzami plus funkcja wykluczania trolli z SG, na której mi nie zależy. Albo jeszcze inaczej, żeby z tego kodu co jest zostawić tylko tę cześć, która umieszcza 5 ostatnich komentarzy na SG, całą resztę wywalić. Jeszcze raz wklejam kod i jeśli ktoś to potrafi zrobić, prosiłbym aby po prostu poprawił kod i wkleił gotowy do nadpisania, bo ja naprawę średnio kumam.

      ‘, $right);

      $right=ereg_replace(‘

      ‘, ‘

      ‘, $right);

      $right=ereg_replace(“December”, “Grudzień”, $right);
      $right=ereg_replace(“November”, “Listopad”, $right);
      $right=ereg_replace(“September”, “Wrzesień”, $right);
      $right=ereg_replace(“October”, “Październik”, $right);
      $right=ereg_replace(“January”, “Styczeń”, $right);
      $right=ereg_replace(“February”, “Luty”, $right);
      $right=ereg_replace(“March”, “Marzec”, $right);
      $right=ereg_replace(“April”, “Kwiecień”, $right);

      $right=ereg_replace(“May”, “Maj”, $right);
      $right=ereg_replace(“Juni”, “Czerwiec”, $right);
      $right=ereg_replace(“July”, “Lipiec”, $right);
      $right=ereg_replace(“August”, “Sierpień”, $right);

      $right=ereg_replace(‘

      ndz.

      ‘, ‘

      ndz.

      ‘,$right);

      $right=ereg_replace(‘

      ‘, ‘

      ‘,$right);

      $right=ereg_replace(‘

      ‘, ‘

      ‘,$right);

      $right=ereg_replace(‘Ostatnio dodane odpowiedzi’, ”,$right);
      $right=ereg_replace(‘zaktualizowany’, ”,$right);
      $right=ereg_replace(‘Szybka odpowiedź’, ”,$right);

      if (!$user->roles[2]) $right=ereg_replace(‘Mój blog

    • Pisz bloga
    • ‘, ”,$right);

      print $right;

      $profile = profile_load_profile($user);
      $ignore = $user->profile_wpisy_ignorowanych;

      $ostatnie_odpowiedzi = $user->profile_ostatnie_odpowiedzi;
      if($ostatnie_odpowiedzi < 5) $ostatnie_odpowiedzi = 5; $ignorowani = ''; $ignorowani .= " AND (UPPER(comments.name) != UPPER('Lustro')) "; $ignorowani .= " AND (UPPER(comments.name) != UPPER('neospasmin')) "; $ignorowani .= " AND (UPPER(comments.name) != UPPER('MaciekS')) "; $ignorowani .= " AND (UPPER(comments.name) != UPPER('Leyte')) "; //$ignorowani .= " AND (UPPER(comments.name) != UPPER('zlotousty_klamca')) "; $query = "SELECT node.nid AS nid, node.uid as uid FROM {node} node LEFT JOIN {term_node} term_node_174 ON node.vid = term_node_174.vid AND term_node_174.tid = 174 WHERE (term_node_174.tid = 174) and node.nid >50″;

      $queryResult = db_query($query);

      while ($nodescount = db_fetch_object($queryResult)) {

      $comments_priv .= ” and comments.nid<>“.$nodescount->nid.” “;

      }

      $query=”SELECT comments.cid AS cid,
      comments.subject AS comments_subject,
      comments.nid AS comments_nid,
      comments.pid As comments_pid,
      comments.timestamp AS comments_timestamp,
      comments.name AS comments_name,
      comments.uid AS comments_uid,
      comments.homepage AS comments_homepage,
      comments.comment AS comments_comment,
      comments.format AS comments_format,
      history_user.timestamp AS history_user_timestamp,
      history_user.nid AS history_user_nid,
      node_comments.created AS node_comments_created,
      node_comments.changed AS node_comments_changed,
      node_comments__node_comment_statistics.last_comment_timestamp AS node_comments__node_comment_statistics_last_comment_timestamp,
      node_comments.nid AS node_comments_nid
      FROM root_comments comments
      LEFT JOIN root_node node_comments ON comments.nid = node_comments.nid
      LEFT JOIN root_history history_user ON node_comments.nid = history_user.nid AND history_user.uid = “.$user->uid.”
      LEFT JOIN root_node_comment_statistics node_comments__node_comment_statistics ON node_comments.nid = node_comments__node_comment_statistics.nid and last_comment_uid<>519
      WHERE (node_comments.status <> 0 OR node_comments.uid = “.$user->uid.”)”.$ignorowani.$comments_priv.”
      ORDER BY comments_timestamp DESC limit “.$ostatnie_odpowiedzi.””;

      $queryResult = db_query($query);

      ?>

  2. Bez znajomości tablic niewiele mogę…
    Ale możesz pominąć generowanie tych setek warunków.
    Fragment
    $query = “SELECT node.nid AS nid,
    node.uid as uid
    FROM {node} node
    LEFT JOIN {term_node} term_node_174 ON node.vid = term_node_174.vid AND term_node_174.tid = 174
    WHERE (term_node_174.tid = 174) and node.nid >50″;

    $queryResult = db_query($query);

    while ($nodescount = db_fetch_object($queryResult)) {

    $comments_priv .= ” and comments.nid<>“.$nodescount->nid.” “;

    }

    w ostatnio prezentowanym pliku PHP zastąp przez
    $comments_priv .= ”;

    – z zapytania znikną waruki “and comments.id<> …” –
    i przyjrzyj się, jak to wpłynęło na wybór ostatnich komentarzy.
    Być może zniknie blokowanie komentarzy z indywidualnych ignorów – jeżeli tak, trzeba przebudować ten mechanizm.

    EDIT: fragment do usunięcia aż do zamykającego “}”

    • Inaczej. Czy ktoś potrafi
      Inaczej. Czy ktoś potrafi napisać nowy kod, który odpowiadałby za zrzut komentarzy na SG w tkim ostylowaniu jak było? Bo to nic innego ten fragemnt upierdliwy jak blok z komentarzami plus funkcja wykluczania trolli z SG, na której mi nie zależy. Albo jeszcze inaczej, żeby z tego kodu co jest zostawić tylko tę cześć, która umieszcza 5 ostatnich komentarzy na SG, całą resztę wywalić. Jeszcze raz wklejam kod i jeśli ktoś to potrafi zrobić, prosiłbym aby po prostu poprawił kod i wkleił gotowy do nadpisania, bo ja naprawę średnio kumam.

      ‘, $right);

      $right=ereg_replace(‘

      ‘, ‘

      ‘, $right);

      $right=ereg_replace(“December”, “Grudzień”, $right);
      $right=ereg_replace(“November”, “Listopad”, $right);
      $right=ereg_replace(“September”, “Wrzesień”, $right);
      $right=ereg_replace(“October”, “Październik”, $right);
      $right=ereg_replace(“January”, “Styczeń”, $right);
      $right=ereg_replace(“February”, “Luty”, $right);
      $right=ereg_replace(“March”, “Marzec”, $right);
      $right=ereg_replace(“April”, “Kwiecień”, $right);

      $right=ereg_replace(“May”, “Maj”, $right);
      $right=ereg_replace(“Juni”, “Czerwiec”, $right);
      $right=ereg_replace(“July”, “Lipiec”, $right);
      $right=ereg_replace(“August”, “Sierpień”, $right);

      $right=ereg_replace(‘

      ndz.

      ‘, ‘

      ndz.

      ‘,$right);

      $right=ereg_replace(‘

      ‘, ‘

      ‘,$right);

      $right=ereg_replace(‘

      ‘, ‘

      ‘,$right);

      $right=ereg_replace(‘Ostatnio dodane odpowiedzi’, ”,$right);
      $right=ereg_replace(‘zaktualizowany’, ”,$right);
      $right=ereg_replace(‘Szybka odpowiedź’, ”,$right);

      if (!$user->roles[2]) $right=ereg_replace(‘Mój blog

    • Pisz bloga
    • ‘, ”,$right);

      print $right;

      $profile = profile_load_profile($user);
      $ignore = $user->profile_wpisy_ignorowanych;

      $ostatnie_odpowiedzi = $user->profile_ostatnie_odpowiedzi;
      if($ostatnie_odpowiedzi < 5) $ostatnie_odpowiedzi = 5; $ignorowani = ''; $ignorowani .= " AND (UPPER(comments.name) != UPPER('Lustro')) "; $ignorowani .= " AND (UPPER(comments.name) != UPPER('neospasmin')) "; $ignorowani .= " AND (UPPER(comments.name) != UPPER('MaciekS')) "; $ignorowani .= " AND (UPPER(comments.name) != UPPER('Leyte')) "; //$ignorowani .= " AND (UPPER(comments.name) != UPPER('zlotousty_klamca')) "; $query = "SELECT node.nid AS nid, node.uid as uid FROM {node} node LEFT JOIN {term_node} term_node_174 ON node.vid = term_node_174.vid AND term_node_174.tid = 174 WHERE (term_node_174.tid = 174) and node.nid >50″;

      $queryResult = db_query($query);

      while ($nodescount = db_fetch_object($queryResult)) {

      $comments_priv .= ” and comments.nid<>“.$nodescount->nid.” “;

      }

      $query=”SELECT comments.cid AS cid,
      comments.subject AS comments_subject,
      comments.nid AS comments_nid,
      comments.pid As comments_pid,
      comments.timestamp AS comments_timestamp,
      comments.name AS comments_name,
      comments.uid AS comments_uid,
      comments.homepage AS comments_homepage,
      comments.comment AS comments_comment,
      comments.format AS comments_format,
      history_user.timestamp AS history_user_timestamp,
      history_user.nid AS history_user_nid,
      node_comments.created AS node_comments_created,
      node_comments.changed AS node_comments_changed,
      node_comments__node_comment_statistics.last_comment_timestamp AS node_comments__node_comment_statistics_last_comment_timestamp,
      node_comments.nid AS node_comments_nid
      FROM root_comments comments
      LEFT JOIN root_node node_comments ON comments.nid = node_comments.nid
      LEFT JOIN root_history history_user ON node_comments.nid = history_user.nid AND history_user.uid = “.$user->uid.”
      LEFT JOIN root_node_comment_statistics node_comments__node_comment_statistics ON node_comments.nid = node_comments__node_comment_statistics.nid and last_comment_uid<>519
      WHERE (node_comments.status <> 0 OR node_comments.uid = “.$user->uid.”)”.$ignorowani.$comments_priv.”
      ORDER BY comments_timestamp DESC limit “.$ostatnie_odpowiedzi.””;

      $queryResult = db_query($query);

      ?>

  3. Bez znajomości tablic niewiele mogę…
    Ale możesz pominąć generowanie tych setek warunków.
    Fragment
    $query = “SELECT node.nid AS nid,
    node.uid as uid
    FROM {node} node
    LEFT JOIN {term_node} term_node_174 ON node.vid = term_node_174.vid AND term_node_174.tid = 174
    WHERE (term_node_174.tid = 174) and node.nid >50″;

    $queryResult = db_query($query);

    while ($nodescount = db_fetch_object($queryResult)) {

    $comments_priv .= ” and comments.nid<>“.$nodescount->nid.” “;

    }

    w ostatnio prezentowanym pliku PHP zastąp przez
    $comments_priv .= ”;

    – z zapytania znikną waruki “and comments.id<> …” –
    i przyjrzyj się, jak to wpłynęło na wybór ostatnich komentarzy.
    Być może zniknie blokowanie komentarzy z indywidualnych ignorów – jeżeli tak, trzeba przebudować ten mechanizm.

    EDIT: fragment do usunięcia aż do zamykającego “}”

    • Inaczej. Czy ktoś potrafi
      Inaczej. Czy ktoś potrafi napisać nowy kod, który odpowiadałby za zrzut komentarzy na SG w tkim ostylowaniu jak było? Bo to nic innego ten fragemnt upierdliwy jak blok z komentarzami plus funkcja wykluczania trolli z SG, na której mi nie zależy. Albo jeszcze inaczej, żeby z tego kodu co jest zostawić tylko tę cześć, która umieszcza 5 ostatnich komentarzy na SG, całą resztę wywalić. Jeszcze raz wklejam kod i jeśli ktoś to potrafi zrobić, prosiłbym aby po prostu poprawił kod i wkleił gotowy do nadpisania, bo ja naprawę średnio kumam.

      ‘, $right);

      $right=ereg_replace(‘

      ‘, ‘

      ‘, $right);

      $right=ereg_replace(“December”, “Grudzień”, $right);
      $right=ereg_replace(“November”, “Listopad”, $right);
      $right=ereg_replace(“September”, “Wrzesień”, $right);
      $right=ereg_replace(“October”, “Październik”, $right);
      $right=ereg_replace(“January”, “Styczeń”, $right);
      $right=ereg_replace(“February”, “Luty”, $right);
      $right=ereg_replace(“March”, “Marzec”, $right);
      $right=ereg_replace(“April”, “Kwiecień”, $right);

      $right=ereg_replace(“May”, “Maj”, $right);
      $right=ereg_replace(“Juni”, “Czerwiec”, $right);
      $right=ereg_replace(“July”, “Lipiec”, $right);
      $right=ereg_replace(“August”, “Sierpień”, $right);

      $right=ereg_replace(‘

      ndz.

      ‘, ‘

      ndz.

      ‘,$right);

      $right=ereg_replace(‘

      ‘, ‘

      ‘,$right);

      $right=ereg_replace(‘

      ‘, ‘

      ‘,$right);

      $right=ereg_replace(‘Ostatnio dodane odpowiedzi’, ”,$right);
      $right=ereg_replace(‘zaktualizowany’, ”,$right);
      $right=ereg_replace(‘Szybka odpowiedź’, ”,$right);

      if (!$user->roles[2]) $right=ereg_replace(‘Mój blog

    • Pisz bloga
    • ‘, ”,$right);

      print $right;

      $profile = profile_load_profile($user);
      $ignore = $user->profile_wpisy_ignorowanych;

      $ostatnie_odpowiedzi = $user->profile_ostatnie_odpowiedzi;
      if($ostatnie_odpowiedzi < 5) $ostatnie_odpowiedzi = 5; $ignorowani = ''; $ignorowani .= " AND (UPPER(comments.name) != UPPER('Lustro')) "; $ignorowani .= " AND (UPPER(comments.name) != UPPER('neospasmin')) "; $ignorowani .= " AND (UPPER(comments.name) != UPPER('MaciekS')) "; $ignorowani .= " AND (UPPER(comments.name) != UPPER('Leyte')) "; //$ignorowani .= " AND (UPPER(comments.name) != UPPER('zlotousty_klamca')) "; $query = "SELECT node.nid AS nid, node.uid as uid FROM {node} node LEFT JOIN {term_node} term_node_174 ON node.vid = term_node_174.vid AND term_node_174.tid = 174 WHERE (term_node_174.tid = 174) and node.nid >50″;

      $queryResult = db_query($query);

      while ($nodescount = db_fetch_object($queryResult)) {

      $comments_priv .= ” and comments.nid<>“.$nodescount->nid.” “;

      }

      $query=”SELECT comments.cid AS cid,
      comments.subject AS comments_subject,
      comments.nid AS comments_nid,
      comments.pid As comments_pid,
      comments.timestamp AS comments_timestamp,
      comments.name AS comments_name,
      comments.uid AS comments_uid,
      comments.homepage AS comments_homepage,
      comments.comment AS comments_comment,
      comments.format AS comments_format,
      history_user.timestamp AS history_user_timestamp,
      history_user.nid AS history_user_nid,
      node_comments.created AS node_comments_created,
      node_comments.changed AS node_comments_changed,
      node_comments__node_comment_statistics.last_comment_timestamp AS node_comments__node_comment_statistics_last_comment_timestamp,
      node_comments.nid AS node_comments_nid
      FROM root_comments comments
      LEFT JOIN root_node node_comments ON comments.nid = node_comments.nid
      LEFT JOIN root_history history_user ON node_comments.nid = history_user.nid AND history_user.uid = “.$user->uid.”
      LEFT JOIN root_node_comment_statistics node_comments__node_comment_statistics ON node_comments.nid = node_comments__node_comment_statistics.nid and last_comment_uid<>519
      WHERE (node_comments.status <> 0 OR node_comments.uid = “.$user->uid.”)”.$ignorowani.$comments_priv.”
      ORDER BY comments_timestamp DESC limit “.$ostatnie_odpowiedzi.””;

      $queryResult = db_query($query);

      ?>

    • Nie
      jest na blachę, to kod który Ty wysyłasz, PHP pobrał ignorowanych i wysłał zapytanie. Zapytanie przechwyciłeś i cudujesz.

      [edit]
      cholera, jest na blachę. bez sensu, przecież root ma listę ignorowanych.
      Znaczy dopisywałeś coś gdzieś do kodu, kiedyś, TAK czy NIE?

      • To dzieło magika Mikiego,
        To dzieło magika Mikiego, jeżeli chodzi o ignory to jego zajob był. Nic tam nie zmieniał nikt, kod jeśli zmieniałem, to według Waszych wskazówek. Na razie pomogła uwaga tetryka, hula póki co. Zatem jakbyś coś poprawiał to uwzględnij jego cięcie, bo zadziałało pozytywnie.

    • Nie
      jest na blachę, to kod który Ty wysyłasz, PHP pobrał ignorowanych i wysłał zapytanie. Zapytanie przechwyciłeś i cudujesz.

      [edit]
      cholera, jest na blachę. bez sensu, przecież root ma listę ignorowanych.
      Znaczy dopisywałeś coś gdzieś do kodu, kiedyś, TAK czy NIE?

      • To dzieło magika Mikiego,
        To dzieło magika Mikiego, jeżeli chodzi o ignory to jego zajob był. Nic tam nie zmieniał nikt, kod jeśli zmieniałem, to według Waszych wskazówek. Na razie pomogła uwaga tetryka, hula póki co. Zatem jakbyś coś poprawiał to uwzględnij jego cięcie, bo zadziałało pozytywnie.

    • Nie
      jest na blachę, to kod który Ty wysyłasz, PHP pobrał ignorowanych i wysłał zapytanie. Zapytanie przechwyciłeś i cudujesz.

      [edit]
      cholera, jest na blachę. bez sensu, przecież root ma listę ignorowanych.
      Znaczy dopisywałeś coś gdzieś do kodu, kiedyś, TAK czy NIE?

      • To dzieło magika Mikiego,
        To dzieło magika Mikiego, jeżeli chodzi o ignory to jego zajob był. Nic tam nie zmieniał nikt, kod jeśli zmieniałem, to według Waszych wskazówek. Na razie pomogła uwaga tetryka, hula póki co. Zatem jakbyś coś poprawiał to uwzględnij jego cięcie, bo zadziałało pozytywnie.

  4. Jerum pajtasz
    Teraz takie coś wyskakuje:

    warning: preg_replace() [function.preg-replace]: No ending matching delimiter ‘}’ found in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 827.
    warning: preg_replace() [function.preg-replace]: No ending matching delimiter ‘}’ found in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 829.
    warning: preg_replace() [function.preg-replace]: No ending delimiter ‘”‘ found in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 830.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 834.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 835.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 836.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 837.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 838.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 839.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 840.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 841.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 843.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 844.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 845.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 846.
    warning: preg_replace() [function.preg-replace]: Unknown modifier ‘n’ in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 849.
    warning: preg_replace() [function.preg-replace]: Unknown modifier ‘<' in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 851. warning: preg_replace() [function.preg-replace]: Unknown modifier '<' in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 853. warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 855. warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 856. warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 857.

  5. Jerum pajtasz
    Teraz takie coś wyskakuje:

    warning: preg_replace() [function.preg-replace]: No ending matching delimiter ‘}’ found in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 827.
    warning: preg_replace() [function.preg-replace]: No ending matching delimiter ‘}’ found in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 829.
    warning: preg_replace() [function.preg-replace]: No ending delimiter ‘”‘ found in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 830.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 834.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 835.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 836.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 837.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 838.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 839.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 840.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 841.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 843.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 844.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 845.
    warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 846.
    warning: preg_replace() [function.preg-replace]: Unknown modifier ‘n’ in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 849.
    warning: preg_replace() [function.preg-replace]: Unknown modifier ‘<' in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 851. warning: preg_replace() [function.preg-replace]: Unknown modifier '<' in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 853. warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 855. warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 856. warning: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash in /home/admin/domains/kontrowersje.net/public_html/themes/kontrowersje/page.tpl.php on line 857.