small changes for compatibility with SMF 2.0.x #139

Closed
wants to merge 4 commits into
from

Conversation

Projects
None yet
4 participants
@MissAllSunday

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.

MissAllSunday added some commits Feb 5, 2014

SMF uses a db prefix so we need to add it to every ajax table
also trimming tabs on empty lines

Signed-off-by: Suki <suki@missallsunday.com>
We already have the database name so overwrite this method to skip th…
…e check on $this->db->getName()

Signed-off-by: Suki <suki@missallsunday.com>
oops! forgot to add the global :P
Signed-off-by: Suki <suki@missallsunday.com>
meh, all tables tarts with ajax_chat_ for some reasons the old integr…
…ation script listed them as "ajaxchat_"

Signed-off-by: Suki <suki@missallsunday.com>

@Frug Frug self-assigned this Feb 10, 2014

@Frug

This comment has been minimized.

Show comment
Hide comment
@Frug

Frug Feb 12, 2014

Owner

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';

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

This comment has been minimized.

Show comment
Hide comment
@Sophist-UK

Sophist-UK Feb 12, 2014

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.

Contributor

Sophist-UK commented Feb 12, 2014

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

This comment has been minimized.

Show comment
Hide comment
@MissAllSunday

MissAllSunday Feb 13, 2014

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.

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

This comment has been minimized.

Show comment
Hide comment
@Frug

Frug Feb 13, 2014

Owner

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.

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

This comment has been minimized.

Show comment
Hide comment
@MissAllSunday

MissAllSunday Feb 14, 2014

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.

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

This comment has been minimized.

Show comment
Hide comment
@Frug

Frug Feb 14, 2014

Owner

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

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

This comment has been minimized.

Show comment
Hide comment
@wintstar

wintstar May 14, 2015

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

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