News:

Wondering if this will always be free?  See why free is better.

Main Menu

H1 Tags in link tree

Started by lucas-ruroken, May 14, 2010, 02:38:13 AM

Previous topic - Next topic

Paracelsus

Lucas-ruroken,

The thing is... on this site (SMF) you have a clear H1 tag applied to the forum banner (just check the page source-code) but in your demo site where you have the MOD working there is no H1 tag in forum banner possibly because you're using a custom theme perhaps? Try to apply the MOD to a non-customized default Curve theme and see how many H1 tags you find.

Antes

Good work lucas :) you are improving SMF in SEO section

lucas-ruroken

Quote from: Paracelsus on May 16, 2010, 05:23:38 PM
Lucas-ruroken,

The thing is... on this site (SMF) you have a clear H1 tag applied to the forum banner (just check the page source-code) but in your demo site where you have the MOD working there is no H1 tag in forum banner possibly because you're using a custom theme perhaps? Try to apply the MOD to a non-customized default Curve theme and see how many H1 tags you find.

yes, but yesterday, i use curve theme with two tags h1 and I had greats result :)
Adk Portal 3.1 is coming....

Design your universe!

coolfx350

I also use a custom theme, only place where <h1> tags duplicates is on the topic listings.

But I clearly seeing improvement already on my forums.  I haven't tried it on the default theme so i don't know.

rd

Quote from: petecheng on May 16, 2010, 08:41:18 PM
I also use a custom theme, only place where <h1> tags duplicates is on the topic listings.

But I clearly seeing improvement already on my forums.  I haven't tried it on the default theme so i don't know.

Well, I am seeing improvements but it might just be the fact that I tried hard to increase my forums rankings last month. Anyways, I am also using this mod on a custom theme.

Paracelsus

Quote from: lucas-ruroken on May 16, 2010, 07:04:26 PM
Quote from: Paracelsus on May 16, 2010, 05:23:38 PM
Lucas-ruroken,

The thing is... on this site (SMF) you have a clear H1 tag applied to the forum banner (just check the page source-code) but in your demo site where you have the MOD working there is no H1 tag in forum banner possibly because you're using a custom theme perhaps? Try to apply the MOD to a non-customized default Curve theme and see how many H1 tags you find.

yes, but yesterday, i use curve theme with two tags h1 and I had greats result :)

I believe in you, just pointed out my observation... actually there is no official support saying that multiple H1 tags are bad, it is just a general feeling among "SEO-experts", but I've already seen Matt Cutts (Google software engineer) saying there is no problem in using multiple H1 tags (if they're not too many of course).

coolfx350

Matt Cutts words are golden, it's like insider info.

Anyways. I wish the Mod writter could modify the code to support only <h1 tag on a single page regardless of themes, but I guess that's hard to do.

thanks op.

lucas-ruroken

Adk Portal 3.1 is coming....

Design your universe!

mu271828

Thanks for the mod!

You can make only the first occurrence of the linktree contain h1 tags by checking if something like $context['h1_linktree_shown'] is not set, and then setting it after the first time:
Code (install.xml) Select

<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>lucas-ruroken:H1tags</id>
<version>1.0</version>
<file name="$themedir/index.template.php">
<operation>
<search position="replace"><![CDATA[
foreach ($context['linktree'] as $link_num => $tree)
]]></search>
<add><![CDATA[
$i = 1;
$count = count($context['linktree']);
foreach ($context['linktree'] as $link_num => $tree)
]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[
// Show the link, including a URL if it should have one.
]]></search>
<add><![CDATA[
if($count == $i && !isset($context['h1_linktree_shown']))
echo'<h1 style="font-size: 1em; display: inline;">';

// Show the link, including a URL if it should have one.
]]></add>
</operation>
<operation>
<search position="after"><![CDATA[
// Show something after the link...?
]]></search>
<add><![CDATA[
if($count == $i && !isset($context['h1_linktree_shown']))
echo'</h1>';
$i++;
]]></add>
</operation>
<operation>
<search position="before"><![CDATA[
// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo '&nbsp;>&nbsp;';
}
]]></search>
<add><![CDATA[
  $context['h1_linktree_shown'] = true;
]]></add>
</operation>
</file>
</modification>

lucas-ruroken

the mod add h1 tag in the last link tree...
Adk Portal 3.1 is coming....

Design your universe!

!RFAN

i installed this mod and m using a custom theme...
can anybody please check my forum and tell me if this mod is working properly and will improve SEO..
please: http://www.amigozone.tk

thanks :)

Afro

Quote from: amigozone on May 27, 2010, 03:15:34 AM
i installed this mod and m using a custom theme...
can anybody please check my forum and tell me if this mod is working properly and will improve SEO..
please: http://www.amigozone.tk

thanks :)

No it is not working on your forum. You need to edit your theme's index.template.php and add the codes manuaaly.

!RFAN

you mean i shud parse the mod and do all modifications manually in index.template.php ??

thanks :)

Afro

^^ I mean you should open your theme/index.template.php and add the whole edits manually. The mod already made those edits on the default theme. Assuming you installed it.

lucas-ruroken

Adk Portal 3.1 is coming....

Design your universe!

mariusfv

Hi lucas-ruroken, I use your link tree mod (http://custom.simplemachines.org/mods/index.php?mod=2559) and I want to install this mod too but is error on install and when I want to modify the code manually some portion of code are modified.
I attach my index.template.php ...can you please help me with modification ?

I have SMF 1.1.11 & default theme.

lucas-ruroken

Adk Portal 3.1 is coming....

Design your universe!

mariusfv

10x lucas-ruroken for your help and your time .
This mode add improvement for optimization at spiders search no ?

lucas-ruroken

Adk Portal 3.1 is coming....

Design your universe!

Fisch.666

Hi!

I have installed this mod at two different 2.0rc3 forums. At the forum without a portal, only one h1 tag is added. But at the second forum with the Portamx portal, two h1 tags are added:

http://www.prielwurmjaeger.de/forum/news/

Any hints how i can fix this? Thanks in advance for a reply.

Advertisement: