• Welcome to Simple Machines Community Forum. Please login or sign up.
January 18, 2022, 07:09:15 PM

News:

Follow SMF on Twitter.


SA Chat

Started by Diego Andrés, July 21, 2010, 10:36:59 PM

Previous topic - Next topic

Sir Osis of Liver

Not my forum, don't like to play too much.  I'll try it when there's more members active. 
"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

aegersz

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 160+ 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

kesulin

Quote from: aegersz 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.
In my forum works fine, with the correct number of online users.
Check it:
castronegro.net

aegersz

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 //SMF Cookie autentication!!!
list ($member_id, $password) = initCookies();


Replace: //SMF Cookie autentication!!!
$member_id = initCookies();


Locate:         // 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:         // No need to validate the password since 2.0.16
        $context['JSON']['STATUS'] = 'ACTIVE';


Locate: ./sachat/functions.php 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: 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 160+ 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

aegersz

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 160+ 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

Diego Andrés

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.

aegersz

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 160+ 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

Sir Osis of Liver

"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

aegersz

What version of SA Chat and for 2.0.16 ?
The configuration of my Linux VPS (SMF 2.0 with 160+ 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

Sir Osis of Liver

1.0a Rev120 running in 2.0.17.  Works fine.
"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

aegersz

... 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 160+ 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

aegersz

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 160+ 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

aegersz

Fixed ! I ran repair_settings.php and despite being no reported changes, it worked.
The configuration of my Linux VPS (SMF 2.0 with 160+ 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

Relaxasaurus

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.

Sir Osis of Liver

If the mod is uninstalled you can delete the tables.
"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

vojislavPrijovic

SMF 2.0.11 work Mozilla, not work Chrome  8)

Kindred

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.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

vojislavPrijovic


aegersz

Important PHP 7.2 and onwards bug fix:

in ./sachat/index.php:

find:
        session_start();
        session_cache_limiter('nocache'); //Shouldent this be before session_start() http://php.net/manual/en/function.session-cache-limiter.php


replace:
        session_cache_limiter('nocache'); // goes before "session_start();" see php.net/manual/en/function.session-cache-limiter.php
        session_start();
The configuration of my Linux VPS (SMF 2.0 with 160+ 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

aegersz

Trivial spyware removal: (see https://www.2-spyware.com/remove-s7-addthis-com.html)

in ./sachat/themes/default/js/body.js.php:

comment out this line so it looks like this:
//                      $sachat.getScript(\'http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-503f263237ff99da\');
The configuration of my Linux VPS (SMF 2.0 with 160+ 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

Advertisement: