Synchronize wordpress with limesurvey

In my previous post, I wrote how to use wordpress functions outside.

Suppose we want to add wordpress header and footer design in limesurvey template. Following are the steps.

1. Create copy of default template in limesurvey.
2. Activate it through survey settings.
3. Now you want to upload that php file which I defined in my previous post. But when you try to upload, it gives message of not supported file system.
4. So, we need to manually upload file in template folder which is currently created.i.e limesurvey/uploads/template/copy_of_template_directory.
5. As, limesurvey template file is .pstpl format which does not support direct inclusion of php files.
6. So, the method is to call php file through AJAX function.

<div id="demo"></div>
<script type="text/javascript" charset="utf-8">
url: "{TEMPLATEURL}demo.php",
type: "POST",
success: function(result){
// Load the remote file contents into the script parent element

Above code helps to append the php code in your demo division. you can define this division where ever you want to embed the php code.


Leave a Reply

Your email address will not be published. Required fields are marked *