Re: [Add-on] AJAX Chat 2.0.0 Beta Styles

phpBB3 styling support, style coding, and style graphics assistance.
Forum rules
Style coding and style related questions only.

Re: [Add-on] AJAX Chat 2.0.0 Beta Styles

Postby torture » 09 Apr 2012, 12:30

Thanks Sniper, i really feel stupid right now.
because I have my controlpanel in dutch I didnt think of the refresh with in the website.

So I was removing all my history from the browser :banghead:

But in the end the Chat is running again, and now I need to do some minnor changes, I'll try to do these myself.

Thank you verry much

Torture

ps. all fixed right now, I could not refresh the divineblack style, thats why I could not do that.
torture    
Crewman
Crewman
 
Posts: 3
Joined: 04 Apr 2012, 15:39
Gender: Male
phpBB Knowledge: 3


Re: [Add-on] AJAX Chat 2.0.0 Beta Styles

Postby Apathy » 15 Apr 2012, 19:06

Never Mind i have found them they are located here http://www.phpbb.com/community/viewtopic.php?t=1214575


I am looking for these mods? if i may call them or edits, would anyone care to help me find them?
Please look at this image
http://i.imgur.com/UyXHi.png
If you look you can see the user "Datapawwolf" i want the mods?(still unsure if that's the word) for whatever mod that helps to set that up :)
Apathy    
Crewman
Crewman
 
Posts: 6
Joined: 14 Apr 2012, 21:43
Gender: Male
phpBB Knowledge: 3

Re: [Add-on] AJAX Chat 2.0.0 Beta Styles

Postby razerbe » 05 May 2012, 17:13

hi

just installed this chat.
but i need some editing in my style

forum: http://razerview.be/airsoft/

i use style: http://www.phpbb.com/customise/db/style ... blue/demo/

big thanks :)
razerbe
Crewman
Crewman
 
Posts: 4
Joined: 05 May 2012, 17:09
Gender: Male
phpBB Knowledge: 4

Re: [Add-on] AJAX Chat 2.0.0 Beta Styles

Postby Sniper_E » 05 May 2012, 20:37

Artodia: Ultra Blue Style Chat

Try putting this chat_body.html template in your styles/art_ultra_blue/template/ directory and refresh your templates.

styles/art_ultra_blue/template/chat_body.html
Code: Select all
<!-- IF S_GET_CHAT -->
   <!-- IF S_READ or S_ADD -->
      <!-- BEGIN chatrow -->
         <div id="p{chatrow.MESSAGE_ID}" class="post <!-- IF chatrow.S_ROW_COUNT is odd -->chat-bg1<!-- ELSE -->chat-bg2<!-- ENDIF -->">
            <div class="inner"><span class="corners-top"><span></span></span>
               <div class="postbody">
                  <!-- IF U_ACP or U_MCP -->
                  <ul class="profile-icons">
                     <li class="delete-icon"><a href="javascript:void({chatrow.MESSAGE_ID})" title="{L_DELETE_POST}" onClick="delete_post('{chatrow.MESSAGE_ID}')"><span>{L_DELETE_POST}</span></a></li>

                  </ul>
                  <!-- ENDIF -->
                  <div class="content">{chatrow.MESSAGE}</div></div>
                     <dl class="postprofile" id="profile{postrow.POST_ID}">
                        <dt>{chatrow.USERNAME_FULL}<br />{chatrow.TIME}</dt>
                     </dl>
               <span class="corners-bottom"><span></span></span>

            </div>
         </div>
      <!-- END chatrow -->--!--{LAST_ID}
      <!-- IF S_WHOISONLINE -->--!--
         <!-- BEGIN whoisrow -->
            <div>
               <div class="inner">
                  <div class="user"><img src="{T_IMAGESET_PATH}/{whoisrow.USER_STATUS}.png" class="online_img" alt="" /> {whoisrow.USERNAME_FULL}</div>
               </div>

            </div>
         <!-- END whoisrow -->--!--{LAST_TIME}--!--{DELAY}--!--{LAST_POST}
      <!-- ENDIF -->
   <!-- ENDIF -->
<!-- ELSE -->
   <!-- IF S_CHAT -->
      <!-- INCLUDE overall_header.html -->
<p class="{S_CONTENT_FLOW_END}<!-- IF S_USER_LOGGED_IN --> rightside<!-- ENDIF -->"><!-- IF S_USER_LOGGED_IN -->{LAST_VISIT_DATE}<!-- ELSE -->{CURRENT_TIME}<!-- ENDIF --></p>
<p>{CURRENT_TIME}</p>

   <!-- ENDIF -->
   <script type="text/javascript">
   // <![CDATA[
   var form_name = 'postform';
   var text_name = 'message';
   var fieldname = 'chat';
   var last_time = 0;
   var xmlHttp = http_object();
   var last_id = {LAST_ID};
   var type = 'receive';
   var post_time = {TIME};
   var read_interval = 15000;
   var interval = setInterval('handle_send("read", last_id);', read_interval);

   function handle_send(mode, f)
   {
      if (xmlHttp.readyState == 4 || xmlHttp.readyState == 0)
      {
         indicator_switch('on');
         type = 'receive';
         param = 'mode=' + mode;
         param += '&last_id=' + last_id;
         param += '&last_time=' + last_time;
         param += '&last_post=' + post_time;
         param += '&read_interval=' + read_interval;

         if (mode == 'add' && document.postform.message.value != '')
         {
            type = 'send';
            for(var i = 0; i < f.elements.length; i++)
            {
               elem = f.elements[i];
               param += '&' + elem.name + '=' + encodeURIComponent(elem.value);
            }
            document.postform.message.value = '';
         }
         else if (mode == 'delete')
         {
            type = 'delete';
            param += '&chat_id=' + f;
         }
         xmlHttp.open("POST", '{FILENAME}', true);
         xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
         xmlHttp.onreadystatechange = handle_return;
         xmlHttp.send(param);
      }
   }

   function handle_return()
   {
      if (xmlHttp.readyState == 4)
      {
         if (type != 'delete')
         {
            results = xmlHttp.responseText.split('--!--');
            if (results[1])
            {
               if (last_id == 0)
               {
                  document.getElementById(fieldname).innerHTML = results[0];
               }
               else
               {
                  document.getElementById(fieldname).innerHTML = results[0] + document.getElementById(fieldname).innerHTML;
               }
               last_id = results[1];
               if (results[2])
               {
                  document.getElementById('whois_online').innerHTML = results[2];
                  last_time = results[3];
                  if (results[4] != read_interval * 1000)
                  {
                     window.clearInterval(interval);
                     read_interval = results[4] * 1000;
                     interval = setInterval('handle_send("read", last_id);', read_interval);
                     document.getElementById('update_seconds').innerHTML = results[4];
                  }
                  post_time = results[5];
               }
            }
         }
         indicator_switch('off');
      }
   }

   function delete_post(chatid)
   {
      document.getElementById('p' + chatid).style.display = 'none';
      handle_send('delete', chatid);
   }

   function indicator_switch(mode)
   {
      if(document.getElementById("act_indicator"))
      {
         var img = document.getElementById("act_indicator");
         if(img.style.visibility == "hidden" && mode == 'on')
         {
            img.style.visibility = "visible";
         }
         else if (mode == 'off')
         {
            img.style.visibility = "hidden"
         }
      }
   }

   function http_object()
   {
      if (window.XMLHttpRequest)
      {
         return new XMLHttpRequest();
      }
      else if(window.ActiveXObject)
      {
         return new ActiveXObject("Microsoft.XMLHTTP");
      }
      else
      {
         document.getElementById('p_status').innerHTML = 'Status: Cound not create XmlHttpRequest Object.  Consider upgrading your browser.';
      }
   }
   // ]]>
   </script>

   <!-- IF not S_USER_LOGGED_IN -->
   <br />
   <!-- ENDIF -->

      <div class="forabg">
         <div class="inner"><span class="corners-top"><span></span></span>
         <ul class="topiclist">
            <li class="header">
               <dl class="icon">
                  <dt><!-- IF not S_CHAT --><a href="{U_CHAT}">{SITENAME} {L_CHAT_EXPLAIN}</a><!-- ELSE -->{SITENAME} {L_CHAT_EXPLAIN}<!-- ENDIF --></dt>
               </dl>
            </li>
         </ul>
         <ul class="topiclist forums" style="text-align: center">
         <!-- DEFINE $FIRST_ROW = true -->
            <!-- IF S_USER_LOGGED_IN -->
               <form name="postform" id="text" method="post" action="javascript:void(0);" onSubmit="handle_send('add', this)">
                  <strong>{L_MESSAGE}:</strong> <input type="text" tabindex="1" name="message" id="message" class="inputbox chatinput" />
                  <input type="submit" class="button1" value="{L_SUBMIT}" name="submit" tabindex="6" accesskey="s"/><br />
               </form>
            <!-- ELSE -->
            <b>You must be a Registered User to Chat in the Shoutbox</b>
            <!-- ENDIF -->
         </ul>
            <span class="corners-bottom"><span></span></span>
         </div>
      </div>
   <div align="left">
      <div class="inner">
         <span class="corners-top"><span></span></span>

         <div class="shouts">
            <div id="chat">
               <!-- BEGIN chatrow -->
                  <div id="p{chatrow.MESSAGE_ID}" class="post <!-- IF chatrow.S_ROW_COUNT is odd -->chat-bg1<!-- ELSE -->chat-bg2<!-- ENDIF -->">
                     <div class="inner"><span class="corners-top"><span></span></span>
                        <div class="postbody">
                           <!-- IF U_ACP or U_MCP -->
                              <ul class="profile-icons">
                                 <li class="delete-icon">

                                    <a href="javascript:void({chatrow.MESSAGE_ID})" title="{L_DELETE_POST}" onClick="delete_post('{chatrow.MESSAGE_ID}')"><span>{L_DELETE_POST}</span></a>
                                 </li>
                              </ul>
                           <!-- ENDIF -->
                           <div class="content"<!-- IF chatrow.USER_COLOR --> style="color: #{chatrow.USER_COLOR};"<!-- ENDIF -->>{chatrow.MESSAGE}</div>
                        </div>
                        <dl class="postprofile" id="profile{postrow.POST_ID}"<!-- IF chatrow.USER_COLOR --> style="border-right: 1px solid #{chatrow.USER_COLOR};"<!-- ENDIF -->>
                           <dt>{chatrow.USERNAME_FULL}<br /><b style="font-size: 0.9em;">{chatrow.TIME}</b></dt>

                        </dl>
                        <span class="corners-bottom"><span></span></span>
                     </div>
                  </div>
               <!-- END chatrow -->
            </div>
         </div>
         &nbsp; <strong>{L_ONLINE_LIST}:</strong><br /><br />

         <div class="onlinelist">
            <div class="users" id="whois_online">
               <!-- BEGIN whoisrow -->
                  <div>
                     <div class="inner">
                        <div class="user"><img src="{T_IMAGESET_PATH}/{whoisrow.USER_STATUS}.png" class="online_img" alt="" /> {whoisrow.USERNAME_FULL}</div>
                     </div>
                  </div>

               <!-- END whoisrow -->
            </div>
         </div>
         <span class="corners-bottom"><span></span></span>
      </div>
   </div>
      <div class="navbar">
         <div class="inner">
            <span class="corners-top"><span></span></span>

            <div class="chatform" style="tex-align: center;padding-bottom: 4px"><img src="{T_THEME_PATH}/images/icon_chat.gif" alt="" />
               {L_DETAILS} <img src="{T_IMAGESET_PATH}/act_indicator.gif" id="act_indicator" alt="" /> <strong>{L_UPDATES} <span id="update_seconds">{DELAY}</span> {L_UNIT}</strong>
            </div>
            <span class="corners-bottom"><span></span></span>
         </div>
      </div>

   <!-- IF S_CHAT -->
      <!-- IF S_DISPLAY_ONLINE_LIST -->
         <h3><!-- IF U_VIEWONLINE --><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a><!-- ELSE -->{L_WHO_IS_ONLINE}<!-- ENDIF --></h3>
         <p>{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /> <br />{LOGGED_IN_USER_LIST}</p>
      <!-- ENDIF -->
      <!-- INCLUDE overall_footer.html -->

   <!-- ENDIF -->
<!-- ENDIF -->

<br />
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6978
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: [Add-on] AJAX Chat 2.0.0 Beta Styles

Postby razerbe » 06 May 2012, 06:05

Thanks mate :)

one question:
when i am loged in the chat says: Airsoft reviews { CHAT_EXPLAIN } but when i am as a guest i see: Airsoft reviews Chat Center
someone can tell me where to edit so i don't see chat_explain ?

thanks
razerbe
Crewman
Crewman
 
Posts: 4
Joined: 05 May 2012, 17:09
Gender: Male
phpBB Knowledge: 4

Re: [Add-on] AJAX Chat 2.0.0 Beta Styles

Postby Sniper_E » 06 May 2012, 08:52

The install directions have lines added to the language/en/common.php language file.
Code: Select all
   //-- mod : AJAX Chat
   'CHAT'               => 'Chat',
   'CHAT_EXPLAIN'         => 'Chat Center',
   'VIEWING_CHAT'         => 'Viewing Shoutbox',
   //-- fin mod : AJAX Chat
If your board's default language is English then that will show in your chat header for guests.
In your UCP you may have a different language setup for yourself. Edit that common.php language file.

And it looks like you have the <!-- INCLUDE chat_body.html --> in the wrong place of your index_body.html

It should look like this.
Code: Select all
<!-- INCLUDE forumlist_body.html -->

<!-- INCLUDE chat_body.html -->
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6978
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: [Add-on] AJAX Chat 2.0.0 Beta Styles

Postby razerbe » 06 May 2012, 15:14

thanks :)

the text problem is fixed.

this is my index_body now

Code: Select all
<!-- INCLUDE overall_header.html -->

<!-- IF S_DISPLAY_SEARCH or U_MCP or (U_MARK_FORUMS and not S_IS_BOT) -->
<div class="navbar">
   <!-- IF S_DISPLAY_SEARCH -->
      <div class="left">
         <a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a>
         <!-- IF S_LOAD_UNREADS --> <span class="bull">&bull;</span> <a href="{U_SEARCH_UNREAD}">{L_SEARCH_UNREAD}</a> <!-- ENDIF -->
         <!-- IF S_USER_LOGGED_IN --> <span class="bull">&bull;</span> <a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a> <!-- ENDIF -->
         <span class="bull">&bull;</span> <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a>
      </div>
   <!-- ENDIF -->
   <!-- IF U_MCP -->
      <div class="right">
         <a href="{U_MCP}">{L_MCP}</a>
         <!-- IF U_MARK_FORUMS -->
            <span class="bull">&bull;</span> <a href="{U_MARK_FORUMS}">{L_MARK_FORUMS_READ}</a>
         <!-- ENDIF -->
      </div>
      <!-- IF not S_DISPLAY_SEARCH --><div class="clear"></div><!-- ENDIF -->
   <!-- ELSEIF U_MARK_FORUMS and not S_IS_BOT -->
      <div class="right">
         <a href="{U_MARK_FORUMS}">{L_MARK_FORUMS_READ}</a>
      </div>
      <!-- IF not S_DISPLAY_SEARCH --><div class="clear"></div><!-- ENDIF -->
   <!-- ENDIF -->
</div>
<!-- ENDIF -->

<!-- INCLUDE forumlist_body.html -->

<!-- INCLUDE chat_body.html -->

<!-- IF S_DISPLAY_ONLINE_LIST or (S_DISPLAY_BIRTHDAY_LIST and BIRTHDAY_LIST) or NEWEST_USER -->
<div class="panel stats">
   <div class="inner">
      <!-- IF S_DISPLAY_ONLINE_LIST -->
         <!-- IF U_VIEWONLINE --><h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3><!-- ELSE --><h3>{L_WHO_IS_ONLINE}</h3><!-- ENDIF -->
         <p>{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}</p>
         <p>{LOGGED_IN_USER_LIST}</p>
         <!-- IF LEGEND --><p><em>{L_LEGEND}: {LEGEND}</em></p><!-- ENDIF -->
      <!-- ENDIF -->
      <!-- IF NEWEST_USER -->
         <h3>{L_STATISTICS}</h3>
         <p>{TOTAL_POSTS} &bull; {TOTAL_TOPICS} &bull; {TOTAL_USERS} &bull; {NEWEST_USER}</p>
      <!-- ENDIF -->
      <!-- IF S_DISPLAY_BIRTHDAY_LIST and BIRTHDAY_LIST -->
         <h3>{L_BIRTHDAYS}</h3>
         <p><!-- IF BIRTHDAY_LIST -->{L_CONGRATULATIONS}: <strong>{BIRTHDAY_LIST}</strong><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF --></p>
      <!-- ENDIF -->
   </div>
</div>
<!-- ENDIF -->


<!-- INCLUDE overall_footer.html -->


hope it is oke now

big thanks
razerbe
Crewman
Crewman
 
Posts: 4
Joined: 05 May 2012, 17:09
Gender: Male
phpBB Knowledge: 4

Re: [Add-on] AJAX Chat 2.0.0 Beta Styles

Postby Sniper_E » 06 May 2012, 15:24

That looks much better. Now you just need some posts in there... what are you waiting on?
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6978
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: [Add-on] AJAX Chat 2.0.0 Beta Styles

Postby razerbe » 06 May 2012, 15:30

i already tested with posting in the hidden zone.

already writhing some things four the review zone, just need some time to finnish it and we can go live :yahoo:
razerbe
Crewman
Crewman
 
Posts: 4
Joined: 05 May 2012, 17:09
Gender: Male
phpBB Knowledge: 4

Re: [Add-on] AJAX Chat 2.0.0 Beta Styles

Postby Zohall » 17 Aug 2012, 03:20

Hi any body help me create chat_install.php with UMIL standard?


my file test is here but not working.
Code: Select all
<?php
/**
* Only adjust bitfields, do not rewrite text...
* All new parsings have the img, flash and quote modes set to true
*
* You should make a backup from your users, posts and privmsgs table in case something goes wrong
* Forum descriptions and rules need to be re-submitted manually.
*/
define('UMIL_AUTO', true);
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);

include($phpbb_root_path . 'common.' . $phpEx);
$user->session_begin();
$auth->acl($user->data);
$user->setup();


if (!file_exists($phpbb_root_path . 'umil/umil_auto.' . $phpEx))
{
   trigger_error('Please download the latest UMIL (Unified MOD Install Library) from: <a href="http://www.phpbb.com/mods/umil/">phpBB.com/mods/umil</a>', E_USER_ERROR);
}

$mod_name = 'php-bb Chat sound';

$version_config_name = 'chat_version';


include($phpbb_root_path . 'umil/umil_auto.' . $phpEx);



define('CHAT_TABLE', $table_prefix . 'chat');
define('CHAT_SESSIONS_TABLE', $table_prefix . 'chat_sessions');

$mode = request_var('mode', '');
switch ($mode)
{
   case 'upgrade':
      $sql = 'DROP TABLE ' . CHAT_TABLE;
      $db->sql_query($sql);
   break;
   case 'install':
      switch ($db->sql_layer)
      {
         case 'mysql':
            $db_type = 'mysql_40';
         break;
      
         case 'mysql4':
            if (version_compare($db->mysql_version, '4.1.3', '>='))
            {
               $db_type = 'mysql_41';
            }
            else
            {
               $db_type = 'mysql_40';
            }
         break;
      
         case 'mysqli':
            $db_type = 'mysql_41';
         break;
      
         default:
            $db_type = $db->sql_layer;
         break;
      }
      $sql = "CREATE TABLE {$table_prefix}chat (
        message_id int(11) unsigned NOT NULL auto_increment,
        chat_id int(11) unsigned NOT NULL default '0',
        user_id int(11) unsigned NOT NULL default '0',
        username varchar(255) NOT NULL default '',
        user_colour varchar(6) NOT NULL default '',
        message text NOT NULL,
        bbcode_bitfield varchar(255) NOT NULL default '',
        bbcode_uid varchar(8) NOT NULL default '',
        bbcode_options tinyint(1) unsigned NOT NULL default '7',
        time int(11) unsigned NOT NULL default '0',
        PRIMARY KEY  (message_id)
      )";
      if ($db_type == 'mysql_41')
      {
         $sql .= 'CHARACTER SET `utf8` COLLATE `utf8_bin`';
      }
      $db->sql_query($sql);
      
      $sql = "CREATE TABLE {$table_prefix}chat_sessions (
        user_id mediumint(8) unsigned NOT NULL default '0',
        username varchar(255) NOT NULL default '',
        user_colour varchar(6) NOT NULL default '',
        user_login int(11) unsigned NOT NULL default '0',
        user_firstpost int(11) unsigned NOT NULL default '0',
        user_lastpost int(11) unsigned NOT NULL default '0',
        user_lastupdate int(11) unsigned NOT NULL default '0',
        PRIMARY KEY  (user_id)
      )";
      if ($db_type == 'mysql_41')
      {
         $sql .= 'CHARACTER SET `utf8` COLLATE `utf8_bin`';
      }
      $db->sql_query($sql);
   break;
}
// Done
$db->sql_close();
if (!$mode)
{
   die('you did not select a mode');
}
else
{
   die('Database installed successfully. Remove this file from your server');
}
?>
User avatar
Zohall    
Lieutenant
Lieutenant
 
Posts: 201
Joined: 16 Aug 2010, 05:39
Location: Hecatompylos
Favorite Team: Real Madrid
Gender: Male
phpBB Knowledge: 6

PreviousNext

Return to phpBB3 Styling Assistance

Who is online

Users browsing this forum: No registered users and 6 guests