A few changes

Where we keep all the boring tidbits about the PHPDN site, the news, and what not.

Moderator: General Moderators

Post Reply
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

A few changes

Post by Benjamin »

I spent some time last night and made the following changes:
  • Added Google Custom Search to the header
  • Changed how page titles are rendered for SE readability and ranking
  • Removed text from pages used by bots to locate this forum (to post spam)
  • Changed the height of Syntax boxes
  • A few other minor changes
I would like to also have the forum topic URL's changed so that they are the topic title and post id. If anyone wants to tackle that it would be great.
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: A few changes

Post by Jonah Bron »

Benjamin wrote: Added Google Custom Search to the header
Lovin' it.
Benjamin wrote:I would like to also have the forum topic URL's changed so that they are the topic title and post id.
Don't quite understand...
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: A few changes

Post by Benjamin »

A topic url would be changed from the current format:

http://forums.devnetwork.net/viewtopic.php?f=20&t=130714

To:

http://forums.devnetwork.net/a-few-changes/post/130714/
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: A few changes

Post by Jonah Bron »

Ahhh, I get it.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: A few changes

Post by pickle »

Not digging the ads - any way to get rid of them? Could we say we're a non-profit?

Good work though.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: A few changes

Post by Benjamin »

We can pay to have them removed. Actually, I haven't even seen them because I use adblock anyway.
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: A few changes

Post by Jonah Bron »

You mean the ads on the search results? Same here, I didn't know they were there until you mentioned it and I disabled Adblock. Don't suppose Devnet gets anything from them?
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: A few changes

Post by califdon »

Benjamin wrote:A topic url would be changed from the current format:

viewtopic.php?f=20&t=130714

To:

a-few-changes/post/130714/
Isn't there a problem with non-unique post titles? It's pretty hard to avoid duplicating an old topic title that was used years ago. You know, like "HELP!!!" :?

Of course, maybe that's the way to collect 'em all in one place.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: A few changes

Post by Benjamin »

Well that's why we have to put the post id in the url.
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: A few changes

Post by Jonah Bron »

Anyway, that should be a simple URL rewrite, right? Tested, this seems to work:

[text]RewriteEngine on
RewriteRule ^[^/]+/post/(\d+)/?$ /viewtopic.php?t=$1[/text]
Not sure if it might conflict with other things though. You can speculate all you want, but until you check it out for yourself, you never know :)
Last edited by Jonah Bron on Wed Jul 27, 2011 11:10 am, edited 1 time in total.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: A few changes

Post by Benjamin »

Yeah I'll need to go through the site and change these links where they appear and also add 301 redirects for the old posts.

I'm curious why you are rewriting to posting.php rather than viewtopic.php though.
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: A few changes

Post by Jonah Bron »

I am too... how did I do that? :-|
User avatar
ok
Forum Contributor
Posts: 393
Joined: Wed May 31, 2006 9:20 am
Location: The Holy Land

Re: A few changes

Post by ok »

I think that the stackoverflow URL is better then the one Benjamin suggested. It uses the first part as a domain like forum,topic,post etc, the second part as an id and the last part is for SEO.
For example:
[text]http://stackoverflow.com/questions/7380 ... controller[/text]

So:
[text]a-few-changes/post/130714/[/text]
Becomes:
[text]post/130714/a-few-changes[/text]

I think that putting it that way is better since it is very easy for users to find the title (as it is always placed last).
User avatar
Vegan
Forum Regular
Posts: 574
Joined: Fri Sep 05, 2008 3:34 pm
Location: Victoria, BC
Contact:

Re: A few changes

Post by Vegan »

all the search engines can easily work with phpBB and fine the relevant content

same applies for all of the other popular forum packages
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
Post Reply