Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

stilldver

Newbie
  
  • Posts

    7
  • Joined

  • Last visited

stilldver's Achievements

Rookie

Rookie (2/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Нужен человек, который возьмётся отредактировать и настроить существующий ИМ (настройка юзербилити, исправление ошибок, настройка оплаты и доставки). [email protected] +7-985-385-40-99 Андрей
  2. Тут??? <?php class ModelFidoNews extends Model { public function getNewsStory($news_id) { $query = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "news n LEFT JOIN " . DB_PREFIX . "news_description nd ON (n.news_id = nd.news_id) LEFT JOIN " . DB_PREFIX . "news_to_store n2s ON (n.news_id = n2s.news_id) WHERE n.news_id = '" . (int)$news_id . "' AND nd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND n2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND n.status = '1'"); return $query->row; } public function getNews() { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "news n LEFT JOIN " . DB_PREFIX . "news_description nd ON (n.news_id = nd.news_id) LEFT JOIN " . DB_PREFIX . "news_to_store n2s ON (n.news_id = n2s.news_id) WHERE nd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND n2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND n.status = '1' ORDER BY n.date_added DESC"); return $query->rows; } public function getNewsShorts($limit) { $query = $this->db->query("SELECT * FROM " . DB_PREFIX . "news n LEFT JOIN " . DB_PREFIX . "news_description nd ON (n.news_id = nd.news_id) LEFT JOIN " . DB_PREFIX . "news_to_store n2s ON (n.news_id = n2s.news_id) WHERE nd.language_id = '" . (int)$this->config->get('config_language_id') . "' AND n2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND n.status = '1' ORDER BY n.date_added DESC LIMIT " . (int)$limit); return $query->rows; } public function getTotalNews() { $query = $this->db->query("SELECT COUNT(*) AS total FROM " . DB_PREFIX . "news n LEFT JOIN " . DB_PREFIX . "news_to_store n2s ON (n.news_id = n2s.news_id) WHERE n2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND n.status = '1'"); if ($query->row) { return $query->row['total']; } else { return FALSE; } } } ?>
  3. Подскажите плиз.... (в PHP профан) <?php class ControllerModuleNews extends Controller { protected function index($setting) { $this->load->language('module/news'); $this->load->model('fido/news'); $this->data['heading_title'] = $this->language->get('heading_title'); $this->data['heading_all'] = $this->language->get('heading_all'); $this->data['text_read_more'] = $this->language->get('text_read_more'); $this->data['text_date_added'] = $this->language->get('text_date_added'); $this->data['show_headline'] = $this->config->get('news_module_headline'); $this->data['news_count'] = $this->model_fido_news->getTotalNews(); $this->data['news'] = array(); $results = $this->model_fido_news->getNewsShorts(3); foreach ($results as $result) { $cut_descr_symbols = 96; $descr_plaintext = strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')); if( mb_strlen($descr_plaintext, 'UTF-8') > $cut_descr_symbols ) { $descr_plaintext = mb_substr($descr_plaintext, 0, $cut_descr_symbols, 'UTF-8') . '…'; } $this->load->model('tool/image'); if ($result['image']) { $this->data['image'] = TRUE; } else { $this->data['image'] = FALSE; } $image = $this->model_tool_image->resize($result['image'], 70, 70); $this->data['news'][] = array( 'title' => $result['title'], 'description' => $descr_plaintext, 'fotos' => $image, 'href' => $this->url->link('information/news', 'news_id=' . $result['news_id']), 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])) ); } $this->id = 'news'; if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/news.tpl')) { $this->template = $this->config->get('config_template') . '/template/module/news.tpl'; } else { $this->template = 'default/template/module/news.tpl'; } $this->render(); } } ?> Как сделать сортировку по дате?
  4. Спасибо, контроллер добавил, права установил 777 в image/ image/cache/ image/data/ system/cache/ system/logs/ download/ config.php admin/config.php в итоге сайт видит, хоть и с ошибками, но при входе в админку все-равно 'эта ошибка
  5. Ребят,помогите плиз... я только учусь. был хостинг, кое-какие разработки на основе стандартного шаблона, минимум модулей, так, ковыряния. Сделал бэкап, но при установке на новый хост стала вылезать ошибка... Notice: Error: Could not load controller common/header! in /var/www/u7588959/data/www/mbostore.ru/system/engine/controller.php on line 47 Что это может быть???
Guest
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.