Advertisement:

make a BACK to SITE button in non default theme

Aloittaja di_marrkuss, syyskuu 01, 2011, 02:39:03 IP

« edellinen - seuraava »

di_marrkuss

Hello :)
In forum  of my site, I use "As Theme", so file index.template.php is NOT the same, as in defaul theme. Well, because of this, I can't make a button, that will return user back to site, in main menu....
Honestly, I tried to make it, and I add a new button in my menu:
// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action=='mlist' || $context['browser']['is_ie4']) ? '' : '' , '
  <li><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>';


// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action=='mlist' || $context['browser']['is_ie4']) ? '' : '' , '
<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';

//The [BACK_TO_SITE] button
echo ($current_action=='' || $context['browser']['is_ie4']) ? '' : '' , '
<li><a href="http://LINK_TO_SITE"', '">' , $txt[241] , '</a></li>';

echo '</ul>';

It's look like it has to be, but the problem is when you push that button, it take you to link like hxxp://link_to_forum/link_to_site, and its not working. So the question is - how do it right, so it'll be hxxp://link_to_site...

And one more - if somebody knows this "As Theme", tell me, how replace Logo link with link of main site (it will be even better than create a back_to_site button), because I tried to do that, like it sad on SMF, but it work only for default theme, I spent a lot of time, to find where it can be replaced, but when I find it
<a href="'.$scripturl.'?action=forum" title=""><span id="logo"> </span></a>';
and replace by my site link, it started to work by the same sheme - hxxp://link_to_forum/link_to_site.

di_marrkuss

Actually, I found what I've done wrong, So I answer this Question by myself:

To set another link on your logo, you must simply paste it in file index.template.php, as I said up in my previous post.

It was like this:
<a href="'.$scripturl.'?action=forum" title=""><span id="logo"> </span></a>';
And now its like this one:
<a href="http://YOUR_SITE_ADRESS"'.$scripturl.'?action=forum" title=""><span id="logo"> </span></a>';

The problem was, as I said, that with the click on my logo I got blank page, and in adress line I saw link like hxxp:forum_adress/site_adress
I found that I miss one important thing - When I went to my main site, a looked on url, and saw that adress is hxxp:site_adress/eng/ So my mistake was that in index.template.php I wrote url without this .../eng/

thats all. when I wrote my url right, it began working very well.

Good luck:)

Advertisement: