• Resolved daidalos117

    (@daidalos117)


    Hello,
    Great plugin. Is there any way how to use normal PHP in review template? I think your “templating” is very limited. If I could use normal PHP it would be much better..
    Is there any way how to edit output of form? For example remove placeholder etc.
    Thanks:)

    • This topic was modified 7 years, 2 months ago by daidalos117.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    The templates are simply PHP files so you can add any PHP code you wish. The templating system has been built with non-developers in mind, but can easily be used with PHP code.

    If you would like to access the review fields as PHP variables, try adding this to the template to view the available review fields:

    glsr_debug( $context );

    The plugin is very flexible and almost anything can be modified. Have a look through the many Site Reviews code snippet examples here for ideas:

    https://pastebin.com/u/geminilabs

    However, to remove things like placeholders you do not need a custom template. Go to the Site Reviews > Settings > Translations page, search for the placeholder text you wish to remove, then replace it with a single space character. This will “remove” the placeholder text.

    • This reply was modified 7 years, 2 months ago by Gemini Labs.
    • This reply was modified 7 years, 2 months ago by Gemini Labs.
    Plugin Author Gemini Labs

    (@geminilabs)

    Please also make sure you read the Site Reviews > Documentation page, specifically the FAQ, Hooks, and Helpers sections.

    Thread Starter daidalos117

    (@daidalos117)

    Well glsr_debug( $context ); is what I was looking for! 🙂 I didn’t find it in documentation tho.
    About the placeholder, I tried that, but sadly it doesn’t work. When it is only space, it does default placeholder text 🙁

    Plugin Author Gemini Labs

    (@geminilabs)

    It works for me and many others. Make sure to save the settings after setting your custom translations. If it still does not work, please follow the instructions on the “Contact support” section of the Documentation page.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Templating’ is closed to new replies.