176 2012-11-26 14:06:14
Re: ERROR on fresh download and install (4 replies, posted in Problem Solving / Help & Support)
177 2012-11-26 14:04:29
Re: Nick names not showing in page, replaced by user name (2 replies, posted in Problem Solving / Help & Support)
Try using a relative link in the include rather than an absolute one.
178 2012-11-21 13:49:03
Re: Category doesn't create new ID (3 replies, posted in Problem Solving / Help & Support)
I am not familiar with the differences in your version of cutenews but in the original cutenews the category ids can be changed in your data/category.db.php and the next available number to use is in cat.num.php
179 2012-11-21 13:39:02
Re: Retrieving lost password (3 replies, posted in Problem Solving / Help & Support)
To log in use step 2 from this post:
https://cutephp.com/forum/index.php?s=&...st&p=154951
To move your data from one cutenews install to another move the data folder.
(Make backups first)
180 2012-11-20 16:13:48
Re: Preg_match errors - now what? (4 replies, posted in Problem Solving / Help & Support)
Line 20 should look like this:
if( isset($template) and $template != "" and !preg_match("/^[_a-zA-Z0-9-]{1,}$/", $template)){ die("invalid template characters"); }181 2012-11-20 12:26:34
Re: Problems with the Options menu (11 replies, posted in Problem Solving / Help & Support)
If you have updated to php 5 then all your scripts will need to be updated if they give errors.
It is not possible to rewrite cutenews 1.5 to downgrade it. You could use an earlier version of cutenews but this is not a good idea as it will not be as secure.
182 2012-11-20 12:23:37
Re: Preg_match errors - now what? (4 replies, posted in Problem Solving / Help & Support)
preg_match needs a delimiter and you have not used one, eregi does not.
Usually / is used. You need to put one at each end of the values you are using like this:
/^[_a-zA-Z0-9-]{1,}$/
So
eregi("^[_a-zA-Z0-9-]{1,}$"
becomes
preg_match("/^[_a-zA-Z0-9-]{1,}$/"
183 2012-11-16 10:03:31
Re: Problems with the Options menu (11 replies, posted in Problem Solving / Help & Support)
This error should not occur in php5.3. Upgrade your PHP installation?
184 2012-11-15 09:57:21
Re: CuteNews 1.5.0 Review (12 replies, posted in Script Feedback and Suggestion)
Language — Some wrong or weird sounding things
A search result displays "Founded news articles".
Proposition: "News articles found"
185 2012-11-15 09:51:23
Re: search box problem (18 replies, posted in Problem Solving / Help & Support)
It seems that they work like NEWS field, because it search post have that criteria also in the text of the story...
Yes, it does.
This needs to be fixed by the script author. Support_Team.
186 2012-11-14 09:37:15
Re: search box problem (18 replies, posted in Problem Solving / Help & Support)
On the page search for where you have
<input type=text value="Italia fuori dallÂ’euro"
It is where you have the search selection.
187 2012-11-14 08:20:48
Re: search box problem (18 replies, posted in Problem Solving / Help & Support)
As Filou83 has explained, the problem is the include and input in indexb.php
188 2012-11-12 16:14:43
Re: latest comments: an issue (5 replies, posted in Problem Solving / Help & Support)
I have tested the code on my server and there are no problems with categories being displayed correctly in a main include. The latest comments code displays the last X comments regardless of category. So the problem may lie in your main include.
189 2012-11-11 11:21:04
Re: latest comments: an issue (5 replies, posted in Problem Solving / Help & Support)
In the previous thread I asked if you were using the second script for PHP 5.
You said you were but you have used the first one.
Use this one.
https://cutephp.com/forum/index.php?s=&...ost&p=49288
Modify the code to suit your server.
<?php
//set your absolute path to cutenews here
$mPath = "home*****public_htmlcutenews";
$reverse = false; //false = newest comments first.
//number of latest comments to show
if(!isset($comments_number)) $comments_number = 4;
//URL to where you include your news, example: http://site.com/news.php
$site_url = 'http://www.pasqualemarinelli.com/indexb.php';
//more help on the format: http://www.php.net/manual/en/function.date.php
$date_format = 'd M y';
//can use: {url}, {name}, {date}, {comment}, {ip}, {mail}, {newsid}, {comid}, {title}
$ctemplate = ' {date} by {name} - {comment}
';
$latest_comments = array();
$all_comments = file("$mPath/cdata/comments.txt");
foreach($all_comments as $comment_line)
{
$comment_line_arr = explode("|>|", $comment_line);
$newsid = $comment_line_arr[0];
$comment_arr = explode("||", $comment_line_arr[1]);
foreach($comment_arr as $single_comment)
{
$single_comment_arr = explode("|",$single_comment);
$latest_comments[$single_comment_arr[0]] = array_merge( array( $newsid ), $single_comment_arr );
}
}
if($reverse)
ksort($latest_comments);
else
krsort($latest_comments);
$t=0;
foreach($latest_comments as $comment){
$output = $ctemplate;
if ($comment[2]){
$title = get_title($comment[0], $mPath); //make sure path is passed to prevent open errors
$category = get_cat($comment[0], $mPath); //make sure path is passed to prevent open errors
$output = str_replace("{url}", $site_url."?subaction=showcomments&id={newsid}&ucat={category}#{comid}", $output);
$output = str_replace("{name}", $comment[2], $output);
$output = str_replace("{title}", $title, $output);
$output = str_replace("{mail}", $comment[3], $output);
$output = str_replace("{ip}", $comment[4], $output);
$output = str_replace("{comment}", $comment[5], $output);
$output = str_replace("{date}", date($date_format, $comment[1]), $output);
$output = str_replace("{newsid}", $comment[0], $output);
$output = str_replace("{comid}", $comment[1], $output);
$output = str_replace("{category}", $category, $output);
$output = replace_comment("show", $output);
echo $output . "n";
$t++;
}
if($t == $comments_number) break;
}
function get_title($id, $mPath){
$all_news = file("$mPath/cdata/news.txt");
foreach ($all_news as $news) {
$news_arr = explode("|", $news);
if ($news_arr[0] == "$id") {
$title = $news_arr[2];
}
}
$title = ereg_replace("<[^>]*>","",$title); // incase there is html tags
$title = str_stop($title, 40); // keep the title length under 40 chars, edit to taste
return $title;
}
function get_cat($id, $mPath){
$all_news = file("$mPath/cdata/news.txt");
foreach ($all_news as $news) {
$news_arr = explode("|", $news);
if ($news_arr[0] == "$id") {
return $news_arr[6];
}
}
return $title;
}
function str_stop($string, $max_length){
if (strlen($string) > $max_length){
$string = substr($string, 0, $max_length);
$pos = strrpos($string, " ");
if ($pos === false) {
return substr($string, 0, $max_length)."...";
}
return substr($string, 0, $pos)."...";
}else{
return $string;
}
}
unset($reverse);
?>190 2012-11-03 15:26:21
Re: latest comment (9 replies, posted in Problem Solving / Help & Support)
Your code works here without giving an error, although it repeats the same comment. Try changing $template to a different name. Are you using any other variables both in your main include and in the comments hack?
191 2012-11-03 10:11:31
Re: latest comment (9 replies, posted in Problem Solving / Help & Support)
Did you use the version for PHP 5?
Post your modified version here.
192 2012-11-02 18:11:50
Re: latest comment (9 replies, posted in Problem Solving / Help & Support)
I have tested the script and it works, when modified, on one of my servers.
503 Service Unavailable error is usually due to something overloading the server.
Take out the latest comments script and see if the error is still there.
If it is then the problem is in the central include.
193 2012-11-02 10:38:29
Re: latest comment (9 replies, posted in Problem Solving / Help & Support)
There was a hack for this in 1.3.6 here:
https://cutephp.com/forum/index.php?showtopic=10545
With slight modification it works in 1.5
i.e the require_once lines
change references from data folder to cdata
add correct $mPath references
194 2012-10-29 19:50:41
Re: News Won't Show Up on Page (7 replies, posted in Problem Solving / Help & Support)
Open it with a text editor and check what is in it.
195 2012-10-29 17:31:32
Re: News Won't Show Up on Page (7 replies, posted in Problem Solving / Help & Support)
Have you got a news.txt file in your cdata directory?
196 2012-10-26 09:05:09
Re: session expired (2 replies, posted in Problem Solving / Help & Support)
If your host has given you access to your php.ini file.
then you should put it there.
You can find out where your php.ini file is by creating a file called phpinfo.php with the following in it
<?php phpinfo(); ?>
Upload it to your site and call it with your browser using
www.yourwebsite/phpinfo.php
Then look for the exact path for where your default php.ini is located on the server.
It may be in your public_html directory.
If not just make your own.
<?php
ini_set( "session.save_path", "/web/htdocs/www.domain.com/home/" );
ini_set("session.gc_maxlifetime","3600");
?>
Save it as php.ini
and upload it to the root folder of your site.
197 2012-10-21 13:16:03
Re: User permissions (1 replies, posted in Problem Solving / Help & Support)
Which version of cutenews are you using?
There is a hack for this for the 1.3.6 and 1.4.7 version.
https://cutephp.com/forum/index.php?showtopic=33970
A temporary fix if you are using 1.5 then delete lines 111 to 143 in addnews.php
Use this at your own risk.
Hopefully the Support Team will add an option to allow journalists to post without approval as in the hack.
198 2012-10-18 18:43:54
Re: Cutnews isn't working (7 replies, posted in Problem Solving / Help & Support)
Try a relative path instead of an absolute one
include("nieuws/show_news.php");
199 2012-10-14 11:23:19
Re: Trouble upgrading to 1.5.0 (1 replies, posted in Problem Solving / Help & Support)
As you have a backup you should be able to delete the cutenews directory and re-install the new version in a new directory to get a clean installation. Copy the old data directory into the new cutenews directory and then run cutenews/index.php to let the installer migrate your old data.
200 2012-10-08 13:39:22
Re: Pagination (7 replies, posted in Problem Solving / Help & Support)
It uses the css of the page in which you put the include
Posts found: 176 to 200 of 305
CutePHP Forums → Posts by Damoor
