Jump to content

Submitticket.php. How to add script on the main <body> tag?


PVY

Recommended Posts

only template files are editable, and they located under "/templates/{Your-Template-Name}/" directory.

but you don't need to edit any template file for what you ask here, you could simply write a function (ActionHook) to check in what page your clients are and apply the whatever you need.

<?php

add_hook("ClientAreaFooterOutput", 1, function($vars){

  	// Check if current page are submitticket.php
  	if ($vars['filename'] == "submitticket"){
    
      	// Add your tracking code here
      	$javascriptCode = '<script type="text/javascript">alert("You\'re about to submit a ticket :)");</script>';
      
      	return $javascriptCode;
    
    }

});

create new php file (e.g.: googleTrackingCode.php) inside /includes/hooks/ directory and copy the example code above to it, test it then put your tracking code, that's it

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated