Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Simple Press and Chat Plugin from WPMU
Avatar
Lachance
Canada
Member
Free Members
sp_UserOfflineSmall Offline
Mar 9, 2014 - 4:23 pm

Mr Papa said
what are you options on forum - integration - page and permalink?  might play with those a bit and see if you can get it to show...   display multiple and display in loop...  and the strict api...

Tried all the possibilities there, still not showing

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 9, 2014 - 5:08 pm

did you turn one off?

Avatar
Lachance
Canada
Member
Free Members
sp_UserOfflineSmall Offline
Mar 9, 2014 - 8:09 pm

Yes I tried with them turned off too

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 9, 2014 - 10:08 pm

No, I meant was the chat plugin and simple press both enabled...  I didnt see any wp debug info...

Avatar
Lachance
Canada
Member
Free Members
sp_UserOfflineSmall Offline
Mar 9, 2014 - 10:53 pm

Mr Papa said
No, I meant was the chat plugin and simple press both enabled...  I didnt see any wp debug info...

Yes always both enabled

Avatar
Brandon
U.S.
SP Wrangler
Free Members
sp_UserOfflineSmall Offline
Mar 10, 2014 - 12:38 am

Lachance said

Are you using the latest version of the Chat?
Cause when I tested the chat with a previous version (1.3) it was working ok but when I bought the plugin (which is version 2.0) it was not working anymore

I know it doesn't help but that site is running Version 2.0.7.1.

Anything in your SP error logs or phperror.log that might hel?

Avatar
SunRider
Member
Free Members
sp_UserOfflineSmall Offline
Jul 21, 2014 - 10:47 pm

I thought I'd resurrect this thread because I am hearing a lot of people are having this problem, myself included.  Simple Press is a fantastic forum and I am very happy with it.  I need a good chat feature on my site and after looking at all availabe ones, I purchased the WPMUDev Chat plugin because it just looked fantastic.  If I could get both Simple Press & Chat to work together, I (and many others) would be a happy camper.  

So, reading over the thread that I believe may be the one that Lachance started at the WPMUDev site a few months ago (different name there - "Giyom", so I could be wrong), I find the following exchange of info between Giyom & the WPMUDev developer, Paul, and was hoping this might get the ball rolling again toward getting the "incompatibility" issue fixed.  Here we go:

 

Paul
INACTIVE
  
@Giiyom,

Ok. Finally able to get to the bottom of the issue. Here are the very technical details and feel free to pass this on to the forum plugin thread you mentioned.

When Chat loads itself it registers a callback function on the 'init' action. It is within this init function where it then calls the WP function get_avatar();.

When Simple:Press(SP) loads it registers a filter callback function to filter the contents by the get_avatar() WP function. See file sp-load-code.php line 239. When Chat calls the get_avatar() WP function the SP filter function is eventually called. This is turn causes SP to load other PHP files one of which is sp-load-forum.php. On line 61 of that file is a check for the value of the variable $spIsForum. If that variable is TRUE then the processing continues and the forum output is displayed.

The problem is the variable $spIsForum is not set to true until a much later step within the SP plugin. At some later time there is another WP action executed 'wp'. This action causes the SP function sp_is_forum_page() to be called. It is in this function where the variable $spIsForum is finally set to TRUE.

So the problem is that when/if the get_avatar() function is called before the SP plugin has initialized itself.

The other real issue is how the file sp-load-forum.php is included. In PHP they use a loader function include_once() which rightly named will prevent the file from being loaded into memory more than once. This is the proper technique.

The issue here then is that the first time the file is loaded during the get_avatar() processing the variable is still set to FALSE. So later then the 'wp' action callback is executed and the file is NOT loaded because is already has from the get_avatar() filter step. The process to actually load the forum output is not run.

Related to the include_once() loading of the file is how the code is setup. The code is such that when the file is loaded the PHP code is executed. This is normally fine. But in this case the code is run on the initial load. When the second time comes around and since the file is not loaded again the forum code is not executed again. The better approach would be to get away from the inline PHP code and wrap it in a function. Then during both places you can just call the function to load the forum output.

As far as I can tell this is not related to Chat.

 
(0)
 
Giyom INACTIVE
 
Hi Paul,

Wow ok :)

And If I just disable the SP avatar thing it should work I guess?

But I will let them know about it.

Huge thanks Paul !

 
(0)
 
Giiyom INACTIVE
 
 
But Paul, what did you change exactly? Cause it's working fine now?
Did you change the Avatar setting?
 
(0)
 
Paul INACTIVE
 
 
@Giiyom,

For now I left the chat plugin NOT calling the get_avatar function in the early stage. So this will for now let the Simple:Press and Chat coexist. But the next update of Chat will correct that.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 22, 2014 - 6:26 am

Well - it's fascinating stuff and I will read through it again and try to check anything I can. But - it is really quite a bit out of date now and far, far from accurate. I do not know when this was written but it is clearly on an older version of Simple:Press than the one you are now using. Many, many changes in those files and I can certyainly disprove the first assertion made.
Personally, I think the only possible way we may be able to help track this is to have a copy of the plugin so we can install on a test system and then try and track what is happening. I am not a fan of chat plugins as they are, by their very nature, resource hogs and sometimes can hijack other components using AJAX calls but I believe this to be better than most. So - any chance you can lend me a copy to try out?By the way - as a fan of both motorbikes and Vancouver I am somewhat jealous! What a great area to ride bikes in. My bother lives In North Van but it has been a while since I paid a visit.

andy-signature.png
YELLOW
SWORDFISH
Avatar
SunRider
Member
Free Members
sp_UserOfflineSmall Offline
Jul 22, 2014 - 5:21 pm

I'll send you a link to the zipped chat file via PM sometime today.

Yes, Vancouver (and the rest of BC, including Vancouver Island) is a bikers dream.  If you do make it out here, give me a shout!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 22, 2014 - 8:20 pm

please send it to support at simple-press dot com...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626