Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 13
  1. #1
    Utente di HTML.it
    Registrato dal
    Mar 2009
    Messaggi
    95

    Un consiglio su script PHP

    Buon giorno forum^^

    Visto che sto avendo parecchi problemi con tutti gli script che sto usando, mi servirebbe una mano...per caso conoscete uno script perfettamente funzionante per l'inserimento,modifica,cancellazione di news che dia anche la possibilità di inserire immagini??

  2. #2
    Prova Cute-news.


  3. #3
    Utente di HTML.it
    Registrato dal
    Mar 2009
    Messaggi
    95
    mitico^^ funziona alla perfezione!!

  4. #4
    Utente di HTML.it
    Registrato dal
    Mar 2009
    Messaggi
    95
    Ragazzi sapete x caso come togliere la possibilità di inserire commenti dallo script cute news??

  5. #5
    Prova a leggere tra le guide o faq dal sito ufficiale..lì troverai sicuramente qualcosa.

  6. #6
    Utente di HTML.it
    Registrato dal
    Mar 2009
    Messaggi
    95
    ciao .... sono andato e mi hanno detto di vedere qua:

    http://cutephp.com/forum/index.php?showtopic=11121


    ho visto e non ho capito una mazza...quale delle tante possibilità devo sciegliere?? voglio solo eliminare i commenti..

  7. #7
    non c'è qualcosa nella configurazione? se non c'è provaa togliere solo il link ai commenti, non trovando il link gli utenti non commentano . una soluzione poco elegante ma dovrebbe funzionare
    Un tardo hegeliano di Busalla / allevava un gorilla nella stalla
    citando Adorno nell notti chiare / finché il primate stanco di ascoltare
    lo strangolò con una sciarpa gialla Dillo Con Parole Sue

  8. #8
    Utente di HTML.it
    Registrato dal
    Mar 2009
    Messaggi
    95
    eh nn lo trovo

  9. #9
    Utente di HTML.it
    Registrato dal
    Mar 2009
    Messaggi
    95
    guardate qua:

    <?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($_SERVER["HTTP_ACCEPT"] or $_SERVER["HTTP_ACCEPT_CHARSET"] or $_SERVER["HTTP_ACCEPT_ENCODING"] or $_SERVER["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.

    This is incorrect and you must include it using the PATH to show_news.php</h4>
    Example:

    this is <font color=red>WRONG</font> : &lt;?PHP include(\"http://yoursite.com/cutenews/show_news.php\"); ?&gt;

    this is <font color=green>CORRECT</font>: &lt;?PHP include(\"cutenews/show_news.php\"); ?&gt;



    // <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!
    the template ".htmlspecialchars($template)." 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("Error!
    CuteNews has detected that you use \$category = \"".htmlspecialchars($category)."\"; but you can call the categories only with their ID numbers and not with names

    example:
    <blockquote>&lt;?PHP
    \$category = \"1\";
    include(\"path/to/show_news.php\");
    ?&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);
    ?>

  10. #10
    secondo me la configurazione se c'è è qui
    /data/config.php
    Un tardo hegeliano di Busalla / allevava un gorilla nella stalla
    citando Adorno nell notti chiare / finché il primate stanco di ascoltare
    lo strangolò con una sciarpa gialla Dillo Con Parole Sue

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.