chat modification for TheKiller...

User avatar
spaceace
Site Owner
Posts: 991
Joined: Wed Dec 16, 2009 8:30 pm
Location: Ontario, Canada
Flag: Canada

chat modification for TheKiller...

Post by spaceace »

try this and see if it's what you're looking for.

go into phpmyadmin or other database tool and run this SQL
Code: Select all
ALTER TABLE phpbb_chat ADD COLUMN forum_id mediumint(8) UNSIGNED NOT NULL DEFAULT '0' AFTER time;
replace your root files with the files from the root folder as well as adding the template files
chat modification.zip
You do not have the required permissions to view the files attached to this post.
Last edited by spaceace on Tue Feb 26, 2013 10:30 am, edited 3 times in total.

if you like my work and would like to contribute to my development of styles, please donate by using the donate button in the header.

Image

Need hosting? Click this text to check out ICDSOFT

User avatar
Dragosvr92
Registered User
Posts: 89
Joined: Tue Apr 26, 2011 12:26 pm
Location: Romania
Flag: Romania

Re: chat modification for TheKiller...

Post by Dragosvr92 »

YAAY THANKS MATE ! Im going to try it right now ! :D
Last edited by Dragosvr92 on Tue Feb 26, 2013 10:30 am, edited 2 times in total.

User avatar
spaceace
Site Owner
Posts: 991
Joined: Wed Dec 16, 2009 8:30 pm
Location: Ontario, Canada
Flag: Canada

Re: chat modification for TheKiller...

Post by spaceace »

something i forgot about. some file edits for the post add-on :roll:
includes/constants.php

[FIND]
Code: Select all
define('BOTS_TABLE',				$table_prefix . 'bots');
[AFTER, ADD]
Code: Select all
define('CHAT_TABLE',				$table_prefix . 'chat');
define('CHAT_SESSIONS_TABLE',		$table_prefix . 'chat_sessions');
language/en/common.php

[FIND]
Code: Select all
?>
[BEFORE, ADD]
Code: Select all
// chat language for new replies and new topics
$lang = array_merge($lang, array(
	'CHAT_NEW_POST'		=> '%1$s replied to <a href="%2$s">%3$s</a>',
	'CHAT_NEW_TOPIC'	=> '%1$s started a new topic: <a href="%2$s">%3$s</a>',
));
includes/functions_posting.php

[FIND]
Code: Select all
unset($sql_data[POSTS_TABLE]['sql']);
[BEFORE, ADD]
Code: Select all
insert_into_chat($subject, $data, $post_mode);
[FIND]
Code: Select all
?>
[BEFORE, ADD]
Code: Select all
/**
 * Insert new posts and topics into the chat
 * @param string $subject
 * @param string $data
 * @param string $type
 */
function insert_into_chat($subject, $data, $type)
{
	global $user, $phpEx, $phpbb_root_path, $db;

	if ($type == 'reply')
	{
		$lang = 'CHAT_NEW_POST';
	}
	else
	{
		$lang = 'CHAT_NEW_TOPIC';
	}

	$username = get_username_string('full', $user->data['user_id'], $user->data['username'], $user->data['user_colour']);
	$url = append_sid($phpbb_root_path . 'viewtopic.' . $phpEx, 'f=' . $data['forum_id'] . '&t=' . $data['topic_id'] . '&p=' . $data['post_id'] . '#p' . $data['post_id']);

	$message = sprintf($user->lang[$lang], $username, $url, $subject);
	$uid = $bitfield = $options = '';
	$allow_bbcode = $allow_urls = $allow_smilies = true;
	generate_text_for_storage($message, $uid, $bitfield, $options, $allow_bbcode, $allow_urls, $allow_smilies);

	$sql_ary = array(
		'chat_id'			=> 1,
		'user_id'			=> $user->data['user_id'],
		'username'			=> $user->data['username'],
		'user_colour'		=> $user->data['user_colour'],
		'message'			=> $message,
		'bbcode_bitfield'	=> $bitfield,
		'bbcode_uid'		=> $uid,
		'bbcode_options'	=> $options,
		'time'				=> time(),
		'forum_id'			=> $data['forum_id'],
	);
	$sql = 'INSERT INTO ' . CHAT_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
	$db->sql_query($sql);
}
Last edited by spaceace on Tue Feb 26, 2013 10:30 am, edited 2 times in total.
if you like my work and would like to contribute to my development of styles, please donate by using the donate button in the header.

Image

Need hosting? Click this text to check out ICDSOFT

User avatar
Dragosvr92
Registered User
Posts: 89
Joined: Tue Apr 26, 2011 12:26 pm
Location: Romania
Flag: Romania

Re: chat modification for TheKiller...

Post by Dragosvr92 »

IM DONE !
Thank You For your time mate ! :D
Last edited by Dragosvr92 on Tue Feb 26, 2013 10:30 am, edited 2 times in total.

User avatar
spaceace
Site Owner
Posts: 991
Joined: Wed Dec 16, 2009 8:30 pm
Location: Ontario, Canada
Flag: Canada

Re: chat modification for TheKiller...

Post by spaceace »

ok, i missed an edit in the chat_body.html

replace it with this one
chat_body.zip
You do not have the required permissions to view the files attached to this post.
Last edited by spaceace on Tue Feb 26, 2013 10:30 am, edited 2 times in total.
if you like my work and would like to contribute to my development of styles, please donate by using the donate button in the header.

Image

Need hosting? Click this text to check out ICDSOFT

User avatar
Dragosvr92
Registered User
Posts: 89
Joined: Tue Apr 26, 2011 12:26 pm
Location: Romania
Flag: Romania

Re: chat modification for TheKiller...

Post by Dragosvr92 »

Thanks Mate ! i owe you big time for this awesome Addon !!!!
When i figure out how to use the paypal thing to add money to it and so on ill try making you a donation for a cold beer lol
Im very poor at the moment tho lol >,<
Last edited by Dragosvr92 on Tue Feb 26, 2013 10:30 am, edited 2 times in total.

User avatar
spaceace
Site Owner
Posts: 991
Joined: Wed Dec 16, 2009 8:30 pm
Location: Ontario, Canada
Flag: Canada

Re: chat modification for TheKiller...

Post by spaceace »

no worries ;)
Last edited by spaceace on Tue Feb 26, 2013 10:30 am, edited 2 times in total.
if you like my work and would like to contribute to my development of styles, please donate by using the donate button in the header.

Image

Need hosting? Click this text to check out ICDSOFT

User avatar
Dragosvr92
Registered User
Posts: 89
Joined: Tue Apr 26, 2011 12:26 pm
Location: Romania
Flag: Romania

Re: chat modification for TheKiller...

Post by Dragosvr92 »

As we just tested the Replying thing and u had to go away i said id say it here :D
i noticed that it will say something like

{USER} {TIME} :{USER} replied to {TOPIC}

It would be great if the person that posts the "announcement" to not be a user and be something like :
Announcement {TIME} :{USER} replied to {TOPIC}

Hope you get it .. my eyes are annoying lol
Last edited by Dragosvr92 on Tue Feb 26, 2013 10:30 am, edited 2 times in total.

User avatar
spaceace
Site Owner
Posts: 991
Joined: Wed Dec 16, 2009 8:30 pm
Location: Ontario, Canada
Flag: Canada

Re: chat modification for TheKiller...

Post by spaceace »

i think i understand what you are wanting. i think it can be adjusted with the language file edit to

{USER} {TIME} :replied to {TOPIC}

testing it when i submit this reply ;)
Last edited by spaceace on Tue Feb 26, 2013 10:30 am, edited 2 times in total.
if you like my work and would like to contribute to my development of styles, please donate by using the donate button in the header.

Image

Need hosting? Click this text to check out ICDSOFT

User avatar
spaceace
Site Owner
Posts: 991
Joined: Wed Dec 16, 2009 8:30 pm
Location: Ontario, Canada
Flag: Canada

Re: chat modification for TheKiller...

Post by spaceace »

yes, it can be adjust to what i just posted.

the language file edit

find
Code: Select all
   'CHAT_NEW_POST'      => '%1$s replied to <a href="%2$s">%3$s</a>',
   'CHAT_NEW_TOPIC'   => '%1$s started a new topic: <a href="%2$s">%3$s</a>',
replace with
Code: Select all
	'CHAT_NEW_POST'		=> ' replied to <a href="%2$s">%3$s</a>',
	'CHAT_NEW_TOPIC'	=> ' started a new topic: <a href="%2$s">%3$s</a>',
Last edited by spaceace on Tue Feb 26, 2013 10:30 am, edited 2 times in total.
if you like my work and would like to contribute to my development of styles, please donate by using the donate button in the header.

Image

Need hosting? Click this text to check out ICDSOFT