1
ukandrewf
pagetitle in url?
  • 2007/3/26 0:57

  • ukandrewf

  • Friend of XOOPS

  • Posts: 198

  • Since: 2002/12/2


Does anyone know of a way to get the page title for a page into the the url for the page? (should add not the whole page title but perhaps the first word or three?) I ask this for SEO purposes I note that sites with a keyword in their url will rank higher.

is there a hack? (where have all the hacks gone?)

I'm particularly intersted in newbb and wfsections

thanks

Andrew

2
huzhenghui
Re: pagetitle in url?
  • 2007/3/26 6:54

  • huzhenghui

  • Just popping in

  • Posts: 53

  • Since: 2007/3/24


Quote:

ukandrewf wrote:
Does anyone know of a way to get the page title for a page into the the url for the page? (should add not the whole page title but perhaps the first word or three?) I ask this for SEO purposes I note that sites with a keyword in their url will rank higher.

is there a hack? (where have all the hacks gone?)

I'm particularly intersted in newbb and wfsections

thanks

Andrew

Edit file "\modules\newbb\templates\newbb_viewforum.html". Find the code below:
<td>&nbsp;<a href="<{$topic.topic_link}>" title="<{$topic.topic_excerpt|strip_tags}>">

Edit to this:
<td>&nbsp;<a href="<{$topic.topic_link}>&<{$topic.topic_title}>" title="<{$topic.topic_excerpt|strip_tags}>">

I am not sure it works for SEO.
gmail & gtalk: huzhengh (at) gmail (dot) com
Skype: huzhenghui

3
JMorris
Re: pagetitle in url?
  • 2007/3/26 13:11

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


You might want to take a look at XOOPS-Tips. They have some great tutorials on short URLs. You may be able to achieve the desired results based on the works posted there.

HTH.

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

4
ukandrewf
Re: pagetitle in url?
  • 2007/3/27 10:14

  • ukandrewf

  • Friend of XOOPS

  • Posts: 198

  • Since: 2002/12/2


huzhenghui,

Can you show me this hack in the wild? What will it give me?

What will url's look like?

thanks

Andrew

(where did the hacks link go on xoops.org?)

5
huzhenghui
Re: pagetitle in url?
  • 2007/3/29 18:11

  • huzhenghui

  • Just popping in

  • Posts: 53

  • Since: 2007/3/24


Quote:

ukandrewf wrote:
huzhenghui,

Can you show me this hack in the wild? What will it give me?

What will url's look like?

thanks

Andrew

(where did the hacks link go on xoops.org?)

You may compare the code.
<{$topic.topic_title}>

The smarty tag ablove means the title of current topic.
gmail & gtalk: huzhengh (at) gmail (dot) com
Skype: huzhenghui

6
ukandrewf
Re: pagetitle in url?
  • 2007/4/9 18:42

  • ukandrewf

  • Friend of XOOPS

  • Posts: 198

  • Since: 2002/12/2


for anyone else interested I tried this hack out and from the main forum page it will create urls as follows:-

http://www.colournation.com/modules/newbb/viewtopic.php?topic_id=2151&forum=3&hair%20colour%20problem

Which is pretty close to what I had in mind.

Individual topics linked from the recent topics block won't have their urls changed (well maybe you can change them in the block templates) :(

It seems very elegant and simple.

thanks

Andrew

7
Catzwolf
Re: pagetitle in url?
  • 2007/4/9 18:45

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Hey,

You need to download a hack called shorturls, I think that is what you are looking for.

John

8
ukandrewf
Re: pagetitle in url?
  • 2007/4/9 19:10

  • ukandrewf

  • Friend of XOOPS

  • Posts: 198

  • Since: 2002/12/2


I tried copying the same thing in the blocks as follows

Quote:
<td><a href="<{$xoops_url}>/modules/newbb/viewtopic.php?topic_id=<{$topic.id}>&forum=<{$topic.forum_id}>&post_id=<{$topic.post_id}>#forumpost<{$topic.post_id}>&<{$topic.topic_title}>"><{$topic.title}></a></td>


but it didn't work :(

Andrew

9
ukandrewf
Re: pagetitle in url?
  • 2007/4/9 22:30

  • ukandrewf

  • Friend of XOOPS

  • Posts: 198

  • Since: 2002/12/2


I'm not sure that shorturls is what i need. It appears to shorten the url to make more google friendly. I'm actually happy with how google indexes me but.. I note a keyword in the url will make google rank more highly.

Therefore the solution proposed is more useful to me.

Currently we have:-
Quote:
http://www.colournation.com/modules/newbb/viewtopic.php?topic_id=2151&forum=3&hair%20colour%20problem


I'd like to know how to edit the links in the front page blocks to show this too as posted previously.

And in an ideal world I'd like the page title to be more readable but i guess this will have to do for now.


Andrew

Login

Who's Online

212 user(s) are online (160 user(s) are browsing Support Forums)


Members: 0


Guests: 212


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits