News:

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

Main Menu

Link Tree

Started by Informatics, February 14, 2008, 02:22:22 AM

Previous topic - Next topic

Informatics

Link to Mod

---------------------
Link Tree
|  By: CyclonBoy
http://if.web.id
---------------------

Mod Information:
For SMF 1.1.x

This mod is used for changing our default conventional links looks like a tree.

There are 2 different effects with some settings at Current theme settings.
You can see one option in Current Settings, that is: Enable inline links

If you check this option, it will generates links tree appeared like on the first image.

Conversely, you will see the links tree like on the second image.

Thanx.

UPDATED INFOs - 29 August 2009
-------------------------------------------------

- Nothing changed on this mod.
- Its still compatible with SMF 1.1.4, 1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.1.9, 1.1.10

v.1.1.0
---------
- Fix minor for enhancement
- This mod can be implemented for all theme

V.1.0.0
---------
- Release beta
- Just for default theme.


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]

kangkenyot

thanks.
works well on my 1.1.4

Informatics

you're welcome my friend.


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]

Sakae

#3
Before I try, I should ask: It supposed to work with Pretty URLs modification?

Ok, I installed and works great. Ty.
http://www.tigrelog.com.br
l: simple p: machines

Informatics

Thanx softcore for your comment.
I'm happy that this little mod would be clearly works and usefull for every1.


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]

Informatics

Guys, this afternoon, i just reupload this mod v.1.1.0.
I change some code at mods information, because the last file i upload had false version, that is 1.0.0.

I've change it into v.1.1.0. You can re-download it


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]

qtime

Thx, very simple installing and usefull on different themes, it makes the tree much clearer. Thanks for your work!

Informatics

thanx qtime for your feedback.


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]

[Lucien]

Really cool mod, vbulletin style  :D
Using it right now, thanks a lot!  :)
I'm using SMF 2.0.2 and SimplePortal 2.3.4

Informatics

yeah soMzE, nice to know you like it. Have fun!


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]


Informatics



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]

netridge

how do you make this mod work with another theme.

Informatics

The calling of the images file that put on the default theme by other theme.


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]

netridge

I just ran it through the mod parser and added the code thanks.

Informatics



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]

Filipina

hello and thanks for the MOD.. for some reason it does not seem to be producing the effect as shown in the images... I am running the current default theme and Mod installed with no errors... here is what i got with and without Enable inline links box checked.  Am I missing something I need to change? Thanks

http://www.melindaspenpals.com/images/linktreeone.jpg

http://www.melindaspenpals.com/images/linktree2.jpg



Filipina

Please disregard my post it works fine... i somehow forgot the final step of applying the MOD... lol... sorry .. it works great by the way :)

Informatics

thanx Filipina or Melinda, nice site.


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]

EagleTrades

Hello,

I am using DilberMC theme and have installed your mod.  After doing so I restarted the forum and noticed that the links are still displayed in a single line instead of using the Tree modification.  Can you tell me:

1. If a hack is required?
2. What the hack would be?
3. What file needs to be modified?

Thank you in advance.  I look forward to your reply.
Regards,

Admin
Eagle Trades Ltd.
Website: www.eagletrades.net
Email: [email protected]

Informatics

hi EagleTrades, thanx for your interesting to this mod.

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


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:


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]

EagleTrades

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: [email protected]

Informatics

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]

Informatics

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


Informatics

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


Informatics

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]

Final60

#28
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,


Informatics

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]

Zagdul

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.

Informatics

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]

indonesia

#32
hi cyclon,
how about this one?
<< SMF

<< vB

Code:


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

WarnetForum.com using SMF since 2007

Informatics

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]

indonesia

Quote from: Cyclon Boy 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.

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...

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

Informatics

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]

myktek

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

Informatics

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]

SeMaForo

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.

Informatics

Quote from: SeMaForo 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?

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]

SeMaForo

Sorry Cyclon,my english is really poor...
When the board displays, i see two times my new linktree, one at he top, before the posts, and a second one just after the posts. Two times then. Is it possible to change that and force the linktree to appear just one time?, for instance only at the top?
Thanks very much
Una frase no se gana a un pueblo, ni con un disfrazarse de poeta.

Informatics

My mother language is not English either :D

Can you show me the sample site of you. 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]

Joker™

is it going to be updated for RC2
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Informatics

^ i'm not sure can do this stuff anymore.... maybe somebody else want to develope it.

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]

Joker™

first of all very nicely written n easy to understand mod ... i played alot with it in my site

did it myself .... if  u allow i can post some of the changes i made

here's my site link if anyone wanna see how it looks...

www.freakygurus.com

thanx once again
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Informatics

You can show your creativity here, maybe someone want to adapt it.
Thanx and what a nice forum you have :) .


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]

Joker™

sure ...here we go..

Find
// Each tree item has a URL and name. Some may have extra_before and extra_after.
foreach ($context['linktree'] as $link_num => $tree)
{


Replace:
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)
{


Find:
// Don't show a separator for the last one (RTL mode)
if ($link_num != count($context['linktree']) - 1 && $context['right_to_left'])
echo '&#171;&nbsp;';


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

if ($link_num > 0)

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

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


Replace:
// 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'] . '"><span>' . $tree['name'] . '</span></a>' : '<span>' . $tree['name'] .'</span>';


Find:
// Don't show a separator for the last one.

Replace:
if ($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.


Thanx for the comment on site  :D

if possible can u pack these codes into mod,as i dont know how to make a mod.
It'll help people to install ur beautiful mod more easily.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Informatics

Nice share. I'll figure it later. 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]

Joker™

Quote from: SeMaForo on November 19, 2009, 06:55:01 AM
Sorry Cyclon,my english is really poor...
When the board displays, i see two times my new linktree, one at he top, before the posts, and a second one just after the posts. Two times then. Is it possible to change that and force the linktree to appear just one time?, for instance only at the top?
Thanks very much

so u want to remove linktree from the bottom ...

ru asking for RC2 ??
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Joker™

i also added some more functionality to linktree .... like

the very first folder image  ---- if u click on it , it will reload the page

the connecting folder image below it --- if u click it , it will take u one step back,i.e the position u were

if anyone wanna see u can see here >> www.freakygurus.com :D
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

fullmoonya

could somebody update this for smf2.0.2?..
do not mark my topic solve unless it is REALLY SOLVED.
my forum

Visit My Blog:
Google SEO Share

BaghdadGhost

Quote from: fullmoonya on March 17, 2012, 07:13:39 AM
could somebody update this for smf2.0.2?..

I second this request if possible.

thanks

Advertisement: