Fork me on GitHub

The block for my module isn't working...  Bottom

  • Ok...
    I have completely coded my own module. It is called pnComic, and allows for the uploading, editing, displaying and deleting of a webcomic...

    In this module I have ALL of the code pretty much finished. I have even gone in and started cleaning up and commenting out the code even better.

    Well, in the middle of all this, I decided I would start getting my first.php block designed. I have dubbed it dailyblock for displaying the most recent comic uploaded. Now then, when I go into ADMINISTRATION -> BLOCKS -> ADD NEW BLOCK I see it added into the list...

    It shows up as

    pnComic/

    But that is it... When I create it, I set it as a CENTER block... and when I visit HOME I get:

    Unknown blocktype: dailyblock!
    This block doesn't seem to exist. Please check corresponding blocks directory.

    Is there a certain way that you set up a Modules blocks? Some esoteric incantation I am missing, or did my Module Designers Guide have the foreward by Cthulhu ripped out?

    Help me Mr. Popeil... I'm in trouble... Need your assistance on the double...

    --


    With the advent of modern technology, sites like Twitter, and the Facebook Virus...
    I think we should all breathe a collective sigh of relief that I got here in time...
    - randomblink
  • Erm...I think maybe the filename and the block name need to be the same? Or are they already?
  • I found the answer...
    Apparently, if your block has functions with names like:
    function modulename_thisblock_init()

    Then you must name your block file: this.php

    You WOULD think this would be listed SOMEWHERE in the documentation... But noooooooo....
    Thanks tho... Everything works now...
    Now I am trying to implement NEXT and PREV comics as buttons...
    Peace!

    --


    With the advent of modern technology, sites like Twitter, and the Facebook Virus...
    I think we should all breathe a collective sigh of relief that I got here in time...
    - randomblink
  • documentation? What's that?

    ;)
  • yep, i had that same problem, u found out though. :)

This list is based on users active over the last 60 minutes.