Survey
Permalink
Hi,
I wanted to have same survey on every page ofmy website.
After adding the survey block through scrapbook I realized that it count results on each page separately and allows many times to vote what makes it useless. I would like to have one survey through the whole site and see one "cake" no matter where visitors vote.
Is it possible?
I wanted to have same survey on every page ofmy website.
After adding the survey block through scrapbook I realized that it count results on each page separately and allows many times to vote what makes it useless. I would like to have one survey through the whole site and see one "cake" no matter where visitors vote.
Is it possible?
In the past, when I've had to do this sort of thing with a block, I've taken kind of a sideways approach to it...
I've create the block and then either added it to a single page, or to the scrap book (depending on how I wanted the user to go about editting it).
I then manually added it to a "new" template version of the site, which was a slightly modified version of the template for all the remaining pages which has the block hard coded with the block id number...
It's a more advanced solution, and not the cleanest, but gets the job done... Here's some example code from where we did it with a slideshow block:
I've create the block and then either added it to a single page, or to the scrap book (depending on how I wanted the user to go about editting it).
I then manually added it to a "new" template version of the site, which was a slightly modified version of the template for all the remaining pages which has the block hard coded with the block id number...
It's a more advanced solution, and not the cleanest, but gets the job done... Here's some example code from where we did it with a slideshow block:
<?php //Manual Block in theme $bID = 27; $done = false; while (!$done) { $query = "SELECT `bID` FROM `BlockRelations` WHERE `originalBID` = ". $bID; $result = Loader::db()->getOne($query); if ($result) { $bID = $result; } else { $done = true; } } ?>
Thanks for help,
I changed $c->getCollectionID() to 1 in survey controller.php file, so now it doesn't matter in which page vote have been placed. I know that it's not the best way to solve this, but its the fastest solution.
I changed $c->getCollectionID() to 1 in survey controller.php file, so now it doesn't matter in which page vote have been placed. I know that it's not the best way to solve this, but its the fastest solution.
However, there are siutations where you'd want the guestbook to have different entries on each page.
I think there would have to be a scrapbook option that makes sure the block id stays the same on each page the block has been placed..
I doubt there's a way to achieve this without doing some advanced core hacking. You could use some iframe like stuff but that's not really elegant.