Block is empty line in dropdown under 'add block'

Block is empty line in dropdown under 'add block'

Vincent Baert -
Number of replies: 2

What did I forget?
I made a block that checks POP3 mail. I've made an entry of $string['pluginname'] = 'POP3' in the language files.

The pluginname is shown under Admin-plugins-blocks-manage blocks.

When I want to add the block to a page it is shown in the dropdown under "add block" as an empty line.

I'm sure I forgot something obvious.
Thanks in advance for helping me out.

Vincent 

Վարկանիշների միջին թիվը. -
In reply to Vincent Baert

Re: Block is empty line in dropdown under 'add block'

Mary Evans -

Hi,

I have only just started experimenting with blocks, but as I find they are similar to the way themes are made, especially some of the php.

In your pop3/block_pop3.php the first line of the function should read..

function init() {
        $this->title = get_string('pluginname', 'block_pop3');
    }

This is telling Moodle where to pull the 'pluginname' from your lang/en/block_pop3.php

If this is not showing 'block_pop3' or you have left this empty, then Moodle will try looking in Moodle.com lang files and not find it and so leave it blank.

If you turn on Debugging in Settings > Site Administration > Development > Debugging  (select Developer Mode from top menu  on that page) you should get some errors if there are any.

Cheers

Mary