Support Forum
Well - I think that rather proves it. your WP theme is not using the standard routines for displaying a page and not defining the WP 'loop' bit working outside of it. It works but it does mean it bypasses WP API standards which means things can be missed so therefore it is marginally questionable.
I am going to have to think about this although, if you want to make a small edit I can show you what to change to enable polls to work for you.
YELLOW
SWORDFISH
|
Sure, The file is /sp-resources/forum-plugins/poills/library/sp-polls-components.php
At line 92 you will find this line of code:
if (!$spIsForum || !in_the_loop()) {
I suggest changing it to:
if (!$spIsForum) {
which is not perfect long term but good enough for this exercise.
YELLOW
SWORDFISH
|
That code may be a hack for her (if it works), but not a general solution... if a user puts it in a sidebar and it shows on the forum page, it will cause errors...
** edit... ah, missed your last line... so, just more explanation...
Visit Cruise Talk Central and Mr Papa's World
Changing to !$inTopicLoop() didn't work. Forum page load froze when loading a topic with a poll.
I just went with your example since the site is live and can't really test.
@elsa.. You should be good to go but if not fixed in the next polls plugin update the change will be reverted. So check with the team here before updating that plugin.
The check you will want is:
if (!$spIsForum || !isset($spTopicView) || !$spTopicView->inPostLoop) {
but be sure to declare $spTopicView global at top of routine...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)