The public contents of t-Point are reachable through the /public/
-Route (/public/de
for german contents).
To use the public contents of t-Point on your Organisation-Website, we provide the following integration methods:
Access the Pages via normal Link:
https://demo.t-point.eu/public/projects/de
https://demo.t-point.eu/public/events/de
https://demo.t-point.eu/public/contacts/de
https://demo.t-point.eu/public/reports/de
Note
https://demo.t-point.eu/ is used by default in this examples.
Of course, you have to replace it with the the root-URL of your t-Point installation.
This is the easiest method to integrate. Use any URL from above and add ?view=frame
and embedd it as <iframe>
Differences to the “regular” Pages, when used with Frame-View:
Simply add the following line to your HTML-Code in your website:
Caution: If you use a CMS, make sure, that the content is inserted as (unformatted) HTML-Text
<iframe src="https://demo.t-point.eu/public/projects/de?view=frame"
id="projectFrame" style="width: 100%; height: 400px; border: none;"></iframe>
If you want to see the whole iframe-content whithout the scrollbars, use the following:
Alternative non-jQuery method:
<iframe src="https://demo.t-point.eu/public/projects/de?view=frame"
id="projectFrame" onload="iframeLoaded()"></iframe>
<script>
function iframeLoaded() {
var iFrameID = document.getElementById('projectFrame');
if(iFrameID) {
iFrameID.style.height =
(iFrameID.contentWindow.document.body.offsetHeight+20) + "px";
}
}
</script>
Note
The “+20” is used to ensure the complete height of the body, if it is adapted via css (margin
)
JS-Sources: http://stackoverflow.com/a/9976309 & http://stackoverflow.com/a/9163087
For the use on public websites, the contents are available as JSON-Data. They can be loaded e.g. via ‘curl’ from external servers.
https://demo.t-point.eu/public/en.json
) shows the Json-links to the available informations../public/de.json
You can insert the Contents of the Pages e.g. via JS (see: stackoverflow) or any script-language you prefer.
The main URLs (with the important data visible) are listed here
https://demo.t-point.eu/public/projects/de.json
https://demo.t-point.eu/public/events/de.json
https://demo.t-point.eu/public/contacts/de.json
https://demo.t-point.eu/public/reports/de.json
If you open this URLs (and there is some public content for each type), you can see some links to the sub-contents with the following Keys in each JSON-Object
link
: Link to the destination-page with the detailed informationinframe
: Link to content, displayed in a frame or popupjson_detail
: Link to detailed JSON-Array of the current ObjectThe Json URL can have a parameter callback to the URL as Query (e.g. ?callback=jsonpFunction
). This works with all JSON-Resources.
Then, you can get the data from this source on a external page with the following code:
<script type="text/javascript">
function getData(data) {
console.log(data);
}
</script>
<script src="https://demo.t-point.eu/public/projects/
de.json?callback=getData"></script>
You can use the RSS-Feeds of the Data to read the Contents via Feed-Reader or implement them via Programming-Language (e.g. via PHP)
The access-links to the feeds are the same as the json-Links (with suffix .rss
)
Projects: https://demo.t-point.eu/public/projects/de.rss
Events: https://demo.t-point.eu/public/events/de.rss
Contacts: --- no RSS-Feed available - use the Json-Data!
Reports: https://demo.t-point.eu/public/reports/de.rss
Examples links show how to load the Feeds via javascript/jQuery on a webpage:
Additional Infos:
You can download the vCard of all public Contacts. To reach this, you have different methods.
https://demo.t-point.eu/public/contacts/de.json
as vCard-key of each Contact.When the System is installed properly, you can see the list of the ‘real’ links to your specific resources in the Admin-Section of the Bundle.
Log in to your Symfony-Instance and go to your Public section.
If you have the ROLE_ADMIN
added to your User-Security, you can see a link in the left navigation called “Admin-Links” (https://demo.t-point.eu/public/admin).