Carbon-Forum icon indicating copy to clipboard operation
Carbon-Forum copied to clipboard

Add SEO friendly url and canonical

Open axisdos opened this issue 10 years ago • 30 comments

Hey guys, nice script so far and I love it. Could you guys please add SEO url friendly and also canonical tag to avoid duplicate contents.

If possible, please add no-index tag to subpages > anything after /page/2 (like WP)

axisdos avatar Nov 12 '14 04:11 axisdos

Thanks for your suggestion!

There are few duplicate contents in this program. And the contents of subpages is not duplicate content.

Adding nofollow tag in the subpages Should be unfriendly to search engine .

I will add the robots.txt and sitemap.xml in the next version.

lincanbin avatar Nov 12 '14 04:11 lincanbin

Cool, what about English language, and how come I see the login error on register and login page. It shows 404

axisdos avatar Nov 12 '14 23:11 axisdos

@axisdos The English version will be translated as soon as possible after the completion of the version 3.4 or 3.5. Probably after two or three months?

The mod_rewrite Apache module is a must, you can try to install the latest version.

lincanbin avatar Nov 13 '14 03:11 lincanbin

Could you please add an option for tags and posts pages where we can add custom meta description for them.

axisdos avatar Nov 16 '14 02:11 axisdos

@axisdos Defaults meta description of the post page is 150 characters before the post content, I think this is the most friendly way to search engine. Meta description of tag page will support custom in the future, I have reserved Description field in the Tags table.

topic.php

$PageTitle = $topic['Topic'];
$PageTitle .= $Page>1?' Page'.$Page:'';
$PageMetaDesc = htmlspecialchars(strip_tags(mb_substr($PostsArray[0]['Content'], 0, 150, 'utf-8')));
$PageMetaKeyword = str_replace('|',',',$topic['Tags']);

lincanbin avatar Nov 16 '14 03:11 lincanbin

Could you show me where to translate the script? I want to do that on my own because it would takes long to wait for a translation from you since I have to start my site early.

P.S: Is there is option to have SEO friendly url instead of number (ID)? or you haven't added it yet?

axisdos avatar Nov 17 '14 05:11 axisdos

@axisdos Ah, in fact, Chinese are distributed in almost all PHP files. PHP files are not much (about 50), you can use the Google translator to translate all Chinese you see.

All PHP files
/ static / js / new.function.js
/ static / js / reply.function.js

In

/ styles / default / template / topic.php
/ styles / default / template / new.php

replace /static/editor/lang/zh-cn/zh-cn.js with /static/editor/lang/en/en.js.

lincanbin avatar Nov 17 '14 05:11 lincanbin

Cool. Are you working on adding more SEO features like url friendly? I love the new interface of your forum. Great job!

axisdos avatar Nov 18 '14 00:11 axisdos

What about mobile theme?

axisdos avatar Nov 18 '14 01:11 axisdos

@axisdos

http://ihacksblog.com/remove-features-for-kik-messenger-essentials/
http://ihacksblog.com/blog/312/

Do you think the first URL are more friendly to search engines? Search engines do not recognize these. These are preventing your blog from being collected by automated program easily.

As the program written in Python:

import requests
for x in xrange(1,1000):
    content = requests.get('http://ihacksblog.com/blog/'+str(x)+'/')

The mobile theme is in course of construction.

lincanbin avatar Nov 18 '14 03:11 lincanbin

Yes, te first url is Seo friendly. This artcle might help you http://www.techterms.com/definition/friendly_url

Although the current url structure provided by this script isnt really bad url at all, however, most people prefer the standard friendly url.

axisdos avatar Nov 18 '14 17:11 axisdos

By the way, there is an error with uploading images when creating a new topic too. It successfully upload and appear in the text editor but when you publish the topic it will not show the name of the picture. ds

And when I go to the url image it shows 404 error

axisdos avatar Nov 18 '14 22:11 axisdos

@axisdos This may be due to the Magin Quotes in low version PHP.

You can try to add them in the head common.php

if (get_magic_quotes_gpc()) {
    function StripslashesDeep($var) {
        return is_array($var) ? array_map('StripslashesDeep', $var) : stripslashes($var);
    }
    $_GET = StripslashesDeep($_GET);
    $_POST = StripslashesDeep($_POST);
    $_COOKIE = StripslashesDeep($_COOKIE);
    $_REQUEST = StripslashesDeep($_REQUEST);
}

lincanbin avatar Nov 19 '14 01:11 lincanbin

Thanks. And if possible, could you make a file language for easier translation? I tried to translate a few files today and it took forever. Thanks again!

axisdos avatar Nov 19 '14 01:11 axisdos

@axisdos I can try to do that, this feature should not take me too much time.

lincanbin avatar Nov 19 '14 03:11 lincanbin

Thank you! That would save me a lot of time. Once that feature is included. I will help you translate the whole script, this way should help you add more features into the script without worrying about the translation.

axisdos avatar Nov 19 '14 04:11 axisdos

Oh and another question, how easy is it to transfer the script from one server to another in case I decided to go with other hosting company?

axisdos avatar Nov 23 '14 05:11 axisdos

@axisdos Export the database to SQL and migrate to the new server. Then copy all files to new server, and edit the config.php according to the new database configuration.

lincanbin avatar Nov 23 '14 05:11 lincanbin

Great! What features are you working on for the script? Do you need any suggestions?

axisdos avatar Nov 23 '14 05:11 axisdos

@axisdos I'm doing multi-language support, which is a repetitive, tedious job.

lincanbin avatar Nov 23 '14 06:11 lincanbin

I understand that. Since you already created the multi-language folder. Do I just go straight to the language folder and translate them?

By the way, where is the head file where I can edit the title structure for the website.

Currently, topic title is something like Topic title-Website title.

axisdos avatar Nov 23 '14 06:11 axisdos

@axisdos Yes. And the contents of <Title> is defined by the variable $PageTitle. You can find this variable in the bottom of topic.php.

You can also look at the layout file: / styles / default / template / layout.php.

lincanbin avatar Nov 23 '14 06:11 lincanbin

When Can you add the url friendly feature? I can't wait for it :dancer:

axisdos avatar Nov 23 '14 06:11 axisdos

Oh and where can I edit an existence post?

axisdos avatar Nov 23 '14 06:11 axisdos

@axisdos I still think the short URL more friendly. I have another website whose URL like https://support.google.com/webmasters/answer/76329, which also made a good SEO results. URL with numeric parameter does not affect the search engines. SEO mainly depends on contents and external links.

qq 20141123144816

Whenever possible, shorten URLs by trimming unnecessary parameters.

Reference:Keep a simple URL structure

Friendly URLs that are short and easy to remember are considered "user-friendly URLs.
It is important not to create ridiculously long URLs just to describe the page.

Reference: http://www.techterms.com/definition/friendly_url

lincanbin avatar Nov 23 '14 06:11 lincanbin

Now there is no editing, just delete. This features may be added in next version.

lincanbin avatar Nov 23 '14 06:11 lincanbin

Please add editing feature. Thanks

axisdos avatar Nov 23 '14 06:11 axisdos

Yes, but I still prefer url friendly with post title in it. Could you help me add that?

axisdos avatar Nov 23 '14 07:11 axisdos

OK. Modifying the URL is not a troublesome thing.

lincanbin avatar Nov 23 '14 07:11 lincanbin

@axisdos English Version

Demo: http://en.94cb.com/

There may be many translation errors.

lincanbin avatar Nov 26 '14 01:11 lincanbin