1 (edited by pokemon_jojo 2016-09-16 13:32)

Topic: OLD TOPIC TO DELETE

OLD TOPIC TO DELETE

2

Re: OLD TOPIC TO DELETE

very nice thank you for this small modification/add on.

Re: OLD TOPIC TO DELETE

Looks nice! Will give it a try!!! smile

Re: OLD TOPIC TO DELETE

one question
this Mod can Under my Security?
i mean Scripts and Alerts are working?

Re: OLD TOPIC TO DELETE

b4Lz0R wrote:

one question
this Mod can Under my Security?
i mean Scripts and Alerts are working?

What navigator ? what operating system ? What anti-virus ? Explain more please wink

6

Re: OLD TOPIC TO DELETE

hello i love this modification and right now im trying as hard as i can to possibly delete the entire auto scroll function cause it effects my forum index when it auto scrolls. What it does is when i place the chatbox between the board information and the categories it refreshes and automatically scrolls down to the bottom of the page and is annoying to my users. Does anybody know how i could go about completely rtemoving the auto scroll function.

7 (edited by StevenBullen 2006-08-02 09:40)

Re: OLD TOPIC TO DELETE

Tubby wrote:

hello i love this modification and right now im trying as hard as i can to possibly delete the entire auto scroll function cause it effects my forum index when it auto scrolls. What it does is when i place the chatbox between the board information and the categories it refreshes and automatically scrolls down to the bottom of the page and is annoying to my users. Does anybody know how i could go about completely rtemoving the auto scroll function.

Would it not make more sense to fix it from auto-scrolling to the bottom of the page??

Link?

8

Re: OLD TOPIC TO DELETE

i took it out but i have inserted on the forum index once again heres the link.

www.fatal-gfx.com/forum.php lok at the bottom near the footer and youll see the chatbox. Youll notice thatit will automatically scroll to the bottom of the page because its effected by the auto scroll function of the chatbox and i would like to dispose of this function.

Re: OLD TOPIC TO DELETE

hum !!! just uncheck autoscroll in bottom (right) ! Or unceck it automaticatly.

For autoscroll is not checked at the start, just modify :

FIND :

document.write('<span class="conr" style="width:150px;" ><?php echo $lang_chatbox['Autoscroll'] ?>: <input type="checkbox" id="autoscroll" value="" checked  tabindex="<?php echo $cur_index++ ?>" /></span>');

REPLACE BY

document.write('<span class="conr" style="width:150px;" ><?php echo $lang_chatbox['Autoscroll'] ?>: <input type="checkbox" id="autoscroll" value="" tabindex="<?php echo $cur_index++ ?>" /></span>');

FIND

$('autoscroll').value = 'true';

REPALCE BY

$('autoscroll').value = 'false';

wink

10

Re: OLD TOPIC TO DELETE

I don't want to be annoying smile but is it possible to have in THIS thread all the links and the right codes to install without many surfs this GREAT plugin ? (or ... widget, now smile)

11

Re: OLD TOPIC TO DELETE

thanks pokemon jo jo exactly what i was lookin for.

Re: OLD TOPIC TO DELETE

Great job, jo jo, this mod rocks!

Making the world a better place one byte at a time.

Re: OLD TOPIC TO DELETE

hello how can i disable images in chat?

Re: OLD TOPIC TO DELETE

also i have a question how do you make admins usernames go Red and mods etc instead of having it say [Admin]

15

Re: OLD TOPIC TO DELETE

o.......that has to do with implenting the colored usergroups mod in to chatbox.php im pretty sure you can just follow the same steps as viewtopic.php except search in chatbox.php and replace the code.

Re: OLD TOPIC TO DELETE

chatbox.php doesnt have any of that code yikes

17 (edited by Tubby 2006-10-09 03:28)

Re: OLD TOPIC TO DELETE

yes it does...lol where do you think it gets all of its user information? from the database so chatbox.php has to contain code that collects user information from the database....not the exact code but a code that is similar.

1 second ill write up a small tutorial on how to apply the colored usergroups mod to the chatbox.

Open up chatbox.php

Find:

$result = $db->query('SELECT u.id, u.group_id, u.num_posts_chatbox, m.id AS m_id, m.poster_id, m.poster, m.poster_ip, m.poster_email, m.message, m.posted, g.g_id, g.g_title_chatbox FROM '.$db->prefix.'chatbox_msg AS m INNER JOIN '.$db->prefix.'users AS u ON u.id=m.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id ORDER BY m.posted DESC LIMIT '.$pun_config['cb_max_msg']) or error('Unable to fetch messages', __FILE__, __LINE__, $db->error());

Replace with:

$result = $db->query('SELECT u.id, u.group_id, u.num_posts_chatbox, m.id AS m_id, m.poster_id, m.poster, m.poster_ip, m.poster_email, m.message, m.posted, g.g_id, g.g_title_chatbox g.g_color FROM '.$db->prefix.'chatbox_msg AS m INNER JOIN '.$db->prefix.'users AS u ON u.id=m.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id ORDER BY m.posted DESC LIMIT '.$pun_config['cb_max_msg']) or error('Unable to fetch messages', __FILE__, __LINE__, $db->error());

Now Find:

if ($cur_msg['g_id'] != PUN_GUEST)
        $cur_msg_txt = str_replace('<pun_username>', '<a href="profile.php?id='.$cur_msg['id'].'">'.pun_htmlspecialchars($cur_msg['poster']).'</a>', $cur_msg_txt);
    else
        $cur_msg_txt = str_replace('<pun_username>', pun_htmlspecialchars($cur_msg['poster']), $cur_msg_txt);

and replace with:

if ($cur_msg['g_id'] != PUN_GUEST)
        $cur_msg_txt = str_replace('<pun_username>', '<a href="profile.php?id='.$cur_msg['id'].'">'<span style="color:<?php echo $cur_msg['g_color'] ?>">.pun_htmlspecialchars($cur_msg['poster']).'</span></a>', $cur_msg_txt);
    else
        $cur_msg_txt = str_replace('<pun_username>', pun_htmlspecialchars($cur_msg['poster']), $cur_msg_txt);

Thats it i believe. Now the colored usergroups modification should be applied to the chatbox.

Re: OLD TOPIC TO DELETE

did not work error in line 266

19 (edited by Tubby 2006-10-09 11:18)

Re: OLD TOPIC TO DELETE

oops sorry about that lol should have looked at the file a little more carefully

follow these steps smile

Open up chatbox.php

find:

$result = $db->query('SELECT u.id, u.group_id, u.num_posts_chatbox, m.id AS m_id, m.poster_id, m.poster, m.poster_ip, m.poster_email, m.message, m.posted, g.g_id, g.g_title_chatbox FROM '.$db->prefix.'chatbox_msg AS m INNER JOIN '.$db->prefix.'users AS u ON u.id=m.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id ORDER BY m.posted DESC LIMIT '.$pun_config['cb_max_msg']) or error('Unable to fetch messages', __FILE__, __LINE__, $db->error());

replace with:

$result = $db->query('SELECT u.id, u.group_id, u.num_posts_chatbox, m.id AS m_id, m.poster_id, m.poster, m.poster_ip, m.poster_email, m.message, m.posted, g.g_id, g.g_title_chatbox, g.g_color FROM '.$db->prefix.'chatbox_msg AS m INNER JOIN '.$db->prefix.'users AS u ON u.id=m.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id ORDER BY m.posted DESC LIMIT '.$pun_config['cb_max_msg']) or error('Unable to fetch messages', __FILE__, __LINE__, $db->error());

find:

if ($cur_msg['g_id'] != PUN_GUEST)
        $cur_msg_txt = str_replace('<pun_username>', '<a href="profile.php?id='.$cur_msg['id'].'">'.pun_htmlspecialchars($cur_msg['poster']).'</a>', $cur_msg_txt);
    else
        $cur_msg_txt = str_replace('<pun_username>', pun_htmlspecialchars($cur_msg['poster']), $cur_msg_txt);

replace with:

if ($cur_msg['g_id'] != PUN_GUEST)
        $cur_msg_txt = str_replace('<pun_username>', '<a href="profile.php?id='.$cur_msg['id'].'"><span style="color: '.$cur_msg['g_color'].'">'.pun_htmlspecialchars($cur_msg['poster']).'</span></a>', $cur_msg_txt);
    else
        $cur_msg_txt = str_replace('<pun_username>', pun_htmlspecialchars($cur_msg['poster']), $cur_msg_txt);

find:

$result = $db->query('SELECT u.id, u.group_id, u.num_posts_chatbox, m.id AS m_id, m.poster_id, m.poster, m.poster_ip, m.poster_email, m.message, m.posted, g.g_id, g.g_title_chatbox FROM '.$db->prefix.'chatbox_msg AS m INNER JOIN '.$db->prefix.'users AS u ON u.id=m.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id ORDER BY m.posted DESC LIMIT '.$pun_config['cb_max_msg']) or error('Unable to fetch messages', __FILE__, __LINE__, $db->error());

replace with:

$result = $db->query('SELECT u.id, u.group_id, u.num_posts_chatbox, m.id AS m_id, m.poster_id, m.poster, m.poster_ip, m.poster_email, m.message, m.posted, g.g_id, g.g_title_chatbox, g.g_color FROM '.$db->prefix.'chatbox_msg AS m INNER JOIN '.$db->prefix.'users AS u ON u.id=m.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id ORDER BY m.posted DESC LIMIT '.$pun_config['cb_max_msg']) or error('Unable to fetch messages', __FILE__, __LINE__, $db->error());

now find:

if ($cur_msg['g_id'] != PUN_GUEST)
        $cur_msg_txt = str_replace('<pun_username>', '<a href="profile.php?id='.$cur_msg['id'].'">'.pun_htmlspecialchars($cur_msg['poster']).'</a>', $cur_msg_txt);

and replace with:

if ($cur_msg['g_id'] != PUN_GUEST)
        $cur_msg_txt = str_replace('<pun_username>', '<a href="profile.php?id='.$cur_msg['id'].'"><span style="color: '.$cur_msg['g_color'].'">'.pun_htmlspecialchars($cur_msg['poster']).'</span></a>', $cur_msg_txt);

That should be it ive tested this myself.

20 (edited by Tubby 2006-10-09 16:49)

Re: OLD TOPIC TO DELETE

heres a list of things that i would like to see be added or improved protaining to this modification.

- No auto scroll ( If you direct this modification towards being a shoutbox instead of its own page then auto scroll will not be needed. )

- Opposite message listing ( Messages should be listed in the opposite direction. Meaning the newest messages on top. )

- Easy BBCode ( Easy bbcode would be a great add-on to this modification. )

- New form positioning ( Forms such as the "submit form" should be placed at the top of the chatbox not the bottom. This is so that the viewers can easily catch the new messages. )

- Maybe a chatbox statistics page ( Instead of displaying the statistics inside of the chatbox you can maybe have a main statistics page for the chatbox and then display how many chatbox posts a person has by displaying it somewhere in there profile and maybe even viewtopic.php. )

Well thats it i cant think of anything else atm.

Re: OLD TOPIC TO DELETE

sorry if I sound stupid, but how do you clear this Chat box contents

22

Re: OLD TOPIC TO DELETE

by contents you mean the posts right? Correct me if im wrong but you would probably have to do this through the database with this modification.

Re: OLD TOPIC TO DELETE

yes the posts...I would like to clear the test messages that i sent.

Moreover another change that I wanted was..I did not want the IP and the Chatbox posts to be displayed in the Chatbox...

take a look at my website

www.secondcat.com/forum

24

Re: OLD TOPIC TO DELETE

look the admin plugin for the chatbox and play around with the code and im sure you will eventually figure out how to remove the ip and the chatbox posts tongue

Re: OLD TOPIC TO DELETE

that was a cheeky one....had i been a coder...I would have posted a MOD like this....:P