List Info

Thread: Re: Sidebar plugin help




Re: Sidebar plugin help
country flaguser name
United Kingdom
2007-02-09 04:09:27
Guys,

I think this is a bug - can anyone else reproduce?

Create a simple plugin like mine below on Typo 4.0.3 and
attempt to
publish it.  That operation should fail, and an error will
appear in the
production log indicating something similar to 'unknown
method each on
object nil' (I don't have the exact message here as its on
my home
computer).

Adding a single setting to the controller allows it to work,
ie

$ more gallerysb_controller.rb
class Plugins::Sidebars::GallerysbController <
Sidebars::ComponentPlugin

  setting :foo, 'foopie'

  display_name "Gallery"
  description 'gallery stuff'

  def content
  end
end

This problem occurs on OS X

Stephen.

-----Original Message-----
From: O'Donnell,S,Stephen,XMB R 
Sent: 08 February 2007 20:13
To: typo-listrubyforge.org
Subject: Sidebar plugin help


Guys,

I am getting a bit stuck trying to create a Typo sidebar
plugin using
Typo 4.03.  This is my first time using Typo and I am quite
new to
Rails too, so please bear with me!

I want to create a plugin called 'gallery', so I created a
controller
called gallerysb (for gallery sidebar) in
components/plugins/sidebars
and a folder called gallerysb in the directory.

Inside the directory I created a directory called
content.rthml
containing the following:

$ more content.rhtml
<h3>gallery</h3>

My controller contains:

$ more gallerysb_controller.rb
class Plugins::Sidebars::GallerysbController <
Sidebars::ComponentPlugin

  display_name "Gallery"
  description 'gallery stuff'

  def content
  end
end

When I attempt to publish the controller, Typo just hangs
and doesn't
do it.  I can make other plugings active though (the built
in ones).

Can anyone point out what I am doing wrong please?

Also, my plugin is going to need a model - where should I
put the
model code?  Basically I want to have my sidebar plugin that
generates
a list of available galleries, and when you click on one, it
goes into
a gallery controller which displays a page showing all the
gallery
images.  I guess the gallery should have its own controller
too.

Any help is greatly appreciated! 

Thanks,

Stephen.
_______________________________________________
Typo-list mailing list
Typo-listrubyforge.org
http:
//rubyforge.org/mailman/listinfo/typo-list

Re: Sidebar plugin help
user name
2007-02-09 22:36:32
Can you publish the exact error log? Preferably when running
in
development, for added info.

Regards,

Sean

On 2/9/07, stephen.3.odonnellbt.com
<stephen.3.odonnellbt.com> wrote:
> Guys,
>
> I think this is a bug - can anyone else reproduce?
>
> Create a simple plugin like mine below on Typo 4.0.3
and attempt to
> publish it.  That operation should fail, and an error
will appear in the
> production log indicating something similar to 'unknown
method each on
> object nil' (I don't have the exact message here as its
on my home
> computer).
>
> Adding a single setting to the controller allows it to
work, ie
>
> $ more gallerysb_controller.rb
> class Plugins::Sidebars::GallerysbController <
Sidebars::ComponentPlugin
>
>   setting :foo, 'foopie'
>
>   display_name "Gallery"
>   description 'gallery stuff'
>
>   def content
>   end
> end
>
> This problem occurs on OS X
>
> Stephen.
>
> -----Original Message-----
> From: O'Donnell,S,Stephen,XMB R
> Sent: 08 February 2007 20:13
> To: typo-listrubyforge.org
> Subject: Sidebar plugin help
>
>
> Guys,
>
> I am getting a bit stuck trying to create a Typo
sidebar plugin using
> Typo 4.03.  This is my first time using Typo and I am
quite new to
> Rails too, so please bear with me!
>
> I want to create a plugin called 'gallery', so I
created a controller
> called gallerysb (for gallery sidebar) in
components/plugins/sidebars
> and a folder called gallerysb in the directory.
>
> Inside the directory I created a directory called
content.rthml
> containing the following:
>
> $ more content.rhtml
> <h3>gallery</h3>
>
> My controller contains:
>
> $ more gallerysb_controller.rb
> class Plugins::Sidebars::GallerysbController <
Sidebars::ComponentPlugin
>
>   display_name "Gallery"
>   description 'gallery stuff'
>
>   def content
>   end
> end
>
> When I attempt to publish the controller, Typo just
hangs and doesn't
> do it.  I can make other plugings active though (the
built in ones).
>
> Can anyone point out what I am doing wrong please?
>
> Also, my plugin is going to need a model - where should
I put the
> model code?  Basically I want to have my sidebar plugin
that generates
> a list of available galleries, and when you click on
one, it goes into
> a gallery controller which displays a page showing all
the gallery
> images.  I guess the gallery should have its own
controller too.
>
> Any help is greatly appreciated!
>
> Thanks,
>
> Stephen.
> _______________________________________________
> Typo-list mailing list
> Typo-listrubyforge.org
> http:
//rubyforge.org/mailman/listinfo/typo-list
>
_______________________________________________
Typo-list mailing list
Typo-listrubyforge.org
http:
//rubyforge.org/mailman/listinfo/typo-list

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )