mChat add message

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
deejay_xb
Member
Member
Posts: 87
Joined: 03 Apr 2011, 06:29
Contact:

mChat add message

Postby deejay_xb » 16 Jan 2015, 17:31

I'm trying to make an android app that connects to mchat, displays messages and user can post message after login.
I can get the messages from mchat but for posting the link is something like this:
/mchat.php?mode=add&message=testtestest&addbbcode20=100&addbbcode_custom=%23&creation_time=1421350220&form_token=cc82asdadsa122141faac5c4493aa220fe57

as i've seen the creation_time is unix current time and the form_token is somehow generated at each message.

If so how can i generate that form_token, what is it based of, sessionid+time, or what?

if i am wrong then please tell me if there is some solution to post message in mchat from outside..

User avatar
tumba25
Past Contributor
Past Contributor
Posts: 1058
Joined: 24 Oct 2007, 13:10
Real name: Jari Kanerva
Location: Kokkola, Finland.
Contact:

Re: mChat add message

Postby tumba25 » 16 Jan 2015, 22:15


deejay_xb
Member
Member
Posts: 87
Joined: 03 Apr 2011, 06:29
Contact:

Re: mChat add message

Postby deejay_xb » 17 Jan 2015, 17:24


User avatar
tumba25
Past Contributor
Past Contributor
Posts: 1058
Joined: 24 Oct 2007, 13:10
Real name: Jari Kanerva
Location: Kokkola, Finland.
Contact:

Re: mChat add message

Postby tumba25 » 17 Jan 2015, 21:35

You have to look in the mChat sources or the page source of a site running mChat for that value. You are looking for something like .

deejay_xb
Member
Member
Posts: 87
Joined: 03 Apr 2011, 06:29
Contact:

Re: mChat add message

Postby deejay_xb » 18 Jan 2015, 08:28


User avatar
tumba25
Past Contributor
Past Contributor
Posts: 1058
Joined: 24 Oct 2007, 13:10
Real name: Jari Kanerva
Location: Kokkola, Finland.
Contact:

Re: mChat add message

Postby tumba25 » 18 Jan 2015, 11:13

don't exist. It is . Unless you create it and ship it with your app. And those values are not returned by default, you need to query for them when you have a user id and a session id.

deejay_xb
Member
Member
Posts: 87
Joined: 03 Apr 2011, 06:29
Contact:

Re: mChat add message

Postby deejay_xb » 18 Jan 2015, 11:19


User avatar
tumba25
Past Contributor
Past Contributor
Posts: 1058
Joined: 24 Oct 2007, 13:10
Real name: Jari Kanerva
Location: Kokkola, Finland.
Contact:

Re: mChat add message

Postby tumba25 » 18 Jan 2015, 12:46

If is a custom made file for your board you can have it return what you want. I would suggest returning a json encoded array.

deejay_xb
Member
Member
Posts: 87
Joined: 03 Apr 2011, 06:29
Contact:

Re: mChat add message

Postby deejay_xb » 18 Jan 2015, 14:43


User avatar
tumba25
Past Contributor
Past Contributor
Posts: 1058
Joined: 24 Oct 2007, 13:10
Real name: Jari Kanerva
Location: Kokkola, Finland.
Contact:

Re: mChat add message

Postby tumba25 » 18 Jan 2015, 16:05

might differ?
I had a quick look in mChat files and could not find any form name there only form id. That is not the same thing. Maybe try to leave that empty?

deejay_xb
Member
Member
Posts: 87
Joined: 03 Apr 2011, 06:29
Contact:

Re: mChat add message

Postby deejay_xb » 18 Jan 2015, 16:14

time() is the same, i've used the time() from the mchat autogenerated url
also i put form_name empty but also got different sha1..

User avatar
tumba25
Past Contributor
Past Contributor
Posts: 1058
Joined: 24 Oct 2007, 13:10
Real name: Jari Kanerva
Location: Kokkola, Finland.
Contact:

Re: mChat add message

Postby tumba25 » 19 Jan 2015, 12:51

I should probably install mChat somewhere here.

deejay_xb
Member
Member
Posts: 87
Joined: 03 Apr 2011, 06:29
Contact:

Re: mChat add message

Postby deejay_xb » 19 Jan 2015, 15:15

cool, then we can make some tests also here :D

User avatar
tumba25
Past Contributor
Past Contributor
Posts: 1058
Joined: 24 Oct 2007, 13:10
Real name: Jari Kanerva
Location: Kokkola, Finland.
Contact:

Re: mChat add message

Postby tumba25 » 20 Jan 2015, 07:57


deejay_xb
Member
Member
Posts: 87
Joined: 03 Apr 2011, 06:29
Contact:

Re: mChat add message

Postby deejay_xb » 20 Jan 2015, 08:56

IF the app will work then it will be a free app.
for now to start and develop the app i need to figure out how to make the generated add mchat link..


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “Modders MOD support”

Who is online

Users browsing this forum: No registered users and 6 guests