-
spaceace

- Posts: 940
- Joined: Wed Dec 16, 2009 8:30 pm
- Location: Ontario, Canada
- Flag:

Post
by spaceace » Tue Apr 26, 2011 1:54 pm
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 allALTER 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.

-
Dragosvr92

- Posts: 88
- Joined: Tue Apr 26, 2011 12:26 pm
- Location: Romania
- Flag:

Post
by Dragosvr92 » Tue Apr 26, 2011 1:56 pm
YAAY THANKS MATE ! Im going to try it right now !

Last edited by Dragosvr92 on Tue Feb 26, 2013 10:30 am, edited 2 times in total.
-
spaceace

- Posts: 940
- Joined: Wed Dec 16, 2009 8:30 pm
- Location: Ontario, Canada
- Flag:

Post
by spaceace » Tue Apr 26, 2011 2:06 pm
something i forgot about. some file edits for the post add-on

includes/constants.php
[FIND]
Code:
Select alldefine('BOTS_TABLE', $table_prefix . 'bots');
[AFTER, ADD]
Code:
Select alldefine('CHAT_TABLE', $table_prefix . 'chat');
define('CHAT_SESSIONS_TABLE', $table_prefix . 'chat_sessions');
language/en/common.php
[FIND]
[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 allunset($sql_data[POSTS_TABLE]['sql']);
[BEFORE, ADD]
Code:
Select allinsert_into_chat($subject, $data, $post_mode);
[FIND]
[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.

-
Dragosvr92

- Posts: 88
- Joined: Tue Apr 26, 2011 12:26 pm
- Location: Romania
- Flag:

Post
by Dragosvr92 » Tue Apr 26, 2011 2:13 pm
IM DONE !
Thank You For your time mate !

Last edited by Dragosvr92 on Tue Feb 26, 2013 10:30 am, edited 2 times in total.
-
spaceace

- Posts: 940
- Joined: Wed Dec 16, 2009 8:30 pm
- Location: Ontario, Canada
- Flag:

Post
by spaceace » Tue Apr 26, 2011 2:42 pm
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.

-
Dragosvr92

- Posts: 88
- Joined: Tue Apr 26, 2011 12:26 pm
- Location: Romania
- Flag:

Post
by Dragosvr92 » Tue Apr 26, 2011 2:52 pm
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.
-
spaceace

- Posts: 940
- Joined: Wed Dec 16, 2009 8:30 pm
- Location: Ontario, Canada
- Flag:

Post
by spaceace » Tue Apr 26, 2011 4:01 pm
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.

-
Dragosvr92

- Posts: 88
- Joined: Tue Apr 26, 2011 12:26 pm
- Location: Romania
- Flag:

Post
by Dragosvr92 » Tue Apr 26, 2011 4:22 pm
As we just tested the Replying thing and u had to go away i said id say it here

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.
-
spaceace

- Posts: 940
- Joined: Wed Dec 16, 2009 8:30 pm
- Location: Ontario, Canada
- Flag:

Post
by spaceace » Tue Apr 26, 2011 6:07 pm
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.

-
spaceace

- Posts: 940
- Joined: Wed Dec 16, 2009 8:30 pm
- Location: Ontario, Canada
- Flag:

Post
by spaceace » Tue Apr 26, 2011 6:20 pm
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.

Who is online
Users browsing this forum: CommonCrawl [Bot] and 0 guests