Page 1 of 1

Including Gbook in another page with AJAX

Posted: Fri Jan 03, 2014 10:45 pm
by colinch
Using version 1.7

I'm trying to show the gbook comments on another page by loading the gbook.php in another div using jQuery.

I'm using the following script:

Code: Select all

<script>
       $("#siteloader").load("../gbook/gbook.php");
</script>
It seems like it's only working for my IP address. On all my devices, on all browsers; it's working.
When viewing the page in someone else's house or using a web proxy, the #sideloader div doesn't load the comments.

I hope someone can help me with this, the script is amazing.

Re: Including Gbook in another page with AJAX

Posted: Sat Jan 04, 2014 10:19 am
by Klemen
It won't work like that, GBook was designed as a stand-alone script and in prints out full HTML code with all the headers and tags.

The easiest way to include it in your page directly would probably be to use an iframe.

If you want direct inclusion you would have to completely modify the template files.

Re: Including Gbook in another page with AJAX

Posted: Sat Jan 04, 2014 11:16 am
by colinch
Thanks for your reply!

I will try to use an iframe.

But what thing in the template files is preventing me from displaying it? Because it does work on all my own devices, but when other people try it, it doesnt work.

Re: Including Gbook in another page with AJAX

Posted: Sat Jan 04, 2014 6:17 pm
by Henrie
But what thing in the template files is preventing me from displaying it? Because it does work on all my own devices, but when other people try it, it doesnt work.
I never used JQuery so my following comment might be stupid and also at your supplied code with relative path it does not look like my following comment is the case,
but....

maybe somehow the link to the template files is pointing to some local files which are not available from outside computers?

Greetings,
Henrie