Fork me on GitHub

pnModURL replacing underscore with space in modname?  Bottom

  • Hi

    Can anyone tell me why pnModURL replaces underscores with spaces in the module name itself?
    So instead of index.php?module=My_module I get index.php?module=My%20module - it annoys me to have spaces is the URL like that, and My%20module is not the name of the module...

    Thanks in advance for clarifying this!

    Best regards, Jonas
  • Most probably due to the way you defined the name in your pnversion.php

    Code

    $modversion['version']
    $modversion['description']
    $modversion['displayname']


    If you wrote My Module in the display name, that is what you will see in the URL... you can change that by going into Admin - Modules and modify the name via the modify link on your module line.
    icon_wink
  • Ahh - I see. So when I haven't specified a display name, it tries to pretty-fy the actual module name by replacing underscores with spaces as a default.

    Now I may be asking the stupid question, but a quick search didn't tell me - what else is display name used for (other than in modules listing in admin of course)? Or are people really that interested in being able to point to a specific module by something else than the module name?
  • jonasdelfs

    Ahh - I see. So when I haven't specified a display name, it tries to pretty-fy the actual module name by replacing underscores with spaces as a default.


    pnModUrl uses rawurlencode

    jonasdelfs

    Now I may be asking the stupid question, but a quick search didn't tell me - what else is display name used for (other than in modules listing in admin of course)?


    You can see the example here why many users would do that. Our Pagesetter installation is called "Database", our pnWikka module has been changed to Wiki.
    So if you point your browser to either index.php?module=pnWikka or index.php?module=Wiki .... you will fall on the same module.
    icon_wink

    jonasdelfs

    Or are people really that interested in being able to point to a specific module by something else than the module name?

    Yes... see up. icon_wink

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