Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small changes for compatibility with SMF 2.0.x #139

Closed
wants to merge 4 commits into from

Conversation

MissAllSunday
Copy link

This PR adds minor changes to make ajaxChat 0.8.7 compatible with SMF 2.0.x

  • SMF uses a unique prefix on all its tables so we need to add it to our ajax chat tables as well.
  • Since we already added the prefix, the check on AJAXChat::getDataBaseTable() becomes obsolete so re-write the method to skip it.

also trimming tabs on empty lines

Signed-off-by: Suki <suki@missallsunday.com>
…e check on $this->db->getName()

Signed-off-by: Suki <suki@missallsunday.com>
Signed-off-by: Suki <suki@missallsunday.com>
…ation script listed them as "ajaxchat_"

Signed-off-by: Suki <suki@missallsunday.com>
@Frug Frug self-assigned this Feb 10, 2014
@Frug
Copy link
Owner

Frug commented Feb 12, 2014

Thanks for the commits.

.. but I prefer that ajax_chat's tables not be prefixed the same way as my forum. This is by design and not necessarily an incompatability. What about just adding your prefix in your config.php?
$config['dbTableNames']['online'] = 'smf_prefix_ajax_chat_online';

@Sophist-UK
Copy link
Contributor

Whilst I respect @Frug 's preference for not having the prefix added by default, my own preference would be for the prefix to be added by default and it can be removed by the user if they want to change it.

P.S. I would like to see this implemented for phpbb and other environments in addition to SMF.

@MissAllSunday
Copy link
Author

Hi, yes, I understand it is more easy to modify the config file, however, I was thinking more about helping those who want to write integration scripts, for example, it is on my to-do list to create a new integration script for SMF as the current one is a bit outdated now.

With the proposed changes I wouldn't have to have a copy of the chat on my repo, I could use composer or git submodules to grab the chat whenever I need it, thus, allowing me to keep my repo simpler since I wouldn't have to worry about updating the chat code whenever there is a new release.

Greetings.

@Frug
Copy link
Owner

Frug commented Feb 13, 2014

Well... I'm not against it per-se, and I don't see the problem with adding it to the config, but if it helps your development process, why not.

Please do use the testing branch for future development. It's structured differently and I have to manually merge these changes to it.

@MissAllSunday
Copy link
Author

Thanks, I didn't now how you handled the different branches, I thought you were pushing new versions to each forum specific branch. Although, this changes are specific for SMF, it would broke integration to other forums if they are applied on that branch.

@Frug
Copy link
Owner

Frug commented Feb 14, 2014

I was merging from master to all branches, but it was a pain. Now everything is in the testing branch.

@wintstar
Copy link

Thank you MissAllSunday , this fixed a bug in my modification SMF AJAX Chat. Works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants