Thread:Extension talk:DataTransclusion/Need examples/reply (2)

I'm sure someone has figure this out since this thread is really old but since no one has posted, I figured I'd share what I was able to get to work. This one queries the mediawiki user table for the email address of the user. Not a practical application but just to illustrate how the LocalSettings.php variable is configured:

//DataTransclusion Extension require_once( "$IP/extensions/DataTransclusion/DataTransclusion.php" ); $wgDataTransclusionSources = array(       "user"=>array("class"=>"DBDataTransclusionSource", "keyFields"=>array("user_name","user_real_name"), "keyTypes"=>array("user_name"=>"string","user_real_name"=>"string"), "fieldNames"=>array("user_id","user_name","user_email","user_real_name"), "query"=>"select user_id, user_name, user_email, user_real_name from user")       );

On your template called Template:SampleUser

== User: == e-mail:

On your page:

If someone has a better example, please share!