This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function filter_posts_get_update_preset($preset_parameters, $presetname, $paramarray) { | |
| switch($presetname) { | |
| case 'home': | |
| $notallinfo = isset($preset_parameters['not:all:info']) ? Utils::single_array($preset_parameters['not:all:info']) : array(); | |
| $notallinfo['debate'] = 0; | |
| $preset_parameters['not:all:info'] = $notallinfo; | |
| break; | |
| } | |
| return $preset_parameters; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static function filter_post_content_out_7( $content, $post ) | |
| { | |
| $regex = '%\[(\w+?)(?:\s+(.+?))?/\]|\[(\w+?)(?:\s+(.+?))?(?<!/)](?:(.*?)\[/(\w+?)])%si'; | |
| if(preg_match($regex, $content, $matches)) { | |
| $matches = array_pad($matches, 6, ''); | |
| $code = $matches[1] . $matches[3]; | |
| $attrs = $matches[2] . $matches[4]; | |
| $code_contents = $matches[5]; | |
| preg_match_all('#(\w+)\s*=\s*(?:(["\'])?(.*?)\2|(\S+))#i', $attrs, $attr_match, PREG_SET_ORDER); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*Created by http://freehtml5templates.com | |
| reset*/ | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| } | |
| @font-face { | |
| font-family: AdamskySFRegular; | |
| src: url('adma-webfont.eot'); | |
| src: url('adma-webfont.eot?#iefix') format('embedded-opentype'), url('adma-webfont.woff') format('woff'), url('adma-webfont.ttf') format('truetype'), url('adma-webfont.svg#AdamskySFRegular') format('svg'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $post = Posts::get(array('slug' => 'habari', 'fetch_fn' => 'get_row')); | |
| $related = Posts::get( array( 'vocabulary' => array( 'any:tags' => $post->tags) ) ); | |
| Utils::debug($post->title, $related); | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Helper function: Displays the home page | |
| * @param array $user_filters Additional arguments used to get the page content | |
| */ | |
| public function act_display_home( $user_filters = array() ) | |
| { | |
| $paramarray['fallback'] = array( | |
| 'home', | |
| 'multiple', | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| array ( | |
| 0 => 'SELECT | |
| {posts}.id AS id, | |
| {posts}.slug AS slug, | |
| {posts}.title AS title, | |
| {posts}.guid AS guid, | |
| {posts}.content AS content, | |
| {posts}.cached_content AS cached_content, | |
| {posts}.user_id AS user_id, | |
| {posts}.status AS status, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| array ( | |
| 0 => 'SELECT | |
| {posts}.id AS id, | |
| {posts}.slug AS slug, | |
| {posts}.title AS title, | |
| {posts}.guid AS guid, | |
| {posts}.content AS content, | |
| {posts}.cached_content AS cached_content, | |
| {posts}.user_id AS user_id, | |
| {posts}.status AS status, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| array ( | |
| 0 => 'SELECT | |
| {posts}.id AS id, | |
| {posts}.slug AS slug, | |
| {posts}.title AS title, | |
| {posts}.guid AS guid, | |
| {posts}.content AS content, | |
| {posts}.cached_content AS cached_content, | |
| {posts}.user_id AS user_id, | |
| {posts}.status AS status, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if(Utils::env_test()) { | |
| Config::set( 'db_connection', array( | |
| 'connection_string'=>'sqlite:habari_unittest.db', | |
| 'username'=>'', | |
| 'password'=>'', | |
| 'prefix'=>'' | |
| )); | |
| Config::set('blog_data', array( | |
| 'admin_username' => 'admin', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Query::__set_state(array( | |
| 'where' => | |
| QueryWhere::__set_state(array( | |
| 'operator' => 'AND', | |
| 'expressions' => | |
| array ( | |
| 1 => | |
| QueryWhere::__set_state(array( | |
| 'operator' => 'AND', | |
| 'expressions' => |