|
|
1. .htaccess, :
RewriteRule ^articles\.html$ index.php?articles=yes [L]
RewriteRule ^show_articles_([0-9]+)\.html$ index.php?fullarticles=$1 [L]
articles fullarticles. .
2. (news_table) articles_table ( ).
-- `articles_articles`
DROP TABLE IF EXISTS `articles_table`;
CREATE TABLE IF NOT EXISTS `articles_table` (
`NID` int(11) NOT NULL AUTO_INCREMENT,
`add_date` date DEFAULT NULL,
`title` text,
`textToPrePublication` text,
`textToPublication` mediumtext,
`textToMail` text,
`add_stamp` int(11) DEFAULT NULL,
PRIMARY KEY (`NID`)
) ENGINE=InnoDB DEFAULT CHARSET=cp1251 AUTO_INCREMENT=0 ;
COMMIT;
3. core/config/tables.inc.php:
if ( !defined('NEWS_TABLE') )
{
define('NEWS_TABLE', 'sun_news_table');
- - ,
if(!defined('ARTICLES_TABLE'))
{
define('ARTICLES_TABLE', 'articles_table');
}
4. core/languages/russian.php - , , : define('ADMIN_ARTICLES', '');
5. setting_constants.sql
insert into SETTINGS_TABLE (settings_groupID, settings_constant_name, settings_value, settings_title, settings_description, settings_html_function, sort_order) VALUES (2, 'CONF_ARTICLES_COUNT_IN_CUSTOMER_PART', '3', ' ', ', , .', 'setting_TEXT_BOX(2,', 11);
insert into SETTINGS_TABLE (settings_groupID, settings_constant_name, settings_value, settings_title, settings_description, settings_html_function, sort_order) VALUES (2, 'CONF_ARTICLES_COUNT_IN_ARTICLES_PAGE', '10', ' ', ', , ', 'setting_TEXT_BOX(2,', 12);
insert into BLOCKS_TABLE (title, content, bposition, active, which, sort, html, url, admin, about, pages, dpages, categories, products) VALUES ('', '', 4, 1, 0, 9, 1, 'articles.tpl.html', 0, ' . .', 'a:0:{}', 'a:0:{}', 'a:0:{}', 'a:0:{}');
insert into BLOCKS_TABLE (title, content, bposition, active, which, sort, html, url, admin, about, pages, dpages, categories, products) VALUES (' ', '', 2, 0, 1, 17, 1, 'articles_center.tpl.html', 0, ' . .', 'a:1:{i:0;s:13:"home.tpl.html";}', 'a:0:{}', 'a:0:{}', 'a:0:{}');
6. core/functions/news_function.php core/functions/articles_function.php
( ), (articles_function.php) , :
function newsGetNewsToCustomer() articlesGetArticlesToCustomer(), , , , NEWS_TABLE ARTICLES_TABLE ( core/config/tables.inc.php). , , news articles, .
7. core/includes/news.php core/includes/articles.php . ( , , ). ( show_articles.tpl.html, show_full_articles.tpl.html). GET POST (. .htaccess)!!!!!!! (articles, fullarticles)
..
8. - core/tpl/admin/menu.tpl.html
501 ( <div class="dvmenu">
<table class="adn"><tr><td><img src="data/admin/drs.gif" alt=""></td><td width="100%"><a href="{$smarty.const.ADMIN_FILE}?dpt=modules&sub=news">{$smarty.const.ADMIN_NEWS}</a></td></tr></table> )
<table class="adn"><tr><td><img src="data/admin/drs.gif" alt=""></td><td width="100%"><a href="{$smarty.const.ADMIN_FILE}?dpt=modules&sub=articles">{$smarty.const.ADMIN_ARTICLES}</a></td></tr></table>
9. core/includes/admin/modules.php :
$admin_dpt = array(
"id" => "modules", //department ID
"sort_order" => 40, //sort order (less `sort_order`s appear first)
"name" => ADMIN_MODULES, //department name
"sub_departments" => array
(
array("id"=>"news", "name"=>ADMIN_NEWS),
array("id"=>"articles", "name"=>ADMIN_ARTICLES),
array("id"=>"survey", "name"=>ADMIN_VOTING),
array("id"=>"shipping", "name"=>ADMIN_STRING_SHIPPING_MODULES),
array("id"=>"payment", "name"=>ADMIN_STRING_PAYMENT_MODULES),
array("id"=>"linkexchange", "name"=>ADMIN_STRING_MODULES_LINKEXCHANGE),
array("id"=>"yandex", "name"=>"." )
)
);
add_department($admin_dpt);
.. ..
.
10. core\tpl\admin\modules_articles.tpl.html
11. core\includes\head.php 25
elseif (isset($_GET["fullnews"])) // fullnews => get title ....
elseif (isset($_GET["fullarticles"])) // fullarticles => get title
{
$fullnews_array_head = articlesGetFullArticlesToCustomer($_GET["fullarticles"]);
if ($fullnews_array_head["title"]) $page_title = $fullnews_array_head["title"].". ".CONF_SHOP_NAME;
else $page_title = CONF_DEFAULT_TITLE.". ".CONF_SHOP_NAME;
$meta_tags = "";
if ( CONF_HOMEPAGE_META_DESCRIPTION != "" )
$meta_tags .= "<meta name=\"description\" content=\"".CONF_HOMEPAGE_META_DESCRIPTION."\"/>\n";
if ( CONF_HOMEPAGE_META_KEYWORDS != "" )
$meta_tags .= "<meta name=\"keywords\" content=\"".CONF_HOMEPAGE_META_KEYWORDS."\"/>\n";
}
SEO
: shopcms |
|
|
" " _offset_
http://www.tataspb.ru/category_22.html
http://www.tataspb.ru/category_22_offset_20.html
http://www.tataspb.ru/category_22_offset_30.html
{if !$smarty.get.offset}
{/if}
category.tpl.html
{* ( ) *}
{if !$smarty.get.offset}
{if $selected_category.description}
{include file="header.tpl.html" header=$smarty.const.STRING_CATEGORY_DESK}
<table cellspacing="0" cellpadding="0" width="100%">
<tr>
<td class="hdbtop" align="left">{if $selected_category.picture}<img src="data/category/{$selected_category.picture}" alt="{$selected_category.name}" align="left" style="margin: 0px 6px 6px 0px;">{/if}{$selected_category.description}</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" width="100%">
<tr>
<td class="hdbot"> </td>
</tr>
</table>
{/if}
{else}
{/if}
, , - . SEO
|
|
|
core/functions/setting_functions.php
settingCONF_DEFAULT_SORT_ORDER
$sortlist[] = array("title"=>STRING_SET_ID3, "value"=>"sort_order, name");
$sortlist[] = array("title"=>STRING_SET_ID3, "value"=>"name ASC, in_stock DESC");
, - . ( ), ( ).
|
shadowbox ( ) |
|
prototype scriptaculous, . 20 , , . Shadowbox, , ,
Quick Time, Windows Media Player, Flash, Flash video, HTML, .
1. head.tpl.html
{* shadowbox *}
<link rel="stylesheet" type="text/css" href="/js/shadowbox/shadowbox.css">
<script type="text/javascript" src="/js/shadowbox/shadowbox.js"></script>
<script type="text/javascript">
Shadowbox.init({literal}{{/literal}
language: "ru",
players: [ "img", "swf", "swf", "qt", "wmp", "iframe", "html"]
{literal}}{/literal});
</script>
2. </body> index.tpl.html
{* rel="shadowbox[Mixed]" *}
{literal}
<script type="text/javascript">
<!--
//shadowbox idea by spacesite.ru
sb=document.getElementsByTagName("a");
for(sw=0;sw<sb.length;sw++){
if(sb[sw].className=="link"){
sb[sw].rel="shadowbox[Mixed]";
sb[sw].title="Tata";}}
//-->
</script>
{/literal}
3. css link link
|
|
|
\core\modules\payment\invoice_jur.php
253
$amount += (float) str_replace(",","",$order_content[$key]["Price_x_Quantity"]);
$amount += (float) str_replace(",","",(str_replace(" ","",$order_content[$key]["Price_x_Quantity"])));
-
http://www.tataspb.ru/
, , - . SEO
|
|
|
:
.....
.....
:
\docs\core\includes\processor\invoice_jur.php
\docs\core\modules\payment\invoice_jur.php
Vip ShopCMS 3.1.1
|
: | [1] |