meta description length is too long

Please report bugs here!

Moderator: Thorsten

Post Reply
ecostet
Posts: 16
Joined: Thu Dec 30, 2010 6:06 am

meta description length is too long

Post by ecostet »

dear sir,

Does the meta description length be limited. please check it .

I find this page http://www.qhfaq.com/content_14_359_zh.html
the meta description content is too long in phpMyFAQ 2.6.11, and this problem is also in phpMyFAQ2.6.13.

Code: Select all

<meta name="description" content="我是两门分开考试的,9月份考的期货基础知识,84.5分,然后11月份考了期货法律法规,78分,顺利过关,终于算是可以拿到资格证了,先恭喜一下自己。有些人说,期货从业资格考试容易,看个两三天书就过了,也有些人觉得难,总在徘徊在及格线附近,对此我不做评论,毕竟个人情况不同,我还是说些我个人的经验比较好。 首先,我的经验适用于那些第一次参考,且每天没有太多复习时间的人。按每天一个半小时来算,拿下考试,我花了大概20天,总共30个小时的时间。 其次,我手头的资料有2009年教材一本,2009年习题册一本,2010年mp3语音讲义一套,网上有免费下载,虽然老师讲的内容也差不多等于照着教材念,但是可以让你知道哪些是重点,另外注意复习股指期货的相关新条文法规(期货FAQ私房菜就有,这里感谢下)。 最后,具体说下学习步骤: 1、开始是两眼一摸黑,所以是对着书,先听的录音讲义,老师基本就是照着书念,唯一的好处是,你知道哪些算是重点内容,覆盖率基本是全书的50%。 2、听完一遍讲义,预想的是边看书,边做题。但越看越晕,因为期货法律法规不同于法律基础,光看法规,你不知道哪些法规是重点,哪条法规中的哪个词是重点。 3、改变策略,习题册中的题有个特点,都是按条文顺序出的。所以,我把每章的单选题和多选题的答案,都抄到对应的题上,然后按照这个答案,反过来画书,这 样的好处是你起码知道每条法规的&ldquo;考点&rdquo;都是来自哪里的,以这个为基础,开始背书,而习题册中的判断题和综合题,正好用来检验背书的效果。 4、期货法律法规最大的难点,就是时间点的记忆,如3日,5日,10日,20日,3个月,6个月等等,这需要你自己总结,我是按章节总结的,举个例子,《期货交易所管理条例》基本是10日,涉及中金所,暂停交易是3日。 又如,期货公司高管的任职资格,只要记住三、四、五,以及学士学历就成了。在这方面,期货FAQ私房菜的期货法律法规死记硬背知识点就总结的很好,值得一看。 5、考试的难点在于单选题,最容易做的反而是多选。好多多选题,就算你没学过法律法规,按逻辑也能找出正确答案,这一点看法我跟很多人是相反的,因为很多人都认为多选题最难。 6、建议大家记住每个法律法规的抬头, 在脑子里画出一张表来,这样方便记忆,几个重点的词语必须记住,考到的分数不少。 ..." />
Please check it . Thanks a lot.
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: meta description length is too long

Post by Thorsten »

Hi,

well, this is user generated content added by the administrator of this FAQ. The MySQL table dataset is limited to 255 characters.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
ecostet
Posts: 16
Joined: Thu Dec 30, 2010 6:06 am

Re: meta description length is too long

Post by ecostet »

hi,
I check the code,this is not user generated content added by the administrator of this FAQ. maybe the rules is not fit for Chinese.

Please check this page.

Code: Select all

http://www.cnecosway.com/phpmyfaq/ksw1_15_zh.html
the description content is not added by the administrator. it produced automatically.
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: meta description length is too long

Post by Thorsten »

Hi,

sorry.... I was misleaded.

The description on this pages are from the content of the FAQ... I think this should be shortened. Which length do you propose? Chinese characters will create a problem because they have no spaces between words...

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
ecostet
Posts: 16
Joined: Thu Dec 30, 2010 6:06 am

Re: meta description length is too long

Post by ecostet »

hi,

That's the point. Now I wanna to limit the descrition content, how can I do it ? Thanks a lot.
ecostet
Posts: 16
Joined: Thu Dec 30, 2010 6:06 am

Re: meta description length is too long

Post by ecostet »

Code: Select all

public static function makeShorterText($str, $char)
    {
        $str      = PMF_String::preg_replace('/\s+/u', ' ', $str);
        $arrStr   = explode(' ', $str);
        $shortStr = '';
        $num      = count($arrStr);

        if ($num > $char) {
            for ($j = 0; $j <= $char; $j++) {
                $shortStr .= $arrStr[$j].' ';
            }
            $shortStr .= '...';
        } else {
            $shortStr = $str;
        }

        return $shortStr;
    }
this code doesn't work to Chinese. please check it , THanks.
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: meta description length is too long

Post by Thorsten »

Hi,

I know. It doesn't work for Korean either because those languages don't use spaces between words. But I found no detection for splitting Chinese words and I don't think it's okay to split Chinese words somewhere by default...

Do you have a solution? I think this is a common problem in China. Maybe you have a solution, would be really great!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply