Sebenza Category Template strip HTML replacement

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lesliekirk
    Super Moderator











    • Aug 2008
    • 9290

    #1

    Sebenza Category Template strip HTML replacement

    I need to replace snippet I'm pretty sure this is something from the Sebenza Category Template Manager. It would seem that the forum won't let me post the item.

    I checked the Code Samples and it looks like it takes 36 lines of code to replace this one. Please tell me I'm wrong and what it should be instead of all this here

    https://docs.miva.com/code-samples/remove-html

    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: X | Facebook | Pinterest
  • lesliekirk
    Super Moderator











    • Aug 2008
    • 9290

    #2
    FYI, I get this error message

    Code:
    Error while saving content: %1$s
    
    Error information: " 403 error "
    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: X | Facebook | Pinterest

    Comment

    • lesliekirk
      Super Moderator











      • Aug 2008
      • 9290

      #3
      So here's a screenshot of it:

      p0GAVw.png
      Leslie Kirk
      Miva Certified Developer
      Miva Merchant Specialist since 1997
      Previously of Webs Your Way
      (aka Leslie Nord leslienord)

      Email me: [email protected]
      www.lesliekirk.com

      Follow me: X | Facebook | Pinterest

      Comment

      • alphabet
        Mega Mivite





        • Aug 2006
        • 1160

        #4
        Try the miva_html_strip function

        Code:
        miva_html_strip( text, allowed_tags )
        
        <mvt:assign name="g.return_value" value="miva_html_strip( text, allowed_tags )" />
        http://www.alphabetsigns.com/

        Comment

        • Kent Multer
          Mega Mivite









          • Mar 2006
          • 3251

          #5
          Excuse me if I've misunderstood your question, but newer versions of the Miva VM have a built-in function for stripping HTML: http://www.mivascript.com/item/encod...tml_strip.html

          So maybe you'll just need one line of code. :^)
          Kent Multer
          Magic Metal Productions
          http://TheMagicM.com
          * Web developer/designer
          * E-commerce and Miva
          * Author, The Official Miva Web Scripting Book -- available on-line:
          http://www.amazon.com/exec/obidos/IS...icmetalproducA

          Comment

          • alphabet
            Mega Mivite





            • Aug 2006
            • 1160

            #6
            Just saw your screenshot.

            Code:
            <mvt:assign name="g.allowed_tags" value="''" />
            
            <mvt:assign name="l.settings:product:clean_descrip" value="substring_var(miva_html_strip( l.settings:product:descrip, g.allowed_tags ), 0, 200)" />
            
            &mvt:product:clean_descrip;
            It looks like the Sebenza function returned text, otherwise you need the substring_var function to avoid the 403 error
            http://www.alphabetsigns.com/

            Comment

            • lesliekirk
              Super Moderator











              • Aug 2008
              • 9290

              #7
              Thanks ya'll
              Leslie Kirk
              Miva Certified Developer
              Miva Merchant Specialist since 1997
              Previously of Webs Your Way
              (aka Leslie Nord leslienord)

              Email me: [email protected]
              www.lesliekirk.com

              Follow me: X | Facebook | Pinterest

              Comment

              Working...
              X