The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Add topics name to site url

4 posters

Go down

In progress Add topics name to site url

Post by Xixi1503 October 27th 2016, 11:59 am

Technical Details


Forum version : #phpBB3
Position : Founder
Concerned browser(s) : Google Chrome
Who the problem concerns : All members
Forum link : www.forumk.net

Description of problem

Hi,

I'd like to ask how to automatically set the site/thread name as a part of the link. This would help for my SEO.

Currently, all the links are under numbers for example
http://www.forumk.net/f8-forum
It should be somthine like http://www.forumk.net/noi-quy-dien-dan (title of the forum)

Thank you
Phil


Last edited by Xixi1503 on October 28th 2016, 3:44 am; edited 1 time in total
Xixi1503
Xixi1503
New Member

Posts : 3
Reputation : 1
Language : Vietnamese

Back to top Go down

In progress Re: Add topics name to site url

Post by TheCrow October 27th 2016, 7:36 pm

ChanelW wrote:Hello There,

If I'd be honest, I honestly have never seen this regards to foumotion. It always ends with the end of the domain name (.com , .co.uk) Tur only time I have seen a foward slash then text is when you are navigating between categories. It may be possible, but I have never seen this before. If you have any examples of forums with this please provide them Smile

Thanks,
ChanelW
@ChanelW, what @Xixi1503 wants is something that exists here on the ESF and in general in all English forums but not entirely to every forum.
So you understand what the author wants let me explain you with an example:

Lets say we have a thread called "Hello world". The link once you copy the thread location here on the ESF would be: "the forum link" (help.forumotion.com), "slash" (/), "the topic link" (t1-hello-world). In other words this: help.forumotion.com/t1-hello-world

That does not appear to all forums. For example the authors forum would not show that but instead it would show this:
help.forumotion.com/t1-topic

I am not entirely sure why this is happening but it has been seen to the Greek Forums too. For that i asked for this code once, but for a Greek Forum and Ange Tuteur gave me this code:
Code:
$(function(){
  var main = document.getElementById('main-content'), URI = window.location.pathname.match(/\/t\d+-|\/t\d+p\d+-/) + $('h1.page-title', main).text().trim().replace(/\s/g,'-').replace(/\[|\]|@|!|\$|&|'|\(|\)|\*|\+|,|;|=/g,'').toLowerCase();
  history.pushState({}, '', URI + window.location.hash);
  $('h1.page-title a', main).attr('href', URI);
  for (var a = $('h2.topic-title a', main), i = 0, j = a.length; i<j; i++) a[i].href = URI + a[i].href.match(/#\d+/);
});

But, i have to inform you @Xixi1503, that this may appear as you want it to the url but once you copy the link and try to paste it somewhere else it may show some weird symbols that will take you to the topic but it will have those symbols after all. I think this is what you could use to give you that result.

Also @Xixi1503 the topic you have created here does not have the correct words in it. I would suggest changing the title of this topic to: "Add topics name to site url" or something similar to that.
Please change the title of your topic to something that is related to your question/issue, so that other users will be able to find their question/issue using the search engine.
Please read our forum rules: ESF General Rules
TheCrow
TheCrow
Manager
Manager

Male Posts : 6896
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

In progress Re: Add topics name to site url

Post by TheCrow October 27th 2016, 9:33 pm

No worries my friend. To be honest i understood something completely different when i read the title of the topic but reading its content it eventually meant something else.. Razz
TheCrow
TheCrow
Manager
Manager

Male Posts : 6896
Reputation : 794
Language : Greek, English

https://forumote.forumotion.com

Back to top Go down

In progress Re: Add topics name to site url

Post by Xixi1503 October 28th 2016, 3:49 am

Hello Luffy, thanks for your support. Sorry for the confusion, i dont know much of the technical terms. I already changed topic as you suggested

Where could I paste the code to ? I tried under Javascript codes management but didn't see any changes.

Best Regards,

Phil
Xixi1503
Xixi1503
New Member

Posts : 3
Reputation : 1
Language : Vietnamese

Back to top Go down

In progress Re: Add topics name to site url

Post by SLGray October 28th 2016, 5:28 am

Do you have JavaScript Management activated?


Add topics name to site url Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51453
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

In progress Re: Add topics name to site url

Post by Valoish October 28th 2016, 5:49 am

What placement did you choose for the JS code in your JS Management?
Valoish
Valoish
Forumember

Female Posts : 291
Reputation : 54
Language : English
Location : NYC

http://www.canvastutorials.org/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum