Title: Adding PHP Chat
Last modified: August 20, 2016

---

# Adding PHP Chat

 *  [intrepid9](https://wordpress.org/support/users/intrepid9/)
 * (@intrepid9)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/adding-php-chat/)
 * I’m trying to get [ShoutCloud](http://codecanyon.net/item/shoutcloud-flexible-phpajax-shoutboxchat/125018)
   to work with my site.
 * Now the [instructions](http://www.watconsult.com/watconsult/kotakeva/shout-box/Documentation.pdf)
   say that I have to do add this to my page
 *     ```
       <?php session_start(); ?>
       <?php include('shoutcloud.php'); ?>
       <link type="text/css" rel="stylesheet" href="shoutcloud/ShoutCloud-min.css" media="screen">
       <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
       <script type="text/javascript" src="shoutcloud/ShoutCloud-min.js"></script>
       ```
   
 * I used this [plugin](http://wordpress.org/extend/plugins/allow-php-in-posts-and-pages/)
   to try to add it but it doesn’t work. Any help?

Viewing 14 replies - 1 through 14 (of 14 total)

 *  [Kevin Muldoon](https://wordpress.org/support/users/kevin-muldoon/)
 * (@kevin-muldoon)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/adding-php-chat/#post-2542596)
 * It looks like you are trying to add it to a post or page. I would instead try
   hard coding it into your template e.g. sidebar.php or page.php.
 *  [Snat](https://wordpress.org/support/users/snat/)
 * (@snat)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/adding-php-chat/#post-2542624)
 * You would be best to do it on it’s own page and then use a page template to add
   the needed code that you have above.
 *  Thread Starter [intrepid9](https://wordpress.org/support/users/intrepid9/)
 * (@intrepid9)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/adding-php-chat/#post-2542667)
 * So I add
 *     ```
       <?php session_start(); ?>
       <?php include('shoutcloud.php'); ?>
       ```
   
 * to the page.php template and add
 *     ```
       <link type="text/css" rel="stylesheet" href="shoutcloud/ShoutCloud-min.css" media="screen">
       <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
       <script type="text/javascript" src="shoutcloud/ShoutCloud-min.js"></script>
       ```
   
 * to the page?
 *  Thread Starter [intrepid9](https://wordpress.org/support/users/intrepid9/)
 * (@intrepid9)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/adding-php-chat/#post-2542704)
 * Ok, I got it to display but it isn’t displaying correctly… Help anyone?
 *  [Snat](https://wordpress.org/support/users/snat/)
 * (@snat)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/adding-php-chat/#post-2542723)
 * A link to the page would be useful in seeing what exactly you mean by “isn’t 
   displaying correctly”.
 *  Thread Starter [intrepid9](https://wordpress.org/support/users/intrepid9/)
 * (@intrepid9)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/adding-php-chat/#post-2542754)
 * Here is the [link](http://serv.x10.bz/chat-test/)
 *  [Snat](https://wordpress.org/support/users/snat/)
 * (@snat)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/adding-php-chat/#post-2542775)
 * Okay, it is due to where you place the code. If you are allowed, can you post
   the whole template file you edited and I will replace it to where it is meant
   to go in that file.
 *  Thread Starter [intrepid9](https://wordpress.org/support/users/intrepid9/)
 * (@intrepid9)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/adding-php-chat/#post-2542780)
 * Oh, by the way, this is [another one I did](http://serv.x10.bz/chat-2-2/). This
   one looks more like what it is supposed to look like, however, it still doesn’t
   function correctly…
    I checked the smilies and the path they are looking for;
   it is like /page/shoutcloud/smilies/bla but since wordpress makes dynamic pages,
   it isn’t able to be put where it wants to.
 * I used a custom template because I didn’t want to destroy the main pages. It 
   is basically a direct copy of the page.php
 * Anyway, I have pasted [everything here on pastebin](http://pastebin.com/BQ5Jq87y).
 *  Thread Starter [intrepid9](https://wordpress.org/support/users/intrepid9/)
 * (@intrepid9)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/adding-php-chat/#post-2542834)
 * So, there is no way to do this?
 *  [Snat](https://wordpress.org/support/users/snat/)
 * (@snat)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/adding-php-chat/#post-2542852)
 * Did you include all of shoutcloud files in the template folder?
 * Reason I ask is we may need to change how the include bit works and edit the 
   file a bit to point to the correct location for the images as you pointed out.
 *  Thread Starter [intrepid9](https://wordpress.org/support/users/intrepid9/)
 * (@intrepid9)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/adding-php-chat/#post-2542854)
 * The template folder? I put a copy of the folder in the main directory and also
   another copy in the theme folder…
 * Also, the images was just an example; all the stuff that is needed is in the 
   shoutcloud folder which it can’t find.
 *  [Snat](https://wordpress.org/support/users/snat/)
 * (@snat)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/adding-php-chat/#post-2542855)
 * Right, I am going to give it a try on my site tomorrow and if I get it working
   I will post how I did it for you.
 *  Thread Starter [intrepid9](https://wordpress.org/support/users/intrepid9/)
 * (@intrepid9)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/adding-php-chat/#post-2542865)
 * Ok thanks. Do you need the shoutbox folder and php files?
 *  Thread Starter [intrepid9](https://wordpress.org/support/users/intrepid9/)
 * (@intrepid9)
 * [14 years ago](https://wordpress.org/support/topic/adding-php-chat/#post-2542924)
 * I know this is old, but it still isn’t resolved… Can anyone help?

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Adding PHP Chat’ is closed to new replies.

## Tags

 * [ajax](https://wordpress.org/support/topic-tag/ajax/)
 * [code](https://wordpress.org/support/topic-tag/code/)
 * [jquery](https://wordpress.org/support/topic-tag/jquery/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 14 replies
 * 3 participants
 * Last reply from: [intrepid9](https://wordpress.org/support/users/intrepid9/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/adding-php-chat/#post-2542924)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
