News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

How to change names in url?

Started by MESWEB, December 20, 2014, 02:16:35 PM

Previous topic - Next topic

MESWEB

Hi. I need information about How to change names in URL like
http://www.simplemachines.org/community/index.php?action=post;board=147.0
http://www.simplemachines.org/community/index.php?action=post;anyword=147.0

I need change this to my Polish language name. Thanks.

kat

I could be wrong (Wouldn't be the first time, either)...

But, I believe that will break your forum, entirely. There may be a way to do it. But, I would think that it would require a LOT of coding to be changed.

You might be lucky, though, coz I could be wrong...

In this case, I hope I am. But...

MESWEB

Quote from: K@ on December 20, 2014, 02:23:08 PM
I could be wrong (Wouldn't be the first time, either)...

But, I believe that will break your forum, entirely. There may be a way to do it. But, I would think that it would require a LOT of coding to be changed.

You might be lucky, though, coz I could be wrong...

In this case, I hope I am. But...
That's would be nice :) Can I try? What codes i should search in files? I want try this in localhost.

Sir Osis of Liver

It's hardcoded in the Source files.  You would have to find all occurrences in the correct source files for each action (see $actionArray in index.php), do a find & replace.  Just gave it a quick try in Post.php, didn't work, so the string must be elsewhere as well. 

Quote from: K@ on December 20, 2014, 02:23:08 PM
I believe that will break your forum, entirely.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

kat

I doubt it's this easy...

index.english.php has this:

$txt['board'] = 'Board';

You could try changing that to:

$txt['board'] = 'Polish word';

I suspect that will either break something, or not do the job, though. Because, as Krash mentioned, it's in lots of other files, too.

I would've thought that the Polish language pack would already have that, though.

I'm sure you're asking for trouble, doing this...

Sir Osis of Liver

The urls are put together like this -



$context['linktree'][count($context['linktree']) - 1]['url'] = $scripturl . '?action=post;' . (!empty($topic) ? 'topic=' . $topic : 'board=' . $board) . '.' . $_REQUEST['start'] . (isset($_REQUEST['msg']) ? ';msg=' . (int) $_REQUEST['msg'] . ';' . $context['session_var'] . '=' . $context['session_id'] : '');



If you just change the quoted text, it wouldn't do any harm, but rooting around through many source files and making many changes is a really bad idea.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

In short... No. It is not really possible to do this without an intimate knowledge of the code...  And even then, there is a good chance tgat you break something
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

MESWEB

Quote from: Kindred on December 20, 2014, 05:20:41 PM
In short... No. It is not really possible to do this without an intimate knowledge of the code...  And even then, there is a good chance tgat you break something

So there is no option to do this simply?

Arantor

No there isn't. Even the last time the SMF dev team tried this for something in SMF 2.1, it took much more work than anyone expected.

MESWEB

Thanks for all answer. SO i will be waiting for 2.1 official version.

Arantor

And yet again you misunderstand me, 2.1 doesn't add this.

The point I was making is that if the SMF dev team can't make these changes for a single action without significant trouble - for an action LESS complicated than action=post/action=post2, the odds of you doing it are much slimmer.

Advertisement: