News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

SA Chat

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

Previous topic - Next topic

SA™

ttry changing

if(!isset($_GET['action'])){
to
if(!isset($_GET['action'])  || !isset($_GET['topic'])){
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

anakmacan

#341
Nope, not working this time... where do you find !isset($_GET codes ? maybe i can also try it myself, cos i just found out it shows up on profile either (and make the page loads slower) xD

IME-Matthew

#342
First off, let me say that this mod is by far the best I've seen for SMF, ever. It is way cool, and it will definitely become a permanent fixture of all of my SMF forums in the future.

That said, I am having the strangest issue (r37) with the chat bar not loading on the Message Index ONLY. It loads on everything else, even including admin pages, profiles, a member map mod, etc. I have tried comparing headers with both the MessageIndex source file as well as the template files within the default theme. I have tried replacing stock versions of MessageIndex pages from the SMF 2.0 RC5 source, as well as the stock templates as well, to no avail.

I have tried installing after a clean install with zero mods and I also have the same problem. Is anyone else experiencing this? Again, it loads for every single page except the message index (not the board index, but the message index after clicking into a board). Very strange, please help!!!

Thanks in advance for any suggestions!

IME-Matthew

I have found by adding the ...index.php?action=head... to a new <head> section, and ...index.php?action=body... to the <body> area in the Message Index template, works perfectly. The only thing is it is loading considerably slower, presumably because I am doubling the <head> area now, along with body.

Why is this not parsed properly through the main index page of the forum template I wonder? Interesting indeed...

SA™


@IME-Matthew

in sources/sachathooks.php


// Post preview compatabilty
if (!empty($_REQUEST['board']))
return $buffer;


was added cos post preview wasnt working but if you remve that code it will show but it will also break post preview
ill have to look for another way round the post preview bug

@anakmacan
they come from the url
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

IME-Matthew

Quote from: SA™ on April 22, 2011, 01:19:00 PM

@IME-Matthew

in sources/sachathooks.php


// Post preview compatabilty
if (!empty($_REQUEST['board']))
return $buffer;


was added cos post preview wasnt working but if you remve that code it will show but it will also break post preview
ill have to look for another way round the post preview bug
Perfect, thank you! This worked immediately upon commenting out the code. I also tested post preview and it is working fine. I am assume you simply mean when you are replying to any post and hit "Preview", right? Yes, the text still previews just fine right above the text input area. Strange that it does not work for you. Regardless, I am thankful for your support here! This mod is excellent!!!

SA™

@anakmacan
uno the last edits i gave you and add

if(isset($_GET['action']) || isset($_GET['topic']))
   return $buffer;


before $buffer = str_replace('</head>', '<script type="text/javascript" src="'.$boardurl.'/sachat/index.php?action=head"></script>
</head>', $buffer);
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

cnywrestling

Could some kind soul please offer a mini-tutorial on how to reposition the default location of the chat window?  I'm having a terrible time getting it to move all of the pieces.  When I change msg_container to fixed so it it at the bottom where I want it, then the rest of the message window stays at the top.  If I try to move those, some move, some disappear.  I'm just plain terrible with css so I was hoping someone would be kind enough to point me to the css variable(s) that need to be changed to move the chat window to the bottom.
Thanks  ;D

SA™

id have to dig into the code to find this outt cos i dont know of hand
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

nend

Quote from: cnywrestling on April 22, 2011, 10:22:14 PM
Could some kind soul please offer a mini-tutorial on how to reposition the default location of the chat window?  I'm having a terrible time getting it to move all of the pieces.  When I change msg_container to fixed so it it at the bottom where I want it, then the rest of the message window stays at the top.  If I try to move those, some move, some disappear.  I'm just plain terrible with css so I was hoping someone would be kind enough to point me to the css variable(s) that need to be changed to move the chat window to the bottom.
Thanks  ;D

It is in the css file. I don't rember the class name though but all you have to do is change the position values. Somewhere in sachat.themes.default.style.css. Sorry about the sloppy information important on my droid.

mibodega

I spent hours troubleshooting Sa Chat. It worked when I initially installed it but then I noticed it was not there anymore. So I started removing some MODS and when I removed the SMF Multi Quote mod, boom the SA Chat bar was back.

Just to make sure I re-installed the Multi Quote Mod and Sa Chat Bar disappeared.

SA™

it is cos the chat bar uses the buffer hook and that mod moifies the body tag

index.template.php
find
<body '.((isset($context['current_action']) && ($context['current_action'] == 'post') && (isset($context['current_topic']))) ? 'onLoad="post_mquotes();"' : '').'>';

replace with

<body>

in sources/sachathooks.php

find
$buffer = str_replace('<body>', '<body>
<script type="text/javascript" src="'.$boardurl.'/sachat/index.php?action=body"></script>', $buffer);


replace with
global $context;
$buffer = str_replace('<body>', '<body  '.((isset($context['current_action']) && ($context['current_action'] == 'post') && (isset($context['current_topic']))) ? 'onLoad="post_mquotes();"' : '').'>
<script type="text/javascript" src="'.$boardurl.'/sachat/index.php?action=body"></script>', $buffer);


both mods should now work as intended
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

Arantor

Better still, don't manipulate the buffer hook at all and just add the <script> onto the end of $context['html_headers'] at some point before the templates are invoked, even using the action hook if necessary.

SA™

http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

mibodega

Quote from: Arantor on April 24, 2011, 08:28:52 PM
Better still, don't manipulate the buffer hook at all and just add the <script> onto the end of $context['html_headers'] at some point before the templates are invoked, even using the action hook if necessary.

I am not sure I follow how to do what you instruct ... can you show me please?

Arantor

Quote from: mibodega on April 24, 2011, 08:43:47 PM
I am not sure I follow how to do what you instruct ... can you show me please?

Not really, it wasn't aimed in your direction, but as a suggestion for the mod author.

Quote from: SA™ on April 24, 2011, 08:38:59 PM
that will work?

Can't see why not, $context['html_headers'] should exist at that point and be ripe for extending - and it should be faster than modifying the buffer.

SA™

aha i see id have to play about with and  see if i can do this thanks for rhe suggestion
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

SA™

new version realsed

fixed conflics with ajax stuff
removed all edits now soly uses hooks
updated the open close function [thanks nend]
fixed bar not showing on message index
now you can add,edit,remove your own links from the bar
fixed broken admin layout
now uses intergate_load_theme hook and subtemplates to show the bar
http://samods.github.io/SAChatBar/

Xbox Live: smokerthecheese 360 or xbone
My Work
Piano Movers / Delivery service
QuoteMy allies are dead.
I'm 'bout to be too.
Zombies are chasing me.
F*** it, I'm screwed -___-

mibodega

 so.... should we uninstall Beta 1 and install Beta 2? ::)

anakmacan

SA™: It doesnt work, cos i installed the newer version. New version loads faster though!

Advertisement: