9
   

phpBB Search Engine Optimization - Sessions, static ( SEO )

 
 
Gieckboy
 
  1  
Mon 2 Feb, 2004 06:26 pm
Thanks Craven!
Just want to say thanks Craven for making such a great SEO mod. I've been doing SEO for years and bashed my way through a few SEO forum mods, but never anything as complete and well thought out as this.

Thanks man!
Gieckboy
0 Replies
 
Craven de Kere
 
  1  
Mon 2 Feb, 2004 06:35 pm
Ya ain't seen nuthin' yet! That's about 20% of the SEO work I've already got planned for future mod releases.

I've been surprised at the number of people downloading it. I'll try to come up with a new version soon and thanks for the kind words.
0 Replies
 
khisanthax
 
  1  
Tue 3 Feb, 2004 12:28 pm
I am eagerly waiting with great anticipation for the next release. As I'm sure we all are. Thanks for the hard work, it really makes a difference.
0 Replies
 
JKeats
 
  1  
Wed 11 Feb, 2004 06:31 pm
im currently using this awesome hack here... no errors... everything seems to be working well.

i ran across this... i'm particularly interested in the htaccess and robots.txt portions of it. i'm wondering if they will further increass search engine results, or if they're mess up this hack and hinder my sites results on google... any ideas?

Code:
OPEN

includes/page_header.php

FIND

//
// Generate logged in/logged out status
//

AFTER, ADD

ob_start();
function replace_for_mod_rewrite(&$s)
{
$urlin =
array(
"'(?<!/)viewforum.php\?f=([0-9]*)&topicdays=([0-9]*)&start=([0-9]*)'",
"'(?<!/)viewforum.php\?f=([0-9]*)&mark=topics'",
"'(?<!/)viewforum.php\?f=([0-9]*)'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&view=previous'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&view=next'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&postdays=([0-9]*)&postorder=([a-zA-Z]*)&start=([0-9]*)'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&start=([0-9]*)&postdays=([0-9]*)&postorder=([a-zA-Z]*)&highlight=([a-zA-Z0-9]*)'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&start=([0-9]*)'",
"'(?<!/)viewtopic.php\?t=([0-9]*)'",
"'(?<!/)viewtopic.php&p=([0-9]*)'",
"'(?<!/)viewtopic.php\?p=([0-9]*)'",
);
$urlout = array(
"viewforum\\1-\\2-\\3.html",
"forum\\1.html",
"forum\\1.html",
"ptopic\\1.html",
"ntopic\\1.html",
"ftopic\\1-\\2-\\3-\\4.html",
"ftopic\\1.html",
"ftopic\\1-\\2.html",
"ftopic\\1.html",
"sutra\\1.html",
"sutra\\1.html",
);
$s = preg_replace($urlin, $urlout, $s);
return $s;
}

OPEN

includes/page_tail.php

FIND

$db->sql_close();

AFTER, ADD

$contents = ob_get_contents();
ob_end_clean();
echo replace_for_mod_rewrite($contents);
global $dbg_starttime;

OPEN

.htaccess

ADD

RewriteEngine On
RewriteRule ^forums.* index.php
RewriteRule ^forum([0-9]*).* viewforum.php?f=$1&mark=topic
RewriteRule ^viewforum([0-9]*)-([0-9]*)-([0-9]*).* viewforum.php?f=$1&topicdays=$2&start=$3
RewriteRule ^forum([0-9]*).* viewforum.php?f=$1
RewriteRule ^ptopic([0-9]*).* viewtopic.php?t=$1&view=previous
RewriteRule ^ntopic([0-9]*).* viewtopic.php?t=$1&view=next
RewriteRule ^ftopic([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4
RewriteRule ^ftopic([0-9]*)-([0-9]*).* viewtopic.php?t=$1&start=$2
RewriteRule ^ftopic([0-9]*).* viewtopic.php?t=$1
RewriteRule ^ftopic([0-9]*).html viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5
RewriteRule ^sutra([0-9]*).* viewtopic.php?p=$1

OPEN

robots.txt

Disallow: forum/sutra*.html$
Disallow: forum/ptopic*.html$
Disallow: forum/ntopic*.html$
Disallow: forum/ftopic*asc*.html$

OPEN (2.0.6 only)

includes/functions.php

FIND

if (!empty($db))
{
$db->sql_close();
}

AFTER, ADD

if (stristr($url, 'http://')) {
header('Location: ' . $url);
exit;
}
0 Replies
 
Craven de Kere
 
  1  
Wed 11 Feb, 2004 06:36 pm
That shouldn't interfere.

The code you posted will change the URLs to an html extention.

For e.g. /forums/viewtopic-1.html instead of the php extension.

It should not conflict with my code, and as long as that code is functional you should be fine.

Note: I did not examine your code and I haven't tested it. I do know that it doesn't touch anything that my code touches but I can't vouch for that code.
0 Replies
 
JKeats
 
  1  
Wed 11 Feb, 2004 08:45 pm
kewl... i'll try it out and report back if i run into any issues...
0 Replies
 
Craven de Kere
 
  1  
Thu 12 Feb, 2004 10:32 am
The one hint I'd give is that your .htaccess file might not be visible through your FTP client. So make sure not to overwrite it if you already have one.
0 Replies
 
khisanthax
 
  1  
Thu 12 Feb, 2004 02:57 pm
that's like the mod-rewrite, right?
0 Replies
 
Craven de Kere
 
  1  
Thu 12 Feb, 2004 02:58 pm
That IS mod_rewrite.
0 Replies
 
khisanthax
 
  1  
Thu 12 Feb, 2004 03:16 pm
oh yeah, of course, I knew that.

What additional modifications would you say need to be made for each forum to be indexed and descriptions added to them? on top of or in addition to your mod?
0 Replies
 
Craven de Kere
 
  1  
Thu 12 Feb, 2004 03:41 pm
Personally I don't see much benefit to adding descriptions and wouldn't bother with it.

As you can see from this site all the forums are indexed without meta descriptions.

To use descriptions, you'd have to make/find an additional mod. It could pull from the description field for the forum descriptions but for topic descriptions it would need to be done differently.
0 Replies
 
khisanthax
 
  1  
Thu 12 Feb, 2004 10:44 pm
I meant descriptions along with the site url and title when you get results from a search at an engine.

so, then is your mod enough at it's present state to get all the forums indexed?
0 Replies
 
Craven de Kere
 
  1  
Thu 12 Feb, 2004 11:06 pm
khisanthax wrote:
I meant descriptions along with the site url and title when you get results from a search at an engine.


You already have that. The text that all the major search engines pull is text from the page. It is the text near the query. Search engines place very little weight on things like Meta descriptions, because that isn't text that the reader views and it's easy to send one thing to the search engines and show another to the reader that way.

Because of that kind of search engine spam most search engines really care about the text on the page more than anything else. All the major engines pull text from the page to use in descriptions.

Quote:

so, then is your mod enough at it's present state to get all the forums indexed?


Every single one of these forums is indexed (as long as it's publically viewable). Most of the individual threads are eventually indexed as well.
0 Replies
 
khisanthax
 
  1  
Thu 12 Feb, 2004 11:14 pm
I was wondering because when I do the allinurl query I get a lot of pages in an old directory but none have titles or descriptions, just urls.
0 Replies
 
Craven de Kere
 
  1  
Thu 12 Feb, 2004 11:19 pm
Then there is either no text on the page and it's a query found only in the URL or the page content is not indexed, and only the url is listed.

Sometimes Google only has the URL and no indexed content. Search for paypal for example.

You'll see that their secure url listing (the https:// listing) has nothing but the URL.

That's what it sounds like. This can happen for many many reasons. Sometimes it's a page that will later have it's content cached. Sometimes it's a page that can't be spidered because it's robots.txt excluded.

Sometimes it is a page that was removed, and the link remains for a while even after the content is gone.....

Etc etc
0 Replies
 
khisanthax
 
  1  
Thu 12 Feb, 2004 11:51 pm
the mod rewrite didn't work for me, I clicked on a forum and it gave mea 404
0 Replies
 
Craven de Kere
 
  1  
Thu 12 Feb, 2004 11:54 pm
I've never tested that code so I can't speak for it.

I will eventually write my own mod_rewrite code, but I might wait till 2.2.0 is released because I am quite sure that there will be URL changes with the new version.

That way I can kill two birds with one stone.
0 Replies
 
khisanthax
 
  1  
Fri 13 Feb, 2004 12:03 am
*weeps* but I got it working. There were two sets of instructions for the htaccess, I used the second one and it worked.
0 Replies
 
JKeats
 
  1  
Fri 13 Feb, 2004 11:24 pm
i'm sure this is gonna be part of future additions to this hack... but i'm hoping someone knows how to do it now...

i've gone through index_body.tpl and have removed a number of links i didn't think were necessary.

since the username links were removed from the forum rows... i'd also like to remove them from the whos online area too. there's two instances of it really...

the "The newest registered user is"

and the "Registered Users:"

can someone point me to the right place in index.php to remove the links here on the usernames displayed in these two lines?

thanks.
0 Replies
 
Craven de Kere
 
  1  
Sat 14 Feb, 2004 01:39 am
What I do is simply surround the whole viewonline box with a user logged in switch.

In index_body.tpl find

Code:<br />
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="cat" colspan="2"><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></td>
</tr>
<tr>
<td class="row1" rowspan="3"><img src="templates/Able2Know/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" width="46" height="30" class="imgfolder" title="{L_WHO_IS_ONLINE}" />
</td>
<td class="row1" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />
{TOTAL_USERS}<br />
{NEWEST_USER}</span></td>
</tr>
<tr>
<td class="row1"><span class="gensmall">{TOTAL_USERS_ONLINE}   [ <strong>{L_WHOSONLINE_ADMIN}</strong>
]   [ <strong>{L_WHOSONLINE_MOD}</strong> ]<br />
{RECORD_USERS}<br />
{LOGGED_IN_USER_LIST}</span></td>
</tr>
<tr>
<td height="20" class="row1"><span class="gensmall">{L_ONLINE_EXPLAIN}</span></td>
</tr>
</table>


replace with

Code:<!-- BEGIN switch_user_logged_in -->
<br />
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<td class="cat" colspan="2"><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></td>
</tr>
<tr>
<td class="row1" rowspan="3"><img src="templates/Able2Know/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" width="46" height="30" class="imgfolder" title="{L_WHO_IS_ONLINE}" />
</td>
<td class="row1" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />
{TOTAL_USERS}<br />
{NEWEST_USER}</span></td>
</tr>
<tr>
<td class="row1"><span class="gensmall">{TOTAL_USERS_ONLINE}   [ <strong>{L_WHOSONLINE_ADMIN}</strong>
]   [ <strong>{L_WHOSONLINE_MOD}</strong> ]<br />
{RECORD_USERS}<br />
{LOGGED_IN_USER_LIST}</span></td>
</tr>
<tr>
<td height="20" class="row1"><span class="gensmall">{L_ONLINE_EXPLAIN}</span></td>
</tr>
</table>
<!-- END switch_user_logged_in -->


Of course, the code may differ a bit depending on the template. But the idea is to just wrap it in the switches.

Now if you want the box vicible and just want to get rid of the URLs here is some code you can test.

NOTE: I am coding blind (and tired) and have not tested this code. So make sure you have backups and it's probably best to test on a test install. Let me know if there are any problems.

in index.php find

Code: 'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'),


replace with

Code: 'NEWEST_USER' => sprintf($lang['Newest_user'], $newest_user),


in includes/page_header.php find

Code: $user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';


replace with

Code: $user_online_link = $row['username'];


find

Code: $user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';


replace with
Code: $user_online_link = '<i>' . $row['username'] . '</i>';


I think this will affect the viewonline.php page as well. Like I said be careful with the above code. I just did a quick job with no testing and there could be typos.
0 Replies
 
 

Related Topics

SEO - Going from 0 PR on up - Discussion by jespah
How Rich Pins work ??? - Question by OnceUponAtime
Need a bit of Google advice - Question by bible quizzer
Google Indexing Issue - Question by brainstudioz
Bing Search results - Discussion by iankyra
What is best way for Off-Page seo in 2017? - Question by honesttravel1
 
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 05/17/2024 at 10:38:23