Advertisement:

Author Topic: SA Chat  (Read 532258 times)

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,227
  • Hoarding Budweiser in NY
Re: SA Chat
« Reply #1840 on: February 20, 2020, 06:36:40 PM »
Not my forum, don't like to play too much.  I'll try it when there's more members active. 

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,631
  • Gender: Male
  • the "mods and tweaks" junkie
    • aegersz on GitHub
    • dopetalk (drugs and users)
Re: SA Chat
« Reply #1841 on: February 20, 2020, 09:04:57 PM »
I found that the new version isn't as reliable as the old version so it looks like I'm staying on 2.0.15 forever.

Thanks anyway.
The configuration of my Linux VPS (SMF 2.0 with 150 mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Offline kesulin

  • Semi-Newbie
  • *
  • Posts: 48
Re: SA Chat
« Reply #1842 on: February 21, 2020, 02:43:28 AM »
I found that the new version isn't as reliable as the old version so it looks like I'm staying on 2.0.15 forever.

Thanks anyway.
In my forum works fine, with the correct number of online users.
Check it:
castronegro.net

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,631
  • Gender: Male
  • the "mods and tweaks" junkie
    • aegersz on GitHub
    • dopetalk (drugs and users)
Re: SA Chat
« Reply #1843 on: February 21, 2020, 03:46:53 AM »
Since the new version (REV120) is not as reliable as the old version for me so this is how to upgrade the old revision (SAChatBar-1.0a) to 2.0.16 -> 17 partially borrowed from SMF's Diego Andrés here   

Locate: ./sachat/index.php
Code: [Select]
//SMF Cookie autentication!!!
list ($member_id, $password) = initCookies();

Replace:
Code: [Select]
//SMF Cookie autentication!!!
$member_id = initCookies();

Locate:
Code: [Select]
        // Lets validate the password, anyone can put a number in a cookie, lets see if the password checks out.
        if (isset($user_settings['passwd']) && strlen($password) != 40 || isset($user_settings['passwd']) && sha1($user_settings['passwd'] . $user_settings['password_salt']) != $password) {
                $context['JSON']['STATUS'] = 'AUTH FAILED';
                doOutput();
        } else {
                $context['JSON']['STATUS'] = 'ACTIVE';
        }

Replace:
Code: [Select]
        // No need to validate the password since 2.0.16
        $context['JSON']['STATUS'] = 'ACTIVE';

Locate: ./sachat/functions.php
Code: [Select]
function initCookies() {
global $cookiename;

if (isset($_COOKIE[$cookiename]) && preg_match('~^a:[34]:\{i:0;(i:\d{1,6}|s:[1-8]:"\d{1,8}");i:1;s:(0|40):"([a-fA-F0-9]{40})?";i:2;[id]:\d{1,14};(i:3;i:\d;)?\}$~i', $_COOKIE[$cookiename]) == 1) {
list ($member_id, $password) = @unserialize($_COOKIE[$cookiename]);
$member_id = !empty($member_id) && strlen($password) > 0 ? (int) $member_id : 0;

return array($member_id, $password);
} elseif (isset($_COOKIE[$cookiename])) {
list ($member_id, $password) = @unserialize(stripslashes($_COOKIE[$cookiename]));
$member_id = !empty($member_id) && strlen($password) > 0 ? (int) $member_id : 0;

return array($member_id, $password);
}
}

Replace:
Code: [Select]
function initCookies() {
global $cookiename;

if (isset($_COOKIE[$cookiename]) && preg_match('~^a:[34]:\{i:0;(i:\d{1,6}|s:[1-8]:"\d{1,8}");i:1;s:(0|40):"([a-fA-F0-9]{40})?";i:2;[id]:\d{1,14};(i:3;i:\d;)?\}$~i', $_COOKIE[$cookiename]) == 1) {
list ($id_member, $password) = @unserialize($_COOKIE[$cookiename]);
$id_member = !empty($id_member) && strlen($password) > 0 ? (int) $id_member : 0;

return $id_member;
} elseif (isset($_COOKIE[$cookiename])) {
list ($id_member, $password, $login_span) = @unserialize($_SESSION['login_' . $cookiename]);
$id_member = !empty($id_member) && strlen($password) > 0 ? (int) $id_member : 0;

return $id_member;
}
}

This works on 2.0.17
The configuration of my Linux VPS (SMF 2.0 with 150 mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,631
  • Gender: Male
  • the "mods and tweaks" junkie
    • aegersz on GitHub
    • dopetalk (drugs and users)
Re: SA Chat
« Reply #1844 on: February 21, 2020, 01:19:22 PM »
the previous post has an error as it mentions "SAChatBar-1.0a" but it is really called "SAChatBar-0.1.5 "

attached is the file that incorporates the above code changes that I named SAChatBar-0.1.6 Rev 111
The configuration of my Linux VPS (SMF 2.0 with 150 mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Offline Diego Andrés

  • Customizer
  • SMF Hero
  • *
  • Posts: 3,561
  • Gender: Male
    • DiegoAndresCortes on GitHub
    • @bihgetter on Twitter
    • SMF Tricks - Free & Premium Themes
Re: SA Chat
« Reply #1845 on: February 21, 2020, 03:41:41 PM »
Still don’t think anyone should be using the old version it’s at least 5 years old.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,631
  • Gender: Male
  • the "mods and tweaks" junkie
    • aegersz on GitHub
    • dopetalk (drugs and users)
Re: SA Chat
« Reply #1846 on: February 21, 2020, 05:00:27 PM »
I am all about staying current in all possible situations but the newest version simply fails to work as well for me.

Rather that spend a great deal of time figuring out why it doesn't see all the online members, i will stick with what works best for me.

Anyhow, i learned a little and got it working so that brings with it a sense of satisfaction.

The mod, unlike many others, offers two versions and this might be the reason why.

Due to my large number of mods, i am still not brave enough to upgrade my live environment yet.
The configuration of my Linux VPS (SMF 2.0 with 150 mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,227
  • Hoarding Budweiser in NY
Re: SA Chat
« Reply #1847 on: February 21, 2020, 10:14:25 PM »
Try the attached.

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,631
  • Gender: Male
  • the "mods and tweaks" junkie
    • aegersz on GitHub
    • dopetalk (drugs and users)
Re: SA Chat
« Reply #1848 on: February 24, 2020, 02:25:52 AM »
What version of SA Chat and for 2.0.16 ?
The configuration of my Linux VPS (SMF 2.0 with 150 mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,227
  • Hoarding Budweiser in NY
Re: SA Chat
« Reply #1849 on: February 24, 2020, 12:08:31 PM »
1.0a Rev120 running in 2.0.17.  Works fine.

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,631
  • Gender: Male
  • the "mods and tweaks" junkie
    • aegersz on GitHub
    • dopetalk (drugs and users)
Re: SA Chat
« Reply #1850 on: February 24, 2020, 01:01:04 PM »
... but that zip file doesn't contain any install code for the Package Manager (?) and isn't in FAT format.
The configuration of my Linux VPS (SMF 2.0 with 150 mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,631
  • Gender: Male
  • the "mods and tweaks" junkie
    • aegersz on GitHub
    • dopetalk (drugs and users)
Re: SA Chat
« Reply #1851 on: March 15, 2020, 07:21:10 PM »
I cannot get this to work on CentOS7. the bar is missing and the Dev Tools say "STATS: NO ACCESS" from the js library but the permissions are correct.

any ideas ? i'm in  Apache/2.4.6 (CentOS)
The configuration of my Linux VPS (SMF 2.0 with 150 mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,631
  • Gender: Male
  • the "mods and tweaks" junkie
    • aegersz on GitHub
    • dopetalk (drugs and users)
Re: SA Chat
« Reply #1852 on: March 27, 2020, 01:11:31 AM »
Fixed ! I ran repair_settings.php and despite being no reported changes, it worked.
The configuration of my Linux VPS (SMF 2.0 with 150 mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Offline Relaxasaurus

  • Semi-Newbie
  • *
  • Posts: 17
Re: SA Chat
« Reply #1853 on: April 18, 2020, 02:27:53 PM »
I stopped using this package for my SMF forum a while ago and notice the smf_2sichat db table is enormous. Is it ok if I delete these three tables from my DB?

- smf_2sichat
- smf_2sichat_barlinks
- smf_2sichat_gadgets

I don't see the package in my installed list of packages page anymore.

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 10,227
  • Hoarding Budweiser in NY
Re: SA Chat
« Reply #1854 on: April 18, 2020, 04:36:12 PM »
If the mod is uninstalled you can delete the tables.

Offline vojislavPrijovic

  • Semi-Newbie
  • *
  • Posts: 56
Re: SA Chat
« Reply #1855 on: May 08, 2020, 03:29:50 PM »
SMF 2.0.11 work Mozilla, not work Chrome  8)

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 59,298
  • Gender: Male
    • Kindred-999 on GitHub
Re: SA Chat
« Reply #1856 on: May 08, 2020, 03:48:39 PM »
1- upgrade your SMF. You are 6 versions behind.

2- Yes, new chrome has broken many, if not most things
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline vojislavPrijovic

  • Semi-Newbie
  • *
  • Posts: 56
Re: SA Chat
« Reply #1857 on: May 08, 2020, 05:09:37 PM »
Thanks  :)