[ABD] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
firezz
Registered User
Posts: 78
Joined: Mon Aug 25, 2008 10:18 am

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by firezz » Sun Dec 14, 2008 7:44 pm

hi anyone can help me on my problem to show the chat mod in all the pages ?

thanks

User avatar
noth
Registered User
Posts: 2481
Joined: Fri Jan 07, 2005 7:10 pm
Location: North Surrey
Contact:

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by noth » Sun Dec 14, 2008 9:35 pm

in all the pages?

you mean all the styles?

well Handyman has sorted prosilver and subSilver2

that's all

subSilver2 looks absolutely BRILLIANT!!! really looks superb

basically if you have other styles I suggest uploading the chat body that Handyman made for prosilver to that style

TRY IT

if it doesn't look good try Handyman's Subsilver2 version

I would have thought one or the other would be good, if not

8-) back to the drawing board (do your own :mrgreen: )

Handyman!!! the subSilver2 version IS KING!!!!! marvellous work

firezz
Registered User
Posts: 78
Joined: Mon Aug 25, 2008 10:18 am

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by firezz » Mon Dec 15, 2008 12:09 am

by default.. it is on the main page of my website.. now i want to have it to be seen in all thread.. means when member is viewing a post or thread, on top there, they are still able to view the chat mod and able to post..
is it possible ?

User avatar
noth
Registered User
Posts: 2481
Joined: Fri Jan 07, 2005 7:10 pm
Location: North Surrey
Contact:

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by noth » Mon Dec 15, 2008 9:30 am

look in the viewtopic body .html

see if there is a place towards the bottom before include overall footer that

Code: Select all

<BR /><BR /><!-- INCLUDE chat_body.html -->
could go

if that comes up with a problem it means that the php file for viewtopicbody.html viz viewtopic.php needs the code that went into index.php to make this work viz

Code: Select all

//-- mod : AJAX Chat ----------------------------------------------------
//-- add
include($phpbb_root_path . 'shout.' . $phpEx);
//-- fin mod : AJAX Chat ------------------------------------------------
as always, back up all files first before making additions

Handyman great great work!! what will be the difference when this gets released? awesome work

the subSilver2 body is a great improvement on prosilver IMHO :D good job though anyway!!

nicholas.alipaz
Registered User
Posts: 91
Joined: Fri Jun 15, 2007 12:43 pm
Location: Los Angeles, CA

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by nicholas.alipaz » Tue Dec 16, 2008 10:53 am

TheJP wrote:After following the instructions on the .XML I ran into the following error. I check over my file edits three times and still received the same error message:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3530: Cannot modify header information - headers already sent by (output started at /language/en/common.php:1)
Any ideas, I feel pretty dumb here.

Thanks.
When editing language files, such as common.php:

Make sure, if you edit the language file, that your text editor saves the language file as Unicode (UTF8) and WITHOUT a BOM signature.
If your text editor saves the language file with a BOM signature, you will see an error on your forums.

List of text editors that are capable of saving without BOM signature (this list is small since I just started compiling it)
note: if you are using a Mac, you can use almost any file editor available to you.

1. ZEND
2. Dreamweaver
3. Rapid PHP 2007
4. Notepad++

User avatar
noth
Registered User
Posts: 2481
Joined: Fri Jan 07, 2005 7:10 pm
Location: North Surrey
Contact:

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by noth » Tue Dec 16, 2008 11:22 am

solved 8-) cheers
Last edited by noth on Tue Dec 16, 2008 10:05 pm, edited 1 time in total.

User avatar
Dugi
Registered User
Posts: 1386
Joined: Sun May 25, 2008 5:36 pm
Location: Mainz, Germany
Name: Dukagjin Surdulli
Contact:

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by Dugi » Tue Dec 16, 2008 1:30 pm

i got a problem by including this in index page:

screenshot of the problem
http://i38.tinypic.com/2h6d8is.jpg

how to fix
PM me for custom extension pricing / My validated MODs / My MODs in development

User avatar
noth
Registered User
Posts: 2481
Joined: Fri Jan 07, 2005 7:10 pm
Location: North Surrey
Contact:

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by noth » Tue Dec 16, 2008 10:40 pm

jimcarrel wrote:I assume you wish to show more than 25 'shouts' in the shoutbox/chat?!

To do this you need to edit both the chat.php and the shout.php files

open the chat.php and

FIND

Code: Select all

$result = $db->sql_query_limit($sql, 25);
REPLACE WITH (assuming you wish to show 50 'shouts')

Code: Select all

$result = $db->sql_query_limit($sql, 50)
FIND (again)

Code: Select all

$result = $db->sql_query_limit($sql, 25);
REPLACE WITH (assuming you wish to show 50 'shout's)

Code: Select all

$result = $db->sql_query_limit($sql, 50);
open the shout.php file and

FIND

Code: Select all

$result = $db->sql_query_limit($sql, 25);
REPLACE WITH (assuming you wish to show 50 'shout's)

Code: Select all

$result = $db->sql_query_limit($sql, 50);
That should fix you up. Just use whatever number you wish.
if I implement this much needed advice the top part of the chat body fills up with

[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3792: Cannot modify header information - headers already sent by (output started at /chat.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3794: Cannot modify header information - headers already sent by (output started at /chat.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3795: Cannot modify header information - headers already sent by (output started at /chat.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3796: Cannot modify header information - headers already sent by (output started at /chat.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3792: Cannot modify header information - headers already sent by (output started at /chat.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3794: Cannot modify header information - headers already sent by (output started at /chat.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3795: Cannot modify header information - headers already sent by (output started at /chat.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3796: Cannot modify header information - headers already sent by (output started at /chat.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3792: Cannot modify header information - headers already sent by (output started at /chat.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3794: Cannot modify header information - headers already sent by (output started at /chat.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3795: Cannot modify header information - headers already sent by (output started at /chat.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3796: Cannot modify header information - headers already sent by (output started at /chat.php:1)

if I return the original chat.php then the errors are gone :?

Valker
Registered User
Posts: 10
Joined: Sat Nov 22, 2008 12:08 pm

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by Valker » Wed Dec 17, 2008 5:16 am

hi !

Could someone please help me ?
Find:
Tip: This may be a partial find and not the whole line.

Code: Select all

<a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}" class="icon-faq">{L_FAQ}</a>
In-line Find
Tip: This is a partial match of a line for in-line operations.

Code: Select all

<a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}" class="icon-faq">{L_FAQ}</a>
In-line Add before

Code: Select all

<a href="{U_CHAT}" title="{L_CHAT_EXPLAIN}" class="icon_members">{L_CHAT}</a>&nbsp;
....but my code looks like this:

Code: Select all

<div id="navcontainer">
   <ul id="navlist">
   <!-- IF not S_IS_BOT and S_USER_LOGGED_IN -->
   <li><a href="{U_PROFILE}" title="{L_PROFILE}" accesskey="u">{L_PROFILE}</a>
   <!-- IF S_DISPLAY_PM --><li><a href="{U_PRIVATEMSGS}">({PRIVATE_MESSAGE_INFO})</a></li><!-- ENDIF -->
   <!-- IF U_RESTORE_PERMISSIONS --><li><a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a></li><!-- ENDIF -->
   <!-- ENDIF -->
   <li><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}">{L_FAQ}</a></li>
   <!-- IF not S_IS_BOT --><!-- IF S_DISPLAY_MEMBERLIST --><li><a href="{U_MEMBERLIST}" title="{L_MEMBERLIST_EXPLAIN}">{L_MEMBERLIST}</a></li><!-- ENDIF -->
   <!-- IF not S_USER_LOGGED_IN and S_REGISTER_ENABLED --><li><a href="{U_REGISTER}">{L_REGISTER}</a></li><!-- ENDIF -->
   <li><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="l">{L_LOGIN_LOGOUT}</a></li><!-- ENDIF -->
   <li><a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}">{L_SEARCH_ADV}</a></li>
   </ul>
  </div>

how do i add the line in this code ?

plz help me and my 26 users.

Thx a lot !

jimcarrel
Registered User
Posts: 671
Joined: Fri Jul 27, 2007 10:49 pm
Location: Oklahoma City, Oklahoma

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by jimcarrel » Wed Dec 17, 2008 5:15 pm

try this Valker:
before this line

Code: Select all

<li><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}">{L_FAQ}</a></li>
add this new line:

Code: Select all

<li><a href="{U_CHAT}" target="_blank" title="{L_CHAT_EXPLAIN}">{ L_CHAT}</a></li>
If you don't want the chat opening in a new window, use this:

Code: Select all

<li><a href="{U_CHAT}" title="{L_CHAT_EXPLAIN}">{ L_CHAT}</a></li>
Grace--Getting what I don't deserve
Mercy--Not getting what I do deserve

MikeyJai
Registered User
Posts: 6
Joined: Mon Apr 07, 2008 6:23 am

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by MikeyJai » Wed Dec 17, 2008 8:54 pm

Hi there,

I'm having an error regarding the Shoutbox.

The issue that im having is that the shoutbox appears in my portal.php and index.php but not in the viewforum.php as people browse thorugh

Example Provided:
http://mjtown.info/test1/portal.php
http://mjtown.info/test1/index.php

The issue now is it doesn't show/appear inside the forum or aka viewforum.php:
http://mjtown.info/test1/viewforum.php?f=2

I have made an html page to display the Shoutbox:

Code: Select all

<div style="font-size: 1.2em; margin-bottom: 20px;">{SHOUTBOX}</div>
located in styles/template/portal/block/shoutbox.html

it displays in index.php and portal.php but not in viewforum.php
the block is displayed in viewforum.php but no shoutbox.

Can anyone provide a solution guide to this?

Thank you
Michael

nicholas.alipaz
Registered User
Posts: 91
Joined: Fri Jun 15, 2007 12:43 pm
Location: Los Angeles, CA

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by nicholas.alipaz » Thu Dec 18, 2008 4:33 am

Michael:

You should be able to include the chat on any page, by adding the following to any templates you would like it to show on. I suggest just putting the following in your overall_footer or overall_header as it requires only one edit, then you would need to remove the following line from your index_body file. Alternatively, you could edit every file you want it to show in, like viewtopic_body, viewforum_body, index_body, etc.

Add this:
<!-- INCLUDE chat_body.html -->
You will then need to edit all of your files where the chat will show/be called. For example, viewforum.php, viewtopic.php, viewonline.php, etc so that they include the same edit you made on your index.php for the chat.

Find (partial line):

Code: Select all

$user->setup('
After Add (on a new blank line):

Code: Select all

//-- mod : AJAX Chat ----------------------------------------------------
//-- add
include($phpbb_root_path . 'shout.' . $phpEx);
//-- fin mod : AJAX Chat ------------------------------------------------
Then it should show everywhere you specified. Remember to refresh your template files for the style.

User avatar
noth
Registered User
Posts: 2481
Joined: Fri Jan 07, 2005 7:10 pm
Location: North Surrey
Contact:

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by noth » Thu Dec 18, 2008 9:09 am

Handyman. Halfway back along this mighty thread I found this
Mickroz wrote:this is for 2 days, thanks to ksar @ STG

open chat.php

find:

Code: Select all

    case 'add':
        if (!$user->data['is_registered'] || $user->data['user_type'] == USER_INACTIVE || $user->data['user_type'] == USER_IGNORE)
        {
            redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'));
        }  
after add:

Code: Select all

        $old_time = time() - 3600 * 24 * 2; // 3600 seconds per hour, 24 hours a day
        $sql = 'DELETE FROM ' . CHAT_TABLE . " WHERE time < $old_time";
        $db->sql_query($sql);
do you approve this method to purge old comments from chat? is this code good? (sorry Mickroz I am just looking to the mod author to give his approval if he would) ;)

User avatar
Handyman`
Former Team Member
Posts: 1751
Joined: Thu Feb 03, 2005 8:44 pm
Contact:

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by Handyman` » Thu Dec 18, 2008 10:50 am

I would do it just a bit differently.

open chat.php

Find

Code: Select all

$sql = 'SELECT * FROM ' . CHAT_TABLE . ' ORDER BY message_id DESC';
        $result = $db->sql_query_limit($sql, 25);
        $rows = $db->sql_fetchrowset($result);

        foreach ($rows as $row)
        {
            if ($count++ == 0)
            {
                $last_id = $row['message_id'];
            }
            $template->assign_block_vars('chatrow', array(
                'MESSAGE_ID'    => $row['message_id'],
                'USERNAME_FULL'    => clean_username(get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], $user->lang['GUEST'])),
                'MESSAGE'        => generate_text_for_display($row['message'], $row['bbcode_uid'], $row['bbcode_bitfield'], $row['bbcode_options']),
                'TIME'            => $user->format_date($row['time']),
                'CLASS'            => ($row['message_id'] % 2) ? 1 : 2,
            ));
        }
        $db->sql_freeresult($result); 
Replace with

Code: Select all

$sql = 'SELECT * FROM ' . CHAT_TABLE . ' ORDER BY message_id DESC';
        $result = $db->sql_query_limit($sql, 25);
        $rows = $db->sql_fetchrowset($result);
        $db->sql_freeresult($result);

        $delete_id = 0;
        foreach ($rows as $row)
        {
            if ($count++ == 0)
            {
                $last_id = $row['message_id'];
            }
            $template->assign_block_vars('chatrow', array(
                'MESSAGE_ID'    => $row['message_id'],
                'USERNAME_FULL'    => clean_username(get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], $user->lang['GUEST'])),
                'MESSAGE'        => generate_text_for_display($row['message'], $row['bbcode_uid'], $row['bbcode_bitfield'], $row['bbcode_options']),
                'TIME'            => $user->format_date($row['time']),
                'CLASS'            => ($row['message_id'] % 2) ? 1 : 2,
            ));
            $delete_id = $row['message_id'];
        }
        
        $sql = 'DELETE FROM ' . CHAT_TABLE . '
            WHERE message_id < ' . $delete_id;
        $db->sql_query($sql); 
That will then delete all messages older than the last one displayed in the chat and will also only delete when you first view the chat.
http://startrekguide.com My Mod Queue || 1/16/10 Display Posts Anywhere 1.2.0 RC5, Cash MOD 1.0.0 b1, MOD Version Check, AJAX Chat, SEO MOD, AJAX QR, Photo Gallery
MOD Development Manager (version 0.2.0-dev with MODX Generator)

User avatar
Mickroz
Registered User
Posts: 656
Joined: Thu Mar 06, 2003 11:20 pm
Location: Netherlands
Contact:

Re: [Beta] AJAX Chat/Shoutbox MOD 2.0.0 Beta 8

Post by Mickroz » Thu Dec 18, 2008 5:00 pm

noth wrote:Handyman. Halfway back along this mighty thread I found this
Mickroz wrote:this is for 2 days, thanks to ksar @ STG

open chat.php

find:

Code: Select all

    case 'add':
        if (!$user->data['is_registered'] || $user->data['user_type'] == USER_INACTIVE || $user->data['user_type'] == USER_IGNORE)
        {
            redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'));
        }  
after add:

Code: Select all

        $old_time = time() - 3600 * 24 * 2; // 3600 seconds per hour, 24 hours a day
        $sql = 'DELETE FROM ' . CHAT_TABLE . " WHERE time < $old_time";
        $db->sql_query($sql);
do you approve this method to purge old comments from chat? is this code good? (sorry Mickroz I am just looking to the mod author to give his approval if he would) ;)
no problem i just copied this from STG to here ;)
handymans solution is better :D
I don't need to "get a life." I'm a Gamer, I have lots of lives!
Q: Whats a hash and a root password?
A: hash gets you high, root password gives you god powers, combine the 2 and you are invincible.

Locked

Return to “[3.0.x] Abandoned MODs”