PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Custom meta field question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Custom meta field question

    Hi,

    I searched through the forums but did not find anything addressing this particular issue. I want to make a custom meta field that recognizes a number with two decimal places but does not show any currency symbol. I can't quite figure out an appropriate workaround... The only way I can see of doing it right now is by selecting money and then editing the settings.php file directly to take out the currency symbol, but that does not seem like a practical solution as it's automatically generated each reindex.

    My only other option, it seems, is making a custom meta field drop down, but it would be a very long drop down menu and definitely not ideal.

    Any suggestions would be appreciated. Thanks!

  • #2
    Hmm. There really isn't a perfect solution for that unfortunately.

    You can create a custom version of "search.php" (make a copy of the file without $MetaMoneyCurrency, save it somewhere safe, and set the path in the Indexer under "Configure"->"Advanced"->"Custom script source path"). Modified scripts aren't supported however, and you should be pretty comfortable with making PHP changes before doing this.
    --Ray
    Wrensoft Web Software
    Sydney, Australia
    Zoom Search Engine

    Comment


    • #3
      Great, thank you!

      Comment


      • #4
        I finally got around to trying it today, and it was a really quick and easy solution that worked great. Thanks again.

        I also just want to say that I appreciate all the information that is provided in this forum. It's incredibly helpful.

        Comment


        • #5
          Follow up question for cgi version...

          Hi,

          I have switched from PHP to CGI so that I can index more pages. Is there a way to remove the $ sign in CGI?

          Thanks again!

          Comment


          • #6
            Not easily. The CGI is compiled C/C++ and unless you are an experienced programmer, then it won't be an easy task to change and recompile the code (the source code is available as part of the SDK).

            We'll look into adding an option in the next version to specify a "none" currency or "do not display" option.
            --Ray
            Wrensoft Web Software
            Sydney, Australia
            Zoom Search Engine

            Comment


            • #7
              OK, thanks for letting me know. I kind of figured that already but wanted to ask just in case... I'm hoping I can get this done via Javascript or CSS instead. Thanks again for your quick response.

              Comment

              Working...
              X