TinyPortal

Development => Support => Older SMF versions => Topic started by: sdm_36 on February 10, 2006, 12:53:12 AM

Title: Sp1 links on TP theme not pointing to correct places
Post by: sdm_36 on February 10, 2006, 12:53:12 AM
hi this is only a minor niggle

but i would like to fix it as it is quite frustrating sometimes

http://www.36thchamber.co.uk/forum/


What version of SMF: 1.0.5
What version of TP: 0.8.6
Which themes are used techhead tp
Do you have other Mods installed :
       Mod Name     Version      
1.    PHP 4.4.0 Compatibility Update    1.0    
2.    TinyPortal    0.86    
3.    MySQL 5.0.12 Compatibility Update    1.0

Do you use another CMS? (Joomla or Mambo?) No

Is this a test site? No



The problem is quite simple:
when i am on a board (general discussion for instance) in the forum the inline links at the top read :
36th Chamber Forum | General Category | General Discussion

36th chamber forum link takes me to ....co.uk/forum/index.php.
i would prefer that to point at ......co.uk/forum/index.php?action=forum

General Category link  points towards:
......co.uk/forum/index.php#1
which is really annoying as it makes it very difficult to navigate quickly between boards. I would prefer to have this link pointing to the index.php?action=forum as well if it's not possible to point it at the category level.

Can anyone tell me the file i need to edit in order to change this?

Oh the problem started with the Tiny Portal 0.75 version
but it hasn't gone away now i've upgraded


thanks

Title: Re: Sp1 links on TP theme not pointing to correct places
Post by: Xarcell on February 11, 2006, 04:57:26 AM
I might not understand correctly, but I think that's how SMF operates.
Title: Re: Sp1 links on TP theme not pointing to correct places
Post by: borgBOB on February 11, 2006, 05:32:42 AM
This is part of the code that generates the linktree function:
  // Show the link, including a URL if it should have one.
                echo '<b>', $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="nav">' . $tree['name'] . '</a>' : $tree['name'], '</b>';

It is in index.template.php, but there is more in
Sources/Load.php:
<search for>
                // Build up the linktree.
                $context['linktree'] = array_merge(
                        $context['linktree'],
                        array(array(
                                'url' => $scripturl . '#' . $board_info['cat']['id'],
                                'name' => $board_info['cat']['name']
                        )),
</search for>
<replace>
                // Build up the linktree (adding TPortal forum index)
                $context['linktree'] = array_merge(
                        $context['linktree'],
                        array(array(
                                'url' => $scripturl . '?action=forum#' . $board_info['cat']['id'],
                                'name' => $board_info['cat']['name']
                        )),
</replace>


I suspect the answer is in here. First, make sure your files match these.
Title: Re: Sp1 links on TP theme not pointing to correct places
Post by: sdm_36 on February 11, 2006, 10:31:00 PM
thanks for the advice

problem is now fixed
Title: Re: Sp1 links on TP theme not pointing to correct places
Post by: borgBOB on February 11, 2006, 10:52:05 PM
Always glad to hear that. Good Luck.
Title: Re: Sp1 links on TP theme not pointing to correct places
Post by: IchBin on February 12, 2006, 04:26:52 AM
Quote from: sdm_36 on February 11, 2006, 10:31:00 PM
thanks for the advice

problem is now fixed
Mind posting what you did?
Title: Re: Sp1 links on TP theme not pointing to correct places
Post by: sdm_36 on February 12, 2006, 01:24:04 PM
not at all

basically followed advice as per borgBOB's instructions

I found the  "//build up the linktree" section of code in Load.php
and replaced it with the new piece he posted in this thread.

That actually solved the problem in itself

but just to be safe i edited index.template.php
and substitued that bit of code too.

so many thanks