Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> BBtoNuke
Author Message
borat
Hangin' Around



Joined: Aug 05, 2005
Posts: 29

PostPosted: Thu Jun 08, 2006 3:31 am Reply with quote

Hi

since I upgraded to 2.0.20. from 2.0.14 my post_username column in the nuke_bbposts table are blank for recent posts. I've checked in posting.php but there doesn't seem to be a problem there. Where else can I look?

thanks in advance.
 
View user's profile Send private message
borat







PostPosted: Thu Jun 08, 2006 5:02 am Reply with quote

Okay I figured it might be here includes/functions_post

this line:
Code:


//
// Post a new topic/reply/poll or edit existing post/poll
//
function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, $post_username, $post_subject, $post_message, $poll_title, &$poll_options, &$poll_length)
{
   global $board_config, $lang, $db, $phpbb_root_path, $phpEx;
   global $userdata, $user_ip;

        include("includes/functions_search.php");

        $current_time = time();

        if ($mode == 'newtopic' || $mode == 'reply' || $mode == 'editpost')
        {
                //
                // Flood control
                //
                $where_sql = ($userdata['user_id'] == ANONYMOUS) ? "poster_ip = '$user_ip'" : 'poster_id = ' . $userdata['user_id'];
                $sql = "SELECT MAX(post_time) AS last_post_time
                        FROM " . POSTS_TABLE . "
                        WHERE $where_sql";
                if ($result = $db->sql_query($sql))
                {
                        if ($row = $db->sql_fetchrow($result))
                        {
                                if (intval($row['last_post_time']) > 0 && ($current_time - intval($row['last_post_time'])) < intval($board_config['flood_interval']))
                                {
                                        message_die(GENERAL_MESSAGE, $lang['Flood_Error']);
                                }
                        }
                }
        }

        if ($mode == 'editpost')
        {
                remove_search_post($post_id);
        }

        if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post']))
        {
                $topic_vote = (!empty($poll_title) && count($poll_options) >= 2) ? 1 : 0;

      $sql  = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . " WHERE topic_id = $topic_id";
                if (!$db->sql_query($sql))
                {
                        message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
                }

                if ($mode == 'newtopic')
                {
                        $topic_id = $db->sql_nextid();
                        if (function_exists("update_points")) update_points(10);
                }
        }

        $edited_sql = ($mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post']) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : "";
   $sql = ($mode != "editpost") ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig)" : "UPDATE " . POSTS_TABLE . " SET post_username = '$post_username', enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . " WHERE post_id = $post_id";
        if (!$db->sql_query($sql, BEGIN_TRANSACTION))
        {
                message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
        }

        if ($mode != 'editpost')
        {
                $post_id = $db->sql_nextid();
        }

   $sql = ($mode != 'editpost') ? "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text) VALUES ($post_id, '$post_subject', '$bbcode_uid', '$post_message')" : "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$post_message',  bbcode_uid = '$bbcode_uid', post_subject = '$post_subject' WHERE post_id = $post_id";
        if (!$db->sql_query($sql))
        {
                message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
        }

        add_search_words('single', $post_id, stripslashes($post_message), stripslashes($post_subject));


can somebody tell me if it's right?
 
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6437

PostPosted: Thu Jun 08, 2006 7:34 am Reply with quote

I think others may have had a similar issue. What did you search for?

_________________
I search, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
borat







PostPosted: Thu Jun 08, 2006 10:51 pm Reply with quote

Hi

Last night I compared all the files with other versions of nuke to see what could be causing my problem and I can't find it. I'm pretty sure it's in the posting.php or functions_post.php file. I really need help with this one. I'm stuck. I also search these forums, other forums and google but nothing. Please help.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> BBtoNuke

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©