Which way does your fix work. My desire is to have the main poll, and only a
main poll, appear on those pages that use index_template.

Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341


> -----Original Message-----
> From: Cory R. King [mailto:coryking at mozimedia.com]
> Sent: Tuesday, April 10, 2007 11:23 AM
> To: scoop-help at lists.kuro5hin.org
> Cc: Jerry Schwartz; 'Shawn Estes'
> Subject: Re: [Scoop-help] Main Poll?
>
> For what it's worth, I've fixed the cache bug that caused
> this issue and
> applied to to any affected XLAN customers.  Basically the cache isn't
> getting cleaned out after a new poll is set.
>
> Here is a patch that fixes the issue:
>
> < Start  >
>
> --- lib/Scoop/Admin/Polls.orig  2006-10-06 08:58:35.837581054 -0700
> +++ lib/Scoop/Admin/Polls.pm    2006-10-06 09:07:43.132089631 -0700
> @@ -232,6 +232,7 @@
>                                                 SET             =>
> "value=''",
>                                                 WHERE   =>
> "name='current_poll'",
>                                         });
> +               $S->cache->remove('vars');
>                 $S->cache->stamp('vars');
>                 my $question =
> $S->get_poll_hash($editqid)->{'question'};
>
> @@ -266,6 +267,7 @@
>                                                 SET             =>
> "value=''",
>                                                 WHERE   =>
> "name='current_poll'",
>                                         });
> +                               $S->cache->remove('vars');
>                                 $S->cache->stamp('vars');
>                         }
>                 }
> @@ -542,7 +544,7 @@
>                 $sth->finish;
>
>                 # And reload the vars cache
> -               $S->cache->clear({resource => 'vars', element
> => 'VARS'});
> +               $S->cache->remove('vars');
>                 $S->cache->stamp('vars');
>                 $S->_set_vars();
>                 $S->_set_blocks();
> @@ -748,6 +750,7 @@
>
>                 my $question = $S->get_poll_hash($qid)->{'question'};
>                 $message = qq| Set poll "$question" to
> display on main
> page |;
> +               $S->cache->remove('vars');
>                 $S->cache->stamp('vars');
>         }
> < end >
>
> Jerry Schwartz wrote:
> > That does actually work, although according to Colin Hill
> it should not.
> > According to his memory, it should only display the "Main"
> poll if there are
> > no displayed stories with polls attached. He looked at the
> poll_box code,
> > and concluded that it was a buggy mess.
> >
> > He did seem to agree that the behavior I want (and that you
> seem to be
> > using) would be useful. That may become the default behavior.
> >
> > Regards,
> >
> > Jerry Schwartz
> > Global Information Incorporated
> > 195 Farmington Ave.
> > Farmington, CT 06032
> >
> > 860.674.8796 / FAX: 860.674.8341
> >
> >
> >
> >> -----Original Message-----
> >> From: scoop-help-bounces at lists.kuro5hin.org
> >> [mailto:scoop-help-bounces at lists.kuro5hin.org] On Behalf Of
> >> Shawn Estes
> >> Sent: Monday, April 09, 2007 12:20 PM
> >> To: scoop-help at lists.kuro5hin.org
> >> Subject: Re: [Scoop-help] Main Poll?
> >>
> >> Hi Jerry,
> >>
> >> I think this will work for you:
> >>
> >> Login as admin, look down your "admin tools" and click on New Poll.
> >> Fill out the poll information and click the check at "Mark as main"
> >> and that'll add one to the main page. Assuming that you have
> >> |BOX,poll_box| inside your index_template.
> >>
> >>
> >> On 4/9/07, Jerry Schwartz <jschwartz at the-infoshop.com> wrote:
> >>
> >>> I'm trying to display a poll on the main page, not attached
> >>>
> >> to a story or
> >>
> >>> diary, and I can't seem to figure out how to do it. My boss
> >>>
> >> insists he was
> >>
> >>> able to do it, and he's not a programmer at all, so this is
> >>>
> >> embarrassing. I
> >>
> >>> created a poll as a "main" poll, and it doesn't show up. I
> >>>
> >> tried adding
> >>
> >>> |poll_block| after |main_menu| in default_template, but it
> >>>
> >> didn't show up. I
> >>
> >>> also tried adding it to hotlist_template, and it didn't show up.
> >>>
> >>> I must be missing something fairly simple.
> >>>
> >>> Regards,
> >>>
> >>> Jerry Schwartz
> >>> Global Information Incorporated
> >>> 195 Farmington Ave.
> >>> Farmington, CT 06032
> >>>
> >>> 860.674.8796 / FAX: 860.674.8341
> >>>
> >>> _______________________________________________
> >>> Scoop-help mailing list
> >>> Scoop-help at lists.kuro5hin.org
> >>> http://lists.kuro5hin.org/mailman/listinfo/scoop-help
> >>>
> >>>
> >>>
> >> _______________________________________________
> >> Scoop-help mailing list
> >> Scoop-help at lists.kuro5hin.org
> >> http://lists.kuro5hin.org/mailman/listinfo/scoop-help
> >>
> >>
> >
> >
> >
> > _______________________________________________
> > Scoop-help mailing list
> > Scoop-help at lists.kuro5hin.org
> > http://lists.kuro5hin.org/mailman/listinfo/scoop-help
> >
> >
>
>