Page 1 of 1

Chat box

Posted: 2019-07-02 18:13
by patsd102
HI,

Has anyone every tried to intergrate a chat or shout box into their app?

Just wondering,

I use to use this one on a php site I had = https://sourceforge.net/projects/ajax-chat/#screenshots

Re: Chat box

Posted: 2019-07-03 07:07
by sjohn
Take a look at : https://www.tawk.to

I have not integrated it in a AppGini app yet, but it is really easy to integrate.
You get some code that you paste into the page you want it to appear on, and then you have a chat-box in lower right corner. Functions on desktops as well as mobiles. Useful for support - users can get a subscript of the conversation. It is basically free.

Re: Chat box

Posted: 2019-07-03 17:00
by onoehring
Hi patsd102,

there is a new location for that project: https://frug.github.io/AJAX-Chat/
I quickly downloaded the standalone version.
It seems that one should be able to include the /index.php in the chat directory. I would suggest trying this in the hooks file of the table (views) you want to make this chat available to. If the include does not work, copy the contents of that file in the hooks table directly and adjust path settings.

As a "bonus", you could copy the database settings from AG into the variables of the ajax chat.

Olaf

Re: Chat box

Posted: 2019-07-03 18:03
by jsetzer
Hi,

I'm using LiveZilla...

https://www.livezilla.net/home/en/
https://www.livezilla.net/home/de/

...which also has free plans (see https://www.livezilla.net/shop/en/?action=preview).

I have integrated a chat-button into the applications homepage.

chrome_2019-07-03_19-34-17.png
chrome_2019-07-03_19-34-17.png (19.93 KiB) Viewed 9761 times

You can configure your working times. During workings times and when I'm online, my (paying) customers can chat with me, call us or send us a message. Outside working hours they can send a message. The fields like sender-name and sender-email are automatically filled according to the current user's appgini membership profile.

chrome_2019-07-03_19-35-34.png
chrome_2019-07-03_19-35-34.png (138.82 KiB) Viewed 9761 times
chrome_2019-07-03_20-00-45.png
chrome_2019-07-03_20-00-45.png (112.07 KiB) Viewed 9761 times

There is also a free smartphone app and a web app which can be used as a ticket system.

Hope this helps,
Regards,
Jan

Re: Chat box

Posted: 2019-07-03 18:24
by patsd102
Thanks for all your suggestions guys.

I was really looking for a chat box that would read the users in the database. (fully integrated)
I can use ajax chat, its easy to install, but \i would like the users to appear when logged in to the app,

I hope this is clear

Pat

Re: Chat box

Posted: 2019-07-03 18:28
by patsd102
Bye the way.

If someone is looking for a customer type chat, I used this for a while.
Its easy to install and fully FREE

https://www.mylivechat.com/

cheers

Re: Chat box

Posted: 2020-04-28 21:46
by patsd102
SO.

I have made a hack to allow users make contact with each other through the site.
I call it a shout box, as it is of sorts.

Users click the "shout" button to post, and on "add new" click they are returned to this page,

Its all a bit hacky, but interest in it seems okay so far

Image

Re: Chat box

Posted: 2020-05-26 11:00
by kerelov
Can you post your solution for the "shout box"?

Re: Chat box

Posted: 2020-05-27 16:24
by Jay Webb
Ok..
I'm using appgini 5.82
Ajax Chat 0.8.8
I added this to 'footer.php' in main directory, I tried adding to footer-extra but didn' like results.
Opens from the bottom up.
And, you will need to configure Ajax Chat for your own server..

Code: Select all

<div class="panel-group" id="accordion">
  <div class="panel panel-default">
    <div class="panel-heading">
      <h4 class="panel-title">
        <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
          Chat Box
        </a>
      </h4>
    </div>
    <div id="collapseOne" class="panel-collapse collapse">
      <div id="chatbox" class="panel-body">
<iframe id="chatter" src="./chat/index.php"></iframe>
      </div>
    </div>
  </div>
</div>
<?php
function getShoutBoxContent() {
// URL to the chat directory:
if(!defined('AJAX_CHAT_URL')) {
	define('AJAX_CHAT_URL', './MBDS/chat/');
}

// Path to the chat directory:
if(!defined('AJAX_CHAT_PATH')) {
	define('AJAX_CHAT_PATH', realpath(dirname($_SERVER['SCRIPT_FILENAME']).'/chat').'/');
}

// Validate the path to the chat:
if(@is_file(AJAX_CHAT_PATH.'lib/classes.php')) {
	
	// Include Class libraries:
	require_once(AJAX_CHAT_PATH.'lib/classes.php');
	
	// Initialize the shoutbox:
	$ajaxChat = new CustomAJAXChatShoutBox();
	
	// Parse and return the shoutbox template content:
	return $ajaxChat->getShoutBoxContent();
}

return null;
}
?>
			<!-- Add footer template above here -->
			<div class="clearfix"></div>
			<?php if(!$_REQUEST['Embedded']) { ?>
				<div style="height: 70px;" class="hidden-print"></div>
			<?php } ?>

		</div> <!-- /div class="container" -->
		<?php if(!defined('APPGINI_SETUP') && is_file(dirname(__FILE__) . '/hooks/footer-extras.php')) { include(dirname(__FILE__).'/hooks/footer-extras.php'); } ?>
		<script src="<?php echo PREPEND_PATH; ?>resources/lightbox/js/lightbox.min.js"></script>
	</body>
</html>


<script type="text/javascript">
$('#collapseOne').on('show.bs.collapse', function () {    
    $('.panel-heading').animate({
        backgroundColor: "#515151"
    }, 800);   
})

$('#collapseOne').on('hide.bs.collapse', function () {    
    $('.panel-heading').animate({
        backgroundColor: "#00B4FF"
    }, 800);   
})

</script>

<style>
#accordion {
    position: fixed;
    bottom: -15px;
    width: 88%;
}

.panel-default > .panel-heading{
    background: #00B4FF;
	border-radius: 10px 10px 0 0;
}

.panel-heading {
    padding: 0;
    border-top-left-radius: 0px;
    border-top-right-radius: 0px;
}

.panel-group .panel {
    border-radius: 10px 10px 0 0 ;
}

.panel-title a {
    color: #FFFFFF;
    text-align: center;
    width: 100%;
    display: block;
    font-size: 12px;
    font-family: Helvetica,Arial,sans-serif;
    outline: none;
}

.panel-title a:hover, .panel-title a:focus, .panel-title a:active {
    text-decoration: none;
    outline: none;
}
#chatbox {
	height:600px;
	width:100%;
}
#chatter {
	height: 100%;
	width: 100%;
}
</style>


Re: Chat box

Posted: 2020-05-27 17:28
by Jay Webb
A little upgrade, add glyphicon after button text.

Code: Select all

<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
         Chat Box
		 <span class="glyphicon glyphicon-chevron-right js-rotate-if-collapsed"></span></a>
Add this to the style

Code: Select all

  [data-toggle="collapse"][aria-expanded="true"] > .js-rotate-if-collapsed
        {
            -webkit-transform: rotate(90deg);
            -moz-transform:    rotate(90deg);
            -ms-transform:     rotate(90deg);
            -o-transform:      rotate(90deg);
            transform:         rotate(90deg);
        }

Re: Chat box

Posted: 2020-05-27 19:49
by patsd102
Hi Jay webb

Does this chat integrate the userfrom appgini into the chat
or does the user have to login as a guest

Pat

Re: Chat box

Posted: 2020-05-27 20:18
by Jay Webb
You have to set up each account to be able login, its hard coded, if you want guests, you could remove user name and pass.

Re: Chat box

Posted: 2020-05-27 20:50
by patsd102
Ah, thanks for the reply.

I have used ajax chat before and its a nice chat,
It would be cool if you could integrate it
into appgini,
Sadly its beyond me,
Its also not mobile friendly,

The reason mine looks like it is, is I want only
users logged in only to be able to to post.

regards

Pat :D