Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Problem z cutenews
Klaudia
post 1.04.2006, 22:36:04
Post #1





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 1.04.2006

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


Hej! Mam ogromna prosbe do Was! Zainstalowalam cutenews i gdy dodaje kolejnego newsa robi mi sie wielki odstep miedzy pierwszym a drugim sad.gif Adres mojej strony to: http://joshholloway.prv.pl/ Czy moglby mi ktos powiedziec co mam zrobic, zeby newsy pokazywaly sie jeden pod drugim? Prosze smile.gif

Z gory dziekuje i pozdrawiam winksmiley.jpg
Go to the top of the page
+Quote Post
bronx
post 1.04.2006, 22:44:25
Post #2





Grupa: Zarejestrowani
Postów: 333
Pomógł: 0
Dołączył: 4.03.2004

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


pokaż kod za pomocą którego wyświetlane są newsy smile.gif
Go to the top of the page
+Quote Post
Klaudia
post 1.04.2006, 22:48:50
Post #3





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 1.04.2006

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


Kod
<div style="width: 455; height: 900; ">
      <p style="margin-top: 1; margin-bottom: 1"><?php
include("cutenews/show_news.php");
?> </p><p style="margin-top: 1; margin-bottom: 1"><?php
include("cutenews/show_archives.php");
?></p>
      </div>
Go to the top of the page
+Quote Post
bronx
post 1.04.2006, 22:59:38
Post #4





Grupa: Zarejestrowani
Postów: 333
Pomógł: 0
Dołączył: 4.03.2004

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


hehe, no właśnie pokaż ten kod "show_news.php", albo jeżeli za duży odstęp jest między newsami a newsami archiwalnymi to zamień <p style"... na <div style...
Go to the top of the page
+Quote Post
Klaudia
post 1.04.2006, 23:05:30
Post #5





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 1.04.2006

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


No zmienilam i nic to nie dalo sad.gif
A tu jest ten kod:

Kod
<?php

error_reporting (E_ALL ^ E_NOTICE);

$cutepath =  __FILE__;
$cutepath = preg_replace( "'\\\show_news\.php'", "", $cutepath);
$cutepath = preg_replace( "'/show_news\.php'", "", $cutepath);

require_once("$cutepath/inc/functions.inc.php");
require_once("$cutepath/data/config.php");

// If we are showing RSS, include some need variables.
if($template == 'rss'){
   include("$cutepath/data/rss_config.php");
}

//----------------------------------
// Check if we are included by PATH
//----------------------------------
if($HTTP_SERVER_VARS["HTTP_ACCEPT"] or $HTTP_SERVER_VARS["HTTP_ACCEPT_CHARSET"] or $HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"] or $HTTP_SERVER_VARS["HTTP_CONNECTION"]){ /* do nothing */ }
elseif(eregi("show_news.php", $PHP_SELF)){
die("<h4>CuteNews has detected that you are including show_news.php using the URL to this file.<br>
This is incorrect and you must include it using the PATH to show_news.php</h4><br>Example:<br>
this is <font color=red>WRONG</font> :&nbsp;&nbsp; &lt;?php include(\"http://yoursite.com/cutenews/show_news.php\"); ?&gt;<br>
this is <font color=green>CORRECT</font>:&nbsp;&nbsp; &lt;?php include(\"cutenews/show_news.php\"); ?&gt;<br>
<br><BR>// <font size=2>if you think this message shouldn't be shown, open show_news.php and delete it from there</font>");
}
//----------------------------------
// End of the check
//----------------------------------

if(!isset($subaction) or $subaction == ""){ $subaction = $POST["subaction"]; }

if(!isset($template) or $template == "" or strtolower($template) == "default"){ require_once("$cutepath/data/Default.tpl"); }
else{
        if(file_exists("$cutepath/data/${template}.tpl")){ require("$cutepath/data/${template}.tpl"); }
    else{ die("Error!<br>the template <b>".htmlspecialchars($template)."</b> does not exists, note that templates are case sensetive and you must write the name exactly as it is"); }
}

// Prepare requested categories
if(eregi("[a-z]", $category)){
        die("<b>Error</b>!<br>CuteNews has detected that you use \$category = \"$category\"; but you can call the categories only with their <b>ID</b> numbers and not with names<br>
    example:<br><blockquote>&lt;?php<br>\$category = \"1\";<br>include(\"path/to/show_news.php\");<br>?&gt;</blockquote>");
}
$category = preg_replace("/ /", "", $category);
$tmp_cats_arr = explode(",", $category);
foreach($tmp_cats_arr as $key=>$value){
    if($value != ""){ $requested_cats[$value] = TRUE; }
}

if($archive == ""){
        $news_file = "$cutepath/data/news.txt";
        $comm_file = "$cutepath/data/comments.txt";
}else{
        $news_file = "$cutepath/data/archives/$archive.news.arch";
        $comm_file = "$cutepath/data/archives/$archive.comments.arch";
}

$allow_add_comment                        = FALSE;
$allow_full_story                        = FALSE;
$allow_active_news                         = FALSE;
$allow_comments                         = FALSE;



//<<<------------ Detarime what user want to do
if( $CN_HALT != TRUE and $static != TRUE and ($subaction == "showcomments" or $subaction == "showfull" or $subaction == "addcomment") and ((!isset($category) or $category == "") or ($requested_cats[$ucat] == TRUE )  ) ){
    if($subaction == "addcomment"){  $allow_add_comment        = TRUE; $allow_comments = TRUE; }
    if($subaction == "showcomments"){ $allow_comments = TRUE; }
    if(($subaction == "showcomments" or $allow_comments == TRUE) and $config_show_full_with_comments == "yes"){$allow_full_story = TRUE; }
    if($subaction == "showfull") $allow_full_story = TRUE;
    if($subaction == "showfull" and $config_show_comments_with_full == "yes") $allow_comments = TRUE;

}
else{
    if($config_reverse_active == "yes"){ $reverse = TRUE; }
        $allow_active_news = TRUE;
}
//----------->>> Detarime what user want to do

require("$cutepath/inc/shows.inc.php");
    if($_GET['archive'] and $_GET['archive'] != ''){ $archive = $_GET['archive']; } // stupid fix ?
unset($static, $template, $requested_cats, $category, $catid, $cat,$reverse, $in_use, $archives_arr, $number, $no_prev, $no_next, $i, $showed, $prev, $used_archives);
?>
<!-- News Powered by CuteNews: http://cutephp.com/ -->
Go to the top of the page
+Quote Post
Michasko
post 2.04.2006, 10:41:42
Post #6





Grupa: Zarejestrowani
Postów: 283
Pomógł: 31
Dołączył: 10.01.2006
Skąd: Działoszyn

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


Options -> Edit Templates

pokaż kod z Active News smile.gif


--------------------
Po prawie 3-letniej przerwie w programowaniu, znowu raczkuję :)
Go to the top of the page
+Quote Post
nospor
post 2.04.2006, 10:50:21
Post #7





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




Przenosze na gotowe skrypty


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

Go to the top of the page
+Quote Post
Klaudia
post 2.04.2006, 12:41:49
Post #8





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 1.04.2006

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


Ok! Dziekuje wszystkim za pomoc!! Juz sobie poradzilam winksmiley.jpg
Pozdrawiam biggrin.gif
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: 19.07.2025 - 03:06