News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Installing iFlychat into SMF Default Theme

Started by MicroGuy, April 14, 2014, 03:56:42 PM

Previous topic - Next topic

MicroGuy

Greetings!

I've been working on this most of the day (not a php guy) and still haven't quite got it working.  :-[

We are attempting to integrate the iFlychat client into our forum. Here are the relevant links:

Installation docs: https://iflychat.com/installation/php-chat-client [nofollow]
Our Forum: https://www.gldtalk.org/index.php [nofollow]

I have confirmed the paths are correct by using the test index file that came with the iflychat zip file.

Working test page: https://www.gldtalk.org/iflychat-php/index.php [nofollow]

What we need to know is where to installed the code. I tried putting everything in "index_template.php" but this results in no chatbox appearing and the following error message in the SMF log:

https://www.gldtalk.org/index.php?https://www.gldtalk.org/ [nofollow]
8: Undefined variable: ifly_html_code
File: D:/users/gldtalk.org/htdocs/Themes/default/BoardIndex.template.php (body_above sub template - eval?)
Line: 187


Where to put this:

require_once('./iflychat-php/iflychat_api_settings.php');
require_once('./iflychat-php/iflychat_api.php');
$iflychat = new iFlyChat($iflychat_settings);
$ifly_html_code = $iflychat->get_html_code();


Where to put this:

print $ifly_html_code;

And how to complete step #9 of the instructions here: https://iflychat.com/installation/php-chat-client [nofollow] I think for step #9 we might need to do something as is described on this page: http://wiki.simplemachines.org/smf/How_to_use_the_SMF_user_system_outside_of_SMF

If anyone can help by providing step-by-step instuctions it would be very much appreciated! (:D)

kat

You put the code in index.template and got an error about Boardindex.template?

Odd. Although, that "eval" thing is masking the true error, I believe. If you "Disable evaluation of templates", in Admin>Server settings, you might get a different error.

MicroGuy

#2
I made a copy of the default theme then changed to the duplicated theme in my profile settings.

My idea was to use the duplicate theme for development and then migrate the code changes once I got the chat working.

EDIT: I might should mention that this forum has tapatalk installed.

MicroGuy

I was able to get rid of the errors but now the box simply never appears. But you can see the ifly code in the page source.


// Custom banners and shoutboxes should be placed here, before the linktree.

// iFlychat
global $iflychat, $ifly_html_code;
require_once('./iflychat-php/iflychat_api_settings.php');
require_once('./iflychat-php/iflychat_api.php');
$iflychat = new iFlyChat($iflychat_settings);
$ifly_html_code = $iflychat->get_html_code();

print $ifly_html_code;

margarett

I'm not sure if that will ever work over Tapatalk (if I had to guess, I'd say no)

For what you wish to do, there's nothing probably already made. I'm also not entirely sure on how to accomplish all of that, at least without proper testing. That takes time that I really don't have at the moment.

My serious advice would be to contact the chat authors. It's a paid product so I would expect nothing less than proper support on how to get that to work...

As for getting that point #9, well, it's a shame they use a variable $user_info because it overlaps with a variable with the same name from SMF. If it wasn't for that, it would be more or less easy to globalize our own $user_info and fill the correct variables to their structure...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Advertisement: