Privacy.php Formatting

Greetings All,

I’m working with the contents of privacy.php. I have located the language load section under server events. I would like to use some html I created previously. Do I need to go through every line and escape all the quotes, etc? Or could I call to another file? Similar to how you setup a custom file? (no escape characters required) Seems very time consuming to do it the language file way.

function Language_Load() {
switch (CurrentLanguageID()) {
default:
$this->setPhrase(“cookieconsentsummary”, “I agree to the Privacy and Cookie Use Policy”);
$this->setPhrase(“PrivacyPolicy”, “Privacy and Cookie Use Policy”);
$this->setPhrase(“PrivacyPolicyContent”, " my custom html goes here, escape characters required ");

Thanks!

If you want to load from a separate file, you may use file_get_contents.

Thank you, much appreciated!

in there a server event in phpmaker where we can insert on the privacy page the php code :require_once (“my_own_html_formated_page.inc.php”);i know we can insert texts into the language phrase, but we need more customized formated texts in the pricay.or maybe jquery can make in on client side ?
maybe i’m wrong but i did not see a “privacy” event page …

arbei wrote:

If you want to load from a separate file, you may use > file_get_contents> .

If your file contains HTML only, you may use, e.g.

$this->setPhrase("PrivacyPolicyContent", file_get_contents("my_own_html_formated_page.inc.html")); // Get HTML file

If your file contains PHP code, you may use, e.g.

function requireFile($file){
    ob_start();
    require($file);
    return ob_get_clean();
}
$this->setPhrase("PrivacyPolicyContent", requireFile("my_own_html_formated_page.inc.php"));

If you don’t mind using cURL, you may also use:

$this->setPhrase("PrivacyPolicyContent", ClientUrl("http://www.mycompany.com/my_path/my_own_html_formated_page.inc.php"));

thank you! it is a very good tip you done !