function download_description_function($atts) { $atts = shortcode_atts(array('limit' => -1, 'shortcode' => 'yes', 'limit_words' => -1, 'id' => '', 'striphtml' => 'no', 'addtext' => '...'), $atts, 'download_description'); if ($atts['limit'] > 0) { $atts['limit_words'] = -1; } if ($atts['id'] != '') { $post = get_post($atts['id']); $description = $post->post_content; } else { $description = get_the_content(); } if ($atts['shortcode'] == 'trim') { $description = strip_shortcodes($description); } $description = do_shortcode(wpautop($description)); if ($atts['striphtml'] == 'yes') { $description = strip_tags($description); } if ($atts['limit'] > 0) { $description = substr($description, 0, $atts['limit']); $description .= $atts['addtext']; } if ($atts['limit_words'] > 0) { $description = limit_words($description, $atts['limit_words']); $description .= $atts['addtext']; } return $description; }
function download_excerpt_function($atts) { $atts = shortcode_atts(array('limit' => -1, 'shortcode' => 'yes', 'limit_words' => -1, 'id' => '', 'striphtml' => 'no', 'addtext' => '...', 'more' => 'no'), $atts, 'download_excerpt'); if ($atts['limit'] > 0) { $atts['limit_words'] = -1; } global $post; if ($atts['id'] != '') { $post = get_post($atts['id']); } $description = $post->post_content; if (has_excerpt(get_the_id())) { $description = get_the_excerpt(); } else { if (strstr($description, '<!--more-->') && $atts['more'] == 'yes') { $description = get_the_excerpt(); $atts['limit'] = -1; } else { $description = substr($description, 0, 250); $description = str_replace('<!--more-->', "", $description); } } if ($atts['shortcode'] == 'trim') { $description = strip_shortcodes($description); } $description = do_shortcode(wpautop($description)); if ($atts['striphtml'] == 'yes') { $description = strip_tags($description); } if ($atts['limit'] > 0) { $description = substr($description, 0, $atts['limit']); $description .= $atts['addtext']; } if ($atts['limit_words'] > 0) { $description = limit_words($description, $atts['limit_words']); $description .= $atts['addtext']; } return $description; }
function alc_workshop6($atts, $content = NULL) { extract(shortcode_atts(array("title" => 'Recent Work', "limit" => 6, "featured" => 0, "icon" => ''), $atts)); global $post; $return = ''; $counter = 1; $args = array('post_type' => 'workshop-6', 'taxonomy' => '', 'showposts' => $limit, 'posts_per_page' => $limit, 'orderby' => 'date', 'order' => 'DESC'); if ($featured) { $args['meta_key'] = '_portfolio_featured'; $args['meta_value'] = '1'; } $query = new WP_Query($args); $return .= ' <div class="row"> <div class="large-12 columns"> <div class="title-block"> <div class="icon-container"><i class="icon ' . $icon . '"></i></div> <span class="arrow-right"></span> <h3>' . $title . '</h3> <div class="clearfix"></div> </div> <div class="work_slide"> <ul id="work_slide_w6">'; while ($query->have_posts()) { $query->the_post(); $custom = get_post_custom($post->ID); $thumbnail = get_the_post_thumbnail($post->ID, 'portfolio-4-col'); $return .= '<li> <div class="view view-two">'; if (!empty($thumbnail)) { $return .= get_the_post_thumbnail($post->ID, 'portfolio-4-col', array('class' => 'cover')); } else { $return .= '<img src="' . get_template_directory_uri() . '/images/picture.jpg" alt="' . __('No preview image', 'Universfolio') . '" />'; } $return .= '<div class="mask"> <h3>' . get_the_title() . '</h3> <p>' . limit_words(get_the_excerpt(), 12) . '</p>'; if (isset($custom['_portfolio_link'][0]) && $custom['_portfolio_link'][0] != '') { $return .= '<a href="' . get_permalink() . '" class="button btn-icon icon-2" title="' . get_the_title() . '"> <i class="icon-external-link icon-large"></i> </a>'; } else { $full_image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full', false); $return .= '<a href="' . get_permalink() . '" class="button btn-icon icon-2" title="' . get_the_title() . '" > <i class="icon-external-link icon-large"></i> </a>'; } $full_image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full', false); $return .= '<a href="' . $full_image[0] . '" class="button btn-icon" data-rel="prettyPhoto" title="' . get_the_title() . '" > <i class="icon-zoom-in icon-large"></i> </a>'; $return .= '</div></div>'; $return .= '</li>'; } wp_reset_query(); $return .= '</ul> <div class="clearfix"></div> <a class="prev" id="slide_prev_w6" href="#"><img src="' . get_template_directory_uri() . '/images/arrow_left.png" alt="' . __('Prev', 'Alcatron') . '"></a> <a class="next" id="slide_next_w6" href="#"><img src="' . get_template_directory_uri() . '/images/arrow_right.png" alt="' . __('Next', 'Alcatron') . '"></a> </div></div></div>'; $return .= "\n\t\t<script type=\"text/javascript\">\n\t\t\tjQuery(window).load(function(){\n\t\t\t\tjQuery('#work_slide_w6').carouFredSel({\n\t\t\t\t\tresponsive: true,\n\t\t\t\t\twidth: '100%',\n\t\t\t\t\tauto: false,\n\t\t\t\t\tcircular\t: false,\n\t\t\t\t\tinfinite\t: true,\n scroll: {items:4, pauseOnHover: true},\n\t\t\t\t\tprev : {button: \"#slide_prev_w6\", key\t: \"left\"},\n\t\t\t\t\tnext : {button\t: \"#slide_next_w6\", key : \"right\"},\n\t\t\t\t\tswipe: {onMouse: true, onTouch: true},\n\t\t\t\t\titems: {visible: {min: 1,max: 6}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t</script>"; return $return; }
/** * Parse loaded template * * @param integer $level Current level of parsing * @param array $tags Leave blank, used for recursion * @param boolean $parent_block If parent tag is block element */ public function parse($tags = array()) { global $section, $action, $language, $template_path, $system_template_path; if (!$this->active && empty($tags)) { return; } // get language handler for later $language_handler = MainLanguageHandler::getInstance(); // take the tag list for parsing $tag_array = empty($tags) ? $this->engine->document->tagChildren : $tags; // start parsing tags $count = count($tag_array); for ($i = 0; $i < $count; $i++) { $tag = $tag_array[$i]; // if tag has eval set if (isset($tag->tagAttrs['cms:eval']) || isset($tag->tagAttrs['eval'])) { // get evaluation values if (isset($tag->tagAttrs['eval'])) { $value = $tag->tagAttrs['eval']; } else { $value = $tag->tagAttrs['cms:eval']; } $eval_params = explode(',', $value); foreach ($eval_params as $param) { // prepare module includes for evaluation $settings = array(); if (!is_null($this->module)) { $settings = $this->module->settings; } $params = $this->params; $to_eval = $tag->tagAttrs[$param]; $tag->tagAttrs[$param] = eval('global $section, $action, $language, $language_rtl, $language_handler; return ' . $to_eval . ';'); } // unset param unset($tag->tagAttrs['cms:eval']); } if (isset($tag->tagAttrs['cms:optional'])) { // get evaluation values $optional_params = explode(',', $tag->tagAttrs['cms:optional']); foreach ($optional_params as $param) { // prepare module includes for evaluation $settings = array(); if (!is_null($this->module)) { $settings = $this->module->settings; } $params = $this->params; $to_eval = $tag->tagAttrs[$param]; $value = eval('global $section, $action, $language, $language_rtl, $language_handler; return ' . $to_eval . ';'); if ($value == false) { unset($tag->tagAttrs[$param]); } else { $tag->tagAttrs[$param] = $value; } } // unset param unset($tag->tagAttrs['cms:optional']); } // implement tooltip if (isset($tag->tagAttrs['cms:tooltip'])) { if (!is_null($this->module)) { $value = $this->module->getLanguageConstant($tag->tagAttrs['cms:tooltip']); } else { $value = $language_handler->getText($tag->tagAttrs['cms:tooltip']); } $tag->tagAttrs['data-tooltip'] = $value; unset($tag->tagAttrs['cms:tooltip']); } // implement constants if (isset($tag->tagAttrs['cms:constant'])) { $params = explode(',', $tag->tagAttrs['cms:constant']); if (count($params) > 0) { foreach ($params as $param) { if (!is_null($this->module)) { $tag->tagAttrs[$param] = $this->module->getLanguageConstant($tag->tagAttrs[$param]); } else { $tag->tagAttrs[$param] = $language_handler->getText($tag->tagAttrs[$param]); } } } unset($tag->tagAttrs['cms:constant']); } // check if specified tag shouldn't be cached $skip_cache = false; if (isset($tag->tagAttrs['skip_cache'])) { // unset param unset($tag->tagAttrs['skip_cache']); // get cache handler $cache = CacheHandler::getInstance(); // only if current URL is being cached, we start dirty area if ($cache->isCaching()) { $cache->startDirtyArea(); $skip_cache = true; // reconstruct template for cache, // ugly but we are not doing it a lot $data = $this->getDataForCache($tag); $cache->setCacheForDirtyArea($data); } } // now parse the tag switch ($tag->tagName) { // handle tag used for setting session variable case '_session': case 'cms:session': $name = $tag->tagAttrs['name']; // allow setting referral only once per seesion if (isset($tag->tagAttrs['once'])) { $only_once = in_array($tag->tagAttrs['once'], array(1, 'yes')); } else { $only_once = false; } $should_set = $only_once && !isset($_SESSION[$name]) || !$only_once; // store value if (!in_array($name, $this->protected_variables) && $should_set) { $_SESSION[$name] = $tag->tagAttrs['value']; } break; // transfer control to module // transfer control to module case '_module': case 'cms:module': if (class_exists($tag->tagAttrs['name'])) { $module = call_user_func(array($tag->tagAttrs['name'], 'getInstance')); $module->transferControl($tag->tagAttrs, $tag->tagChildren); } break; // load other template // load other template case '_template': case 'cms:template': $file = $tag->tagAttrs['file']; $path = key_exists('path', $tag->tagAttrs) ? $tag->tagAttrs['path'] : ''; if (!is_null($this->module)) { $path = preg_replace('/^%module%/i', $this->module->path, $path); $path = preg_replace('/^%templates%/i', $template_path, $path); } $new = new TemplateHandler($file, $path); $new->setLocalParams($this->params); $new->parse(); break; // raw text copy // raw text copy case '_raw': case 'cms:raw': if (key_exists('file', $tag->tagAttrs)) { // if file attribute is specified $file = $tag->tagAttrs['file']; $path = key_exists('path', $tag->tagAttrs) ? $tag->tagAttrs['path'] : $template_path; $text = file_get_contents($path . $file); } elseif (key_exists('text', $tag->tagAttrs)) { // if text attribute is specified $text = $tag->tagAttrs['text']; } else { // in any other case we display data inside tag $text = $tag->tagData; } echo $text; break; // multi language constants // multi language constants case '_text': case 'cms:text': $constant = $tag->tagAttrs['constant']; $language = key_exists('language', $tag->tagAttrs) ? $tag->tagAttrs['language'] : $language; $text = ""; // check if constant is module based if (key_exists('module', $tag->tagAttrs)) { if (class_exists($tag->tagAttrs['module'])) { $module = call_user_func(array($tag->tagAttrs['module'], 'getInstance')); $text = $module->getLanguageConstant($constant, $language); } } else { // use default language handler $text = MainLanguageHandler::getInstance()->getText($constant, $language); } echo $text; break; // support for markdown // support for markdown case 'cms:markdown': $char_count = isset($tag->tagAttrs['chars']) ? fix_id($tag->tagAttrs['chars']) : null; $end_with = isset($tag->tagAttrs['end_with']) ? fix_id($tag->tagAttrs['end_with']) : null; $name = isset($tag->tagAttrs['param']) ? $tag->tagAttrs['param'] : null; $multilanguage = isset($tag->tagAttrs['multilanguage']) ? $tag->tagAttrs['multilanguage'] == 'yes' : false; // get content for parsing if (is_null($name)) { $content = $tag->tagData; } $content = $multilanguage ? $this->params[$name][$language] : $this->params[$name]; // convert to HTML $content = Markdown($content); // limit words if specified if (!is_null($char_count)) { if (is_null($end_with)) { $content = limit_words($content, $char_count); } else { $content = limit_words($content, $char_count, $end_with); } } echo $content; break; // call section specific data // call section specific data case '_section_data': case 'cms:section_data': if (!is_null($this->module)) { $file = $this->module->getSectionFile($section, $action, $language); $new = new TemplateHandler(basename($file), dirname($file) . '/'); $new->setLocalParams($this->params); $new->setMappedModule($this->module); $new->parse(); } else { // log error trigger_error('Mapped module is not loaded! File: ' . $this->file, E_USER_WARNING); } break; // print multilanguage data // print multilanguage data case '_language_data': case 'cms:language_data': $name = isset($tag->tagAttrs['param']) ? $tag->tagAttrs['param'] : null; if (!isset($this->params[$name]) || !is_array($this->params[$name]) || is_null($name)) { break; } $template = new TemplateHandler('language_data.xml', $system_template_path); $template->setMappedModule($this->module); foreach ($this->params[$name] as $lang => $data) { $params = array('param' => $name, 'language' => $lang, 'data' => $data); $template->restoreXML(); $template->setLocalParams($params); $template->parse(); } break; // replace tag data string with matching params // replace tag data string with matching params case '_replace': case 'cms:replace': $pool = isset($tag->tagAttrs['param']) ? $this->params[$tag->tagAttrs['param']] : $this->params; $keys = array_keys($pool); $values = array_values($pool); foreach ($keys as $i => $key) { $keys[$i] = "%{$key}%"; } // we can't replact string with array, only matching data types foreach ($values as $i => $value) { if (is_array($value)) { unset($keys[$i]); unset($values[$i]); } } echo str_replace($keys, $values, $tag->tagData); break; // conditional tag // conditional tag case '_if': case 'cms:if': $settings = !is_null($this->module) ? $this->module->settings : array(); $params = $this->params; $condition = true; // check if section is specified and matches if (isset($tag->tagAttrs['section'])) { $condition &= $tag->tagAttrs['section'] == $section; } // check if action is specified and matches if (isset($tag->tagAttrs['action'])) { $condition &= $tag->tagAttrs['action'] == $action; } // check custom condition if (isset($tag->tagAttrs['condition'])) { $to_eval = $tag->tagAttrs['condition']; $eval_result = eval('global $section, $action, $language, $language_rtl, $language_handler; return ' . $to_eval . ';') == true; $condition &= $eval_result; } // parse children if ($condition) { $this->parse($tag->tagChildren); } break; // conditional tag parsed for desktop version // conditional tag parsed for desktop version case 'cms:desktop': if (_DESKTOP_VERSION) { $this->parse($tag->tagChildren); } break; // conditional tag parsed for mobile version // conditional tag parsed for mobile version case 'cms:mobile': if (_MOBILE_VERSION) { $this->parse($tag->tagChildren); } break; // conditional tag parsed for users that are logged in // conditional tag parsed for users that are logged in case 'cms:user': if ($_SESSION['logged']) { $this->parse($tag->tagChildren); } break; // conditional tag parsed for guests // conditional tag parsed for guests case 'cms:guest': if (!$_SESSION['logged']) { $this->parse($tag->tagChildren); } break; // variable // variable case '_var': case 'cms:var': $settings = array(); if (!is_null($this->module)) { $settings = $this->module->settings; } $params = $this->params; $to_eval = $tag->tagAttrs['name']; echo eval('global $section, $action, $language, $language_rtl, $language_handler; return ' . $to_eval . ';'); break; // support for script tag // support for script tag case 'cms:script': if (class_exists('head_tag')) { $head_tag = head_tag::getInstance(); $head_tag->addTag('script', $tag->tagAttrs); } break; // support for collection module // support for collection module case 'cms:collection': if (array_key_exists('include', $tag->tagAttrs) && class_exists('collection')) { $scripts = fix_chars(explode(',', $tag->tagAttrs['include'])); $collection = collection::getInstance(); $collection->includeScript($scripts); } break; // support for link tag // support for link tag case 'cms:link': if (class_exists('head_tag')) { $head_tag = head_tag::getInstance(); $head_tag->addTag('link', $tag->tagAttrs); } break; // support for parameter based choice // support for parameter based choice case 'cms:choice': $param_value = null; if (array_key_exists('param', $tag->tagAttrs)) { // grap param value from GET or POST parameters $param_name = fix_chars($tag->tagAttrs['param']); $param_value = isset($_REQUEST[$param_name]) ? fix_chars($_REQUEST[$param_name]) : null; } else { if (array_key_exists('value', $tag->tagAttrs)) { // use param value specified $param_value = fix_chars($tag->tagAttrs['value']); } } // parse only option foreach ($tag->tagChildren as $option) { if (!$option->tagName == 'option') { continue; } $option_value = isset($option->tagAttrs['value']) ? $option->tagAttrs['value'] : null; $option_default = isset($option->tagAttrs['default']) ? $option->tagAttrs['default'] == 1 : false; // values match or option is default, parse its content if ($option_value == $param_value || $option_default) { $this->parse($option->tagChildren); break; } } break; // default action for parser, draw tag // default action for parser, draw tag default: if (in_array($tag->tagName, array_keys($this->handlers))) { // custom tag handler is set... $handle = $this->handlers[$tag->tagName]; $obj = $handle['object']; $function = $handle['function']; $obj->{$function}($tag->tagAttrs, $tag->tagChildren); } else { // default tag handler echo '<' . $tag->tagName . $this->getTagParams($tag->tagAttrs) . '>'; if (count($tag->tagChildren) > 0) { $this->parse($tag->tagChildren); } if (count($tag->tagData) > 0) { echo $tag->tagData; } $close_tag = $this->close_all_tags ? true : !in_array($tag->tagName, $this->tags_without_end); if ($close_tag) { echo '</' . $tag->tagName . '>'; } } break; } // end cache dirty area if initialized if ($skip_cache) { $cache->endDirtyArea(); } } }
$MemberData[$c]["country"] = geoip_country_name_by_addr($GeoIPDatabase, $row["user_ip"]); if ($GeoIP == 1 and empty($MemberData[$c]["letter"])) { $MemberData[$c]["letter"] = "blank"; $MemberData[$c]["country"] = "Reserved"; } $c++; } if (isset($GeoIP) and $GeoIP == 1) { geoip_close($GeoIPDatabase); } //GET USER COMMENTS $sth = $db->prepare("SELECT c.user_id, c.post_id, c.text, c.`date`, n.news_title\r\n FROM " . OSDB_COMMENTS . " as c \r\n\t LEFT JOIN " . OSDB_NEWS . " as n ON n.news_id = c.post_id\r\n\t WHERE c.user_id = :userID AND n.status >= 1\r\n\t ORDER BY c.`date` DESC\r\n\t LIMIT 50"); $sth->bindValue(':userID', $userID, PDO::PARAM_INT); $result = $sth->execute(); $c = 0; $MemberComments = array(); while ($row = $sth->fetch(PDO::FETCH_ASSOC)) { $ShortText = limit_words(convEnt($row["text"]), 30); $ShortText = str_replace(array("'", '"'), array(" ", " "), $ShortText); $MemberComments[$c]["short_text"] = $ShortText; $MemberComments[$c]["text"] = $row["text"]; $MemberComments[$c]["news_title"] = $row["news_title"]; $MemberComments[$c]["post_id"] = $row["post_id"]; $MemberComments[$c]["date"] = date(OS_DATE_FORMAT, $row["date"]); $MemberComments[$c]["date_int"] = $row["date"]; $c++; } } else { header('location:' . OS_HOME . '?404'); die; }
$info = '<span style="float:right;">[read]</span>'; } if ($status == 0) { $info = '<span style="float:right;"><b>[unread]</b></span>'; } $sth2 = $db->prepare("SELECT * FROM " . OSDB_USERS . " WHERE user_id = '{$fromID}' "); $result = $sth2->execute(); $row2 = $sth2->fetch(PDO::FETCH_ASSOC); $from = $row2["user_name"]; $MFrom = '<span style="font-size:11px;">from: <a href="' . OS_HOME . '?member=' . $row2["user_id"] . '"><i>' . $from . '</i></a></span>'; if (isset($_GET["pm"]) and !empty($_GET["pm"]) and $_GET["pm"] == $row["field_name"]) { $text = AutoLinkShort(convEnt($row["field_value"])) . ' <div></div> <a href="' . OS_HOME . 'adm/?bnet_pm&pm' . $page . '">« back</a>'; $style = 'style="border: 4px solid #ccc; padding: 5px;"'; } else { $style = "style='padding: 5px;'"; $text = '<a href="' . OS_HOME . 'adm/?bnet_pm&pm=' . $row["field_name"] . $page . '#' . $row["field_name"] . '">' . limit_words(convEnt($row["field_value"]), 15) . '</a>'; } ?> <tr class="row"> <td width="200"><a class="anchor" name="<?php echo $row["field_name"]; ?> "></a><b>to:</b> <a href="<?php echo OS_HOME; ?> ?member=<?php echo $sendID; ?> "><b><?php echo $sendTo; ?>
$document->addScriptDeclaration($sbinit); } $db->setQuery('SELECT c.access' . ' FROM #__datsogallery_catg AS c' . ' LEFT JOIN #__datsogallery AS a' . ' ON a.catid = c.cid' . ' WHERE a.id = ' . (int) $id . ' AND a.published = 1' . ' AND a.approved = 1' . ' AND c.approved = 1' . ' AND c.published = 1' . ' AND c.access IN (' . $groups . ')'); $access = $db->loadObject(); if (!$access) { $app->redirect(JRoute::_("index.php?option=com_datsogallery&view=datsogallery" . $itemid), JText::_('COM_DATSOGALLERY_NOT_ACCESS_THIS_IMAGE')); } $db->setQuery('SELECT a.*' . ' FROM #__datsogallery AS a' . ' WHERE a.id = ' . (int) $id); $obj = $db->loadObject(); if (count($obj) < 1) { $app->redirect(JRoute::_("index.php?option=com_datsogallery&view=datsogallery" . $itemid, false), JText::_('COM_DATSOGALLERY_PICSLAD')); } $document->setTitle($obj->imgtitle); if ($ad_metagen) { if ($obj->imgtext) { $document->setDescription(limit_words($obj->imgtext, 25)); $document->setMetadata('keywords', metaGen($obj->imgtext)); } } $obj->id_cache = array(); $db->setQuery('SELECT *' . ' FROM #__datsogallery' . ' WHERE catid = ' . $obj->catid . ' AND published = 1' . ' AND approved = 1' . ' ORDER BY ordering'); $rows = $db->loadObjectList(); if (count($rows)) { foreach ($rows as $row) { $obj->id_cache[] = $row->id; } } $act_key = array_search($obj->id, $obj->id_cache); if ($ad_sortby == "ASC") { $nid = isset($obj->id_cache[$act_key + 1]) ? $obj->id_cache[$act_key + 1] : 0; $pid = isset($obj->id_cache[$act_key - 1]) ? $obj->id_cache[$act_key - 1] : 0;
?> " class="fi-content"> <?php if (has_post_thumbnail()) { ?> <div class="fi-content-img"> <?php the_post_thumbnail('feed'); ?> </div> <?php } ?> <div class="fi-content-text"> <h2 class="fi-content-title"><?php limit_words(get_the_title(), 10); ?> </h2> </div> </a> <div class="fi-meta"> <a href="<?php the_permalink(); ?> " class="fi-meta-share"> <span class="fi-icon"><i class="fa fa-line-chart"></i></span> <span class="fi-count"><?php echo suffixNumFormat(get_post_meta(get_the_ID(), 'total_shares', true)); ?> </span> </a>
function view_post($dbc, $post_data, $post_type, $post) { $thedate = date('Y-m-d H:i:s'); if ($post_data['post_date'] != '0000-00-00 00:00:00' && $post_data['post_date'] <= $thedate) { $show_event = 1; } $body = strip_tags($post_data['body']); $author = get_user_data($dbc, $post['user_id']); $zone = data_zone($dbc, $post_data['zone']); // Post Advertising Zone $cat = data_cat($post_data['cat']); // Post Category // Check to see if the link is local or external: if ($post_data['url'] != '') { if (substr_count($post_data['url'], 'shore31.com') == 0) { $target = ' target="_blank"'; } $title = '<h1><a href="' . $post_data['url'] . '"' . $target . '>' . $post_data['title'] . '</a></h1>'; } else { $title = '<h1>' . $post_data['title'] . '</h1>'; } if ($post_type == 7) { $title = '<h1><a href="' . H . $zone['slug'] . '/' . $cat . '/' . $post_data['slug'] . '">' . $post_data['title'] . '</a></h1>'; } if ($post_type == 6) { $bg = 'loc' . $post['zone']; } if ($post_type == 6) { $bg_clear = 'style="background:none; border:none; box-shadow:none;"'; } echo '<div id="post_' . $post_data['id'] . '" class="post post_type_' . $post_type . ' ' . $bg . ' ">'; if ($post_type == 8) { echo '<div class="item event loc' . $post['zone'] . '">'; } else { echo '<div class="item" ' . $bg_clear . '>'; } switch ($post_type) { case 1: // Standard Post: if ($post_data['image']) { echo '<img style="border-radius:8px 8px 0px 0px;" src="' . H . UP . $post_data['image'] . '" style="width:100%; height:100%;">'; } echo $title; echo '<p class="article">' . limit_words($body, 20) . ' ...</p>'; echo '<p class="readmore"><a href="#">Read more</a></p>'; if ($post['display_date'] != '') { echo '<p class="byline">Posted: ' . $post['display_date'] . '</p>'; } echo '<div class="tag-list">' . $post_data['tag_list'] . '</div>'; break; case 2: // Video Post: echo $title; $video = str_replace('http://youtu.be/', '', $post_data['url']); echo '<iframe style="border-radius:8px;" width="236" height="180" src="//www.youtube.com/embed/' . $video . '" frameborder="0" allowfullscreen></iframe>'; if ($post['display_date'] != '') { echo '<p class="byline">Posted: ' . $post['display_date'] . '</p>'; } echo '<div class="tag-list">' . $post_data['tag_list'] . '</div>'; break; case 3: // Article Post: echo $title; echo '<p>' . limit_words($body, 20) . ' ...</p>'; echo '<p class="readmore"><a href="http://alan.shore31.com/test-article.php?id=' . $post_data['slug'] . '">Read more</a></p>'; if ($post['display_date'] != '') { echo '<p class="byline">Posted: ' . $post['display_date'] . '</p>'; } echo '<div class="tag-list">' . $post_data['tag_list'] . '</div>'; break; case 4: // Poster Post: echo $title; if ($post_data['image']) { echo '<img style="border-radius:0px 0px 0px 0px; margin-bottom:10px;" src="' . H . UP . $post_data['image'] . '" style="width:100%; height:100%;">'; } echo '<div class="tag-list">' . $post_data['tag_list'] . '</div>'; break; case 5: // Ad Box Post: echo '<p>' . $body . '</p>'; break; case 6: // Quote Post: echo '<p style="box-shadow:1px 1px 5px #999999; margin:0px; border-radius:8px 8px 0px 0px;">' . $body . '</p>'; //echo '<div class="tag-list">'.$post_data['tag_list'].'</div>'; break; case 7: // Standard Post: if ($post_data['image']) { echo '<img style="border-radius:8px;" src="' . H . UP . $post_data['image'] . '" style="width:100%; height:100%;">'; } echo $title; echo '<p>' . limit_words($body, 20) . ' ...</p>'; echo '<p class="readmore"><a href="#">Read more</a></p>'; if ($post['display_date'] != '') { echo '<p class="byline">Posted: ' . $post['display_date'] . '</p>'; } echo '<div class="tag-list">' . $post_data['tag_list'] . '</div>'; break; case 8: // Event Post: ?> <a class="calendar_date" href="#"> <div class="calendar_month"><?php echo $post_data['themonth']; ?> </div> <div class="calendar_number"><?php echo $post_data['theday']; ?> </div> <div class="calendar_day"><?php echo $post_data['thedayname']; ?> </div> </a> <h1><span class="loc<?php echo $post_data['zone']; ?> "><?php echo $post_data['title']; ?> </span> @ <?php echo $post_data['venue']; ?> </h1> <p class="display-location">IN <?php echo $zone['name']; ?> </p> <p class="display-date"><?php echo $post_data['display_date']; ?> @ <?php echo $post_data['thetime']; ?> </p> <?php if ($imagecount >= 1) { ?> <p class="display-image"><img src="<?php echo H; ?> uploads/<?php echo $image['filename']; ?> "/></p> <?php } ?> <p class="display-description"><?php echo limit_words($body, 40); ?> ...</p> <p class="readmore"><a href="#">Read more</a></p> <p> <?php social_button($dbc, '22', 'mail', 'Grey', $url); social_button($dbc, '22', 'twitter', 'Grey', $url); social_button($dbc, '22', 'facebook', 'Grey', $url); social_button($dbc, '22', 'google+', 'Grey', $url); social_button($dbc, '22', 'instagram', 'Grey', $url); social_button($dbc, '22', 'pinterest', 'Grey', $url); ?> </p> <?php break; } ?> <?php if ($post_type != 8) { ?> <p style="background:#FFFFFF; <?php if ($post_type == 6) { echo ' box-shadow:1px 1px 5px #999999; margin:0px; border-radius:0px 0px 8px 8px;'; } ?> "> <?php social_button($dbc, '22', 'mail', 'Grey', $url); social_button($dbc, '22', 'twitter', 'Grey', $url); social_button($dbc, '22', 'facebook', 'Grey', $url); social_button($dbc, '22', 'google+', 'Grey', $url); social_button($dbc, '22', 'instagram', 'Grey', $url); social_button($dbc, '22', 'pinterest', 'Grey', $url); ?> </p> <?php } ?> <?php echo '</div>'; echo '</div>'; }
" alt="*" /></a></td> <td width="220"><a href="<?php echo $website; ?> adm/?items&edit=<?php echo $row["itemid"] . $add; ?> "><b><?php echo $row["shortname"]; ?> </b></a> <div class="font12"><?php echo $row["type"]; ?> , Price: <?php echo $row["price"]; ?> </div></td> <td><?php echo limit_words(convEnt($row["item_info"]), 14); ?> </td> </tr> <?php } ?> </table> <?php include 'pagination.php'; ?> </div>
<div style="margin-right: 10px; margin-bottom: 5px" class="imgl"><img src="upload/berita/<?php echo $row_berita['img_berita']; ?> " width="160" height="80" alt="" /></div> <p class="latestnews" style="text-align: justify"><a href="index.php?route=beritabaca&id=<?php echo $row_berita['id_berita']; ?> "><strong><?php echo $row_berita['judul_berita']; ?> </strong> <small> - <?php echo tglindo($row_berita['tgl_rekam']); ?> </small></a></p> <p class="latestnews" style="text-align: justify"><?php echo strip_tags(limit_words($row_berita['isi_berita'], 30)); ?> </p> <p class="readmore"><a href="index.php?route=beritabaca&id=<?php echo $row_berita['id_berita']; ?> ">Continue Reading »</a></p> </li> <?php $i++; $count++; } ?> </ul> </div> <div>
function viewCategory() { $app = JFactory::getApplication('site'); $db = JFactory::getDBO(); $user = JFactory::getUser(); $groups = implode(',', $user->getAuthorisedViewLevels()); $document = JFactory::getDocument(); $filter_order = $app->getUserStateFromRequest('com_datsogallery.filter_order', 'filter_order', 'a.ordering', 'cmd'); $filter_order_Dir = $app->getUserStateFromRequest('com_datsogallery.filter_order_Dir', 'filter_order_Dir', '', 'word'); $catid = JRequest::getVar('catid', 0, '', 'int'); $menu = JSite::getMenu(); $ids = $menu->getItems('link', 'index.php?option=com_datsogallery&view=datsogallery'); $itemid = isset($ids[0]) ? '&Itemid=' . $ids[0]->id : ''; $is_editor = strtolower($user->usertype) == 'editor' || strtolower($user->usertype) == 'administrator' || strtolower($user->usertype) == 'super administrator'; GalleryHeader(); $db->setQuery("select count(*) from #__datsogallery_catg where cid = " . $catid . " AND access IN (" . $groups . ")"); $is_allowed = $db->loadResult(); if (!$is_allowed) { $app->redirect(JRoute::_('index.php?option=com_datsogallery' . $itemid, false), JText::_('COM_DATSOGALLERY_NOT_ACCESS_THIS_CATEGORY'), 'notice'); } //echo dgCategories($catid); require JPATH_COMPONENT_ADMINISTRATOR . DS . 'config.datsogallery.php'; if ($ad_sbcat) { $ssa = !$ad_slideshow_auto ? ',onOpen:function(currentImage){Shadowbox.play();Shadowbox.pause();}' : ''; $document->addStyleSheet(JURI::base(true) . '/components/com_datsogallery/libraries/shadowbox/shadowbox.css'); $document->addScript(JURI::base(true) . '/components/com_datsogallery/libraries/shadowbox/shadowbox.js'); $sbinit = 'Shadowbox.init({slideshowDelay:' . $ad_slideshow_delay . $ssa . '});'; $document->addScriptDeclaration($sbinit); } $db->setQuery("SELECT COUNT(*)" . " FROM #__datsogallery AS a" . " LEFT JOIN #__datsogallery_catg AS c" . " ON c.cid = a.catid" . " WHERE a.published = 1" . " AND a.catid = " . $catid . " AND a.approved = 1" . " AND c.access IN (" . $groups . ")"); $count = $db->loadResult(); if (!in_array($filter_order, array('a.imgcounter', 'a.imgdownloaded', 'a.imgtitle', 'a.imgdate', 'a.ordering'))) { $filter_order = 'a.ordering'; } if (!in_array(strtoupper($filter_order_Dir), array('ASC', 'DESC'))) { $filter_order_Dir = $ad_sortby; } $orderby = ' ORDER BY ' . $filter_order . ' ' . $filter_order_Dir; if ($ad_picincat && $count > 0) { echo JText::sprintf('COM_DATSOGALLERY_CATEGORY_IMAGES', $count); } ?> <form method="post" id="adminForm"> <?php $query = "SELECT count(*) AS count" . " FROM #__datsogallery" . " WHERE catid = " . $catid . " AND published = 1" . " AND approved = 1"; $db->setQuery($query); $row = $db->LoadObject(); $total = $row->count; jimport('joomla.html.pagination'); $limit = JRequest::getVar('limit', $ad_perpage, '', 'int'); $limitstart = JRequest::getVar('limitstart', 0, '', 'int'); $pagination = new JPagination($total, $limitstart, $limit); if ($count > $ad_perpage) { $page_nav_links = $pagination->getPagesLinks(); ?> <div class="datso_pgn"><?php echo $page_nav_links; ?> </div> <div style="clear:both"></div> <?php } $db->setQuery("SELECT * FROM #__datsogallery_catg WHERE cid = " . $catid); $rows = $db->loadObjectList(); $catname = $rows[0]->name; if ($show_grid) { echo '<div class="dg_head_background">' . str_replace('Joomla.tableOrdering', 'tableOrdering', JHTML::_('grid.sort', $catname . ' ', 'a.imgtitle', $filter_order_Dir, $filter_order)); echo '<span class="grid_txt"><div class="grid_border">' . str_replace('Joomla.tableOrdering', 'tableOrdering', JHTML::_('grid.sort', JText::_('COM_DATSOGALLERY_ORDER') . ' ', 'a.ordering', $filter_order_Dir, $filter_order)) . '</div>'; echo '<div class="grid_border">' . str_replace('Joomla.tableOrdering', 'tableOrdering', JHTML::_('grid.sort', JText::_('COM_DATSOGALLERY_DATE_ADD') . ' ', 'a.imgdate', $filter_order_Dir, $filter_order)) . '</div>'; echo '<div class="grid_border">' . str_replace('Joomla.tableOrdering', 'tableOrdering', JHTML::_('grid.sort', JText::_('COM_DATSOGALLERY_HITS') . ' ', 'a.imgcounter', $filter_order_Dir, $filter_order)) . '</div>'; echo '<div class="grid_border">' . str_replace('Joomla.tableOrdering', 'tableOrdering', JHTML::_('grid.sort', JText::_('COM_DATSOGALLERY_DOWNLOADS') . ' ', 'a.imgdownloaded', $filter_order_Dir, $filter_order)) . '</div>'; echo '</span></div>'; } else { echo '<div class="dg_head_background">' . $catname . '</div>'; } echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" class=\"dg_body_background\">\n"; if ($count > $ad_perpage) { $addspace = ' - '; } else { $addspace = ''; } $pages = $pagination->getPagesCounter(); $document->setTitle($catname . $addspace . $pages); if ($ad_metagen) { if ($rows[0]->description) { $document->setTitle($catname . $addspace . $pages); $document->setDescription(limit_words($rows[0]->description, 25)); $document->setMetadata('keywords', metaGen($rows[0]->description)); } } $query = 'SELECT a.*' . ' FROM #__datsogallery AS a' . ' LEFT JOIN #__datsogallery_catg AS c' . ' ON c.cid = a.catid' . ' WHERE a.published = 1' . ' AND a.catid = ' . $catid . ' AND a.approved = 1' . ' AND c.access IN (' . $groups . ')' . $orderby; $db->setQuery($query, $pagination->limitstart, $pagination->limit); $rows = $db->loadObjectList(); $rowcounter = 0; if (count($rows) > 0) { foreach ($rows as $row1) { if ($ad_ncsc) { $cw = 100 / $ad_cp . "%"; } if ($rowcounter % $ad_cp == 0) { echo " <tr>\n"; } echo " <td width=\"" . $cw . "\" class=\"dg_body_background_td\" align=\"center\" valign=\"top\">\n"; $tle = jsspecialchars($row1->imgtitle); if ($ad_showdetail) { $picdate = strftime($ad_datef, $row1->imgdate); } $na = $ad_na ? '#dgtop' : ''; $ld = "<a href='" . JRoute::_("index.php?option=com_datsogallery&task=image&catid=" . $catid . "&id=" . $row1->id . $itemid) . $na . "' title='" . $tle . "'>"; if ($ad_sbcat) { echo " <a rel='shadowbox[screenshots];player=img' href='" . JURI::root() . "index.php?option=com_datsogallery&task=sbox&catid=" . $catid . "&id=" . $row1->id . "&format=raw' title='" . $tle . "'>"; } else { echo $ld; } echo " <img src=\"" . resize($row1->imgoriginalname, $ad_thumbwidth, $ad_thumbheight, $ad_crop, $ad_cropratio, 0, $row1->catid) . "\" " . get_width_height($row1->imgoriginalname, $ad_thumbwidth, $ad_thumbheight, $catid, $ad_cropratio) . " class=\"dgimg\" title=\"" . $tle . "\" alt=\"" . $tle . "\" /></a>"; if ($ad_showdetail) { echo " <div style=\"width:" . $ad_thumbwidth . "px;margin:10px auto 0 auto;text-align:left;text-transform: uppercase;\">"; echo $ad_showimgtitle ? $ld . '<span>' . $row1->imgtitle . '</span></a><br />' : ''; echo " <span>"; echo $ad_showfimgdate ? '<strong>' . JText::_('COM_DATSOGALLERY_DATE_ADD') . '</strong>: ' . $picdate . '<br />' : ''; echo $ad_showimgcounter ? '<strong>' . JText::_('COM_DATSOGALLERY_HITS') . '</strong>: ' . $row1->imgcounter . '<br />' : ''; echo $ad_showdownloads ? '<strong>' . JText::_('COM_DATSOGALLERY_DOWNLOADS') . '</strong>: ' . $row1->imgdownloaded . '<br />' : ''; echo $ad_showrating ? showVote($row1->id, $row1->imgvotes, $row1->imgvotesum) : ''; if ($ad_showcomments) { $and = $is_editor ? '' : ' AND published = 1'; $db->setQuery('SELECT COUNT(cmtid) FROM #__datsogallery_comments WHERE cmtpic = ' . $row1->id . $and); $comments = $db->loadResult(); echo "<strong>" . JText::_('COM_DATSOGALLERY_COMMENTS') . "</strong>: {$comments}"; } echo " </span>"; echo " </div>"; } echo " </td>\n"; $rowcounter++; } } else { echo " <td width=\"" . @$cw . "\" class=\"dg_body_background_td\">" . JText::_('COM_DATSOGALLERY_NO_RESULTS') . "</td>\n"; } if ($rowcounter % $ad_cp != 0) { for ($i = 1; $i <= $ad_cp - $rowcounter % $ad_cp; $i++) { echo " <td width=\"" . @$cw . "\" class=\"dg_body_background_td\"> </td>\n"; } } echo " </tr>\n"; echo "</table>\n"; if ($count > $ad_perpage) { $page_nav_links = $pagination->getPagesLinks(); ?> <div class="datso_pgn"><?php echo $page_nav_links; ?> </div> <?php } ?> <input type="hidden" name="filter_order" value="<?php echo $filter_order; ?> " /> <input type="hidden" name="filter_order_Dir" value="<?php echo $filter_order_Dir; ?> " /> <?php echo JHTML::_('form.token'); ?> </form> <?php echo dgCategories($catid); GalleryFooter(); }
<?php } ?> <p style="padding-top: 10px;"> <?php if (str_word_count($row['long_desc']) < $blogWordLimit) { echo $row['long_desc']; } else { if (str_word_count($row['long_desc']) < $blogWordLimit + 50 && str_word_count($row['long_desc']) - 50 < 50) { echo $row['long_desc']; } else { if (isset($postID)) { echo $row['long_desc']; } else { echo limit_words($row['long_desc'], $blogWordLimit); ?> <a style="color: #333333" href="post.php?id=<?php echo $row['ID']; ?> "> <?php echo ' [..]</a>'; } } } ?> </p> <div class="shareButtons"> <table style="width: 100%">
bloginfo('url'); ?> "><img src="<?php bloginfo('template_directory'); ?> /img/gob-247.png" /></a> <div class="bloque-header single-principal"> <p>Sobre esta CategorÃa</p> <h1><?php echo $category->name; ?> </h1> </div> <p><?php echo limit_words($cat_desc, 30); ?> </p> <a href="http://www.iadb.org/es/banco-interamericano-de-desarrollo,2837.html" target="_blank"><img src="<?php bloginfo('template_directory'); ?> /img/bid.png" /></a> </div> </div><!-- principal --> <div id="search-wrapper" class="infinite-wrapper"> <?php global $wp_query;
/** * Get search results when asked by search module * * @param array $query * @param integer $threshold * @return array */ public function getSearchResults($query, $threshold) { global $language; $manager = ShopItemManager::getInstance(); $result = array(); $conditions = array('visible' => 1, 'deleted' => 0); $query = mb_strtolower($query); $query_words = mb_split("\\s", $query); // include pre-configured options if (isset($this->search_params['category'])) { $membership_manager = ShopItemMembershipManager::getInstance(); $category = $this->search_params['category']; $item_ids = array(); if (!is_numeric($category)) { $category_manager = ShopCategoryManager::getInstance(); $raw_category = $category_manager->getSingleItem(array('id'), array('text_id' => $category)); if (is_object($raw_category)) { $category = $raw_category->id; } else { $category = -1; } } // get list of item ids $membership_list = $membership_manager->getItems(array('item'), array('category' => $category)); if (count($membership_list) > 0) { foreach ($membership_list as $membership) { $item_ids[] = $membership->item; } $conditions['id'] = $item_ids; } } // get all items and process them $items = $manager->getItems(array('id', 'name'), $conditions); // search through items if (count($items) > 0) { foreach ($items as $item) { $title = mb_strtolower($item->name[$language]); $score = 0; foreach ($query_words as $query_word) { if (is_numeric(mb_strpos($title, $query_word))) { $score += 10; } } // add item to result list if ($score >= $threshold) { $result[] = array('score' => $score, 'title' => $title, 'description' => limit_words($item->description[$language], 200), 'id' => $item->id, 'type' => 'item', 'module' => $this->name); } } } return $result; }
//$startingDate = date_create($row['date_from']); $startingDate = $row['date_from']; $title[$row['date_from']] = $row['title']; $timeFrom[$row['date_from']] = $row['time_from']; if (strlen($row['date_to']) > 0) { for ($i = 0; $i < $dateDiff; $i++) { $tempDate = strtotime(date("Y-m-d", strtotime($startingDate . ' + ' . $i . ' day'))); $addedDate = date('Y-m-d', $tempDate); //echo $addedDate."<br />"; /* date_add($startingDate, date_interval_create_from_date_string('1 day')); $addedDate = date_format($startingDate, 'Y-m-d'); echo $addedDate."<br />"; */ $title[$addedDate] = limit_words($row['title'], 7); $timeFrom[$addedDate] = $row['time_from']; if (strlen($row['description']) > 0) { $ID[$row['date_from']] = $row['ID']; } $url = array(); if (strlen($row['url']) > 0) { $url[$row['date_from']] = $row['url']; } //echo $addedDate."<br />"; } //echo "<br />"; } else { if (strlen($row['description']) > 0) { $ID[$row['date_from']] = $row['ID']; }
<?php if (isset($_GET["page"]) and is_numeric($_GET["page"])) { ?> <input type="hidden" name="page" value="<?php echo (int) $_GET["page"]; ?> " /> <?php } ?> <input type="submit" value="save" class="menuButtons" /> </form> </div> </td> <td><?php echo limit_words($row["summary"], 20); ?> </td> <td><a href="<?php echo $website; ?> adm/?guides&hid=<?php echo $row["original"]; ?> " class="menuButtons">Add a guide</a></td> </tr> <?php } ?> </table> <?php
} } ?> </dl> </div> <?php } echo $this->item->event->afterDisplayTitle; echo $this->item->event->beforeDisplayContent; if ($params->get('show_intro')) { ?> <!-- Introtext --> <div class="item_introtext"> <?php if ($params->get('limt_introtext') > '0') { echo limit_words($this->item->introtext, $params->get('limt_introtext')); } else { echo $this->item->introtext; } ?> </div> <?php } ?> <!-- info BOTTOM --> <?php if ($useDefList && ($info == 1 || $info == 2)) { ?> <div class="item_info muted"> <dl class="item_info_dl">
');"> <div class="video_thumb archive"> <?php the_post_thumbnail('bullet', array('class' => 'floatleft')); ?> </div> <time><?php echo get_the_date(); ?> </time> <h5><span class="fa fa-video-camera" aria-hidden="true"></span> <?php the_title(); ?> </h5> <summary><?php echo limit_words(get_the_excerpt(), '25'); ?> <span class="blue"> [Read More]</span></summary> </a> </article> <?php } ?> </ul> </div> </div> <div class="row"> <?php flagship_pagination($flagship_video_archive_query->max_num_pages); ?>
<div class="panel-heading separator"> <div class="panel-title"><?php echo $course['course_code']; ?> </div> </div> <div class="panel-body"> <h3> <span class="semi-bold"></span> <?php echo $course['name']; ?> </h3> <p style="height: 60px;"> <?php echo limit_words($course['description'], 20); ?> </p> <div> <!-- <div class="profile-img-wrapper m-t-5 inline"> <img width="35" height="35" alt="" src="<?php echo user::avatar($course['teacher_id']); ?> "> <div class="chat-status available"> </div> </div> <div class="inline m-l-10"> <p class="small hint-text m-t-5"><?php
<span class="fa fa-fw fa-star-o text-yellow-800" style="color: #F58634;"></span> <span class="fa fa-fw fa-star-o text-yellow-800" style="color: #F58634;"></span> <span class="fa fa-fw fa-star-o text-yellow-800" style="color: #F58634;"></span> <?php } ?> </p> </div> <hr class="margin-none" /> <div class="panel-body"> <p> <?php $content = $row['description']; if (str_word_count($content) > 35) { echo limit_words($content, 35) . "..."; } else { echo $content; } ?> </p> <div class="media v-middle"> <div class="media-left"> <img src="<?php $q1 = $conn->prepare("SELECT * FROM profile WHERE username = :user"); $q1->bindParam(':user', $row['username']); $q1->execute(); while ($row2 = $q1->fetch()) { echo $row2['image']; }
echo dbcount("(comment_id)", DB_COMMENTS, "comment_type='N' AND comment_item_id='" . $data['id'] . "' AND comment_hidden='0'"); ?> Comments</a> <?php } else { ?> <del>0 Comments</del> <?php } ?> </span> </p> <?php if ($i == 1) { ?> <p class="excerpt"><?php echo cleanInput(limit_words(stripslashes($data['news']), 75)); ?> </p> <?php } ?> </div> <?php } ?> </div> </div> <div id="testimonials" class="grid_8 omega"> <?php $result = dbquery("\r\n\tSELECT user_id, user_name, user_status, user_testimonial \r\n\tFROM " . DB_USERS . " \r\n\tWHERE user_status = '0' \r\n\tAND user_testimonial !='' \r\n\tAND user_approve !='1'\r\n\tORDER BY RAND() LIMIT 10\r\n");
mysql_data_seek($result, $i); $row_agenda = mysql_fetch_array($result); ?> <li> <p style="text-align: justify"><a href="index.php?route=agendapastbaca&id=<?php echo $row_agenda['id_agenda']; ?> "><strong><?php echo $row_agenda['hal_agenda']; ?> </strong> <small> - <?php echo tglindo($row_agenda['tgl_agenda']); ?> </small></a></p> <p style="text-align: justify"><?php echo strip_tags(limit_words($row_agenda['uraian_agenda'], 30)); ?> </p> <p class="readmore"><a href="index.php?route=agendapastbaca&id=<?php echo $row_agenda['id_agenda']; ?> ">Continue Reading »</a></p> </li> <?php $i++; $count++; } ?> </ul> </div> <div>
} ?> </td> <td><a class="padLeft" href="<?php echo OS_HOME; ?> adm/?users&edit=<?php echo $row["user_id"]; ?> "><?php echo $row["user_name"]; ?> </a></td> <td> <?php echo limit_words(convEnt($row["reason"]), 12); ?> <?php if (!empty($row["resolved_text"])) { ?> <div><b><?php echo $row["resolved"]; ?> :</b> <?php echo $row["resolved_text"]; ?> </div> <?php } ?> </td>
function minti_bloglist($atts) { extract(shortcode_atts(array('posts' => '4', 'title' => 'Latest Blog Entries', 'show_title' => 'yes', 'categories' => 'all'), $atts)); global $post; $args = array('post_type' => 'post', 'posts_per_page' => $posts, 'order' => 'DESC', 'orderby' => 'date', 'post_status' => 'publish'); if ($categories != 'all') { // string to array $str = $categories; $arr = explode(',', $str); //var_dump($arr); $args['tax_query'][] = array('taxonomy' => 'category', 'field' => 'slug', 'terms' => $arr); } query_posts($args); $out = ''; if (have_posts()) { if ($show_title == 'yes') { $out .= '<h3 class="title"><span>' . $title . '</span></h3>'; } while (have_posts()) { the_post(); $out .= '<div class="latest-blog-list clearfix"><div class="blog-list-item-date">' . get_the_time('d') . '<span>' . get_the_time('M') . '</span></div> <div class="blog-list-item-description"> <h4><a href="' . get_permalink() . '" title="' . get_the_title() . '">' . get_the_title() . '</a></h4> <span>' . get_comments_number() . ' ' . __('Comments', 'minti') . '</span> <div class="blog-list-item-excerpt">' . limit_words(get_the_excerpt(), '20') . '... <a href="' . get_permalink() . '">' . __('Read More →', 'minti') . '</a></div> </div> </div>'; } $out .= '<div class="clear"></div>'; wp_reset_query(); } return $out; }
function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['post_title']); echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } $post_count = $instance['post_count']; $category = $instance['post_category']; $args = array('post_type' => 'portfolio', 'taxonomy' => 'portfolio_category', 'posts_per_page' => $post_count); if (!empty($category)) { $args['term'] = $category; } $loop = new WP_Query($args); ?> <ul class="widget-popular-list"> <?php while ($loop->have_posts()) { $loop->the_post(); ?> <li> <div class="list-post-thumb"> <a href="<?php the_permalink(); ?> "> <?php if (has_post_thumbnail()) { ?> <?php the_post_thumbnail('blog-thumb2', array('class' => 'cover')); ?> <?php } else { ?> <img src = "<?php echo get_template_directory_uri(); ?> /images/picture_small.png" alt="No Image" /> <?php } ?> </a> </div> <div class="list-post-desc"> <a href="<?php the_permalink(); ?> "><?php the_title(); ?> </a> <br /> <?php echo limit_words(get_the_excerpt(), '12'); ?> </div> <div class="clear"></div> <!-- <p><?php //echo limit_words($loop->post_content, '12') ?> </p>--> </li> <?php } ?> </ul> <?php echo $after_widget; }
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="keywords" content="WEDDING, MAGAZINE, UYO, AKWA IBOM STATE, TRADITIONAL MARRIAGE, BACHELOR, BRIDAL SHOWER, SOUVENIERS, WHITE WEDDING, ACCESSORIES DESIGNERS, MASTER OF CEREMONIES, MC, PHOTOGRAPHERS, DECORATORS, DISC JOCKEY, CAKE, CAKE AND DESERT, CATERING, DRINKS, CATERING AND DRINKS, BRIDAL COUTURE, BRIDE, GROOM, WIFE, HUSBAND"> <meta name="author" content="knotandrings.com"> <meta property="og:title" content="<?php echo $titleee; ?> " /> <meta property="og:url" content="http://knotandrings.com" /> <meta property="og:image" content="http://knotandrings.com/<?php echo $imgpost; ?> " /> <meta property="og:description" content="<?php if (str_word_count($descee) > 20) { echo limit_words($descee, 20) . '...'; } else { echo $descee; } ?> " /> <meta property="og:site_name" content="knotandrings.com" /> <?php } } else { ?> <title>Knot and Rings</title> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content="Knot and Rings is the world's first online wedding rating magazine, focused on showcasing iconic wedding moments and rewarding couples and different wedding vendors with gifts who make the monthly top 5 listing. ">
?> /img/gob-247.png" /> <?php } ?> </a> <div class="bloque-header single-principal"> <p>Sobre está colección</p> <h1><?php the_title(); ?> </h1> </div> <p class="desc-coleccion"><?php echo limit_words($content, 50); ?> </p> <a href="http://www.iadb.org/es/banco-interamericano-de-desarrollo,2837.html" target="_blank"><img src="<?php bloginfo('template_directory'); ?> /img/bid.png" /></a> </div> </div><!-- principal --> <?php } } ?>
echo $clean_caption; ?> " alt="<?php the_title(); ?> "> <time><?php echo get_the_date(); ?> </time> <h5><span class="fa fa-camera" aria-hidden="true"></span> <?php the_title(); ?> </h5> <summary><?php echo limit_words(get_the_content(), '25'); ?> <span class="blue"> [Read More]</span></summary> </a> </li> <?php } ?> </ul> </div> </div> <div class="row"> <?php flagship_pagination($flagship_photo_archive_query->max_num_pages); ?>
<li class="scene"> <div class="movie"> <div class="poster"></div> <div class="info"> <header> <h1><?php the_title(); ?> </h1> </header> <p><?php echo limit_words(get_the_excerpt(), '30') . '...'; ?> </p> </div> </div> </li> <?php } } wp_reset_query(); ?>