Chat box

Wish to see a specific feature/change in future releases? Feel free to post it here, and if it gets enough "likes", we'd definitely include it in future releases!
Post Reply
patsd102
Veteran Member
Posts: 139
Joined: 2013-01-15 19:59

Chat box

Post by patsd102 » 2019-07-02 18:13

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
23.17

sjohn
Veteran Member
Posts: 86
Joined: 2018-05-23 09:32

Re: Chat box

Post by sjohn » 2019-07-03 07:07

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.

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1140
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: Chat box

Post by onoehring » 2019-07-03 17:00

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

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1797
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Chat box

Post by jsetzer » 2019-07-03 18:03

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 9693 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 9693 times
chrome_2019-07-03_20-00-45.png
chrome_2019-07-03_20-00-45.png (112.07 KiB) Viewed 9693 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
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

patsd102
Veteran Member
Posts: 139
Joined: 2013-01-15 19:59

Re: Chat box

Post by patsd102 » 2019-07-03 18:24

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
23.17

patsd102
Veteran Member
Posts: 139
Joined: 2013-01-15 19:59

Re: Chat box

Post by patsd102 » 2019-07-03 18:28

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
23.17

patsd102
Veteran Member
Posts: 139
Joined: 2013-01-15 19:59

Re: Chat box

Post by patsd102 » 2020-04-28 21:46

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
23.17

kerelov
Veteran Member
Posts: 42
Joined: 2020-04-17 21:20
Location: Bulgaria

Re: Chat box

Post by kerelov » 2020-05-26 11:00

Can you post your solution for the "shout box"?

User avatar
Jay Webb
Veteran Member
Posts: 80
Joined: 2017-08-26 15:27
Contact:

Re: Chat box

Post by Jay Webb » 2020-05-27 16:24

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>

What we envision, we make happen.

User avatar
Jay Webb
Veteran Member
Posts: 80
Joined: 2017-08-26 15:27
Contact:

Re: Chat box

Post by Jay Webb » 2020-05-27 17:28

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);
        }
What we envision, we make happen.

patsd102
Veteran Member
Posts: 139
Joined: 2013-01-15 19:59

Re: Chat box

Post by patsd102 » 2020-05-27 19:49

Hi Jay webb

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

Pat
23.17

User avatar
Jay Webb
Veteran Member
Posts: 80
Joined: 2017-08-26 15:27
Contact:

Re: Chat box

Post by Jay Webb » 2020-05-27 20:18

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.
What we envision, we make happen.

patsd102
Veteran Member
Posts: 139
Joined: 2013-01-15 19:59

Re: Chat box

Post by patsd102 » 2020-05-27 20:50

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
23.17

Post Reply