Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums N-13 News N-13 News 3.0
1 2
Lunski
Posted on 16 Apr 2008, 02:34:44

Access: Member
Total Posts: 3
Joined: 2008-04-16

Thanks for all your hard work Chris.

When I install, I encounter this error at step 3:

Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/authenti/public_html/news/config.php on line 23

Fatal error: Unsupported operand types in /home/authenti/public_html/news/config.php on line 23

I CHMOD everything and reinstalled twice, but still gives me this error. Please advise. Thanks
#171
Chris
Posted on 16 Apr 2008, 02:39:33

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Well I feel silly, I made a typo in the config file, I added a ~ character when it should of been an @ symbol, try redownloading and installing again, it should work now :)

or instead of redownloading simply edit config.php, on line 23 it says
Quote:
~$bannedmsg = mysql_result($query,0);

change that squiggly line to an @ character
#172
Last edited by Chris at 2008-04-16 02:41:27 Reason:
Lunski
Posted on 16 Apr 2008, 03:16:04

Access: Member
Total Posts: 3
Joined: 2008-04-16

thanks for the quick help.

is there any way to implement a MOD REWRITE to make the urls seo friendly? I remember there was a category url seo feature in 2.0 but i don't see it in this version. Or somehow rewrite url to:

http://www.website.com/category/story-title-here.html

thanks
#173
Chris
Posted on 16 Apr 2008, 03:41:33

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Implementing mod rewrite certainly is possible but not without making quite a few changes to the script. The reason I removed the ability to choose a category by modifying the url was to make the process more simple, though if you would still like to do that what you could do is edit index.php, on line 84 change:

Code:
$cat = slash2($cat);


To

Code:
if(!$cat){
$cat = slash2($_GET['category']);
}else{
$cat = slash2($cat);
}


Then around line 250, you'll see some code that creates the next/previous links, change those so it adds &category=$cat as follows:

change
Code:
$pages .= "<a href=\"?page=$d\">$d</a> ";


To

Code:
$pages .= "<a href=\"?page=$d&category=$cat\">$d</a> ";


And do the same thing or $plink and $nlink.

I'll look into adding mod rewrite into the next version of the script, I've got a few ideas I'd like to add to it.
#174
Lunski
Posted on 18 Apr 2008, 12:24:47

Access: Member
Total Posts: 3
Joined: 2008-04-16

Im getting this error when i add images to news:

Fatal error: Call to undefined function resizeimg() in /home/authenti/public_html/news/bbparser.php(131) : regexp code on line 1
#175
Chris
Posted on 18 Apr 2008, 14:53:56

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Ah that was a piece of code left over from when I added BBCode to this main site, I've edited it slightly so if you re-download the script and simply upload bbparser.php to replace your existing file it should work now.
#176
Lorid
Posted on 27 Apr 2008, 20:04:53

Access: Member
Total Posts: 1
Joined: 2008-04-27

Has anyone had any problems with the install script? I keep getting this message.

Notice: Undefined index: step in C:\Apache2.2\htdocs\links\install.php on line 32

#179
Chris
Posted on 27 Apr 2008, 20:09:38

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Hey Lorid, when you see an error undefined index that means your PHP installation is reporting all errors including warnings, undefined index is just a coding standard warning not an actual error that affects the script.

Check your php.ini for error_reporting, you probably have it set to

Quote:
error_reporting = E_ALL
try changing it to
Quote:
error_reporting = E_ALL & ~E_NOTICE

that should make the messages go away.
#180
Rhoula
Posted on 03 May 2008, 05:17:57

Access: Member
Total Posts: 1
Joined: 2008-05-03

Hi...
Great script,
I have a question please.
Is there a way to add just the tilte to a page and when the user click on a title it takes him to the news story.
Thank you
#181
Chris
Posted on 03 May 2008, 14:42:56

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Hi Rhoula,

To do that what you'll need to do is edit the index.php file. On line 385 it should say
Code:
$h = str_replace("{news}",$allnews,$h);
$h = str_replace("{pagintation}",$allnewspagintation,$h);
echo $h;
}else{


what you need to is edit the 4th line, the echo $h, first you put a # infront so it looks like this
Code:
#echo $h;


then below that add the following code
Code:
$sql = "SELECT nppage,newsorder FROM `$newsoptions` WHERE 1";
$query = mysql_query($sql);
$all = mysql_fetch_array($query);
$nppage = $all['nppage'];
$newsorder = $all['newsorder'];

$sql = "SELECT * FROM $newstable ORDER BY timestamp $newsorder LIMIT 0, $nppage";
$query = mysql_query($sql);
while($row = mysql_fetch_array($query)){
    echo "<a href=\"?id=".$row[id]."\">" . $row['title']. "</a><br />";
}



so now the whole thing should look like
Code:
$h = str_replace("{news}",$allnews,$h);
$h = str_replace("{pagintation}",$allnewspagintation,$h);
echo $h;
$sql = "SELECT nppage,newsorder FROM `$newsoptions` WHERE 1";
$query = mysql_query($sql);
$all = mysql_fetch_array($query);
$nppage = $all['nppage'];
$newsorder = $all['newsorder'];

$sql = "SELECT * FROM $newstable ORDER BY timestamp $newsorder LIMIT 0, $nppage";
$query = mysql_query($sql);
while($row = mysql_fetch_array($query)){
    echo "<a href=\"?id=".$row[id]."\">" . $row['title']. "</a><br />";
}
}else{


Now just save the file and upload it. I've uploaded the file with the changes made here if you don't want to edit it manually Download it here
#182
1 2
Network-13.com © 2013