View family.php
//see it in action:
//the input data is in the form of family.txt
//when parsed, it takes the form of family2.txt
public function renderInfo($people = false, $name = false)
$sub = $people !== false;
if (!$name) $name = $this->person->name;
if (!$people) $people = self::parse($this->family_info);
$father = false; $mother = false;
View tree.php
//Similar to
$items= Yii::app()->db->createCommand('select id, name, parent_id from locations order by id')->queryAll();
$items = Formatter::arrayGroupBy($items, 'id', 'parent_id');
public static function arrayGroupBy($items, $key, $column)
return self::groupArray($items, $key, $column, '');
View data.php
$name = $_POST["name"];
$lat = $_POST['latitude'];
$lon = $_POST['longitude'];
//TODO: Save to db
echo date('d M Y h:i:s');
View QGenLite.cs
static void Main()
var ofd = new OpenFileDialog { InitialDirectory = path };
if (ofd.ShowDialog() == DialogResult.Cancel)
MessageBox.Show("Nothing selected. exiting");
View wordpress.php
// in the wp-config of wordpress, you can replace the usual define(DB_NAME) etc with this method (to configure the db)
// for varying the codebase per site, you can refer to the CS Sites plugin
// -
// this config is for 2 sets of sites (biblios + tg) on 2 environments, hence the siteNamesWeb
function site_db_config() {
$local = true;
$dbPrefix = ''; // in case you have a convention (wp_ for wordpress etc)
$siteNames = array(
View wp-testimonials.php
// In the sfstst_showall function, add the do_shortcode line to this one below
if ($tstpage2->sfimgurl != '') { // check for image
$tstpage2->sfimgurl = do_shortcode($tstpage2->sfimgurl);
// Then in the testimonial Image url, you can use something like
// [link type=img src=testimonials/guy.jpg return=src]
// And this will we changed (via link shortcode of cs-companion) to