Of coding and phpBB

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

$sql_data[TOPICS_TABLE]['sql'] = array(
'forum_id' => ($topic_type == POST_GLOBAL) ? 0 : $data['forum_id'],
'icon_id' => $data['icon_id'],
'topic_approved' => (!$post_approval) ? 0 : $data['topic_approved'],
'topic_title' => $subject,
'topic_subtitle' => $data['topic_subtitle'],
'topic_first_poster_name' => $username,
'topic_type' => $topic_type,
'topic_time_limit' => ($topic_type == POST_STICKY || $topic_type == POST_ANNOUNCE) ? ($data['topic_time_limit'] * 86400) : 0,
'poll_title' => (isset($poll['poll_options'])) ? $poll['poll_title'] : '',
'poll_start' => (isset($poll['poll_options'])) ? (($poll['poll_start']) ? $poll['poll_start'] : $current_time) : 0,
'poll_max_options' => (isset($poll['poll_options'])) ? $poll['poll_max_options'] : 1,
'poll_length' => (isset($poll['poll_options'])) ? ($poll['poll_length'] * 86400) : 0,
'poll_vote_change' => (isset($poll['poll_vote_change'])) ? $poll['poll_vote_change'] : 0,

'topic_attachment' => (!empty($data['attachment_data'])) ? 1 : (isset($data['topic_attachment']) ? $data['topic_attachment'] : 0),
);


$sql = 'INSERT INTO ' . TOPICS_TABLE . ' ' .
$db->sql_build_array('INSERT', $sql_data[TOPICS_TABLE]['sql']);
$db->sql_query($sql);


EVERYTHING IS RIGHT SO WHY DON'T YOU WORK ALREADY DAMN YOU


Well, should cool down. That's what happens if you screw around with the forum systems of others. But if someone happens to know how this works, tell me. PLEEEASSE.

But eh, I got the perfect things to not destroy my PC when I'm raging. SMG2 is 100%ed (though the last star made me almost destroy my Wii, then I coded again), Sonic Adventure DX and Bomberman 2. Though I'm stuck in both of the latter games.
In SADX I wonder where Knuckles should move his red a**, and Bomberman 2 is... well, Bomberman. But I bet later I will find out how it works and I will facepalm me so hard my nose breaks.

Also,
if ($post_data['topic_type'] != POST_GLOBAL)
{
$sql = 'SELECT topic_type, forum_id
FROM ' . TOPICS_TABLE . "
WHERE topic_id = $topic_id";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);

if ($row && !$row['forum_id'] && $row['topic_type'] == POST_GLOBAL)
{
$to_forum_id = request_var('to_forum_id', 0);

if ($to_forum_id)
{
$sql = 'SELECT forum_type
FROM ' . FORUMS_TABLE . '
WHERE forum_id = ' . $to_forum_id;
$result = $db->sql_query($sql);
$forum_type = (int) $db->sql_fetchfield('forum_type');
$db->sql_freeresult($result);

if ($forum_type != FORUM_POST || !$auth->acl_get('f_post', $to_forum_id))
{
$to_forum_id = 0;
}
}

if (!$to_forum_id)
{
include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);

$template->assign_vars(array(
'S_FORUM_SELECT' => make_forum_select(false, false, false, true, true, true),
'S_UNGLOBALISE' => true)
);

$submit = false;
$refresh = true;
}
else
{
if (!$auth->acl_get('f_post', $to_forum_id))
{
// This will only be triggered if the user tried to trick the forum.
trigger_error('NOT_AUTHORISED');
}

$forum_id = $to_forum_id;
}
}
}


Did your brain explode now? Yes? Alright, my job is done.

i NOW DOING: Coding
NOW PLAYING: Sonic Adventure DX
RANDOM THOUGHT OF THE DAY:
Italy epicly sucks at World Cup. Did they stop doping or what?

1 Kommentare:

brandobrawl said...

Hey Suyo. At that line highlighted in red, I was about to say, "Is that last symbol actually a comma?" But then I highlighted it and it is. Sorry Suyo, I see nothing wrong that pops out at me. Maybe I'm too much of an inexperienced coder.

Good luck!

Post a Comment

 
Copyright © Suyo's Cat Blog