News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

domain.ext and domain.ext/index.php issue? How to change it?

Started by Anglis, February 27, 2008, 03:37:42 PM

Previous topic - Next topic

Anglis

 Hi recently i have noticed that my SMF forums urls are domain.ext and domain.ext/index.php, which means when i click on home , or when most of the traffic comes from SE it actually shows link domain.ext/index.php, how and where can i change my ''Home'' url which links to index.php , i want it to be changed to what is my domain without index.php!

cheers in advance

vai

jerm

index.template.php


// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


Change the <a href> part

Anglis


I have changed it to this!

// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="http://mydomein.lv" , $scripturl, '">' , $txt[103] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


still the same problem, i probably it added wrong i didnt remove smething, can you have a look plz ?

thx

Kindred

I am surprised that even works at all...

<a href="http://mydomein.lv" , $scripturl, '">

should be
<a href="http://mydomein.lv">
Сл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."

Anglis

weird i have changed it to like u said!

// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="http://mydomein.lv">' , $txt[103] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
i still get a same index.php after my domain if i hit Home :/  And that is the file index.template.php in themes/default folder , i guess it cant be  themes i am using atm file, since there wont be such a files in it like '' // Show the [home] button.''

greyknight17


Kindred

ummm... yes, you will most definitely have to change the code in the theme(s) you are using.
Сл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."


greyknight17

Open up /Themes/blueskies.../index.template.php:

Code (Search for) Select
<li><a' , $current_action=='help' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';

Code (Replace with) Select
<li><a href="http://mydomein.lv">YOUR TEXT HERE</a></li>
<li><a' , $current_action=='help' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';


Replace the domain and YOUR TEXT HERE according to what you want.

Anglis

Quote from: greyknight17 on March 02, 2008, 05:57:21 PM
Open up /Themes/blueskies.../index.template.php:

Code (Search for) Select
<li><a' , $current_action=='help' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';

Code (Replace with) Select
<li><a href="http://mydomein.lv">YOUR TEXT HERE</a></li>
<li><a' , $current_action=='help' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=help">' , $txt[119] , '</a></li>';


Replace the domain and YOUR TEXT HERE according to what you want.
ok cheers, thanks very much!

Anglis

Sorry but i have tried it and it doesnt work :( , besides it gives me a new gap between MENUS at top! And still got the index.php when i click HOME!
besides why would i possibly need there a place for ''Your TEXT in there'' ?

EDITED:

You mixed up lines i think! I meant Home link! Can you tell me please with what i have to replace this line ?

<li><a' , $current_action=='home' ? ' class="chosen"' : '' , ' href="', $scripturl, '">' , $txt[103] , '</a></li>'; i tired myself, but got an error :/

cheers

greyknight17

Do you just want that to point to your own link? If so, change it to the following:

<li><a href="http://www.yoursite.com">' , $txt[103] , '</a></li>';

Replace yoursite.com with the site you want to use.

Anglis

not sure what exactly u meant by this!

QuoteDo you just want that to point to your own link? If so, change it to the following:

but yeah thanks it works now :)

Advertisement: