[ABD] Slashdot Style News Posting By CMX - 2.0.6

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
Enki
Registered User
Posts: 92
Joined: Sun Oct 12, 2003 7:43 pm

Post by Enki »

I am getting this error:

Code: Select all

Error in posting

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near '0, 0, 0)' at line 1

INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, news_id, topic_status, topic_type, topic_vote) VALUES ('News', 2, 1067065875, 2, ,0, 0, 0)

Line : 258
File : /usr/local/psa/home/vhosts/****.com/httpdocs/forums/includes/functions_post.php
uchlee
Registered User
Posts: 4
Joined: Thu Oct 30, 2003 8:23 am

I'm having the same error.

Post by uchlee »

Enki wrote: I am getting this error:

Code: Select all

Error in posting

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near '0, 0, 0)' at line 1

INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, news_id, topic_status, topic_type, topic_vote) VALUES ('News', 2, 1067065875, 2, ,0, 0, 0)

Line : 258
File : /usr/local/psa/home/vhosts/****.com/httpdocs/forums/includes/functions_post.php


I had the same error but figured out what was wrong. Please refer to the post below.
Last edited by uchlee on Thu Oct 30, 2003 9:34 am, edited 2 times in total.
uchlee
Registered User
Posts: 4
Joined: Thu Oct 30, 2003 8:23 am

I figured it out.

Post by uchlee »

There are some parts that we should do more than once. while editing files.

For exmaple,

#
#-----[ OPEN ]------------------------------------------
#
includes/functions_post.php

#
#-----[ FIND ]------------------------------------------
#
global $userdata, $user_ip;

#
#-----[ AFTER, ADD ]------------------------------------------
#
// BEGIN cmx_slash_news_mod
if( isset( $news_category ) && is_numeric( $news_category ) )
{
$news_id = intval( $news_category );
}
else
{
$news_id = 0;
}
// END cmx_slash_news_mod

There are 3 instances of "global $userdata, $user_ip;" in "functions_post.php" so we need to do the process above 3 times.

I can't remember which ones are to be done more than once since I spent hell lot of time. :(

Can someon please specify which ones are to be edited more than once?

Thanks for the great mod, anyway.
Enki
Registered User
Posts: 92
Joined: Sun Oct 12, 2003 7:43 pm

Post by Enki »

thats a bummer,
so I have to wait for someone to help fix this.
damn...
CodeMonkeyX
Registered User
Posts: 261
Joined: Thu Feb 14, 2002 3:16 am
Location: So. California
Contact:

New Release - Version 1.0.1

Post by CodeMonkeyX »

Hi all, I have just posted the files to the latest release. Sorry I have not been able to provide support for this mod, but phpBB mod development is not a priority to me now. But I thought I atleast owed it to everyone to release the version I was working on.

Version 1.0.1 should fix a couple of bugs people were having. It also has a lot of new features. You can checkout all the info on my site.

Thanks for all your support with this mod, later.
CodeMonkeyX
codemonkeyx.net
"Codito Ergo Sum" - Descartes (kinda)
netclectic
Former Team Member
Posts: 4439
Joined: Wed Mar 13, 2002 3:08 pm
Location: Omnipresent
Contact:

Post by netclectic »

Nice one :)

I noticed some issues in your mod instructions:
  • the COPY section should be:
    copy root/news_rss.php to news_rss.php
    copy root/news_index.php to news_index.php
    copy root/admin/admin_news_cats.php to admin/admin_news_cats.php
    copy root/admin/admin_news.php to admin/admin_news.php
    copy root/includes/news.php to includes/news.php
    copy root/includes/news_common.php to includes/news_common.php
    copy root/includes/news_data.php to includes/news_data.php
    copy root/templates/subSilver/news.tpl to templates/subSilver/news.tpl
    copy root/templates/subSilver/news_200_rss_body.tpl to templates/subSilver/news_200_rss_body.tpl
    copy root/templates/subSilver/admin/news_cat_edit_body.tpl to templates/subSilver/admin/news_cat_edit_body.tpl
    copy root/templates/subSilver/admin/news_cat_list_body.tpl to templates/subSilver/admin/news_cat_list_body.tpl
    copy root/templates/subSilver/admin/news_config_body.tpl to templates/subSilver/admin/news_config_body.tpl
    copy root/language/lang_english/lang_news.php to language/lang_english/lang_news.php
  • the section that updates the sql in functions_post should be like this:
    #
    #-----[ FIND ]---------------------------------------------
    # around line 268
    $sql = ($mode != "editpost") ? "INSERT INTO "

    #
    #-----[ IN-LINE FIND ]---------------------------------------------
    # around line 268 (directly in that line)
    (topic_title, topic_poster, topic_time, forum_id,

    #
    #-----[ IN-LINE AFTER, ADD ]---------------------------------------
    #
    news_id,

    #
    #-----[ IN-LINE FIND ]---------------------------------------------
    # around line 268 (directly in that line)
    $current_time, $forum_id,

    #
    #-----[ IN-LINE AFTER, ADD ]---------------------------------------
    #
    $news_id,

    #
    #-----[ IN-LINE FIND ]---------------------------------------------
    # around line 268 (directly in that line)
    "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject',

    #
    #-----[ IN-LINE AFTER, ADD ]---------------------------------------
    #
    news_id = $news_id,

    there is no need to repeat the initial find, and it make life easier if you just use a small section of the line initially, as it's likely that it could ave been modified by other mods.
I also noticed in includes/news.php there are a few instances of

Code: Select all

$CFG['index_file']
which look like they should be

Code: Select all

$this->config['news_index_file']
which will mean you can also remove the declarations of $CFG from the functions.

apart from those it seems ok, i've not looked at the rss stuff yet though.
Defend the game:
Image
CodeMonkeyX
Registered User
Posts: 261
Joined: Thu Feb 14, 2002 3:16 am
Location: So. California
Contact:

Post by CodeMonkeyX »

Thanks ;D

You are correct $CFG is meant to be outta there already. And I will clean up the rest for 1.0.2. :)
CodeMonkeyX
codemonkeyx.net
"Codito Ergo Sum" - Descartes (kinda)
JohnGF
Registered User
Posts: 6
Joined: Wed Oct 08, 2003 10:27 am

I got the following error on phpbbfm ...

Post by JohnGF »

I use phpbbfm and I got the following error:
Warning: Missing argument 23 for submit_post()
in /.../functions_post.php on line 232.

I know, that I have seen this as an posting error in this or your forum before. But I can find it.

I use phpbbfm RELEASED 206.3.3 and CMX_news Mod 1.0.1

I know, phpbbfm is a heavy modded phpbb, but I need it for a little time. So, can you help me?

And what are the changes, because I`m working on Minerva too.
CodeMonkeyX
Registered User
Posts: 261
Joined: Thu Feb 14, 2002 3:16 am
Location: So. California
Contact:

Re: I got the following error on phpbbfm ...

Post by CodeMonkeyX »

JohnGF wrote: I use phpbbfm and I got the following error:
Warning: Missing argument 23 for submit_post()
in /.../functions_post.php on line 232.

I know, that I have seen this as an posting error in this or your forum before. But I can find it.

I use phpbbfm RELEASED 206.3.3 and CMX_news Mod 1.0.1

I know, phpbbfm is a heavy modded phpbb, but I need it for a little time. So, can you help me?

And what are the changes, because I`m working on Minerva too.


It takes me long enough to track down problems in regular phpBB, I do not have time to check every branched version of phpBB as well.

There is a full changelist in the install file.
CodeMonkeyX
codemonkeyx.net
"Codito Ergo Sum" - Descartes (kinda)
Cross_+_Flame
Registered User
Posts: 295
Joined: Wed Oct 30, 2002 3:37 pm
Location: Okie-homa!
Contact:

Post by Cross_+_Flame »

Hello CMX.

I've installed 1.01 on a beta version of my forum.

http://www.crossandflame.com/forumX/news_index.php

As you can see, the images are not appearing. I updated from BETA6 per your instructions, ran through the code trying to make sure the changes were correct, and everything else works fine. The only problem is the IMAGES and the CATEGORIES functions are not working, as the images do not show up.

Check it out if you don't mind and lemme know. Thanks!
CodeMonkeyX
Registered User
Posts: 261
Joined: Thu Feb 14, 2002 3:16 am
Location: So. California
Contact:

Post by CodeMonkeyX »

Cross_+_Flame wrote: Hello CMX.

I've installed 1.01 on a beta version of my forum.

http://www.crossandflame.com/forumX/news_index.php

As you can see, the images are not appearing. I updated from BETA6 per your instructions, ran through the code trying to make sure the changes were correct, and everything else works fine. The only problem is the IMAGES and the CATEGORIES functions are not working, as the images do not show up.

Check it out if you don't mind and lemme know. Thanks!


When I looked at the properties of the missing images I noticed their URL is http://crossandflame.com/forum/images/news/mandrake.gif, but your forum is installed under http://crossandflame.com/forumX/.

Try updating the News configuration with your correct base URL. That should fix it.

Also you might want to test your page in Mozilla, when I viewed it the news was all squashed to one site of the page.

Thanks for testing it out, is everything else working ok?
CodeMonkeyX
codemonkeyx.net
"Codito Ergo Sum" - Descartes (kinda)
User avatar
Rancisis
Registered User
Posts: 161
Joined: Sun Dec 08, 2002 10:57 am
Location: Belgium

Post by Rancisis »

I downloaded the 1.01 version (zip file) of this mod but can't find the /root/includes/functions_news.php file.
I only have news.php, news_commn.php and news_data.php in there.
Any explenation for this???

copy root/includes/functions_news.php to includes/functions_news.php
Mighty_Y
Registered User
Posts: 36
Joined: Thu Dec 05, 2002 5:38 pm

Post by Mighty_Y »

ignore the line, it is a file form one of the earlier beta's , it isn't needed anymore :)
User avatar
Rancisis
Registered User
Posts: 161
Joined: Sun Dec 08, 2002 10:57 am
Location: Belgium

Post by Rancisis »

What about these :?,
templates/subSilver/news_body.tpl
templates/subSilver/news_topics_body.tpl
netclectic
Former Team Member
Posts: 4439
Joined: Wed Mar 13, 2002 3:08 pm
Location: Omnipresent
Contact:

Post by netclectic »

look back a page, i posted some changes that are requried.
Defend the game:
Image
Locked

Return to “[2.0.x] MODs in Development”