eburgnights
Гуру форума
- Регистрация
- 10 Мар 2007
- Сообщения
- 212
- Реакции
- 74
- Автор темы
- #1
в ридми файле галлереи указано:
Но дело в том, что в index.php нет такого.
Кто прикручивал данную галлерею к vivvo, помогите пожалуйста!
Код:
Unpack zip file to your Vivvo site trough ftp, set permissions to 777 for
files/thumbanil
files/thumbanil/article_full
files/thumbanil/gallery
files/thumbanil/headline
files/thumbanil/latest
Applay following changes.
Changes to index.php:
After:
$article_list = new Article_list();
$article_list->search(array('a.cid' => $cid, 'a.status' => 1, 'a.created' => $cur_date), $_GET['sort'], 'descending', $category->ArticleNumberPerPage, $start_from);
(around line 155)
Replace:
if ($category->PostedArticles > 0) {
$category_articles_short_HTML = HTML_article_list(
$article_list,
'content_article_list_no_title.tpl',
array('BOX_TITLE' => $category->Category_name, 'BOX_ID' => 'box_article_list'),
'article_short.tpl',
array('image_width' => $latest_news_image_width, 'word_number' => $latest_news_word_number)
);
$show_pager_HTML=HTML_Show_Pager($cur_page, $pg_link, $category->PostedArticles, $start_from, $category->ArticleNumberPerPage);
$template_manager->assign($category_articles_short_HTML,'/{ARTICLE_SHORT}/');
}
With:
if ($category->Template != '' && file_exists($root. 'templates/content/summary/' . $category->Template)){
$summary_template = $category->Template;
}else{
$summary_template = "article_short.tpl";
}
if ($category->PostedArticles > 0) {
$category_articles_short_HTML = HTML_article_list(
$article_list,
'content_article_list_no_title.tpl',
array('BOX_TITLE' => $category->Category_name, 'BOX_ID' => 'box_article_list'),
$summary_template,
array('image_width' => $latest_news_image_width, 'word_number' => $latest_news_word_number)
);
$show_pager_HTML=HTML_Show_Pager($cur_page, $pg_link, $article_list->get_total_count(), $start_from, $category->ArticleNumberPerPage);
$template_manager->assign($category_articles_short_HTML,'/{ARTICLE_SHORT}/');
}
After:
$date=getDate(strtotime($article->Created)); (around line 493)
Replace:
$index_template="$tpl_folder/article_Full.tpl";
With:
$category->LoadFromDatebase($article->Category_id);
if ($category->Template != '' && file_exists($root. 'templates/content/' . $category->Template)){
$index_template = 'templates/content/' . $category->Template;
}else{
$index_template="$tpl_folder/article_Full.tpl";
}
To make category a gallery you will need to choose custom templates for it (ctg_gallery.tpl for custom template and
ctgheader_gallery.tpl for custom header template).
To enable last post from gallery box add following to include/box_definition.php:
// if you want to have last post from multiple galleries put ids in comma separated format (ie. '1,5,12')
$gallery_last_post = HTML_gallery_last_post( -- your gallery id goes here --);
$template_manager->assign($gallery_last_post, '/{GALLERY_LAST_POST}/');
After that you need to put {GALLERY_LAST_POST} tag in your index.tpl (of ctg_main.tpl).
Но дело в том, что в index.php нет такого.
Кто прикручивал данную галлерею к vivvo, помогите пожалуйста!