1 (edited by Quadric 2012-02-15 22:28)

Topic: [Extension] SEO Optimizer (quadric_seo_optimizer)

This extension add some SEO optimizations. Majority of it's functionality is url redirect from different schema and add more information into url link

Features:
- redirect urls between schemes to remove duplicate content.
- prevent from manual changing hardcoded links in forum when administrator change url scheme.
- add forum title into topic link
- removes "Page 1" from first page of list. Only second and more has "Page x"


Demo:
RCT Forum
(Check the url: It's build from forum title + topic title)


Download:
Quadric SEO Optimizer 1.0.0
Quadric SEO Optimizer 1.1.0
Quadric SEO Optimizer 1.1.1
Quadric SEO Optimizer 1.1.2


Changelog:
15 Feb 2012, v1.1.2

- Core:
  . Compatibility for PunBB 1.4.2
  . Fixed pagination bug on default url format

08 Jan 2012, v1.1.1

- Core:
  . Fixed crumbs (First page doesn't contains page number) in title

30 Dec 2011, v1.1.0

- Core:
  . Fixed bad post url generation method
  . Add pages and crumbs forum name into post url
  . Fixed crumbs title generation for special pages
  . Dropped crumbs modifications code (oryginal code by Helid) from previous
    version because it was invalid

28 Dec 2011, v1.0.0

- Core:
  . First Release

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

Hey Quadric

Just noticed something;
on a board with URL Scheme File based (fancy)
and on second page of a thread I get a 404 error when trying to post
when I disable your extension I can post again...
Normal?

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

I don't think so tongue

Honestly i didn't check topic with pagination so there is a problem i think. I'll check it and try to fix.

Thanks for your feedback.

4 (edited by Quadric 2012-01-20 20:08)

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

I have updated this plugin.

1) Fixed bug found by KeyDog
2) Add some more pages and links with forum name link
3) Fixed crumbs modifications

5

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

You can add external links to be nofollow?

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

I've had a plan to make nofollow modification to links but this is very controversial. I think that it should be an option for administrator if he want it or not. I'll fix my extensions for punBB 1.4.2 soon so i could include an option you've suggested.

7

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

Ok.
I found an error, by default URL (viewtopic.php?id=1 ) you can not switch to another page (viewtopic.php?id=1&p=2).

8 (edited by Quadric 2012-02-15 22:31)

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

You're right Pebro. I didn't check it on a default url with pagination. I found a bug with an url entity contruction for punBB url generator and get_current_url function (it's different format), so i fixed it to use one format in comparision and i guess it works. Check first topic for version 1.1.2. Let me now if it is OK.

9

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

Great! Paging in version 1.1.2 works. Thanks.

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

Quadric
Great work! We hope to continue.

11 (edited by SuperMAG 2012-10-31 12:09)

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

Few suggestions if this extension is still developed:

1- Remove the forum title from topic, it makes that topic extra large, and its not needed to be in there anywhere, its all the the topic tile, having forums title in makes no sense, forums are like categories, where you are just suppose to post the topic in to have everything arranged.


2- Description in topics in search engines, can it be changed to first few lines of the topic instead of the description of the main forums. So this makes the description in the main forums only be showed on main page and forums page, while topic pages have first few lines from topic. This will make huge improvement in search engines.


3- Its about the posts and topics that are indexed in search engines, in most other forums software, the topics main link is indexed as far as i know, not the single posts in it, the posts are indexed with a topic like + something like #p5263636 so it scrolls down to that post. This will hugly improve SEO of the site, it will remove the many duplicate links and the results in the search engines will only contain the main topic links with that #243242 things.

Example:
Now:
Main topic link: http://punbb.informer.com/forums/topic/ … optimizer/
Main topic first post link: http://punbb.informer.com/forums/post/142851/#p142851
Main topic second post link: http://punbb.informer.com/forums/post/142874/#p142874

With my idea:

Main topic link: http://punbb.informer.com/forums/topic/ … optimizer/
Main topic first post link: http://punbb.informer.com/forums/topic/ … r/#p142851
Main topic second post link: http://punbb.informer.com/forums/topic/ … r/#p142874


4- In Google search engine results, there is always this "Skip to forum content." in the description, can you remove that please.


Lastly, to the developers of Punbb, these stuff should be implemented to the core, not as an extension, i mean SEO is an important thing, it shouldn't be ignored, it should be added to the core.

MyFootballCafe.com  is Now Online!

12 (edited by SuperMAG 2012-11-30 11:21)

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

- add forum title into topic link

how do i remove this part from the following code:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension SYSTEM "ext-1.0.dtd">

<!--
/**
 * Various SEO improvements
 *
 * quadric_seo_optimizer
 * @copyright (C) 2011 quadric quadmachine@wp.pl
 * @license [url]http://www.gnu.org/licenses/gpl.html[/url] GPL version 2 or higher
 *
 * Extension for PunBB (C) 2011 PunBB
 * License [url]http://www.gnu.org/licenses/gpl.html[/url] GPL version 2 or higher
 */
-->

<extension engine="1.0">
    <id>quadric_seo_optimizer</id>
    <title>Quadric SEO Optimizer</title>
    <version>1.1.2</version>
    <description>Various SEO improvements</description>
    <author>Quadric</author>

    <minversion>1.4</minversion>
    <maxtestedon>1.4.2</maxtestedon>

    <hooks>
        <!-- Check if url match the current scheme. If not redirect to current scheme -->
        <hook id="vf_modify_forum_info"><![CDATA[
        $current_url = forum_htmlencode(get_current_url());
        $seo_url = forum_sublink($forum_url['forum'], $forum_url['page'], (isset($_GET['p']) ? $_GET['p'] : 1), array($id, sef_friendly($cur_forum['forum_name'])));
        if ($seo_url !== $current_url) {
            header("Location: $seo_url", true, 301);
            exit();
        }
        ]]></hook>
        
        <!-- Check if url match the current scheme. If not redirect to current scheme -->
        <hook id="vt_modify_topic_info"><![CDATA[
        $current_url = forum_htmlencode(get_current_url());
        if ($pid) {
            $seo_url = forum_link($forum_url['post'], $pid);
            if ($seo_url !== $current_url . '#p' . $pid) {
                header("Location: $seo_url", true, 301);
                exit();
            }
        } else if ($id) {
            $seo_url = forum_sublink($forum_url['topic'], $forum_url['page'], (isset($_GET['p']) ? $_GET['p'] : 1), array($id, sef_friendly($cur_topic['forum_name'] . ' ' . $cur_topic['subject'])));
            if ($seo_url !== $current_url) {
                header("Location: $seo_url", true, 301);
                exit();
            }
        }
        ]]></hook>
        
        <!-- Add forum title parts into topic title in topic -->
        <hook id="vf_topic_loop_normal_topic_pre_item_title_merge"><![CDATA[
        $forum_page['item_title']['link'] = '<a href="'.forum_link($forum_url['topic'], array($cur_topic['id'], sef_friendly($cur_forum['forum_name'] . ' ' . $cur_topic['subject']))).'">'.forum_htmlencode($cur_topic['subject']).'</a>';
        ]]></hook>
        
        <!-- Add forum title parts into topic title in breadcrumb -->
        <hook id="vt_pre_header_load"><![CDATA[
        // Generate paging and posting links
        $forum_page['page_post']['paging'] = '<p class="paging"><span class="pages">'.$lang_common['Pages'].'</span> '.paginate($forum_page['num_pages'], $forum_page['page'], $forum_url['topic'], $lang_common['Paging separator'], array($id, sef_friendly($cur_topic['forum_name'] . ' ' . $cur_topic['subject']))).'</p>';
        
        // Setup breadcrumbs
        $forum_page['crumbs'] = array(
            array($forum_config['o_board_title'], forum_link($forum_url['index'])),
            array($cur_topic['forum_name'], forum_link($forum_url['forum'], array($cur_topic['forum_id'], sef_friendly($cur_topic['forum_name'])))),
            array($cur_topic['subject'], forum_link($forum_url['topic'], array($id, sef_friendly($cur_topic['forum_name'] . ' ' . $cur_topic['subject']))))
        );
        ]]></hook>
        
        <!-- Add forum title parts into thread response -->
        <hook id="po_pre_header_load"><![CDATA[
        if ($tid)
            $forum_page['crumbs'][count($forum_page['crumbs']) - 2] = array($cur_posting['subject'], forum_link($forum_url['topic'], array($tid, sef_friendly($cur_posting['forum_name'] . ' ' . $cur_posting['subject']))));
        ]]></hook>
        
        <!-- Add forum title parts into thread pages in forum -->
        <hook id="vf_topic_loop_normal_topic_pre_item_nav_merge"><![CDATA[
        if ($forum_page['item_pages'] > 1)
            $forum_page['item_nav']['pages'] = '<span>'.$lang_forum['Pages'].'&#160;</span>'.paginate($forum_page['item_pages'], -1, $forum_url['topic'], $lang_common['Page separator'], array($cur_topic['id'], sef_friendly($cur_forum['forum_name'] . ' ' . $cur_topic['subject'])));

        // Does this topic contain posts we haven't read? If so, tag it accordingly.
        if (!$forum_user['is_guest'] && $cur_topic['last_post'] > $forum_user['last_visit'] && (!isset($tracked_topics['topics'][$cur_topic['id']]) || $tracked_topics['topics'][$cur_topic['id']] < $cur_topic['last_post']) && (!isset($tracked_topics['forums'][$id]) || $tracked_topics['forums'][$id] < $cur_topic['last_post']))
        {
            $forum_page['item_nav']['new'] = '<em class="item-newposts"><a href="'.forum_link($forum_url['topic_new_posts'], array($cur_topic['id'], sef_friendly($cur_forum['forum_name'] . ' ' . $cur_topic['subject']))).'">'.$lang_forum['New posts'].'</a></em>';
            $forum_page['item_status']['new'] = 'new';
        }
        ]]></hook>
        
        <hook id="fn_generate_crumbs_end"><![CDATA[
        if ($reverse)
        {
            $crumbs = '';
            for ($i = ($num_crumbs - 1); $i >= 0; --$i)
                $crumbs .= (is_array($forum_page['crumbs'][$i]) ? forum_htmlencode($forum_page['crumbs'][$i][0]) : forum_htmlencode($forum_page['crumbs'][$i])).((isset($forum_page['page']) && $i == ($num_crumbs - 1) && $forum_page['page'] > 1) ? ' ('.$lang_common['Page'].' '.forum_number_format($forum_page['page']).')' : '').($i > 0 ? $lang_common['Title separator'] : '');
        }
        ]]></hook>
        
    </hooks>
</extension>

Can someone help?

MyFootballCafe.com  is Now Online!

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

Hello there.
I wont make a new post for this, so..

This dont work to me, and i do not know why.
I did install the extension, and if i change httacess.dit to .httaccess i get error 500..
If i dont change httaccess file, i get 404 error..

Need help please.

14

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

Finally I do not end up with the expansion!
I still get the 404 error after!

Help me please sad

15

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

show the contents of the .htaccess

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

# BEGIN PunBB

# ----------------------------------------------------------------------
# Start rewrite engine
# ----------------------------------------------------------------------

<IfModule mod_rewrite.c>
# MultiViews interfers with proper rewriting
Options -MultiViews

RewriteEngine On

# Uncomment and properly set the RewriteBase if the rewrite rules are not working properly
#RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . rewrite.php [L]
</IfModule>


# ----------------------------------------------------------------------
# Better website experience for IE users
# ----------------------------------------------------------------------

# Force the latest IE version, in various cases when it may fall back to IE7 mode
# github.com/rails/rails/commit/123eb25#commitcomment-118920
# Use ChromeFrame if it's installed for a better experience for the poor IE folk

<IfModule mod_setenvif.c>
  <IfModule mod_headers.c>
     BrowserMatch MSIE ie
     Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie
   </IfModule>
</IfModule>

<IfModule mod_headers.c>
# Because X-UA-Compatible isn't sent to non-IE (to save header bytes),
# We need to inform proxies that content changes based on UA
   Header append Vary User-Agent
# Cache control is set only if mod_headers is enabled, so that's unncessary to declare
</IfModule>


# ----------------------------------------------------------------------
# UTF-8 encoding
# ----------------------------------------------------------------------

# Use UTF-8 encoding for anything served text/plain or text/html
AddDefaultCharset utf-8

# Force UTF-8 for a number of file formats
AddCharset utf-8 .html .css .js .xml .json .rss


# ----------------------------------------------------------------------
# A little more security
# ----------------------------------------------------------------------

# Do we want to advertise the exact version number of Apache we're running?
# Probably not.
## This can only be enabled if used in httpd.conf - It will not work in .htaccess
# ServerTokens Prod


# "-Indexes" will have Apache block users from browsing folders without a default document
# Usually you should leave this activated, because you shouldn't allow everybody to surf through
# every folder on your server (which includes rather private places like CMS system folders).
<IfModule mod_autoindex.c>
    Options -Indexes
</IfModule>

# END PunBB

17

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

try to uncomment RewriteBase /
did you change default url scheme?

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

did you change default url scheme?

yes, not working.

19

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

no idea, sorry, maybe someone else will can help you

20

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

Are you using Rack Nerds hosting? Are they servers on Apache, Lighttpd, or nginx? Is mod_rewrite function available at this host?

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

apache and yes mod_rewrite is available.
joomla SEF work very good.

22

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

Are you sure you have uncommented this:

# Uncomment and properly set the RewriteBase if the rewrite rules are not working properly
#RewriteBase /

It should be:

# Uncomment and properly set the RewriteBase if the rewrite rules are not working properly
RewriteBase /

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

RewriteEngine On

# Uncomment and properly set the RewriteBase if the rewrite rules are not working properly
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . rewrite.php [L]
</IfModule>

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

What do You need to change in manifest? I could be wrong but changes in manifest may not be sufficent. I guess there must be some changes in .htaccess or rewrite.php file

Re: [Extension] SEO Optimizer (quadric_seo_optimizer)

OK, i'm not sure too smile Please let me know what do you exactly need to change.