Title: Advanced Meta Tags MOD
Description:Acest mod genereaza automat cuvinte cheie si meta tag-uri.
Version: 1.0.0
Intram in phpmyadmin > Selctam baza de date de la forum
Apasam pe SQL si in el intrducem :
INSERT INTO phpbb_config (config_name, config_value) VALUES ('description_word_count', 150); INSERT INTO phpbb_config (config_name, config_value) VALUES ('use_dynamic_description', 1); INSERT INTO phpbb_config (config_name, config_value) VALUES ('append_keywords_first', 0); INSERT INTO phpbb_config (config_name, config_value) VALUES ('global_keywords', 'replace, these, keywords, with your own, keywords'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('append_global_keywords', 1); INSERT INTO phpbb_config (config_name, config_value) VALUES ('keyword_word_count', 50); INSERT INTO phpbb_config (config_name, config_value) VALUES ('use_dynamic_keywords', 1);
Deschidem: language/en/acp/board.php
Cautam linia
'WARNINGS_EXPIRE_EXPLAIN' ));
Dupa adaugam :
// Advanced Meta Tags MOD $lang = array_merge($lang, array( 'APPEND_GLOBAL_KEYWORDS' => 'Append Global Keywords', 'APPEND_GLOBAL_KEYWORDS_EXPLAIN'=> 'Add Global Keywords to the Generated Meta Keywords', 'APPEND_KEYWORDS_FIRST' => 'Add Global Keywords Position', 'APPEND_KEYWORDS_FIRST_EXPLAIN' => 'Yes to add Global Keywords appear before Generated Keywords, No to add Global Keywords after Generated Keywords', 'DESCRIPTION_WORD_COUNT' => 'Meta Description Word Count Limit', 'DYNAMIC_DESCRIPTION' => 'Enable Page Generated Meta Descriptions', 'DYNAMIC_KEYWORDS' => 'Enable Page Generated Meta Keywords', 'GLOBAL_KEYWORDS' => 'Global Meta Keywords', 'KEYWORD_WORD_COUNT' => 'Meta Keyword Word Count Limit', ));
Deschidem: includes/acp/acp_board.php
Cautam
'site_desc' => array('lang' => 'SITE_DESC', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => false),
Dupa adaugam :
// Advanced Meta Tags MOD 'use_dynamic_description' => array('lang' => 'DYNAMIC_DESCRIPTION', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 'description_word_count' => array('lang' => 'DESCRIPTION_WORD_COUNT', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => false), 'global_keywords' => array('lang' => 'GLOBAL_KEYWORDS', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => false), 'use_dynamic_keywords' => array('lang' => 'DYNAMIC_KEYWORDS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 'keyword_word_count' => array('lang' => 'KEYWORD_WORD_COUNT', 'validate' => 'int', 'type' => 'text:3:4', 'explain' => false), 'append_global_keywords' => array('lang' => 'APPEND_GLOBAL_KEYWORDS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'append_keywords_first' => array('lang' => 'APPEND_KEYWORDS_FIRST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
Deschidem : viewtopic.php
Cautam linia
// Output the posts $first_unread = $post_unread = false; <color=#40BF00>Dupa adaugam : // Advanced Meta Tags MOD $first_post_text = '';
Cautam linia :
// Second parse bbpre here if ($row<'bbpre_bitfield'>) { $bbpre->bbpre_second_pass($message, $row<'bbpre_uid'>, $row<'bbpre_bitfield'>); }
Dupa adaugam :
// Advanced Meta Tags MOD if ($i == 0) { $first_post_text = $message; }
Cautam:
page_header($user->lang<'VIEW_TOPIC'> .' - ' . $topic_data<'topic_title'>); <color=#40BF00>Repunem cu : page_header($user->lang<'VIEW_TOPIC'> .' - ' . $topic_data<'topic_title'>, true, $first_post_text); // true, post_text added by Advanced Meta Tags MOD
Deschidem includes/functions.php
Cautam :
function page_header($page_title = '', $display_online_list = true) <color=#40BF00>Repunem cu : function page_header($page_title = '', $display_online_list = true, $post_text = '') // true, post_text added by Advanced Meta Tags MOD
Cautam linia:
// The following assigns all _common_ variables that may be used at any point in a template. $template->assign_vars(array(
Adaugam inainte:
// Advanced Meta Tags MOD $page_keywords = $config<'global_keywords'>; $page_description = $config<'site_desc'>; if (!empty($post_text)) { $post_text = strtolower(strip_tags($post_text)); $post_text = str_word_count($post_text, 1); if ($config<'use_dynamic_keywords'>) { $count = 0; $page_keywords = array(); foreach ($post_text as $word) { $word = str_replace("'", '', $word); if (strlen($word) > 2) { if (!empty($page_keywords) && in_array($word, $page_keywords)) { continue; } $page_keywords<> = $word; $count++; } if ($count == $config<'keyword_word_count'>) { break; } } $config_keywords = ($config<'append_global_keywords'>) ? $config<'global_keywords'> : ''; $page_keywords = ($config<'append_keywords_first'>) ? $config_keywords . ', ' . implode(', ', $page_keywords) : implode(', ', $page_keywords) . ', ' . $config_keywords; } if ($config<'use_dynamic_description'>) { $count = 0; $page_description = ''; foreach ($post_text as $word) { $page_description .= $word . ' '; $count++; if ($count == $config<'description_word_count'>) { break; } } } }
Cautam:
'PAGE_TITLE' => $page_title,
Dupa adugam:
// Advanced Meta Tags MOD 'PAGE_KEYWORDS' => $page_keywords, 'PAGE_DESCRIPTION' => $page_description,
Deschidem: styles/TEMA TA/template/overall_header.html