Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [cutenews PHP] Błąd nad komentarzami
arik
post 19.03.2008, 14:30:27
Post #1





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 13.03.2008

Ostrzeżenie: (0%)
-----


Witam !

Na mojej stronie www.herthabsc.boo.pl wystąpił problem. W newsach, gdy zobaczę pełną treść pojawia się błąd (pod treścią, a nad komentarzami)

Warning: Division by zero in /home/accounts_h/herthabsc/public_html/cutenews/inc/functions.inc.php on line 259

Nie wiem co zrobić, żeby się go pozbyć. Zauważyłem, że serwer zmiena nazwy plików z dużej na małą, ale sprawdzałem pliki i wszystkie są dobrze napisane.



Go to the top of the page
+Quote Post
czaru
post 19.03.2008, 14:37:07
Post #2





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 17.03.2008

Ostrzeżenie: (0%)
-----


Wklej może kawałek kodu z pliku functions.inc.php tak od 240 do 280 linijki lub wiecej tongue.gif

Ten post edytował czaru 19.03.2008, 14:37:45
Go to the top of the page
+Quote Post
arik
post 19.03.2008, 20:15:52
Post #3





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 13.03.2008

Ostrzeżenie: (0%)
-----


  1. <?php
  2. return $result;
  3. }
  4.  
  5. ////////////////////////////////////////////////////////
  6. // Function:  insertSmilies
  7. // Description: insert smilies for adding into news/comments
  8.  
  9. function insertSmilies($insert_location, $break_location = FALSE)
  10. {
  11. global $config_http_script_dir, $config_smilies;
  12.  
  13. $smilies = explode(",", $config_smilies);
  14. foreach($smilies as $smile)
  15. {
  16. $i++; $smile = trim($smile);
  17.  
  18. $output .= "<a href=\"javascript:insertext(':$smile:','$insert_location')\"><img style=\"border: none;\" alt=\"$smile\" src=\"$config_http_script_dir/data/emoticons/$smile.gif\" /></a>";
  19. if($i%$break_location == 0 and $break_location)
  20. {
  21. $output .= "<br />";
  22. }else{ $output .= "&nbsp;"; }
  23. }
  24. return $output;
  25. }
  26.  
  27. ////////////////////////////////////////////////////////
  28. // Function:  replace_comments
  29. // Description: Replaces comments charactars
  30. function replace_comment($way, $sourse){
  31. global $config_allow_html_in_news, $config_allow_html_in_comments, $config_http_script_dir, $config_smilies;
  32.  
  33. $sourse = stripslashes(trim($sourse));
  34.  
  35. if($way == "add"){
  36.  
  37. $find = array(
  38. "'\"'",
  39. "'''",
  40. "'<'",
  41. "'>'",
  42. "'|'",
  43. "'\n'",
  44. "'r'",
  45.  );
  46. ?>
Powód edycji: poprawiłem bbcode (cysiaczek)
Go to the top of the page
+Quote Post
Cysiaczek
post 19.03.2008, 20:56:16
Post #4





Grupa: Moderatorzy
Postów: 4 465
Pomógł: 137
Dołączył: 26.03.2004
Skąd: Gorzów Wlkp.




  1. <?php
  2. if($i%$break_location == 0 and $break_location)
  3. //na i zobacz
  4. if($break_location>&& $i%$break_location == 0 )
  5. ?>


--------------------
To think for yourself you must question authority and
learn how to put yourself in a state of vulnerable, open-mindedness;
chaotic, confused, vulnerability, to inform yourself.
Think for yourself. Question authority.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 18.06.2025 - 02:15