1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Documentation Requests

Discussion in 'General Troubleshooting' started by Nick, Mar 1, 2010.

  1. Nick

    Nick Well-Known Member

    Is there something you'd like to know that isn't in the documentation?

    Let me know here and I'll try to add it.

    baadier likes this.
  2. nothingman

    nothingman Active Member

    Thanks Nick, could we have a list of the pagename variables for Hotaru - on the lines of something like this?
  3. Nick

    Nick Well-Known Member

    Not possible because Hotaru doesn't have any pages. All pages are provided by plugins. We do have a section on getting the page name, though.
  4. nothingman

    nothingman Active Member

    Hi Nick, what I meant was the pagenames (?) on this tutorial Default Hiding the Sidebar .

    For example, in the following code snippet, I know that login means the login page but what if I want to enter the 'case' for the latest comments page in the following code snippet? So, what I'm asking for is a simple list that tells me to enter 'register' in my code to imply that it means the 'register' page etc

    <?php switch ($h->pageName) {
    $h->sidebars false;
    $h->sidebars true;
    Last edited: Mar 3, 2010
  5. Nick

    Nick Well-Known Member

    Page names are taken from the URL e.g. example.com/index.php?page=comments or example.com/comments if using friendly urls. If you want to know the name of a page, you can get it from the url.

    While I could list all the current page names for you, Hotaru will probably see a whole new series of plugins for different kinds of websites. There will be new plugins that handle registration, logging in, content submission, etc. and they will probably use different page names to the current ones.
  6. nothingman

    nothingman Active Member

    That's all I need. Thanks! :)
  7. ties

    ties Theme & Plugin Development

  8. Nick

    Nick Well-Known Member

    Done: Testing for Active Plugins. I'm happy to make changes if necessary.
    ties likes this.
  9. done

    done New Member

    Full code of plugin case studies at bottom

    For the plugin case studies, do you think you can paste the whole code at the bottom, especially for the widget plugin. For example, I'm trying to make a javascript widget plugin, but I'm not sure if when I use the title widget_blanks I'm supposed to call it widget_widget_blanks because that's what the instructions seem to imply, as only step #4 refers to widget_hello_world. Still a bit confused tbh. It would make it easier to copy and paste too. Thanks!
  10. petsagouris

    petsagouris Design & Development

    You can find the Hello World widget plugin on the forums.
  11. Nick

    Nick Well-Known Member

    That's just the original plugin for Hello World. There was never a released Hello World Widget as it serves no purpose other than to demonstrate how to make a widget.

    @done - I hear you, but it's such a tiny little plugin it would be overkill to repeat the code below it. The full code is just this:

     * name: Hello World
     * description: Displays "Hello World!" in the sidebar
     * version: 0.2
     * folder: hello_world
     * class: HelloWorld
     * requires: widgets 0.6
     * hooks: install_plugin

    class HelloWorld
         public function 
    // plugin name, function name, optional arguments

         public function 
    "Hello World!";
    The "widget_" prefix is necessary for the Widgets plugin to use your function, so if your plugin is called "widget_blanks", then yes, your function would need to be called "widget_widget_blanks".

    I agree a note about that could be added to the docs.
    Last edited: Dec 3, 2010
  12. done

    done New Member

    IMO I think all three case studies should have the code at the bottom, it's so much easier to look at end product and work backwards than trying to piece meal code in your head. The widget plugin case study is only an easy read if you've memorized the hello world plugin, if you haven't its very confusing because you have to back reference to hello world case study, which itself doesn't have the full code cleanly displayed (ugh). That was my experience. Even after reading the case studies it was easier for me to find an existing widget plugin and copy/paste the basic part (such as what u pasted above), and then modify it to my needs.
  13. Nick

    Nick Well-Known Member

    Well, it's a wiki, and you're more than welcome to register and edit the parts you think need improving.
  14. scaza

    scaza Active Member

    I'd really appreciate a clearer understanding of how the rss feeds get generated. As I start to modify them: http://forums.hotarucms.org/showthread.php?1503-RSS-feeds-and-special-characters

    and have started creating my own podcast specific rss feed it would probably be best to understand how it works and leverage what is already there.

    Also is it possible to extend the class of non-plugin classes? For example class RSSItem in rsswriter.php?

    Can you use one plugin to extend 2 different classes/plugins?
    Last edited: Feb 25, 2011
  15. annyW32f

    annyW32f Banned

    thank you for sharing[​IMG]
  16. annyW32f

    annyW32f Banned

    That's all I need. Thanks! [​IMG]
  17. tlq123

    tlq123 Banned

    Thanks for the information,just found this post my technorati news feed section! I was searching for this since past 3 months and i am glad to see it here. Thanking you much
  18. cara

    cara New Member

    For the plugin case studies, do you think you can paste the whole code at the bottom

Share This Page