Advertisement:

Author Topic: Link Tree  (Read 51807 times)

Offline Informatics

  • Full Member
  • ***
  • Posts: 454
  • Gender: Male
  • SMF Explorer
    • Forum Informatika
Re: Link Tree
« Reply #20 on: March 13, 2008, 09:41:42 PM »
hi EagleTrades, thanx for your interesting to this mod.

First, please find this code at your index.template.php, on function theme_linktree()

Code: [Select]
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;';
}

Change it manually with this code:

Code: [Select]
if($settings['linktree_inline'])
    echo '<img src="' . $settings['default_images_url'] . '/nav_inline_start.gif" alt="linktree" class="midimage" border="0" />&nbsp;';
// Each tree item has a URL and name.  Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show the | | |-[] Folders.
if (!$settings['linktree_inline'])
{
if ($link_num > 0)
echo str_repeat('<img src="' . $settings['default_images_url'] . '/icons/linktree_main.gif" alt="| " border="0" />', $link_num - 1), '<img src="' . $settings['default_images_url'] . '/icons/linktree_side.gif" alt="|-" border="0" />';
echo '<img src="' . $settings['default_images_url'] . '/icons/folder_open2.gif" alt="+" border="0" />&nbsp; ';
}

// 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 $settings['linktree_link'] && (isset($tree['url']) && $link_num != count($context['linktree']) - 1) ? '<a href="' . $tree['url'] . '" class="nav">' . $tree['name'] . '</a>' : $tree['name'];

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

if ($settings['linktree_inline'] && $link_num == count($context['linktree']) - 2)
        echo '<br /><img src="' . $settings['default_images_url'] . '/nav_inline_end.gif" alt="linktree" class="midimage" border="0" />&nbsp;';
// Don't show a separator for the last one.
if ($link_num != count($context['linktree']) - 1)
echo $settings['linktree_inline'] ? ($link_num < (count($context['linktree']) - 2) ? ' &nbsp;&gt;&nbsp; ' : '') : '<br />';
}

Dont forget to put these images to your image directory:
- nav_inline_end.gif
- nav_inline_start.gif

And this image on your image - icon directory.
- folder_open2.gif

Thanx you!

You can catch me @ Forum Informatika a.k.a Indonesian Informatics Online Community @ http://if.web.id


Mods:
1. LinkTree v.1.1.0 [Topic  || Download]
2. Header Rotator v.1.1.0 for 1.1.x | v.2.1 for 2.0 [Topic || Download]

Offline EagleTrades

  • Semi-Newbie
  • *
  • Posts: 39
    • Eagle Trades Ltd.
Re: Link Tree
« Reply #21 on: March 13, 2008, 11:32:17 PM »
Thank you for your relpy.  I have performed the steps that you recommend and the mod is working just fine. I did have to install it manually to get it to work. I believe this is because we are using a customized theme, not the default smf theme.

Anyway, thanks for your reply. The mod is working as stated.
Regards,

Admin
Eagle Trades Ltd.
Website: www.eagletrades.net
Email: admin@eagletrades.net

Offline Informatics

  • Full Member
  • ***
  • Posts: 454
  • Gender: Male
  • SMF Explorer
    • Forum Informatika
Re: Link Tree
« Reply #22 on: March 14, 2008, 09:35:31 PM »
thanx EagleTrades for the feedback, anyway, good job for doing manually.

You can catch me @ Forum Informatika a.k.a Indonesian Informatics Online Community @ http://if.web.id


Mods:
1. LinkTree v.1.1.0 [Topic  || Download]
2. Header Rotator v.1.1.0 for 1.1.x | v.2.1 for 2.0 [Topic || Download]

Offline Informatics

  • Full Member
  • ***
  • Posts: 454
  • Gender: Male
  • SMF Explorer
    • Forum Informatika
Re: Link Tree
« Reply #23 on: May 20, 2008, 06:21:32 AM »
This mod is compatible with 1.1.5

You can catch me @ Forum Informatika a.k.a Indonesian Informatics Online Community @ http://if.web.id


Mods:
1. LinkTree v.1.1.0 [Topic  || Download]
2. Header Rotator v.1.1.0 for 1.1.x | v.2.1 for 2.0 [Topic || Download]

flying.man

  • Guest
Re: Link Tree
« Reply #24 on: June 06, 2008, 05:21:46 AM »
This mod is compatible with 1.1.5

you sure?

Offline Informatics

  • Full Member
  • ***
  • Posts: 454
  • Gender: Male
  • SMF Explorer
    • Forum Informatika
Re: Link Tree
« Reply #25 on: June 06, 2008, 09:50:21 PM »
Yeah... just go to the download link, and try to parse with 1.1.5

You can catch me @ Forum Informatika a.k.a Indonesian Informatics Online Community @ http://if.web.id


Mods:
1. LinkTree v.1.1.0 [Topic  || Download]
2. Header Rotator v.1.1.0 for 1.1.x | v.2.1 for 2.0 [Topic || Download]

flying.man

  • Guest
Re: Link Tree
« Reply #26 on: June 08, 2008, 10:45:57 AM »
thanx dude!

Offline Informatics

  • Full Member
  • ***
  • Posts: 454
  • Gender: Male
  • SMF Explorer
    • Forum Informatika
Re: Link Tree
« Reply #27 on: June 09, 2008, 03:53:41 AM »
you're welcome mate :)

You can catch me @ Forum Informatika a.k.a Indonesian Informatics Online Community @ http://if.web.id


Mods:
1. LinkTree v.1.1.0 [Topic  || Download]
2. Header Rotator v.1.1.0 for 1.1.x | v.2.1 for 2.0 [Topic || Download]

Offline Final60

  • Semi-Newbie
  • *
  • Posts: 74
Re: Link Tree
« Reply #28 on: July 07, 2008, 07:40:53 PM »
Hey Ive been trying to manually install this mod without much luck, currently no link tree shows up at all (default or modified) on the custom theme Dark Fantasy, but it seems to work fine with the default theme.

heres the forum: www.dcpryzom.co.uk/forum

Ive attached the Dark Fantasy theme inde.template.php, would you mind taking a look at it, would be much appreciated!

regards,

« Last Edit: July 07, 2008, 07:49:49 PM by Final60 »

Offline Informatics

  • Full Member
  • ***
  • Posts: 454
  • Gender: Male
  • SMF Explorer
    • Forum Informatika
Re: Link Tree
« Reply #29 on: July 08, 2008, 01:53:04 AM »
OK... i'll try...
Just wait...

You can catch me @ Forum Informatika a.k.a Indonesian Informatics Online Community @ http://if.web.id


Mods:
1. LinkTree v.1.1.0 [Topic  || Download]
2. Header Rotator v.1.1.0 for 1.1.x | v.2.1 for 2.0 [Topic || Download]

Offline Zagdul

  • Semi-Newbie
  • *
  • Posts: 90
Re: Link Tree
« Reply #30 on: September 22, 2008, 01:10:35 AM »
Is it necessary to do a manual install if you're using a custom theme? I've done the package install and tried enabling / disabling inline links but it's not displaying any differently in my forum index.

If it is the case, that's fine, I am just asking.

Thanks for your time.

Offline Informatics

  • Full Member
  • ***
  • Posts: 454
  • Gender: Male
  • SMF Explorer
    • Forum Informatika
Re: Link Tree
« Reply #31 on: September 22, 2008, 06:13:33 AM »
I think, its depend on your theme style.

You can catch me @ Forum Informatika a.k.a Indonesian Informatics Online Community @ http://if.web.id


Mods:
1. LinkTree v.1.1.0 [Topic  || Download]
2. Header Rotator v.1.1.0 for 1.1.x | v.2.1 for 2.0 [Topic || Download]

Offline indonesia

  • Jr. Member
  • **
  • Posts: 124
    • WarnetForum
Re: Link Tree
« Reply #32 on: March 27, 2009, 08:05:39 PM »
hi cyclon,
how about this one?
<< SMF

<< vB

Code:

Code: [Select]
function theme_linktree()
{
global $context, $settings, $options;

// Folder style or inline?  Inline has a smaller font.
echo '<span class="nav"', $settings['linktree_inline'] ? ' style="font-size: smaller;"' : '', '>';

// Each tree item has a URL and name.  Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{
// Show the | | |-[] Folders.
if (!$settings['linktree_inline'])
{

if ($link_num == count($context['linktree']) - 1)
if ($link_num > 1)
echo str_repeat('<img src="' . $settings['images_url'] . '/icons/linktree_main.gif" alt="| " border="0" />'
, $link_num == count($context['linktree']) - 2), '<br /><img src="' . $settings['images_url'] . '/icons/linktree_side.gif" alt="|-" border="0" /><img src="' . $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" />&nbsp; ';
if ($link_num >= 1)
if ($link_num !== count($context['linktree']) - 1)
echo ' &raquo; ';
if ($link_num < 1)
echo '<img src="' . $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" />&nbsp; ';
}


//echo '<img src="' . $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" />&nbsp; ';
// Show something before the link?
if (isset($tree['extra_before']))
echo $tree['extra_before'];

if ($link_num == count($context['linktree']) - 1)
echo '<span class="last">';

// Show the link, including a URL if it should have one.
echo '', $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="nav">' . $tree['name'] . '</a>' : $tree['name'], '';

// 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 $settings['linktree_inline'] ? ' &nbsp;|&nbsp; ' : '';
}

echo '</span>';
}

im sorry, the code is not good

« Last Edit: March 28, 2009, 07:57:24 AM by dkillers »
WarnetForum.com using SMF since 2007

Offline Informatics

  • Full Member
  • ***
  • Posts: 454
  • Gender: Male
  • SMF Explorer
    • Forum Informatika
Re: Link Tree
« Reply #33 on: May 03, 2009, 09:42:38 PM »
sorry for my belate 1000x reply :)

i dont have any notifying email for this post.

btw, i dont have it try yet... OK. I'll try. THANX.

You can catch me @ Forum Informatika a.k.a Indonesian Informatics Online Community @ http://if.web.id


Mods:
1. LinkTree v.1.1.0 [Topic  || Download]
2. Header Rotator v.1.1.0 for 1.1.x | v.2.1 for 2.0 [Topic || Download]

Offline indonesia

  • Jr. Member
  • **
  • Posts: 124
    • WarnetForum
Re: Link Tree
« Reply #34 on: May 04, 2009, 04:47:36 AM »
sorry for my belate 1000x reply :)

i dont have any notifying email for this post.

btw, i dont have it try yet... OK. I'll try. THANX.

hi.. cyclon

im sorry, my code above have little bug...
if there are only two link_num, the last link is not become a tree...

before:

after:


Please use this code to fix it...

Code: [Select]
function theme_linktree()

{

   global $context, $settings, $options;



   // Folder style or inline?  Inline has a smaller font.

   echo '<span class="nav"', $settings['linktree_inline'] ? ' style="font-size: smaller;"' : '', '>';



   // Each tree item has a URL and name.  Some may have extra_before and extra_after.

   foreach ($context['linktree'] as $link_num => $tree)

   {

      // Show the | | |-[] Folders.

      if (!$settings['linktree_inline'])

      {



         if ($link_num == count($context['linktree']) - 1)

         if ($link_num > 0)

            //No str_repeat here.. :D

             echo '<br /><img src="' . $settings['images_url'] . '/icons/linktree_side.gif" alt="|-" border="0" />

             <img src="' . $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" />&nbsp; ';

         

         if ($link_num >= 1)

         if ($link_num !== count($context['linktree']) - 1)

         echo ' &raquo; ';

         if ($link_num < 1)

         echo '<img src="' . $settings['images_url'] . '/icons/folder_open.gif" alt="+" border="0" />&nbsp; ';

      }

           

      // Show something before the link?

      if (isset($tree['extra_before']))

         echo $tree['extra_before'];



if ($link_num == count($context['linktree']) - 1)

         echo '<span class="last">';

   

      // Show the link, including a URL if it should have one.

      echo '', $settings['linktree_link'] && isset($tree['url']) ? '<a href="' . $tree['url'] . '" class="nav">' . $tree['name'] . '</a>' : $tree['name'], '';



      // 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 $settings['linktree_inline'] ? ' &nbsp;|&nbsp; ' : '';

   }



   echo '</span>';

}

WarnetForum.com using SMF since 2007

Offline Informatics

  • Full Member
  • ***
  • Posts: 454
  • Gender: Male
  • SMF Explorer
    • Forum Informatika
Re: Link Tree
« Reply #35 on: May 04, 2009, 05:01:22 AM »
OK... i'll try. Nice works.

You can catch me @ Forum Informatika a.k.a Indonesian Informatics Online Community @ http://if.web.id


Mods:
1. LinkTree v.1.1.0 [Topic  || Download]
2. Header Rotator v.1.1.0 for 1.1.x | v.2.1 for 2.0 [Topic || Download]

Offline myktek

  • Semi-Newbie
  • *
  • Posts: 17
Re: Link Tree
« Reply #36 on: October 18, 2009, 03:17:56 AM »
i got it installed, btw like the mod and thanks, but it looks really horrible on my theme..?

smf 1.1.10
egad's gold night2 theme
manually replaced the code and copied the files to the images and images/icon directory

Offline Informatics

  • Full Member
  • ***
  • Posts: 454
  • Gender: Male
  • SMF Explorer
    • Forum Informatika
Re: Link Tree
« Reply #37 on: October 19, 2009, 09:35:28 AM »
Thanx. Maybe you could fix the design for us.

You can catch me @ Forum Informatika a.k.a Indonesian Informatics Online Community @ http://if.web.id


Mods:
1. LinkTree v.1.1.0 [Topic  || Download]
2. Header Rotator v.1.1.0 for 1.1.x | v.2.1 for 2.0 [Topic || Download]

Offline SeMaForo

  • Semi-Newbie
  • *
  • Posts: 60
  • Gender: Female
  • Siempre que ocurre igual pasa lo mismo
Re: Link Tree
« Reply #38 on: November 06, 2009, 10:07:57 PM »
Thanks a lot for the  explanatios, i've finally got it
By the way,what to do if you dont want the second linktree at the bottom of the last post appears?
Una frase no se gana a un pueblo, ni con un disfrazarse de poeta.

Offline Informatics

  • Full Member
  • ***
  • Posts: 454
  • Gender: Male
  • SMF Explorer
    • Forum Informatika
Re: Link Tree
« Reply #39 on: November 06, 2009, 10:58:53 PM »
Thanks a lot for the  explanatios, i've finally got it
By the way,what to do if you dont want the second linktree at the bottom of the last post appears?

Thanx. Btw, i still dont understand what you mean....

Maybe, you just decrease the loop....

You can catch me @ Forum Informatika a.k.a Indonesian Informatics Online Community @ http://if.web.id


Mods:
1. LinkTree v.1.1.0 [Topic  || Download]
2. Header Rotator v.1.1.0 for 1.1.x | v.2.1 for 2.0 [Topic || Download]