Advanced Meta Tags

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Locked
User avatar
MartectX
Translator
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

Re: Advanced Meta Tags

Post by MartectX » Mon Sep 08, 2008 8:26 pm

Frenchiexno1 wrote:I am also getting a problem in the ACP Board Settings section. I have checked and I have updated the Board.php to the letter as in the install guide. But every time I add this file it messed up the ACP console.

Code: Select all

[phpBB Debug] PHP Notice: in file /adm/index.php on line 149: Cannot modify header information - headers already sent by (output started at /language/en/acp/board.php:1)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 151: Cannot modify header information - headers already sent by (output started at /language/en/acp/board.php:1)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 152: Cannot modify header information - headers already sent by (output started at /language/en/acp/board.php:1)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 153: Cannot modify header information - headers already sent by (output started at /language/en/acp/board.php:1)
This indicates problems with language files. Check if you forgot a comma somewhere or saved the files with BOM and also check if your files begin with <?php (nothing before that!).

MGLorencin
Registered User
Posts: 17
Joined: Wed Aug 20, 2008 9:40 am

Re: Advanced Meta Tags

Post by MGLorencin » Thu Sep 18, 2008 2:42 pm

nano351 wrote:
updown wrote:

Code: Select all

$post_text = str_word_count($post_text, 1, 'äöüßÄÖÜáàâÁÀÂéèêÉÈÊóòôÓÒÔúùûÚÙÛ1234567890');
This works pretty good. You'd think there'd be another function that would have utf-8 support
This works even better for me :)

Code: Select all

$post_text = str_word_count($post_text, 1, 'šđžčćŠĐŽČĆäöüßÄÖÜáàâÁÀÂéèêÉÈÊóòôÓÒÔúùûÚÙÛ1234567890');

endeffects
Registered User
Posts: 27
Joined: Thu Sep 18, 2008 2:40 pm

Re: Advanced Meta Tags

Post by endeffects » Fri Sep 19, 2008 8:11 pm

hallo,

i had a look into the previous postings but i don't understand how to deal with utf8 strings.
can somebody please explain what i have to do here:

Code: Select all

	if (!empty($post_text))
	{
		$post_text = strtolower(strip_tags($post_text));
		$post_text = str_word_count($post_text, 1);
		if ($config['use_dynamic_keywords'])
		{

User avatar
MartectX
Translator
Posts: 1324
Joined: Wed Dec 19, 2007 8:05 pm
Location: Marienplatz

Re: Advanced Meta Tags

Post by MartectX » Fri Sep 19, 2008 8:13 pm

endeffects wrote:hallo,

i had a look into the previous postings but i don't understand how to deal with utf8 strings.
can somebody please explain what i have to do here:

Code: Select all

	if (!empty($post_text))
	{
		$post_text = strtolower(strip_tags($post_text));
		$post_text = str_word_count($post_text, 1);
		if ($config['use_dynamic_keywords'])
		{
FIND

Code: Select all

$post_text = str_word_count($post_text, 1);
REPLACE WITH

Code: Select all

$post_text = str_word_count($post_text, 1, 'šđžčćŠĐŽČĆäöüßÄÖÜáàâÁÀÂéèêÉÈÊóòôÓÒÔúùûÚÙÛ1234567890');

User avatar
alahamdan
Registered User
Posts: 248
Joined: Tue Oct 23, 2007 7:37 am
Contact:

Re: Advanced Meta Tags

Post by alahamdan » Sun Sep 28, 2008 2:31 am

People

This Will Work With Utf 8?

It Will Support Arabic Characters like this: مرحبا

Thanx

User avatar
maxklm
Registered User
Posts: 7
Joined: Tue Jul 05, 2005 8:07 pm
Location: Russia
Contact:

Re: Advanced Meta Tags

Post by maxklm » Sun Sep 28, 2008 6:26 am

For Russian user
I find fix problem with utf-8

clean code without stopwords (eng, rus)

Fine in includes/functions.php

Code: Select all

    // 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;
				}
			}
		}
	}
Replace with:

Code: Select all

       // Meta Keywords MOD 2.0
       $stopwords = array("/^about$/","/^1$/","/^after$/","/^2$/","/^all$/","/^also$/","/^3$/","/^an$/","/^4$/","/^and$/","/^5$/","/^another$/","/^6$/","/^any$/","/^7$/","/^are$/","/^8$/","/^as$/","/^9$/","/^at$/","/^0$/","/^be$/","/^$$/","/^because$/","/^been$/","/^before$/","/^being$/","/^between$/","/^both$/","/^but$/","/^by$/","/^came$/","/^can$/","/^come$/","/^could$/","/^did$/","/^do$/","/^each$/","/^for$/","/^from$/","/^get$/","/^got$/","/^has$/","/^had$/","/^he$/","/^have$/","/^her$/","/^here$/","/^him$/","/^himself$/","/^his$/","/^how$/","/^if$/","/^in$/","/^into$/","/^is$/","/^it$/","/^like$/","/^make$/","/^many$/","/^me$/","/^might$/","/^more$/","/^most$/","/^much$/","/^must$/","/^my$/","/^never$/","/^now$/","/^of$/","/^on$/","/^only$/","/^or$/","/^other$/","/^our$/","/^out$/","/^over$/","/^said$/","/^same$/","/^see$/","/^should$/","/^since$/","/^some$/","/^still$/","/^such$/","/^take$/","/^than$/","/^that$/","/^the$/","/^their$/","/^them$/","/^then$/","/^there$/","/^these$/","/^they$/","/^this$/","/^those$/","/^through$/","/^to$/","/^too$/","/^under$/","/^up$/","/^very$/","/^was$/","/^way$/","/^we$/","/^well$/","/^were$/","/^what$/","/^where$/","/^which$/","/^while$/","/^who$/","/^with$/","/^would$/","/^you$/","/^your$/","/^а$/","/^безо$/","/^более$/","/^будем$/","/^будет$/","/^будто$/","/^буду$/","/^будут$/","/^бы$/","/^были$/","/^было$/","/^быть$/","/^в$/","/^в отношении$/","/^в течении$/","/^вас$/","/^ваш$/","/^вблизи$/","/^вбок$/","/^ввосьмером$/","/^в-восьмых$/","/^ввысь$/","/^вдали$/","/^вдаль$/","/^вдвое$/","/^вдвоем$/","/^вдвойне$/","/^вдевятером$/","/^в-девятых$/","/^вдесятеро$/","/^вдогон$/","/^вдогонку$/","/^вдоль$/","/^вдосталь$/","/^вдруг$/","/^верх$/","/^весь$/","/^взамен$/","/^вид$/","/^видно$/","/^вкратце$/","/^вкупе$/","/^вместо$/","/^вне$/","/^внешне$/","/^вниз$/","/^внизу$/","/^вновь$/","/^внутри$/","/^внутрь$/","/^во$/","/^во время$/","/^вовне$/","/^вовсе$/","/^вовсю$/","/^во-первых$/","/^воз$/","/^возле$/","/^воочию$/","/^вопреки$/","/^вот$/","/^впредь$/","/^в-пятых$/","/^вровень$/","/^врознь$/","/^врозь$/","/^вряд ли$/","/^в-седьмых$/","/^все$/","/^всего$/","/^все-таки$/","/^вслед$/","/^всплошную$/","/^вспять$/","/^всюду$/","/^в-третьих$/","/^в-шестых$/","/^вы$/","/^выше$/","/^где$/","/^где-либо$/","/^где-нибудь$/","/^где-то$/","/^да$/","/^дабы$/","/^далее$/","/^де$/","/^для$/","/^до$/","/^другие$/","/^других$/","/^его$/","/^едва$/","/^едва-едва$/","/^ее$/","/^еле$/","/^если$/","/^есть$/","/^еще$/","/^ж$/","/^же$/","/^за$/","/^заключается$/","/^зато$/","/^зачем$/","/^зачем-либо$/","/^зачем-нибудь$/","/^зачем-то$/","/^и$/","/^из$/","/^из-за$/","/^или$/","/^имеющее$/","/^имеющие$/","/^имеющий$/","/^имеющим$/","/^иначе$/","/^итого$/","/^их$/","/^к$/","/^как$/","/^как-либо$/","/^как-нибудь$/","/^какой$/","/^какой-то$/","/^как-то$/","/^кверху$/","/^ко$/","/^когда$/","/^когда-либо$/","/^когда-нибудь$/","/^когда-то$/","/^кое$/","/^кое-где$/","/^кое-как$/","/^кое-какой$/","/^кое-когда$/","/^кое-кто$/","/^кое-куда$/","/^кое-откуда$/","/^кое-чей$/","/^кое-что$/","/^который$/","/^который$/","/^который-либо$/","/^который-нибудь$/","/^кто-либо$/","/^кто-нибудь$/","/^кто-то$/","/^куда$/","/^куда-либо$/","/^куда-нибудь$/","/^куда-то$/","/^ли$/","/^либо$/","/^ль$/","/^мало$/","/^меж$/","/^мимо$/","/^может$/","/^можно$/","/^мы$/","/^на$/","/^над$/","/^надо$/","/^намного$/","/^наш$/","/^не$/","/^него$/","/^некий$/","/^некогда$/","/^некого$/","/^некто$/","/^нем$/","/^немало$/","/^немного$/","/^несколько$/","/^нет$/","/^нечего$/","/^ни$/","/^нигде$/","/^никакой$/","/^никогда$/","/^никто$/","/^никуда$/","/^ним$/","/^нисколько$/","/^ничей$/","/^ничто$/","/^но$/","/^о$/","/^об$/","/^обе$/","/^обо$/","/^однако$/","/^около$/","/^он$/","/^она$/","/^они$/","/^опять$/","/^особенно$/","/^от$/","/^от$/","/^откуда$/","/^откуда-либо$/","/^откуда-нибудь$/","/^откуда-то$/","/^относится$/","/^относятся$/","/^отнюдь$/","/^ото$/","/^отсюда$/","/^оттого$/","/^по$/","/^под$/","/^подле$/","/^подо$/","/^подчас$/","/^позднее$/","/^позже$/","/^пока$/","/^полно$/","/^помимо$/","/^поначалу$/","/^понемногу$/","/^по-прежнему$/","/^порой$/","/^по-своему$/","/^поскольку$/","/^после$/","/^посредине$/","/^постольку$/","/^потом$/","/^потому$/","/^почему$/","/^почему-либо$/","/^почему-нибудь$/","/^почему-то$/","/^почти$/","/^поэтому$/","/^пред$/","/^предо$/","/^представляет$/","/^прежде$/","/^при$/","/^про$/","/^просто$/","/^против$/","/^прямо$/","/^путем$/","/^путем$/","/^ради$/","/^разве$/","/^разом$/","/^ранее$/","/^с$/","/^себе$/","/^сквозь$/","/^сколь$/","/^сколько$/","/^сколько-нибудь$/","/^сколько-то$/","/^сложно$/","/^служащее$/","/^служащие$/","/^служащим$/","/^служит$/","/^сначала$/","/^снова$/","/^со$/","/^собой$/","/^совсем$/","/^содержащее$/","/^содержащий$/","/^содержит$/","/^сообразно$/","/^сперва$/","/^спереди$/","/^сразу$/","/^среди$/","/^средь$/","/^столь$/","/^столько$/","/^та$/","/^так$/","/^такой$/","/^так как$/","/^так что$/","/^также$/","/^там$/","/^то$/","/^тогда$/","/^того$/","/^тоже$/","/^только$/","/^том$/","/^тот$/","/^тут$/","/^у$/","/^уже$/","/^хоть$/","/^хотя$/","/^чего$/","/^чего-то$/","/^чей$/","/^чей-либо$/","/^чей-нибудь$/","/^чей-то$/","/^чем$/","/^через$/","/^что$/","/^что-либо$/","/^что-нибудь$/","/^что-то$/","/^чтоб$/","/^чтобы$/","/^чуть$/","/^чье-либо$/","/^чье-нибудь$/","/^чье-то$/","/^эти$/","/^этим$/","/^этих$/","/^это$/","/^этом$/","/^я$/","/^этот$/","/^оно$/");
       $page_keywords = $config['global_keywords'];
       $page_description = $config['site_desc'];
       
       if (!empty($post_text))
       {
          $post_text = utf8_strtolower(strip_tags($post_text));
          $post_text = explode(" ", $post_text);
          if ($config['use_dynamic_keywords'])
          {
             $count = 0;
             $page_keywords = array();
             foreach ($post_text as $word)
             {
                $word = str_replace("'", '', $word);
                $word = eregi_replace("\n{1,}|\r{1,}|\n\r{1,}","",$word);
                $word = preg_replace($stopwords,"",$word);
                if (strlen($word) > 3)
                {
                   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)
             {
                $word = str_replace("'", '', $word);
                $word = eregi_replace("\n{1,}|\r{1,}|\n\r{1,}","",$word);

                $page_description .= $word . ' ';
                $count++;
                
                if ($count == $config['description_word_count'])
                {
                   break;
                }
             }
          }
       }
       
Checked. Realy work.

p.s. posted by PTVDesign in forum: http://startrekguide.com/community/view ... =80#p66834


p.p.s Maybe this code work in other utf-8 languages, use this code, but you must replace russian stop word.

updown
Registered User
Posts: 542
Joined: Sat Jan 05, 2008 6:53 am

Re: Advanced Meta Tags

Post by updown » Fri Oct 10, 2008 11:27 pm

MGLorencin wrote:

Code: Select all

$post_text = str_word_count($post_text, 1, 'šđžčćŠĐŽČĆäöüßÄÖÜáàâÁÀÂéèêÉÈÊóòôÓÒÔúùûÚÙÛ1234567890');
Sorry, that has been typical german ignorance :oops:

By the way, I just recognized that I've also forgotten the "i"-chars - just in case someone ever needs them 8-) :

Code: Select all

$post_text = str_word_count($post_text, 1, 'šđžčćŠĐŽČĆäöüßÄÖÜáàâÁÀÂéèêÉÈÊóòôÓÒÔúùûÚÙÛíìîÍÌÎ1234567890');
There are also missing some other special european chars (skandinavia and the french "cedie") - maybe we could complete this

updown
Registered User
Posts: 542
Joined: Sat Jan 05, 2008 6:53 am

Re: Advanced Meta Tags

Post by updown » Fri Oct 10, 2008 11:30 pm

Galaxy21 wrote:But how could the mod be approved by the MOD-Team if it doesn't have UTF-8 support
That hasn't been the first validated mod without utf8-support ... ;)

User avatar
Notorious Pyromaniac
Registered User
Posts: 7
Joined: Tue Oct 14, 2008 12:31 am
Location: Liverpool, UK
Contact:

Re: Advanced Meta Tags

Post by Notorious Pyromaniac » Tue Oct 14, 2008 1:29 pm

Didn't work for me :(
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3459: Undefined index: global_keywords
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3600: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3602: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3603: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3604: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3459: Undefined index: global_keywords
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3466: Undefined index: use_dynamic_keywords
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3493: Undefined index: use_dynamic_description
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3600: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3602: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3603: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3604: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 291: Undefined index: use_dynamic_description
[phpBB Debug] PHP Notice: in file /adm/index.php on line 292: Undefined index: use_dynamic_description
[phpBB Debug] PHP Notice: in file /adm/index.php on line 273: Undefined index: description_word_count
[phpBB Debug] PHP Notice: in file /adm/index.php on line 273: Undefined index: global_keywords
[phpBB Debug] PHP Notice: in file /adm/index.php on line 291: Undefined index: use_dynamic_keywords
[phpBB Debug] PHP Notice: in file /adm/index.php on line 292: Undefined index: use_dynamic_keywords
[phpBB Debug] PHP Notice: in file /adm/index.php on line 273: Undefined index: keyword_word_count
[phpBB Debug] PHP Notice: in file /adm/index.php on line 291: Undefined index: append_global_keywords
[phpBB Debug] PHP Notice: in file /adm/index.php on line 292: Undefined index: append_global_keywords
[phpBB Debug] PHP Notice: in file /adm/index.php on line 291: Undefined index: append_keywords_first
[phpBB Debug] PHP Notice: in file /adm/index.php on line 292: Undefined index: append_keywords_first
[phpBB Debug] PHP Notice: in file /adm/index.php on line 150: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 152: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 153: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 154: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)

User avatar
Tripp
Former Team Member
Posts: 1358
Joined: Sun May 20, 2007 5:14 am
Location: G'boro, North Carolina
Name: Tripp
Contact:

Re: Advanced Meta Tags

Post by Tripp » Tue Oct 14, 2008 5:54 pm

Use an editor that saves without BOM. Also seems you didn't do all the edits correctly.
The box said 'You need Windows XP or better' .... so I installed linux.

Formerly Drugs

User avatar
Notorious Pyromaniac
Registered User
Posts: 7
Joined: Tue Oct 14, 2008 12:31 am
Location: Liverpool, UK
Contact:

Re: Advanced Meta Tags

Post by Notorious Pyromaniac » Tue Oct 14, 2008 11:25 pm

Drugs wrote:Use an editor that saves without BOM. Also seems you didn't do all the edits correctly.
I'm using Notepad++ does that save without "BOM"?

User avatar
Tripp
Former Team Member
Posts: 1358
Joined: Sun May 20, 2007 5:14 am
Location: G'boro, North Carolina
Name: Tripp
Contact:

Re: Advanced Meta Tags

Post by Tripp » Wed Oct 15, 2008 1:52 am

Notorious Pyromaniac wrote:
Drugs wrote:Use an editor that saves without BOM. Also seems you didn't do all the edits correctly.
I'm using Notepad++ does that save without "BOM"?
There's an option under "New Document" tab in settings. Change the encoding to UTF-8 without BOM. Then, simply open the files and resave them and reupload them
The box said 'You need Windows XP or better' .... so I installed linux.

Formerly Drugs

User avatar
Notorious Pyromaniac
Registered User
Posts: 7
Joined: Tue Oct 14, 2008 12:31 am
Location: Liverpool, UK
Contact:

Re: Advanced Meta Tags

Post by Notorious Pyromaniac » Sat Oct 18, 2008 10:12 am

It's working perfectly now - thanks :D

User avatar
Notorious Pyromaniac
Registered User
Posts: 7
Joined: Tue Oct 14, 2008 12:31 am
Location: Liverpool, UK
Contact:

Re: Advanced Meta Tags

Post by Notorious Pyromaniac » Tue Oct 21, 2008 7:30 am

Hi,

Is it possible to also get the topic name and put that into the META tags also? I have some threads on my forum with a title and only a video which do not add any additional META tags.

Mudjosh
Registered User
Posts: 234
Joined: Sat Jun 14, 2008 11:04 pm

Re: Advanced Meta Tags

Post by Mudjosh » Thu Oct 23, 2008 3:44 am

Ok, I have installed this mod and I am having issues with Board Settings and Board Features. Neither are appearing when clicked on. All that shows is a blank page.

A page back it was said to be because of a language problem but I have double checked my edits and I did exactly as Modx described to me.

I am wondering if someone could advise me where to look. I have checked in the Language directory and then in the include/acp/acp_boards file so far. I will continue with the search myself but I would love if I had a tip or two.. ;)

EDIT:

I have a question about one bit of instructions though:

Code: Select all

    'WARNINGS_EXPIRE_EXPLAIN'
));
I have this:

Code: Select all

'WARNINGS_EXPIRE_EXPLAIN'		=> 'Number of days that will elapse before the warning will automatically expire from a user's record.',
));
Is it the same?

Locked

Return to “[3.0.x] MOD Database Releases”