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?

View Replies: View Best Answer
Remo replied on at Permalink Reply
I never tried that but this problem is probably going to happen as well if you want to place a form/guestbook on different pages using the scrapbook...

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.
jjdb210 replied on at Permalink Best Answer Reply
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:

//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;
lak17a replied on at Permalink Reply
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.