I wanted to run Magento's PHP Shell Scripts through Command Line on my Windows PC. So this is what i had to do to run PHP through windows cmd.
Find the folder where PHP is installed. As I am using WAMP, I found php.exe in folder:
More»
How does TAG cloud works in Codefight CMS?
Admin/Modules/Pages/Controllers/Pages.php:
In admin when creating page, if tags are set split tags separated with commas. Then clean up every tag for tag-key as $tag. Then insert the tags into tag clouds table.
<?php
if(isset($pages_tags))
{
$pages_tags = split(',',$pages_tags);
if(is_array($pages_tags) && count($pages_tags) > 0)
foreach($pages_tags as $v)
{
//clean tag
$tag = $this->data_model->link_clean($v);
//add|increment tag count
$this->data_model->tag_cloud_add($tag, 'page', $v);
//insert tags to tags table
$this->db->insert('pages_tags', array('pages_id' => $page_id, 'tags' => $tag));
}
}
?>
Admin/Models/Data_model.php
More»