This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Duplicate Title Tags
#1



Attached Files Thumbnail(s)
       

Have you completed the interview?
Reply
#2

I'm solvnig it like this:
- some php code after session_start();
- new php variable is created
- variable has got value of $_GET['cmtx_page']
- and it is printed at the end of a description and a title.

I can't see any other solution. Commentics code is included later. Could it become a plugin?

(By the way - I'm preparing plugins for a 'Separate stars feed' and 'Next/Prew in head', http://www.commentics.org/forum/showthread.php?tid=453 . I've found that plugins are welcome after a Commentics page is redisigned.)

lp
stariocek

<?php
session_start();
ob_start();

$tr_stra=1 ;

if ((isset($_GET['cmtx_page'])) && (ctype_digit($_GET['cmtx_page'])) && ($_GET['cmtx_page'] != ""))
{
$tr_stra = htmlspecialchars($tr_stra, ENT_QUOTES, 'UTF-8');
$tr_stra = (int) $_GET['cmtx_page'];
}
else
{

}

?>
...

Title an description:

<head>

<title>Motorni in električni skiroji Go-Ped. Ocene in komentarji, stran <?php echo $tr_stra ; ?>.</title>
<meta name="description" content="Električni skiroji! Motorni skiroji! Ocene in komentarji, stran <?php echo $tr_stra ; ?>." />

</head>
Reply
#3

About solution with 'Canonical' ... my plugin for 'Next/Prew in head', 'Next/Prew in head, http://www.commentics.org/forum/showthread.php?tid=453 ', is also handling a 'Canonical' issue.


I'm testing it on htt://www.moto-skiro.si :

<head>
...
<link rel="canonical" href="http://www.moto-skiro.si/komentarji-ocene-go-ped.php?cmtx_page=1" />
<link rel="next" href="/komentarji-ocene-go-ped.php?cmtx_page=2" />
...
</head>


The "cmtx_sort" can be handled by it, too.

lp
stariocek
Reply
#4

On every "cmtx_page=XX":
- <link rel="canonical" href="http://www.xxxxxx.xx/comment.php cmtx_page=XX" />

Should be enought! Why? When page is called with a 'cmtx_sort' or any other further parameter missing, a canonical version is returned! All parameters are set by default and this can be treated as a canonical version. Solution is 'future proof' and simple, ... ?

lp
stariocek

(14-Mar-2013, 08:13 AM)stariocek Wrote:  About solution with 'Canonical' ... my plugin for 'Next/Prew in head', 'Next/Prew in head, http://www.commentics.org/forum/showthread.php?tid=453 ', is also handling a 'Canonical' issue.


I'm testing it on htt://www.moto-skiro.si :

<head>
...
<link rel="canonical" href="http://www.moto-skiro.si/komentarji-ocene-go-ped.php?cmtx_page=1" />
<link rel="next" href="/komentarji-ocene-go-ped.php?cmtx_page=2" />
...
</head>


The "cmtx_sort" can be handled by it, too.

lp
stariocek
Reply
#5

I'm not sure about <meta name="robots" content="noindex"/> and cmtx_sort :

- it could help with smaller server load
- but crawlers should be clever enough, hope so, to eliminate non-canonical URLs without scanning
- 'noindex' solution is, technically equivalent, but logically exactly opposite to solution with only parameter 'cmtx_page' + 'canonical'
- 'cmtx_page' + 'canonical' is easier to implement and maintain then 'noindex' solution.

I vote for 'cmtx_page' + 'canonical', if crawlers are smart enough. Some kind of test could answer this question ...

lp, stariocek
Reply
#6

Hi stariocek,

Yes, I forgot to include the "ctype_digit($_GET['cmtx_page']", that's important.

I think this would be a very good add-on (plugin). If it works well, I could recommend it in the integration guide.

Yes, cmtx_page + canonical seems better than noindex.

So, what would happen in the following cases?
  • commentics.org/project.php
  • commentics.org/project.php?cmtx_page=xx
  • commentics.org/project.php?cmtx_perm=xx#cmtx_perm_xx
  • commentics.org/project.php?cmtx_sort=xx
  • commentics.org/project.php?cmtx_page=xx&cmtx_sort=xx

Have you completed the interview?
Reply
#7

(15-Mar-2013, 07:10 PM)Steven Wrote:  Hi stariocek,

Yes, I forgot to include the "ctype_digit($_GET['cmtx_page']", that's important.

I think this would be a very good add-on (plugin). If it works well, I could recommend it in the integration guide.

Yes, cmtx_page + canonical seems better than noindex.

So, what would happen in the following cases?
  • commentics.org/project.php
  • commentics.org/project.php?cmtx_page=xx
  • commentics.org/project.php?cmtx_perm=xx#cmtx_perm_xx
  • commentics.org/project.php?cmtx_sort=xx
  • commentics.org/project.php?cmtx_page=xx&cmtx_sort=xx

[*]commentics.org/project.php
====================================
<link rel="canonical" href="http://www.moto-skiro.si/komentarji-ocene-go-ped.php?cmtx_page=1" />
<link rel="next" href="/komentarji-ocene-go-ped.php?cmtx_page=2" />

[*]commentics.org/project.php?cmtx_page=xx
====================================
<link rel="canonical" href="http://www.moto-skiro.si/komentarji-ocene-go-ped.php?cmtx_page=2" />
<link rel="prev" href="/komentarji-ocene-go-ped.php?cmtx_page=1" />

[*]commentics.org/project.php?cmtx_perm=xx#cmtx_perm_xx
===============================================
<link rel="canonical" href="http://www.moto-skiro.si/komentarji-ocene-go-ped.php?cmtx_page=2" />
<link rel="prev" href="/komentarji-ocene-go-ped.php?cmtx_page=1" />

[*]commentics.org/project.php?cmtx_sort=xx
==========================================
<link rel="canonical" href="http://www.moto-skiro.si/komentarji-ocene-go-ped.php?cmtx_page=1" />
<link rel="next" href="/komentarji-ocene-go-ped.php?cmtx_page=2" />

[*]commentics.org/project.php?cmtx_page=xx&cmtx_sort=xx
=================================================
<link rel="canonical" href="http://www.moto-skiro.si/komentarji-ocene-go-ped.php?cmtx_page=2" />
<link rel="prev" href="/komentarji-ocene-go-ped.php?cmtx_page=1" />

That is it, it works like this now. It looks good to me. I think it should work.

lp, stariocek
Reply
#8

Here it is, my script next/prew + canonical. It is quick written and unpolished, but it works.

It has got one SERIOUS problem. It is using a die("Sorry, ..."); ... And it can block a http protocol in case of PHP failure ... It was a quick testing script, never polished.

I'm working on new version without die(); - 'just move on if something is wrong' style.

I don't have large enough sample page to test it well. A better coded plug-in is to be finished soon.

lp, stariocek


Attached Files
.php glava-rel.php Size: 6.52 KB  Downloads: 21
Reply
#9

Hi,

Thanks, I received your add-on. Regarding the name and description, I was thinking that these would be suitable:

Name: SEO Optimizer
Version: 0.7
Author: stariocek
Description: Adds canonical and prev/next links inside the <head> tag of the page.
Date: 16-Mar-2013
Status: Experimental
Compatible: v2.1, v2.2, v2.3

Are you happy with that?

Have you completed the interview?
Reply
#10

(17-Mar-2013, 03:25 PM)Steven Wrote:  Hi,

Thanks, I received your add-on. Regarding the name and description, I was thinking that these would be suitable:

Name: SEO Optimizer
Version: 0.7
Author: stariocek
Description: Adds canonical and prev/next links inside the <head> tag of the page.
Date: 16-Mar-2013
Status: Experimental
Compatible: v2.1, v2.2, v2.3

Are you happy with that?

Of course!

lp, stariocek
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post

Forum Jump:


Users browsing this thread: 2 Guest(s)