Loading...
 
Skip to main content

Features / Usability


Integrating content from database

posts: 17

Hya,

I've got a perl script that can insert emails into a database. I now want to display a list of messages (sender, date, subject) and the individual messages. Doing this by its self isn't that difficult, but I'm not sure what the best way to integrate it with TikiWiki is.

I've had a look at TikiIntegrator, which is fine for static html, but won't display php. I've also looked at the DynamicContent feature, but while static html looks easy enough, I'm not sure how to get it pull info from the database.

Any hints, tips or pointers would be greatly appreciated.

Cheers,
Ewan

posts: 2881 United Kingdom

Hi ewan

How about using the Featured Link style of framed output? Where your PHP file can run in the center column of tiki in a iframe.

Check out the Featured Links for an idea!

Damian


posts: 17

I'd seen the IFrames method but I'm not a great fan of frames TBH.

Cheers though,
Ewan


posts: 17

I've been playing about with setting up a new Feature using FeatureCreationDev as a guideline.

I created my feature: tiki-email.php
created a template file: ./templates/tiki-email.tpl

and inserted

(it won't let me include the code here, but it's basically what's quoted in FeatureCreationDev)

into ./template/tiki-admin-include-features.tpl

and inserted

"feature_email",

into

$features_toggles = array(
.....
);

===
But I'm getting parsing errors:

Parse error: parse error, unexpected $ in /var/www/html/tiki/templates_c/en/%%198/%%1989249160/tiki-admin-include-features.tpl.php on line 718

and

Parse error: parse error, unexpected $ in /var/www/html/tiki/templates_c/en/%%405/%%405324798/tiki-email.tpl.php on line 15

(I've entered 'feature_email', 'y' into the the tiki-preferances table of the database as well)

I can't for the life of me work out what's missing!

Cheers,
ewan

posts: 17

replying to my own post again! I really mustn't talk to myself like this 🙄

Anyway, after much faffing around, I've managed to setup a new feature to display a field from a database 😊

I still don't understand what the parsing errors were caused by. In the end I just played about with the 'contactus' files and set my feature up using those files and the feature_contactus referances in the TikiWiki database.

cheers,
ewan


posts: 17

replying to my own post again! I really mustn't talk to myself like this 🙄

Anyway, after much faffing around, I've managed to setup a new feature to display a field from a database 😊

I still don't understand what the parsing errors were caused by. In the end I just played about with the 'contactus' files and set my feature up using those files and the feature_contactus referances in the TikiWiki database.

cheers,
ewan