Advertisement:

Author Topic: SA Chat  (Read 529654 times)

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,910
  • 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,614
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk
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 145 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,614
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk
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 145 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,614
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk
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 145 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,454
  • 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,614
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk
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 145 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 Hero
  • ******
  • Posts: 9,910
  • 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,614
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk
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 145 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 Hero
  • ******
  • Posts: 9,910
  • 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,614
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk
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 145 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,614
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk
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 145 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,614
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk
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 145 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