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
Problems with other Plugins
Avatar
gnilebein
Guest
Guests
Mar 6, 2012 - 12:16 pm

I have a problem with the \"2 Click Social Media Buttons\" Plugin. This plugin inserts some social media like buttons at the page bottom. But on the page where the forum is included, this like buttons are visible above the forum.

Old Forum version:

[Image Can Not Be Found]

New Forum version:

[Image Can Not Be Found]

Avatar
gnilebein
Guest
Guests
Mar 6, 2012 - 12:19 pm

Old Forum:

http://img.gnilebein.de/images.....030619.jpg

New Forum:

http://img.gnilebein.de/images.....203eje.jpg

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 6, 2012 - 8:17 pm

so you have not said what the problem is???

Avatar
gnilebein
Guest
Guests
Mar 7, 2012 - 12:36 am

Oh sorry, with SP 4.5.1 the 2 Click Social Media Buttons are placed under the forum. But now, after the update to SP 5.0.1, this buttons are placed above the forum.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 7, 2012 - 4:54 am

I can no tell for sure without downloading and installing the plugin and playing with it but I can tell you the most likely reason - and I stress this may not be it.

WordPress allows plugins to work by the use of 'hooks' known as action and filters. One of the most common is called 'the_content' which allows a plugin to add/remove or change the actual content of a post or page. SP uses this to display your forum.

It is possible that your Social Media plugin is also using 'the_content' to add it's display components.

The problem with using these hooks - if that is what is happening - is that, if not defined in the code when called, the order they are used can be random. So it might be - and again I stress the 'might' - that your plugin is simply getting the first bite followed by the forum.

If you know your way around the plugin code you could look for an add_filter('the_content' 'xx') in the code and give it a higher priority which, in theory, should force it to be actioned later in the processing.

So - might that be the answer?

andy-signature.png
YELLOW
SWORDFISH
Avatar
gnilebein
Guest
Guests
Mar 7, 2012 - 9:34 am

This was a good hint but not the answer. The 2 Click Social Media Buttons has a priority of 8.

SP 4.5.1 and SP 5.0.1 has a priority of 1, correct?

I found out a strange thing. The update information is displayed in the correct order:

http://img.gnilebein.de/images.....030716.jpg

After the DB update, the order is wrong:

http://img.gnilebein.de/images.....203wew.jpg

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 7, 2012 - 9:56 am

Steve: (Mr Papa) - Might this be related to the changes that were made for the user with the page title at the bottom?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 7, 2012 - 9:48 pm

page title at bottom?  not sure what you mean...

any wp page content on the forum page is shown above the forum...  so guess it depends on how the plugin is hooking into the content...  I dont know that its possible to get it to come out after...

if folks want content after, guess we would need to add an option to display it before or after...

Avatar
gnilebein
Guest
Guests
Mar 8, 2012 - 2:17 am

However, there must be a difference between SP 4.5.1 and Sp 5.0.1... SP 4.5.1 works correctly... SP 5.0.1 not 🙂

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 8, 2012 - 7:09 am

perhaps you can help us out here.

When the plugin uses the_content hook to add it's stuff can you tell me how it is doing it? I.e., is it literally adding it to the end - appending - of the passed in post content? 

andy-signature.png
YELLOW
SWORDFISH
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: 621
Members: 17368
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79627