Suggestion: Mobile template for mchat.php?

Support for mods released by phpbbmodders.net found at either https://github.com/phpbbmodders/ or the MODDB at http://www.phpbb.com
Forum rules
Please only request support for mods released by phpbbmodders.net found at either https://github.com/phpbbmodders/ or the MODDB at http://www.phpbb.com
Gero
New member
New member
Posts: 9
Joined: 19 Jan 2013, 13:55

Re: Suggestion: Mobile template for mchat.php?

Post by Gero »

RMcGirr83 wrote:Or just change this line

Code: Select all

<textarea  name="message" class="inputbox medium mChatText" id="mChatMessage" onkeydown="mChat.key(event);" rows="2" cols="32"></textarea><br />


to the default input used in the mchat_body.html file.


i didnt understand how it works. I have to use those lines in the normal mchat_body.html? or in your midfied body.html? Questions over Questions, and i am think i am not clever enough :(
Gero
New member
New member
Posts: 9
Joined: 19 Jan 2013, 13:55

Re: Suggestion: Mobile template for mchat.php?

Post by Gero »

ah Stoker i mean we missunderstanding us. I used your mchat_body.html style and its very nice thx for your work. But my Question is can i get some mchat Box like those normal one from mchat_body.

My Problem, i use 8 Boardstyles, and mchat Settings with 30 Lines, thats okay cause i can scroll in the box. But on iphone and Android i see all 30 Lines, thats a many.

i would use the normal mchat_body but this body doesnt work, text field and buttons are displayed incorrect.
greetz
Gero
noth
New member
New member
Posts: 34
Joined: 07 Jul 2012, 13:40

Re: Suggestion: Mobile template for mchat.php?

Post by noth »

I think it means look at what the chat body originally said to begin with and use that

(so use the default which is:
<input type="text" name="message" class="inputbox medium mChatText" id="mChatMessage" /><br /> )
footiefan
New member
New member
Posts: 2
Joined: 28 Nov 2013, 13:23

Re: Suggestion: Mobile template for mchat.php?

Post by footiefan »

Stoker wrote:This is my mchat_body.html for the artodia style:

Code: Select all

<!-- IF MCHAT_ARCHIVE_MODE or MCHAT_CUSTOM_PAGE -->
   <!-- INCLUDE overall_header.html -->
<!-- ENDIF -->
<!-- IF MCHAT_ARCHIVE_MODE -->
<!--**
*
* @package mChat
* @version $Id: mchat_body.html
* @copyright (c) 2010 Rich McGirr
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/-->
<!-- ENDIF -->
<!-- IF not MCHAT_READ_MODE -->
<div class="forums">
<p class="header gradient link"><!-- IF MCHAT_ARCHIVE_MODE -->{L_MCHAT_ARCHIVE_PAGE}<!-- ELSE -->{L_MCHAT_TITLE}<!-- ENDIF --></p>
      <div class="postbody mChatBodyFix">
<!-- ENDIF -->
   <!-- IF MCHAT_ENABLE -->
         <!-- IF not MCHAT_READ_MODE -->
         <script type="text/javascript">
         // <![CDATA[
         // Define mChat setting
         var mChatNoMessage = '{MCHAT_NOMESSAGE_MODE}';
         var mChatFile = '{MCHAT_FILE_NAME}';
         var mChatForumRoot = '{ROOT_PATH}';
         var mChatCustomPage = '{MCHAT_CUSTOM_PAGE}';
         <!-- IF not MCHAT_ARCHIVE_MODE -->
         var mChatPause = '{MCHAT_PAUSE_ON_INPUT}';
         var mChatRefresh = '{MCHAT_REFRESH_JS}';
         <!-- ELSE -->
         var mChatPause = false;
         var mChatRefresh = false;
         <!-- ENDIF -->
         <!-- IF MCHAT_USER_TIMEOUT -->
         var mChatUserTimeout = '{MCHAT_USER_TIMEOUT}';
         <!-- ELSE -->
         var mChatUserTimeout = false;
         <!-- ENDIF -->
         var mChatNoMessageInput = '{LA_MCHAT_NOMESSAGEINPUT}';
         var mChatNewMessageAlert = '{LA_MCHAT_NEW_CHAT}';
         var mChatNoMessage = '{LA_MCHAT_NOMESSAGE}';
         var mChatEditInfo = '{LA_MCHAT_EDITINFO}';
         var mChatNoAccess = '{LA_MCHAT_NOACCESS}';
         var mChatFlood = '{LA_MCHAT_FLOOD}';
         var mChatDelConfirm = '{LA_MCHAT_DELCONFIRM}';
         var mChatReset = '{LA_MCHAT_RESET_QUESTION}';
         var mChatRefreshing = '{LA_MCHAT_REFRESHING}';
         var mChatSessOut = '{LA_MCHAT_SESSION_OUT}';
         var mChatSessEnds = '{LA_MCHAT_SESSION_ENDS}';
         var mChatRefreshYes = '{MCHAT_REFRESH_YES}';
         var mChatRefreshNo = '{LA_MCHAT_REFRESH_NO}';
         var mChatMssgLngthLong = '{MCHAT_MESS_LONG}';
         <!-- IF MCHAT_MESSAGE_LNGTH -->
         var mChatMssgLngth = '{MCHAT_MESSAGE_LNGTH}';
         <!-- ELSE -->
         var mChatMssgLngth = false;
         <!-- ENDIF -->
         <!-- IF S_MCHAT_SOUND_YES -->
         var mChatSound = true;
         <!-- ELSE -->
         var mChatSound = false;
         <!-- ENDIF -->
         <!-- IF MCHAT_WHOIS -->
         var mChatWhois = true;
         var mChatWhoisRefresh = '{MCHAT_WHOIS_REFRESH}';
         <!-- ELSE -->
         var mChatWhois = false;
         var mChatWhoisRefresh = false;
         <!-- ENDIF -->
         <!-- IF MCHAT_ARCHIVE_MODE -->
         var mChatArchiveMode = true;
         <!-- ELSE -->
         var mChatArchiveMode = false;
         var form_name = 'postform';
         var text_name = 'message';
         var mChatFocusFix = true;
         <!-- ENDIF -->
         // ]]>
         </script>
         <!-- IF not MCHAT_ARCHIVE_MODE -->
         <script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/editor.js"></script>
         <div id="mChatmain">
         <!-- ENDIF -->
         <div id="mChatData">
   <!-- ENDIF -->
            <!-- INCLUDE mchat_no_avatars.html -->
      <!-- IF not MCHAT_READ_MODE -->
               <!-- IF MCHAT_NOMESSAGE_MODE --><div id="mChatNoMessage">{L_MCHAT_NOMESSAGE}</div><!-- ENDIF -->
         </div>
         <!-- IF not MCHAT_ARCHIVE_MODE -->         
         </div>
         <!-- IF MCHAT_STATIC_MESS --><span style="float:right; padding-right:4px;">{L_MCHAT_COPYRIGHT}</span><div class="mChatStatic"><strong>{L_MCHAT_ANNOUNCEMENT}:</strong> <span style="color:#990000;">{MCHAT_STATIC_MESS}</span></div><!-- ENDIF -->
         <!-- IF not (MCHAT_ARCHIVE_MODE or MCHAT_CUSTOM_PAGE) and MCHAT_WHOIS and S_MCHAT_INDEX_STATS --><div class="mChatStats" id="mChatStats"><!-- IF MCHAT_USERS_LIST --><a href="#" onclick="mChat.toggle('UserList'); return false;">{MCHAT_USERS_COUNT}</a><!-- ELSE -->{MCHAT_USERS_COUNT}<!-- ENDIF -->&nbsp;{L_MCHAT_ONLINE_EXPLAIN}<br /><span id="mChatUserList">{MCHAT_USERS_LIST}</span></div><!-- ENDIF -->         
         <form method="post" action="javascript//" onsubmit="mChat.add();" id="postform">
         <div class="mChatPanel">
            <noscript><div class="mchat_alert">{L_MCHAT_NOJAVASCRIPT}</div></noscript>
            <!-- IF MCHAT_ADD_MESSAGE -->
            <input type="hidden" name="mode" value="add" />
            <textarea  name="message" class="inputbox medium mChatText" id="mChatMessage" onkeydown="mChat.key(event);" rows="2" cols="32"></textarea><br />
            <input id="submit_button" type="button" class="button2" onclick="mChat.add();" value="{L_MCHAT_ADD}" />
            <input id="mChatClear" type="button" class="button2" onclick="mChat.clear();" value="{L_MCHAT_CLEAR_INPUT}" />
            <!-- IF MCHAT_ALLOW_SMILES and .smiley -->
            <input type="button" class="button2" onclick="mChat.toggle('Smiles');" value="{L_MCHAT_SMILES}" />
            <!-- ENDIF -->
            <!-- IF MCHAT_ALLOW_BBCODES -->
            <input type="button" class="button2" onclick="mChat.toggle('BBCodes');" value="{L_MCHAT_BBCODES}" />
            <!-- ENDIF -->
            <!-- ENDIF -->
            <!-- IF MCHAT_READ_ARCHIVE_BUTTON -->
            <input type="button" class="button2" onclick="window.location.href = '{MCHAT_ARCHIVE_URL}';" value="{L_MCHAT_ARCHIVE}" />
            <!-- ENDIF -->
            <!-- IF MCHAT_FOUNDER -->
            <input type="button" class="button2" onclick="window.location.href = '{MCHAT_CLEAN_URL}';" value="{L_MCHAT_CLEAN}" />
            <!-- ENDIF -->
            <!-- IF MCHAT_ADD_MESSAGE -->
            <!-- IF MCHAT_RULES -->
            <input type="button" class="button2" onclick="popup('{U_MCHAT_RULES}', 450, 275); return false;" value="{L_MCHAT_HELP}" />
            <!-- ENDIF -->
            <!-- IF MCHAT_ALLOW_BBCODES -->
               <!-- INCLUDE mchat_bbcodes.html -->
            <!-- ENDIF -->
            <!-- ENDIF -->
            <!-- IF MCHAT_ALLOW_SMILES and .smiley -->
            <div id="mChatSmiles" style="padding: 5px; display: none;">               
               <!-- BEGIN smiley -->
               <a href="#" onclick="insert_text('{smiley.A_SMILEY_CODE}', true); return false;"><img src="{smiley.SMILEY_IMG}" width="{smiley.SMILEY_WIDTH}" height="{smiley.SMILEY_HEIGHT}" alt="{smiley.SMILEY_CODE}" title="{smiley.SMILEY_DESC}" /></a>
               <!-- END smiley -->
               <a href="{U_MORE_SMILIES}" onclick="popup(this.href, 300, 350, '_phpbbsmilies'); return false;">{L_MORE_SMILIES}</a>               
            </div>
            <!-- ENDIF -->
            <div style="padding: 3px;">
               <img src="{ROOT_PATH}mchat/load.gif" alt="{L_MCHAT_LOAD}" title="{L_MCHAT_LOAD}" id="mChatLoadIMG" class="mChatImageLoad" />
               <img src="{ROOT_PATH}mchat/ok.gif" alt="{L_MCHAT_OK}" title="{L_MCHAT_OK}" id="mChatOkIMG" class="mChatImageOk" />
               <img src="{ROOT_PATH}mchat/error.gif" alt="{L_MCHAT_ERROR}" title="{L_MCHAT_ERROR}" id="mChatErrorIMG" class="mChatImageHideImg" />
               <img src="{ROOT_PATH}mchat/paused.gif" alt="{L_MCHAT_PAUSE}" title="{L_MCHAT_PAUSE}" id="mChatPauseIMG" class="mChatImageHideImg" />
               <span id="mChatRefreshText">{MCHAT_REFRESH_YES}</span><!-- IF MCHAT_USER_TIMEOUT --> &bull; <span id="mChatSessMess">&nbsp;</span><!-- ENDIF --> &bull; <label for="mChatUseSound">{L_MCHAT_USESOUND} <input type="checkbox" id="mChatUseSound" <!-- IF S_MCHAT_SOUND_YES -->checked="checked"<!-- ENDIF --> /></label>
            </div>
         </div>
         </form>
         <!-- ENDIF -->
         <div id="mChatSound" class="mChatSound"></div>
         <script type="text/javascript" src="{ROOT_PATH}mchat/mchat_ajax_mini.js"></script>
      </div>
      <!-- ENDIF -->
   <!-- ELSE -->
   <div class="mchat_alert">{L_MCHAT_ENABLE}</div>
   <!-- ENDIF -->
   <!-- IF not MCHAT_READ_MODE -->
         <!--/ ** If you remove this expect no support from me ** /-->
      </div>
</div>
</div>
   <!-- ENDIF -->
<!-- IF MCHAT_CUSTOM_PAGE and MCHAT_WHOIS -->
<h3>{L_WHO_IS_CHATTING}</h3>
   <div class="mChatStats" id="mChatStats"><!-- IF MCHAT_USERS_LIST --><a href="#" onclick="mChat.toggle('UserList'); return false;">{MCHAT_USERS_COUNT}</a><!-- ELSE -->{MCHAT_USERS_COUNT}<!-- ENDIF -->&nbsp;{L_MCHAT_ONLINE_EXPLAIN}<br /><span id="mChatUserList">{MCHAT_USERS_LIST}</span></div>
   <div class="mChatRefresh"><span id="mChatRefresh">{L_MCHAT_WHOIS_REFRESH_EXPLAIN}</span><span id="mChatRefreshN" style="display: none;">{L_MCHAT_REFRESHING}</span>
<!-- IF LEGEND --><br /><em>{L_LEGEND}: {LEGEND}</em><!-- ENDIF --></div>
<!-- ENDIF -->
<!-- IF MCHAT_ARCHIVE_MODE or MCHAT_CUSTOM_PAGE -->
<!-- INCLUDE overall_footer.html -->
<!-- ENDIF -->

Note that I am also using Rich addon for textarea. That mean that you also have to edit the mchat js if you use it.


I just found this 3d that is exactly what I was looking for!
I have a doubt though, what does "This is my mchat_body.html for the artodia style" means? The artodia main style folder, or the mobile style folder?
Anyone knows?
steve
Master of posting
Master of posting
Posts: 1213
Joined: 12 Jul 2009, 19:14
Location: uk
Contact:

Re: Suggestion: Mobile template for mchat.php?

Post by steve »

Its for the Mobile style ..,
Steve ©
footiefan
New member
New member
Posts: 2
Joined: 28 Nov 2013, 13:23

Re: Suggestion: Mobile template for mchat.php?

Post by footiefan »

steve wrote:Its for the Mobile style ..,

ok thanks!
So I have to create a new file and add it in the template folder of the mobile site.
Got it.
Cheers!
Leinad4Mind
Member
Member
Posts: 54
Joined: 15 Jun 2011, 17:16
Contact:

Re: Suggestion: Mobile template for mchat.php?

Post by Leinad4Mind »

Dani wrote:
Dani wrote:Trying to get mChat mobile friendly with Artodia Mobile style too. It is working fine with other styles, but not with Artodia. I have done the prosilver edits to the style and copied Stoker's mchat_body.html

JS error: Uncaught TypeError: Object #<Object> has no method 'key'
Link: http://screammagazine.com/scream2013/chat
Also, it doesn't look very mobile friendly. Any suggestions?

Any idea why I get that JS error?


I've the same problem... I will try to solve it.


Gero wrote:oh sorry 1 Question ;)

My Mchat settings set 30 Lines, that is perfect for all normal styles (prosilver, lucid lime,...), but on iphone and android i see all these lines.

is it possible to make a custom box with scrollbar? i know it isnt the best way for an android or apple.

if i try to use the standard mchat body, i have the textfield and send buttons in the middle of my mchat (over the chat text). it isnt important i can use 20 Lines, but maybe u know a solution.

greetings
Gero


You just need to FIND:

Code: Select all

<div id="mChatmain">


REPLACE:

Code: Select all

<div id="mChatmain" <!-- IF MCHAT_CUSTOM_PAGE -->class="mChatRowLimitCustom" style="height: {MCHAT_CUSTOM_HEIGHT}px;"<!-- ELSE -->class="mChatRowLimit" style="height: {MCHAT_INDEX_HEIGHT}px;"<!-- ENDIF -->>


;)

PS: Btw i'm getting "Failed to load resource: the server responded with a status of 403 (Forbidden)" on Send. So I can't send anything on this style... strange... anyone know why?
steve
Master of posting
Master of posting
Posts: 1213
Joined: 12 Jul 2009, 19:14
Location: uk
Contact:

Re: Suggestion: Mobile template for mchat.php?

Post by steve »

Possibly BECAUSE its missing {S_FORM_TOKEN} from with in the <form> tag ....
my artodia template's and css file will be posted tomoro
Steve ©
Leinad4Mind
Member
Member
Posts: 54
Joined: 15 Jun 2011, 17:16
Contact:

Re: Suggestion: Mobile template for mchat.php?

Post by Leinad4Mind »

[img]http://www.en.kolobok.us/smiles/light_skin/facepalm.gif[/img]

Thanks steve! ;)
steve
Master of posting
Master of posting
Posts: 1213
Joined: 12 Jul 2009, 19:14
Location: uk
Contact:

Re: Suggestion: Mobile template for mchat.php?

Post by steve »

mChat version 1.3.7/1.3.8 Artodia Mobile style template and css file
mobile.zip
fixed
(5.23 KiB) Downloaded 1200 times

extract the zip file and upload the template and theme folder into your Artodia Mobile style folder ,refresh and f5..
Steve ©
User avatar
RMcGirr83
Supporter
Supporter
Posts: 6242
Joined: 30 Nov 2006, 14:23
Real name: Rich McGirr

Re: Suggestion: Mobile template for mchat.php?

Post by RMcGirr83 »

Steve, please double check your files and test. You have a spelling mistake which won't allow anyone to submit a message.
steve
Master of posting
Master of posting
Posts: 1213
Joined: 12 Jul 2009, 19:14
Location: uk
Contact:

Re: Suggestion: Mobile template for mchat.php?

Post by steve »

nub, fixed..
Steve ©
neuropass
Member
Member
Posts: 66
Joined: 12 Apr 2010, 17:07

Re: Suggestion: Mobile template for mchat.php?

Post by neuropass »

Togbish wrote:
RMcGirr83 wrote:Holy god your files are a mess. You have jQuery being loaded multiple times as well as the ui theme css and just way too much stuff going on. You will have to clean that stuff up first. Even your prosilver style isn't working correctly.


I tend to place so much emphasis on my Mobile version, It is what most of my members use. Since phpBB does not have an official version and the owner of the Style does not give Mod support, I am left to figure out how to get things working somehow. Nearly everything on my desktop version has a copy on the Mobile.


Or switch to premium paid template where you get support from the author etc etc..
bubban
New member
New member
Posts: 7
Joined: 15 Feb 2014, 15:07

Re: Suggestion: Mobile template for mchat.php?

Post by bubban »

So probably going to get shot down for asking this noob question but here goes, I did what Steve recommended uploaded the files into the required artodia folder and I still don't get any mchat on my mobile version of my forum.

Would anyone care to help a relative newbie?

Thanks
User avatar
RMcGirr83
Supporter
Supporter
Posts: 6242
Joined: 30 Nov 2006, 14:23
Real name: Rich McGirr

Re: Suggestion: Mobile template for mchat.php?

Post by RMcGirr83 »

You also have to edit the appropriate html files within the template.
Post Reply