Create your first Widget for WordPress – Gallery 2 ImageBlock

Now I am going further with my experiment and modify PHP Text Widget to allow embedding Menalto Gallery 2 ImageBlock into your blog.

As a result here is for you to try is an actual widget which you can see used to show some of my gallery photos.
You can download widget here – Gallery 2 Widget.

Bellow are steps to follow in order to start using it.

  • Download a ZIP file from location above
  • Unpack it and upload folder into your WordPress plugin folder
  • Visit your WordPress Admin concole and enable Plugin under “Plugins” section
  • Now go to Presentation/Widgets. You will see a new widget available – “Gallery.2″. If you need more then 1 widget to be used in your blog, change a number of available Gallery.2 widgets to desired.
  • Drag “Gallery.2 widget from available list onto your sidebar and go into options by clicking a small button on the widget bar
  • You could specify SideBar widget name, location of your gallery and choose appearance of the ImageBlock in your blog. Description for items is self-explanatory otherwise go to your Gallery.ImageBlock configuration page to find more details about the options.

Enjoy.

This entry was posted in Web-design and tagged , , , . Bookmark the permalink.

2 Responses to Create your first Widget for WordPress – Gallery 2 ImageBlock

  1. Charles says:

    Hello, I am using your widget. Do you know how I can modify it so that when using the “date” option it shows the full date AND time and not just the date? I did some research and found how to modify the gallery2 tpl file so that gallery itself shows the time along with the date, but the widget is still just showing the date only.

  2. Plug-in by itself does not modify html returned by G2.
    The option to include date is inherited in the plug-in and handling is implemented by G2 Imageblock module.
    Initial handling is in ImageBlock.tpl and could probably be adjusted (look for $ImageBlockData.show.date).

Leave a Reply

  • About

    From being a junior developer all the way to Development Manager position, I was always interested in new technologies. Passionate speaker, IT junky, developer, architect, team lead, and development manager - many hats, one goal - making software better and closer to people’s needs. For the most part I am using my blog as a scratch pad, writing small articles on things which I came across, was asked about more then once, and which would otherwise require additional research again and again.

    View Serguei Dosyukov's profile on LinkedIn
  • Testimonials

    The greydragon theme is fantastic. It’s clean, stable and feature rich. It took me a while to decide to move...

    Ed

    I’m a huge fan of this theme. I’ve got more than 90,000 pictures in my gallery3 running on a Ubuntu...

    Jklobo

    First I’m new to G3. I was wanting to append my forum with a gallery and after doing a lot...

    Setishock
    http://www.animeappeal.com

    more...

  • Categories