Author |
Message |
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm
![](modules/Forums/images/avatars/5ed231554a8492e2e09da.gif)
Joined: Aug 13, 2009
Posts: 1123
|
Posted:
Fri Jun 21, 2013 5:39 am |
|
I need to convert this module in order to work for RavenNuke. Does anyone test this module with RavenNuke. I am getting some errors and the feed doesn't work.
Let me know who wants to convert it.
Code:Warning: intval() expects parameter 2 to be long, string given in /modules/Multiheadlines/admin/index.php on line 456
Warning: Division by zero in /modules/Multiheadlines/index.php on line 32
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
Site Admin
![](modules/Forums/images/avatars/125904890252d880f79f312.png)
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Fri Jun 21, 2013 8:21 am |
|
I'm not sure which version I used last (I no longer us it) but I did pass a number of bug fixes back to the original developer.
The intval error looks weird because you can only pass one parameter into it, not two. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jun 21, 2013 4:40 pm |
|
I contacted as well and he doesn't respond. I am running the last version. Can u please take a look and let me know what is going on. I will send a donation as soon as u finish it if u have time. I want to use google news on my website. Thank in advance. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Jun 23, 2013 4:04 am |
|
Sorry but I'm really busy right now and am going to be tied up until probably the end of September. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jun 24, 2013 6:02 pm |
|
I guess nobody is interesting in fixing this module. ![Sad](modules/Forums/images/smiles/icon_sad.gif) |
Last edited by hicuxunicorniobestbuildpc on Fri Jul 05, 2013 5:51 am; edited 1 time in total |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jul 05, 2013 5:50 am |
|
I fixed all error from Division by zero but I guess the mayor problem still there. It is not saving the news in data base. The news is not showing. Any clue guys. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
Site Admin
![](modules/Forums/images/avatars/41f0b40a419280935f3a0.gif)
Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Mon Jul 08, 2013 7:34 pm |
|
It might be easier if you posted more details - like error messages in your cPanel log, error.log or RavenNuke log. That might also help you figure out what's happening, too. Have you tried adding echo or die statements to isolate errors? |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Jul 10, 2013 10:43 am |
|
Sorry, I turned error on but I get no error at all. There is no error showing by error.log. This is my index.php
I guess the index.php is too long and it doesn't show properly here. |
Last edited by hicuxunicorniobestbuildpc on Wed Jul 10, 2013 4:45 pm; edited 1 time in total |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
Site Admin
![](modules/Forums/images/avatars/201442295664a46e4575d46.jpg)
Joined: Aug 22, 2007
Posts: 1775
|
Posted:
Wed Jul 10, 2013 11:19 am |
|
do you have not a larger file with more lines *gg*
https://gist.github.com/ ftw *gg*
btw in the index is no sql insert - without a insert - no data can be stored *gg* |
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Jul 10, 2013 5:02 pm |
|
These are the 3 files. I didn't include index file from admin neralex. I know there isn't any sql insert but this module works with other old RavenNuke version but not with the new version.
https://gist.github.com/bestbuildpc/5970957 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/3234de284ee21bd39eecd.jpg)
Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina
|
Posted:
Wed Jul 10, 2013 5:21 pm |
|
Two things I noticed is that you have the @ in front of some queries and php functions which will suppress errors. You should remove them so you can find your errors.
Second thing is the file is using mysqli_real_escape_string which should be $db->sql_escape_string. |
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Jul 10, 2013 5:23 pm |
|
try to replace the function insert_todb in the functions.php
Code:function insert_todb($cat, $url_id, $title, $link, $description, $pubdate) {
global $db, $prefix;
if (is_numeric($cat) && is_numeric($url_id) && is_numeric($pubdate)) {
$title = preg_replace('/\n/i','', $title);
// $nr = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_multiheadlines_news WHERE news_title='$title' AND news_link='$link'"));
$nr = $db->sql_numrows($db->sql_query('SELECT * FROM `' . $prefix . '_multiheadlines_news` WHERE `news_title` = \'' . $db->sql_escape_string($title) . '\''));
if (intval($nr)==0) {
$news_time = time();
$title = $db->sql_escape_string(htmlspecialchars_decode(check_html($title, 'nohtml'), ENT_QUOTES));
$link = $db->sql_escape_string(htmlspecialchars_decode(check_html($link, 'nohtml'), ENT_QUOTES));
$description = $db->sql_escape_string(check_html($description, ''));
$db->sql_query('INSERT INTO `' . $prefix . '_multiheadlines_news` VALUES '."('$cat', '$url_id', '$title', '$link', '$description', '$pubdate', '$news_time')");
}
$db->sql_query('UPDATE `' . $prefix . '_multiheadlines_urls` SET `urls_time` = \'' . time() . '\' WHERE `urls_id` = \'' . $url_id . '\'');
}
}
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jul 11, 2013 6:06 am |
|
nuken, I replaced all mysqli and I did what neralex suggested. I don't get any news yet. I refresh feeds. I checked log and there is no errors after activated. I checked my log from my cpanel in my server and there is no error. I turned error on and there is no error. I don't know what is going on. It is making crazy this module.
For the moment, there is no news! |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jul 11, 2013 6:14 am |
|
do you get any errors in the dblog file of RN while saving data into the db? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jul 11, 2013 7:07 am |
|
no, that is the strage thing. I am not getting any error. I checked all tables in phpMyadmin and they are ok. I am having any error.
here i included the index.php frm admin folder
https://gist.github.com/bestbuildpc/5970957 Updated
![Bang Head](modules/Forums/images/smiles/banghead.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jul 11, 2013 7:40 am |
|
You still have the @ suppressing errors in that file as well as several instances of mysqli_real_escape_string |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jul 11, 2013 7:40 am |
|
I updated right now with a couple of changes.
This is what I did in footer.php
Code:if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) {
header('Location: index.php');
exit('Access Denied');
}
global $db;
define('NUKE_FOOTER', true);
//Multiheadlines module entry
require( "modules/Multiheadlines/getrss.php" );
foot();
|
I am not getting any error and the google and yahoo news are not showing.
I changed the log to 2 and I get this error
Code:July 11, 2013, 1:59 pm
File: /www.bestbuildpc.org/db/mysqli.php - Line: 185
SQL was: SELECT * FROM nuke_modules WHERE title!='Multiheadlines' ORDER BY active DESC, inmenu DESC, custom_title ASC
querycount = 53
|
Code:File: /www.bestbuildpc.org/db/mysqli.php - Line: 185
SQL was: SELECT * FROM nuke_multiheadlines_urls WHERE urls_active = '1' AND 1373551193> (urls_time+urls_ref) ORDER BY urls_time ASC LIMIT 0, 1
querycount = 374
|
Code:July 11, 2013, 3:59 pm
File: /www.bestbuildpc.org/db/mysqli.php - Line: 185
SQL was: SELECT * FROM nuke_multiheadlines_config
querycount = 369
|
Code:July 11, 2013, 3:59 pm
File: /www.bestbuildpc.org/db/mysqli.php - Line: 185
SQL was: SELECT * FROM nuke_multiheadlines_categ WHERE categ_title='News'
querycount = 370
|
Code:July 11, 2013, 3:59 pm
File: /www.bestbuildpc.org/db/mysqli.php - Line: 185
SQL was: SELECT * FROM nuke_multiheadlines_news WHERE news_cat='1' AND news_active='1'
querycount = 372
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Jul 11, 2013 8:41 pm |
|
Have you tried different themes and disabled all left blocks? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Jul 13, 2013 6:09 pm |
|
Ok guys! After testing a lot in differents ways then I found out where it is coming from the problem. This is the error I get.
Warning: mysql_real_escape_string(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in modules/Multiheadlines/functions.php on line 556
Warning: mysql_real_escape_string(): A link to the server could not be established in /modules/Multiheadlines/functions.php on line 556
Code:$informations=filtering($info["infos"], $info["encoding"]);
$db->sql_query("UPDATE ".$prefix."_multiheadlines_urls SET urls_infos='".mysql_real_escape_string($informations)."' WHERE urls_id = '".$url_id."'");
return $info;
}
|
I replace above with . $db->sql_escape_string
Code:$informations=filtering($info["infos"], $info["encoding"]);
$db->sql_query("UPDATE ".$prefix."_multiheadlines_urls SET urls_infos='". $db->sql_escape_string($informations)."' WHERE urls_id = '".$url_id."'");
return $info;
}
|
but I didn't get any result ![Bang Head](modules/Forums/images/smiles/banghead.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jul 15, 2013 4:43 am |
|
I modify function.php
I replace this one
Code:if (($contents=file_get_contents($rss)) <> false) {
|
with
Code:$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $rss);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 25);
$file_contents = curl_exec($ch);
curl_close($ch);
if (($file_contents=='') <> false) {
|
I don't get any result yet! ![Sad](modules/Forums/images/smiles/icon_sad.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
misterstereus
Regular
![Regular Regular](modules/Forums/images/ranks/2stars.gif)
![](modules/Forums/images/avatars/gallery/108.gif)
Joined: Aug 03, 2012
Posts: 61
Location: Rome Italy
|
Posted:
Mon Jul 15, 2013 10:20 am |
|
Hello hicuxunicorniobestbuildpc can you send me a complete module or link to download? I test to fix it
info@prontoservizi.com |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jul 15, 2013 3:59 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
misterstereus
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Jul 16, 2013 9:13 am |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Jul 16, 2013 4:05 pm |
|
No,negative, this one is not working. Remember I am running PHP 5.4 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Jul 16, 2013 4:19 pm |
|
Guys I must inform you I fix it myself doing this and I would like to know why neralex's code didn't work.
This is what I did
I search for this function
Code:function insert_todb($cat, $url_id, $title, $link, $description, $pubdate) {
global $db, $prefix;
if (is_numeric($cat) && is_numeric($url_id) && is_numeric($pubdate)) {
$title = preg_replace('/\n/i','', $title);
// $nr = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_multiheadlines_news WHERE news_title='$title' AND news_link='$link'"));
$nr = $db->sql_numrows($db->sql_query('SELECT * FROM `' . $prefix . '_multiheadlines_news` WHERE `news_title` = \'' . $db->sql_escape_string($title) . '\''));
if (intval($nr)==0) {
$news_time = time();
$title = $db->sql_escape_string(htmlspecialchars_decode(check_html($title, 'nohtml'), ENT_QUOTES));
$link = $db->sql_escape_string(htmlspecialchars_decode(check_html($link, 'nohtml'), ENT_QUOTES));
$description = $db->sql_escape_string(check_html($description, ''));
$db->sql_query('INSERT INTO `' . $prefix . '_multiheadlines_news` VALUES '."('$cat', '$url_id', '$title', '$link', '$description', '$pubdate', '$news_time')");
}
$db->sql_query('UPDATE `' . $prefix . '_multiheadlines_urls` SET `urls_time` = \'' . time() . '\' WHERE `urls_id` = \'' . $url_id . '\'');
}
}
|
I replaced it with this one.
Code:function insert_todb($cat, $url_id, $title, $link, $description, $pubdate) {
global $db, $prefix;
$title=eregi_replace("\n","", $title);
$title=mysql_escape_string(stripslashes(check_html($title, "nohtml")));
// $nr = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_multiheadlines_news WHERE news_title='$title' AND news_link='$link'"));
$nr = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_multiheadlines_news WHERE news_title='$title'"));
if (intval($nr)==0) {
$news_time=time();
$db->sql_query("INSERT INTO ".$prefix."_multiheadlines_news (news_cat, news_site, news_title, news_link, news_description, news_pubdate, news_time) VALUES ('".intval($cat)."', '".intval($url_id)."', '".mysql_escape_string(stripslashes(check_html($title, "nohtml")))."', '".stripslashes(check_html($link, "nohtml"))."', '".mysql_escape_string($description)."', '".intval($pubdate)."', '".intval($news_time)."')");
}
$db->sql_query("UPDATE ".$prefix."_multiheadlines_urls SET urls_time='".time()."' WHERE urls_id = '".intval($url_id)."'");
}
|
and Line 580
Code:$informations=filtering($info["infos"], $info["encoding"]);
$db->sql_query("UPDATE ".$prefix."_multiheadlines_urls SET urls_infos='".mysql_real_escape_string($informations)."' WHERE urls_id = '".$url_id."'");
return $info;
}
|
I replace it with this one and now it is working!!!!
Code:$informations=filtering($info["infos"], $info["encoding"]);
$db->sql_query("UPDATE ".$prefix."_multiheadlines_urls SET urls_infos='".mysql_escape_string($informations)."' WHERE urls_id = '".$url_id."'");
return $info;
}
|
Thanks anyway misterstereus. I never thought it could be so difficult to fix this module. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|