Warning: fopen(C:\Inetpub\vhosts\deejones.biz\httpdocs\jonesad/cdata/log/error_dump.log) [function.fopen]: failed to open stream: Permission denied in C:\Inetpub\vhosts\deejones.biz\httpdocs\cutenews\core\core.php on line 59
[...]
Warning: fopen(C:\Inetpub\vhosts\deejones.biz\httpdocs\jonesad/cdata/log/error_dump.log) [function.fopen]: failed to open stream: Permission denied in C:\Inetpub\vhosts\deejones.biz\httpdocs\cutenews\core\core.php on line 59

This is the textbook error of files not being writable. Please ensure that they can be written to. Now, are you running this on your computer? UNIX based file systems use CHMOD, but Windows works differently, and I'm afraid I have no idea how.

Google is your best friend in this case; I'm sure searching "how to make files writable in ..." along with the name of the program that you're using to run PHP locally will be helpful!

Hmm, could you please paste the contents of the file /cdata/conf.php ? I have a "lead," but have yet to confirm it.

Right now, I doubt that it's related to any file permissions. I think it's some error in the coding somewhere.

Also, if you remember the names of the additional fields you had, or if you remember what other settings you've edited around the time they disappeared, that information would be great, of course https://cutephp.com/forum/style_emoticons/default/smile.gif

Yes, in Options > Edit Template use the [full-link] tag along with {title}.

Hello,

You can change the look & feel of CuteNews by editing the templates. This can be done in Options > Edit Templates in the administration area. I believe the <div> has a predefined width in there that you can change. https://cutephp.com/forum/style_emoticons/default/smile.gif

Hey Filou,

Likewise! Nice to see that you're still around https://cutephp.com/forum/style_emoticons/default/wink.gif

Thanks for the information! I had removed all [url] tags and then it randomly refused another paragraph. Removing the URL tags was laborious enough so I gave up at that point and saved it as HTML, haha.

Assuming you're not using pop-ups — open /core/core.php and find line 941-944:

            if ($archive)
                $URL  = RWU( 'archreadmore', $PHP_SELF . build_uri('subaction,id,archive,ucat,title,template', array('showfull', $news_arr[0], $archive, $news_arr[NEW_CAT],titleToUrl($news_arr[NEW_TITLE]),$template)) . "&$user_query" );
            else
                $URL  = RWU( 'readmore', $PHP_SELF . build_uri('subaction,id,ucat,title,template', array('showfull', $news_arr[0], $news_arr[NEW_CAT],titleToUrl($news_arr[NEW_TITLE]),$template)) . "&$user_query" );

Replace with

            if ($archive)
                $URL  = $PHP_SELF.RWU( 'archreadmore', $PHP_SELF . build_uri('subaction,id,archive,ucat,title,template', array('showfull', $news_arr[0], $archive, $news_arr[NEW_CAT],titleToUrl($news_arr[NEW_TITLE]),$template)) . "&$user_query" );
            else
                $URL  = $PHP_SELF.RWU( 'readmore', $PHP_SELF . build_uri('subaction,id,ucat,title,template', array('showfull', $news_arr[0], $news_arr[NEW_CAT],titleToUrl($news_arr[NEW_TITLE]),$template)) . "&$user_query" );


-------

For comment links, find in /core/core.php lines 912-915:

        if($archive)
            $URL = RWU( 'archreadcomm', $PHP_SELF . build_uri('subaction,id,ucat,title,template,archive', array('showcomments', $news_arr[NEW_ID], $news_arr[NEW_CAT], titleToUrl($news_arr[NEW_TITLE]))) );
        else
            $URL = RWU( 'readcomm', $PHP_SELF . build_uri('subaction,id,ucat,title,template', array('showcomments', $news_arr[NEW_ID], $news_arr[NEW_CAT], titleToUrl($news_arr[NEW_TITLE]))) );


Replace with

        if($archive)
            $URL = $PHP_SELF.RWU( 'archreadcomm', $PHP_SELF . build_uri('subaction,id,ucat,title,template,archive', array('showcomments', $news_arr[NEW_ID], $news_arr[NEW_CAT], titleToUrl($news_arr[NEW_TITLE]))) );
        else
            $URL = $PHP_SELF.RWU( 'readcomm', $PHP_SELF . build_uri('subaction,id,ucat,title,template', array('showcomments', $news_arr[NEW_ID], $news_arr[NEW_CAT], titleToUrl($news_arr[NEW_TITLE]))) );


In your index.php page, you have an include code. Something like:

<?php
include('./cutenews/show_news.php');
?>

Add a variable declaration $PHP_SELF above the include() line:

<?php
$PHP_SELF = "news.php";
include('./cutenews/show_news.php');
?>

That should do the trick.

Yes, currently (1.5.3), only month names are translatable. But if you're not scared to open a file and change some lines, we can add translatable weekdays https://cutephp.com/forum/style_emoticons/default/wink.gif

Open /core/core.php and find: (line 1200 - 1215)
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>function embedateformat($timestamp, $output)
{
    // Months
    if ( preg_match_all('~{month(\|.*?)?}~i', $output, $monthd, PREG_SET_ORDER) )
    {
        foreach ($monthd as $v)
            if (empty($v[1])) $output = str_replace($v[0], date('F', $timestamp), $output);
            else
            {
                $monthlist = spsep(substr($v[1], 1));
                $output = str_replace($v[0], $monthlist[date('n', $timestamp)-1], $output);
            }
    }

    // Others parameters
    $output     = str_replace('{weekday}', date('l', $timestamp), $output);</div>

Remove the last line (with {weekday} in it)

Below. add the following code (where you removed the line):
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>    // Weekdays
    if ( preg_match_all('~{weekday(\|.*?)?}~i', $output, $weekd, PREG_SET_ORDER) )
    {
        foreach ($weekd as $v)
            if (empty($v[1])) $output = str_replace($v[0], date('l', $timestamp), $output);
            else
            {
                $weeklist = spsep(substr($v[1], 1));
                $output = str_replace($v[0], $weeklist[date('w', $timestamp)], $output);
            }
    }</div>

I tested it, works like a charm.

Warning: The week starts with Sunday! So you would have something like
{weekday|zondag,maandag,dinsdag,woensdag,donderdag,vrijdag,zaterdag}

This will accept both {weekday} or {weekday|zondag,...}. Veel geluk!

I've tried posting a review as I did for 1.5.0 but the forum's anti-spam features make it impossible for me to post it here.

Therefore, I've saved it as XHTML and uploaded it to my website at http://korn19.ch/coding/cutenews/review_1.5.3.html  Sorry for the inconvenience.  https://cutephp.com/forum/style_emoticons/default/rolleyes.gif

34

(16 replies, posted in News)

Very nice! I love what CuteNews is becoming. https://cutephp.com/forum/style_emoticons/default/smile.gif

Thank you also for fixing the bugs a while back I had reported. That means a lot~

boop

The post was spam (link to a commercial website in profile + the fact that he just joined to write that? Yeah, no) and has therefore been deleted.

Hablo un poco de español, espero que vamos a entendernos. https://cutephp.com/forum/style_emoticons/default/smile.gif (Mi español es muy mal)

CuteNews es un 'program' por creer sitios o por el "management" de una sección de noticias. Normalmente, tienes que abrir una página, cambiar / añadir texto en el código HTML (y no puedes solo escribir lo que quieres añadir, tienes también que pensar al código HTML) y después, tienes que hacer un "upload" de la página que has cambiado — y eso necesite mucho tiempo, es verdad?

Entonces, si cambias una página una y otra vez, puedes preguntarte si no hay una posibilidad más fácil y más rápido por hacer eso... La respuesta es: si, claro! Se puede hacer con CuteNews; si pones CuteNews en una carpeta [folder?] en tu sitio, puedes ir allí y solamente tienes que escribir la nueva noticia, sin preocuparte del código HTML (CuteNews hace eso automatico per te) etc.

Es como un program de administración por un blog. CuteNews se especializa en noticias (pienso), pero se puede utilizar por cambiar un blog o páginas de un sitio.

Do you mean that clicking on the titles won't show the corresponding text field?

The problem most probably lies within the browser. Using another browser and seeing if it works will confirm that. Perhaps you have Javascript disabled? (How to enable)
There is a very unlikely possibility that something in the templates caused the problem — again: this is really unlikely. To be on the safe side, try selecting another template to edit and see if the problem remains. Then it would most likely be your browser, unless you edited some of the CuteNews files recently.

Thanks for the details. I'm at a loss for this one. In svart_spalt.php, try adding the following:

<?php
unset($start_from);
$PHP_SELF= 'show_nyheter.php';
$static = true;
$template = "Headlines";
$number = "15";
$category = "1,3,4,7,8";
include("cutenews/show_news.php");
?>

If that doesn't help, try copying the code from a page that does NOT work into a new .php page and only save those three includes. Does the news then show up properly? If not, try removing the $category parameter or setting it to another category. The more specific you can be about when that error appears the bigger our chances to locate the cause.

Please create a PHP file with the code below, upload it somewhere on your server and copy its output. It will just output the time of the server and its timezone. Like this, we know that the server's time is the problem and that it isn't CuteNews doing something weird.

<?php
echo 'Server time: '.date('d M Y, H:i');
echo '
Timezone: '.date('e (\G\M\T P)');
echo '
Timestamp: '.time();
?>

Please provide your actual time as well — my guess is that "Server time" will be five hours ahead of your time. That would mean the server's timezone is configured five hours ahead of you, which seems a bit odd (unless you're in Hawaii and you're renting a server located on the East Coast). Once confirmed, we can look into changing your timezone (if possible).

If you go back to Options > System Configurations and look at the setting Time Adjustment, does it still say -300 or has it defaulted back to 0, for instance? (There was a bug in an early UTF-8 CuteNews version doing that.) Could you also please try setting it to "60" for instance and see if that value has any effect?

Hello Ola,

So your news is not updating only on three pages? That's a rather odd issue. Could you please share your include codes for those three pages as well as the include code of a page where everything works? (For comparison purposes.)

Also, do those pages have any other PHP scripts (which the others ones possibly don't have)? It could be that they're interfering with CuteNews. Pasting the identical include codes in an empty file would answer that for us.

The causes could be anywhere... Do you know if you have an IIS (Windows) server, or is it Unix-based?

If you'd like, I can try and install CuteNews for you, but that would require FTP access (to the CuteNews folder). Of course, it's up to you whether you're comfortable with that or not.

[Edit: The <acronym title='Original Poster (topic creator)'>OP</acronym> has kindly messaged me and I could install CuteNews for xem]

Unfortunately, no official demo is available. Please see your inbox though, I've mailed you a link to a CuteNews copy you can install and play around with to your heart's contempt.

If anyone else would like a demo, don't hesitate to message me. https://cutephp.com/forum/style_emoticons/default/smile.gif

No problem — I'm glad your issue could be solved. https://cutephp.com/forum/style_emoticons/default/smile.gif Take care.

Alright, this time I think we have our solution:

<?php
$start_from = 0;
$subaction = '';

// Side include
$number = 2;
$template = 'Headlines';
include('show_news.php');
?>

<?php
$start_from = isset($_GET['start_from']) ? $_GET['start_from'] : 0;
$subaction = isset($_GET['subaction']) ? $_GET['subaction'] : '';

// Main include
$number = 4;
include('show_news.php');
?>

Thanks for the information!  I don't know why the $static variable was removed in CuteNews 1.5 — it was a very useful include parameter.

We'll just make even uglier code, then! Assuming that your code is:

<?php
$template = 'side';
$number = 2;
include('/cutenews/show_news.php');
?>
...
<?php
$number = 5;
include('/cutenews/show_news.php');
?>

change to

<?php
$my_get = $_GET;
$_GET = array();

$template = 'side';
$number = 2;
include('/cutenews/show_news.php');
?>
...
<?php
$_GET = $my_get;
$number = 5;
include('/cutenews/show_news.php');
?>

I call this "even uglier" code because it really is, but it's fast and it does the trick. Nothing to worry. https://cutephp.com/forum/style_emoticons/default/smile.gif

Your include codes are probably something like

<?php
$number = 5;
include('/cutenews/show_news.php');
?>
...
<?php
$template = 'side';
$number = 2;
include('/cutenews/show_news.php');
?>

Provided that the middle include comes before the one on the right-hand side in your file, do the following after the first include() line:

unset($_GET['start_from']);

So:

<?php
$number = 5;
include('/cutenews/show_news.php');
unset($_GET['start_from']);
?>


in the example above.

It's not particularly elegant, but it's fast and it works.

Hm, I recommend sticking with your CuteNews installation if your whole site is relying on this. I'd love to help but I'm afraid the amount of free time I have doesn't really allow for bigger code changes, and I doubt anyone else who is currently active will help you (either lack of knowledge or of interest).

I'm happy you could change the code accordingly to your needs. You know where to find support in case of further problems. https://cutephp.com/forum/style_emoticons/default/smile.gif

Add/Edit page content as in a link to the edit news module (with the correct article ID, of course) on every page when you're logged in? Are you using CuteNews to display all of your pages? If so, please provide additional details. Were there big code changes necessary?

Posts found: 26 to 50 of 93

Pages Previous 1 2 3 4 Next

CutePHP Forums → Posts by (lKj)



The pun_antispam official extension is installed. Copyright © 2003–2009 PunBB.