pyrocms/pyrocms — Issue #1120: blog tags model
Author: danlopez00
Created: 2012-02-07 23:41:15+00:00
State: open

include display_name

```php

public function get_tagged_by($tag, $params)
{
return $this->db->select('blog.*, blog.title title, blog.slug slug, blog_categories.title category_title, blog_categories.slug category_slug, profiles.display_name')
->from('blog')
->join('keywords_applied', 'keywords_applied.hash = blog.keywords')
->join('keywords', 'keywords.id = keywords_applied.keyword_id')
->join('blog_categories', 'blog_categories.id = blog.category_id', 'left')
->join('profiles', 'profiles.user_id = blog.author_id', 'left')
->where('keywords.name', str_replace('-', ' ', $tag))
->where($params)
->get()
->result();
}

```