TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 195,994
  • Total Topics: 21,325
  • Online today: 369
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 275
  • Total: 275

stripping out the linktree - except while in the forums

Started by iowamf, November 06, 2005, 12:21:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rkmike

Quote from: Bloc on November 06, 2005, 06:12:05 PM
Just take out the linktree call from TPortal.template, TPortalAdmin.template and TPmodules.template and it will show only in forum... ;)

Am kinda new to all this... where is the linktree call in these files?

G6Cad

Search for "linktree" in the files and you get them all to show in the code :)

IchBin

The linktree function is usually at the bottom of the index.template.php file.

rkmike

Great stuff.  Thanks for all your help! Woulda taken me forever to figure it out on my own.

rkmike

Small problem, whenever I try to make changes to the template, it corrupts the whole page. I've tred deleting the "function theme linktree line" along with others. I know I'm doing something wrong...  Bloc mentioned the TPortal, TPortalAdmin and TPmodules templates, but I couldn't find the "theme_linktree ()" in any of these... The site is here: "http://www.otownplays.com/smf/" (I'm running the DilberMC theme on TP0.9.5 and SMP 1.1RC3 if that makes a difference). Where do I remove the linktree stuff? Do I remove everything listed below, or just part of it? I don't know anything about php... I am working with a text editor to make my changes, is that the problem?


// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()
{
   global $context, $settings, $options;

   echo '<div class="nav" style="font-size: 85%; margin-bottom: 2ex; margin-top: 2ex;">';

   // Each tree item has a URL and name. Some may have extra_before and extra_after.
   foreach ($context['linktree'] as $link_num => $tree)
   {
      // Show something before the link?
      if (isset($tree['extra_before']))
         echo $tree['extra_before'];

      // 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>';

      // Show something after the link...?
      if (isset($tree['extra_after']))
         echo $tree['extra_after'];

      // Don't show a separator for the last one.
      if ($link_num != count($context['linktree']) - 1)
         echo '&nbsp;>&nbsp;';
   }

   echo '</div>';
}


Thanks again...

rkmike

Small update, I figured out how to remove the linktree from the template, but it removes it from the forum too. I'd just like to remove the linktree from the front page...

Maya

I have been looking at this too...

I can remove the whole linktree too but I just want the linktree to not show on first page

I do want linktree in forum and other areas

as well, linktree doesn't show in some mods like smf gallery, but it does in arcade... ( would the linktree code have to be put in the gallery.template.php to show??)

I know this is something simple....but.. ???










anunlike

It's at the very beginning in TPortal.template.php.

just remove:
// show the linktree

if((isset($context['TPortal']['boardnews'][0]['options']['linktree']) && $context['TPortal']['front_type']!='frontblock') || $context['TPortal']['front_type']=='frontblock')

echo '

<div style="margin-bottom: 4px;">', theme_linktree() , '</div>';

Maya

perfect...thnx..thats exactly what was wanted... :up:

anunlike

#19
Quote from: Maya on October 22, 2006, 09:39:12 PMperfect...thnx..thats exactly what was wanted... :up:

No problem.

It also removes the margin / space from the text and the 4px margin underneath the text, though. :-\

This website is proudly hosted on Crocweb Cloud Website Hosting.