Login

Member statsTotal: 186Latest: MiguelGuests online: 6Members online: 0
EmailLogin here

Location
ForumN-13 News • N-13 News 3.0

Access: Member
Total posts: 3

Status: Offline
Re: N-13 News 3.0 Quote 

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
09:34pm 15th Apr 08  
Access: Admin
Total posts: 169

Status: Offline
Re: N-13 News 3.0 Quote 

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
09:39pm 15th Apr 08
_______________
Chris - Network-13
Last edited by Chris at 09:41pm 15th Apr 08
Access: Member
Total posts: 3

Status: Offline
Re: N-13 News 3.0 Quote 

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
10:16pm 15th Apr 08  
Access: Admin
Total posts: 169

Status: Offline
Re: N-13 News 3.0 Quote 

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:

PHP Code:
$cat = slash2($cat);

To

PHP 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
PHP Code:
$pages .= "<a href="?page=$d">$d</a> ";

To

PHP 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.
10:41pm 15th Apr 08
_______________
Chris - Network-13
Access: Member
Total posts: 3

Status: Offline
Re: N-13 News 3.0 Quote 

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
07:24am 18th Apr 08  
Access: Admin
Total posts: 169

Status: Offline
Re: N-13 News 3.0 Quote 

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.
09:53am 18th Apr 08
_______________
Chris - Network-13
Access: Member
Total posts: 1

Status: Offline
Re: N-13 News 3.0 Quote 

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

Notice: Undefined index: step in C:Apache2.2htdocslinksinstall.php on line 32

03:04pm 27th Apr 08  
Access: Admin
Total posts: 169

Status: Offline
Re: N-13 News 3.0 Quote 

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.
03:09pm 27th Apr 08
_______________
Chris - Network-13
Access: Member
Total posts: 1

Status: Offline
Re: N-13 News 3.0 Quote 

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
12:17am 3rd May 08  
Access: Admin
Total posts: 169

Status: Offline
Re: N-13 News 3.0 Quote 

Hi Rhoula,

To do that what you'll need to do is edit the index.php file. On line 385 it should say
PHP 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
PHP Code:
#echo $h;

then below that add the following code
PHP 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
PHP 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
09:42am 3rd May 08
_______________
Chris - Network-13
Post a reply!

< 1 2