View family.php
//see it in action: http://plus65.in/family/1
//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 http://cselian.com/blog/tech/snippets/displaying-tree-info/
//Controller
$items= Yii::app()->db->createCommand('select id, name, parent_id from locations order by id')->queryAll();
$items = Formatter::arrayGroupBy($items, 'id', 'parent_id');
//Formatter
public static function arrayGroupBy($items, $key, $column)
{
return self::groupArray($items, $key, $column, '');
View data.php
<?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()
{
start:
var ofd = new OpenFileDialog { InitialDirectory = path };
if (ofd.ShowDialog() == DialogResult.Cancel)
{
MessageBox.Show("Nothing selected. exiting");
return;
}
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
// - https://github.com/ImranCS/wp-cselian/tree/master/cs-sites
// 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
<?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
// http://tg.cselian.com/assets/images/testimonials/guy.jpg
?>