<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Module: Threaded Tree View</title>
        <description> This module displays the threaded list view with tree lines similar to those used in Phorum 3.

This module was originally created by Brian Moon.  I have updated it for Phorum 5.2 and used &amp;lt;div&amp;gt;&amp;#039;s to draw the lines rather than images.

Installation and Usage:
This module installs like any other module.

From the settings page you can customize the color and thickness of the tree lines.  Each template can have its own line color and thickness which will be displayed if you leave the settings empty.

If you have a custom template and want to use this module, you will need to create a folder in this modules&amp;#039;s template folder and copy your template&amp;#039;s list_threads.tpl and read_threads.tpl files into that folder.  Using the supported templates as examples add the necessary lines to the template files. Those lines can be found in the supported templates after this line:

&amp;lt;!--  Begin the Threaded Tree View customization  --&amp;gt;
Depending on the Phorum template you use as a base, I would suggest starting with that template&amp;#039;s code.  Regardless, you may need to adjust the margins and height values.

You will also need to create a settings.php file in your template&amp;#039;s folder. I would again suggest copying this file frocm one of the supported templates. You will then need to adjust the line height and width.  If your template requires further tweaking (such as for messages with a special icon which changes the height of their row) you can add php code to the four alloted modifier variables in the settings.php file.  Examples of this can be seen in the Classic and Emerald templates.  It is important to note that if you do not use one of the modifier variables, it should still be supplied simply with an empty string.

The Classic, Emerald, and Lightweight templates are supported without any extra work on your part.

Todo:
- Add support for more templates

- Add features as requested.</description>
        <link>https://www.phorum.org/support/read.php?62,135543,135543#msg-135543</link>
        <lastBuildDate>Wed, 18 Nov 2026 20:19:44 -0600</lastBuildDate>
        <generator>Phorum 6.0.4</generator>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,135543,148424#msg-148424</guid>
            <title>Re: Module: Threaded Tree View</title>
            <link>https://www.phorum.org/support/read.php?62,135543,148424#msg-148424</link>
            <description><![CDATA[ I have a bug report.  I was discussing  this with Maurice (<a href="http://www.phorum.org/phorum5/read.php?61,148378" target="_blank" >phorum.org</a>) and he suggested I file a bug report here.<br />
<br />
My initial post:<br />
I&#039;m using emerald template and the tree-view module. When a closed topic is view, there is no reply box, or a box saying replies aren&#039;t allowed, etc. The following is the error report.   <br />
<br />
Phorum Template Error <br />
phorum_get_template() was called with an empty page name. <br />
This might indicate a template problem. <br />
Here&#039;s a backtrace that might help finding the error: <br />
#0 phorum_get_template() called at [/usr/local/apache2/vhosts/mysite.com/htdocs/boards/common.php:1599] <br />
#1 phorum_output(Array ([0] =&gt; treeview::read_threads,[1] =&gt; )) called at [/usr/local/apache2/vhosts/mysite.com/htdocs/boards/mods/treeview/treeview.php:192] <br />
#2 mod_treeview_end_output() <br />
#3 call_user_func(mod_treeview_end_output) called at [/usr/local/apache2/vhosts/mysite.com/htdocs/boards/common.php:1887] <br />
#4 phorum_hook(end_output) called at [/usr/local/apache2/vhosts/mysite.com/htdocs/boards/common.php:1706] <br />
#5 phorum_output(Array ([0] =&gt; read_threads,[1] =&gt; message)) called at [/usr/local/apache2/vhosts/mysite.com/htdocs/boards/read.php:861]<br />
<br />
I also get an error message if I leave a moved message when a post is moved. I imagine it&#039;s from the same error, but it moves to the topic too soon for me to copy the error message.<br />
<br />
<br />
Maurice&#039;s suggestion:<br />
I suspect the mods/treeview/treeview.php file, which contains this line: <br />
Language: PHP$templates[] = $PHORUM[&quot;posting_template&quot;];<br />
<br />
The $PHORUM[&quot;posting_template&quot;] variable is not always set. Try changing that line to: <br />
Language: PHP$templates[] = &#039;posting&#039;;<br />
<br />
<br />
My reply:<br />
I&#039;ve made the change and it kindof works. <br />
<br />
It has a box that says the topic is closed. But then under that it has the start of a reply box. It has Author: then a box to fill in the subect. <br />
<br />
then: &quot;mod_tos_tpl_editor_before_textarea(): Can&#039;t determine whether we&#039;re editing a new message.&quot;]]></description>
            <dc:creator>dsibilant</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Fri, 08 Apr 2011 21:22:11 -0500</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,135543,136177#msg-136177</guid>
            <title>Re: Module: Threaded Tree View</title>
            <link>https://www.phorum.org/support/read.php?62,135543,136177#msg-136177</link>
            <description><![CDATA[ Sorry Diego, you&#039;re absolutely right, and my apologies for not replying earlier.<br />
<br />
I think I was suffering from over-excitement at getting this working as a Phorum newbie! Anyway, thanks for being so polite in pointing me gently in the right direction :)]]></description>
            <dc:creator>Kronalias</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Mon, 26 Jan 2009 11:14:50 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,135543,135907#msg-135907</guid>
            <title>Re: Module: Threaded Tree View</title>
            <link>https://www.phorum.org/support/read.php?62,135543,135907#msg-135907</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>Joe Curia</strong><br />
I am working on a narrow template where issues like this need to be resolved. </div></blockquote>
<br />
Thanks for your last mod Joe<br />
I will give it a try now, I am sure it works fine but I think the problem is not subjet&#039;s lenght but the multiple nested replies (at least on my forum), so if you have let&#039;s say 25 nested replies even the shortest subject will screw the template.<br />
<br />
But again, I don&#039;t think this is really a problem<br />
Users understand when you have multiple nested replies this might happen and is not a big issue for them<br />
<br />
By the way my users love this mod, extremely useful when you have +500 replies per thread! :)]]></description>
            <dc:creator>Diego</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Wed, 14 Jan 2009 02:50:15 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,135543,135906#msg-135906</guid>
            <title>Re: Module: Threaded Tree View</title>
            <link>https://www.phorum.org/support/read.php?62,135543,135906#msg-135906</link>
            <description><![CDATA[ Kronalias, what do you mean &quot;threaded view doesn&#039;t support avatars&quot;?<br />
This has nothing to do with avatars, it depends on your template/design so you can show avatars or not, am I wrong?]]></description>
            <dc:creator>Diego</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Wed, 14 Jan 2009 02:46:06 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,135543,135821#msg-135821</guid>
            <title>Re: Module: Threaded Tree View</title>
            <link>https://www.phorum.org/support/read.php?62,135543,135821#msg-135821</link>
            <description><![CDATA[ Thanks for posting this solution, Kronalias.  I&#039;m sure it will come in handy for many people.]]></description>
            <dc:creator>Joe Curia</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Fri, 09 Jan 2009 11:40:44 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,135543,135820#msg-135820</guid>
            <title>Re: Module: Threaded Tree View</title>
            <link>https://www.phorum.org/support/read.php?62,135543,135820#msg-135820</link>
            <description><![CDATA[ Excellent module Joe, thank you! I hope you won&#039;t mind if I put this post in...<br />
<br />
I&#039;ve installed the User Avatar mod, and the Threaded Tree View doesn&#039;t support avatars (no criticism - there&#039;s no reason why it should, really!)<br />
<br />
Anyway, taking &quot;One message per page with threaded view&quot; as an example, if you want to display avatars the following edit to read_threads.tpl seems to do the trick...<br />
<br />
If you want an avatar in the one message you&#039;re reading, then after the lines:<br />
<br />
                    &lt;small&gt;{MESSAGE-&gt;datestamp}&lt;/small&gt;<br />
                &lt;/td&gt;<br />
<br />
insert:<br />
<br />
       &lt;td style=&quot;padding-right:10px&quot;&gt;<br />
         {IF MESSAGE-&gt;user_avatar}<br />
           &lt;img src=&quot;{MESSAGE-&gt;user_avatar}&quot; alt=&quot;avatar&quot;<br />
            {IF MESSAGE-&gt;user_avatar_w}<br />
              style=&quot;width:{MESSAGE-&gt;user_avatar_w}px;<br />
                     height:{MESSAGE-&gt;user_avatar_h}px&quot;<br />
            {/IF} /&gt;<br />
         {/IF}<br />
       &lt;/td&gt;<br />
<br />
If you want an avatar in each of the threaded lines, then after the line:<br />
<br />
        &lt;td width=&quot;15%&quot; class=&quot;{altclass}&quot; nowrap=&quot;nowrap&quot;&gt;{MESSAGES-&gt;datestamp}&lt;/td&gt;<br />
<br />
insert:<br />
<br />
       &lt;td style=&quot;padding-right:10px&quot;&gt;<br />
         {IF MESSAGES-&gt;user_avatar}<br />
           &lt;img src=&quot;{MESSAGES-&gt;user_avatar}&quot; alt=&quot;avatar&quot;<br />
            {IF MESSAGES-&gt;user_avatar_w}<br />
              style=&quot;width:{MESSAGES-&gt;user_avatar_w}px;<br />
                     height:{MESSAGES-&gt;user_avatar_h}px&quot;<br />
            {/IF} /&gt;<br />
         {/IF}<br />
       &lt;/td&gt;<br />
<br />
Best regards, Kronalias<br />
<br />
PS I tried to post the above with the correct indents, but they&#039;ve got lost somewhere...]]></description>
            <dc:creator>Kronalias</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Fri, 09 Jan 2009 11:37:14 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,135543,135673#msg-135673</guid>
            <title>Re: Module: Threaded Tree View</title>
            <link>https://www.phorum.org/support/read.php?62,135543,135673#msg-135673</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>Diego</strong><br />
I know, I am aware of many variables here, and this template is fixed width, so really long threads with many responses (many in my forum have +100 replies) make this even more unpredictable. But don´t worry about it, i consider it expected behaviour in the same way a two lines subject doubles the row size and nobody should complain. </div></blockquote>
<br />
I am working on a narrow template where issues like this need to be resolved.  I am using the following code which is not perfect but does the job for most cases.  Please note, to reduce processing load I am not looking at wide or narrow font characters, simple going with a preset string length.  You could try making these changes to your template and letting me know if it helps.  If so, I will add them to the template here.<br />
<br />
Immediately before the subject span add these lines:<br />
<pre class="bbcode">
{VAR TMP-&gt;subject MESSAGES-&gt;subject}
{VAR TMP-&gt;indent_cnt MESSAGES-&gt;indent_cnt}
&lt;?php 
    $max_length = 60 - ($PHORUM[&quot;DATA&quot;][&quot;TMP&quot;][&quot;indent_cnt&quot;] / 4);
    if (strlen($PHORUM[&quot;DATA&quot;][&quot;TMP&quot;][&quot;subject&quot;]) &gt; $max_length)
        $PHORUM[&quot;DATA&quot;][&quot;TMP&quot;][&quot;subject&quot;] = substr($PHORUM[&quot;DATA&quot;][&quot;TMP&quot;][&quot;subject&quot;],0,($max_length-1)).&quot;...&quot;;
?&gt;</pre>
Note, I have arbitrarily chosen a maximum string length of 60, you may want to adjust this.<br />
<br />
Next, change the subject code to use our new subject:<br />
<pre class="bbcode">
&lt;a href=&quot;{MESSAGES-&gt;URL-&gt;READ}&quot;&gt;{MESSAGES-&gt;subject}&lt;/a&gt;</pre>
becomes:<br />
<pre class="bbcode">
&lt;a href=&quot;{MESSAGES-&gt;URL-&gt;READ}&quot;&gt;{TMP-&gt;subject}&lt;/a&gt;</pre>
Let me know if you have any questions or get this working and want it added to your template for this module.  Thanks.]]></description>
            <dc:creator>Joe Curia</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Wed, 31 Dec 2008 08:16:37 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,135543,135616#msg-135616</guid>
            <title>Re: Module: Threaded Tree View</title>
            <link>https://www.phorum.org/support/read.php?62,135543,135616#msg-135616</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>Diego</strong><br />Only problem is when you have a superlong subject that breaks in two lines, there is a little break. I guess there is no way to avoid it, and I could live with it as it is not a big issue</div></blockquote>
<br />
FWIW, that was an issue in version 3 and the previous module.  not a lot you can do about it.]]></description>
            <dc:creator>Brian Moon</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Tue, 23 Dec 2008 19:03:33 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,135543,135609#msg-135609</guid>
            <title>Re: Module: Threaded Tree View</title>
            <link>https://www.phorum.org/support/read.php?62,135543,135609#msg-135609</link>
            <description><![CDATA[ I know, I am aware of many variables here, and this template is fixed width, so really long threads with many responses (many in my forum have +100 replies) make this even more unpredictable. But don´t worry about it, i consider it expected behaviour in the same way a two lines subject doubles the row size and nobody should complain. <br />
<br />
thanks again for this fantastic mod]]></description>
            <dc:creator>Diego</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Tue, 23 Dec 2008 11:16:56 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,135543,135608#msg-135608</guid>
            <title>Re: Module: Threaded Tree View</title>
            <link>https://www.phorum.org/support/read.php?62,135543,135608#msg-135608</link>
            <description><![CDATA[ It&#039;s all about logic.  My module allows for some great customization, but the logic can be difficult.  In this case we need to determine at which subject length, smaller for each indent, the subject will wrap, then increase the margin and height of the vertical line.  The other issue with this is that the font used is not monospaced, thus an l or &#039; will take up less space than a c or d.  So the logic would need to determine the string length of the subject, then increment this by any wide characters (w, m) and reduce it by any slim characters (l, &#039;).  Then increment this length by the number of indents and compare it against the preset width for subject wrapping.  If the logic indicates the subject will wrap, then the vertical line needs to change.<br />
<br />
Further at issue is the fact that previous wraps may cause the current row to need to extend its vertical line.<br />
<br />
As long as you can live with it for now, I will throw this into the back of my head and let it stew for a while. You will be the first to know when a final solution is cooked up.]]></description>
            <dc:creator>Joe Curia</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Tue, 23 Dec 2008 11:13:11 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,135543,135605#msg-135605</guid>
            <title>Re: Module: Threaded Tree View</title>
            <link>https://www.phorum.org/support/read.php?62,135543,135605#msg-135605</link>
            <description><![CDATA[ double checked and i had templates there.<br />
I uploaded yours and work great. Only problem is when you have a superlong subject that breaks in two lines, there is a little break. I guess there is no way to avoid it, and I could live with it as it is not a big issue<br />
<br />
thanks!!]]></description>
            <dc:creator>Diego</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Tue, 23 Dec 2008 10:06:25 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,135543,135604#msg-135604</guid>
            <title>Re: Module: Threaded Tree View</title>
            <link>https://www.phorum.org/support/read.php?62,135543,135604#msg-135604</link>
            <description><![CDATA[ I&#039;m not sure what to tell you.  Those errors indicate that the read_threads.tpl file does not exist in the /mods/treeview/templates/eastlink folder.<br />
<br />
On my test forum, if the file is missing, I get the same error.  However, with both files in place it works fine.  I have done the customizations needed for the template and have uploaded them here.  Please unzip and place the attached eastlink folder into the mods/treeview/templates folder and let me know if that works for you.   <br />
<br />
I have removed the bullet icons as you requested and it uses a thin line which is the same color as the border color.  You can change the color of the line either in the template&#039;s settings.php file or from the settings page of the module. <br />
<br />
If everything looks good, I will add the eastlink folder to the module for default support.  If you think anything needs changing, please let me know so I can change it on my end and add the eastlink folder to the module for default support when you have finished tweaking it.<br />
<br />
EDIT: attached template removed and added to the module download above.]]></description>
            <dc:creator>Joe Curia</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Tue, 23 Dec 2008 07:18:09 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,135543,135600#msg-135600</guid>
            <title>Re: Module: Threaded Tree View</title>
            <link>https://www.phorum.org/support/read.php?62,135543,135600#msg-135600</link>
            <description><![CDATA[ yes I copied the templates in the right folder, get this error when i turn on the module.]]></description>
            <dc:creator>Diego</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Tue, 23 Dec 2008 04:27:58 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,135543,135594#msg-135594</guid>
            <title>Re: Module: Threaded Tree View</title>
            <link>https://www.phorum.org/support/read.php?62,135543,135594#msg-135594</link>
            <description><![CDATA[ Did you copy your template files into the /mods/treeview/templates/eastlink folder or simply edit them in the /templates/eastlink folder?  You need to copy your read_threads.tpl and list_threads.tpl files into the the module&#039;s templates folder and edit them there.]]></description>
            <dc:creator>Joe Curia</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Mon, 22 Dec 2008 18:33:38 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,135543,135592#msg-135592</guid>
            <title>Re: Module: Threaded Tree View</title>
            <link>https://www.phorum.org/support/read.php?62,135543,135592#msg-135592</link>
            <description><![CDATA[ fantastic!<br />
<br />
I tried to make it work with my own template (posted it on templates section), copied snippet as required but i get this error message:<br />
<br />
Warning: filemtime() [function.filemtime]: stat failed for ./mods/treeview/templates/eastlink/read_threads.tpl in /home/eastlink/public_html/foro/include/templates.php on line 130<br />
<br />
Fatal error: phorum_get_file_contents: file &quot;./mods/treeview/templates/eastlink/read_threads.tpl&quot; does not exist in /home/eastlink/public_html/foro/include/templates.php on line 741<br />
<br />
Any ideas?<br />
<br />
thanks!]]></description>
            <dc:creator>Diego</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Mon, 22 Dec 2008 17:14:58 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,135543,135556#msg-135556</guid>
            <title>Re: Module: Threaded Tree View</title>
            <link>https://www.phorum.org/support/read.php?62,135543,135556#msg-135556</link>
            <description><![CDATA[ It is close :-)  In Emerald and Classic it isn&#039;t really a problem.  The only place I really had a problem was in Lightweight on the first post in a thread.  There the line starts a little lower, but I don&#039;t know that it is that bad.  I&#039;ve attached screenshots of each as an Admin.  I have also placed a number of customizable variables in the settings.php file for each template which may be used to attemp to alleviate the problem.  I may go back and try to tackle the Lightweight template again if requested.]]></description>
            <dc:creator>Joe Curia</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Sun, 21 Dec 2008 12:47:01 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,135543,135552#msg-135552</guid>
            <title>Re: Module: Threaded Tree View</title>
            <link>https://www.phorum.org/support/read.php?62,135543,135552#msg-135552</link>
            <description><![CDATA[ great module.<br />
didn&#039;t check it out yet as I&#039;m working with the older version on 5.1 but does it work correctly with moderator options enabled too, lines stretching and the like?]]></description>
            <dc:creator>Thomas Seifert</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Sun, 21 Dec 2008 09:35:52 -0600</pubDate>
        </item>
        <item>
            <guid>https://www.phorum.org/support/read.php?62,135543,135543#msg-135543</guid>
            <title>Module: Threaded Tree View</title>
            <link>https://www.phorum.org/support/read.php?62,135543,135543#msg-135543</link>
            <description><![CDATA[ This module displays the threaded list view with tree lines similar to those used in Phorum 3.<br />
<br />
This module was originally created by Brian Moon.  I have updated it for Phorum 5.2 and used &lt;div&gt;&#039;s to draw the lines rather than images.<br />
<br />
<b>Installation and Usage:</b><br />
This module installs like any other module.<br />
<br />
From the settings page you can customize the color and thickness of the tree lines.  Each template can have its own line color and thickness which will be displayed if you leave the settings empty.<br />
<br />
If you have a custom template and want to use this module, you will need to create a folder in this modules&#039;s template folder and copy your template&#039;s list_threads.tpl and read_threads.tpl files into that folder.  Using the supported templates as examples add the necessary lines to the template files. Those lines can be found in the supported templates after this line:<br />
<pre class="bbcode">
&lt;!--  Begin the Threaded Tree View customization  --&gt;</pre>
Depending on the Phorum template you use as a base, I would suggest starting with that template&#039;s code.  Regardless, you may need to adjust the margins and height values.<br />
<br />
You will also need to create a settings.php file in your template&#039;s folder. I would again suggest copying this file frocm one of the supported templates. You will then need to adjust the line height and width.  If your template requires further tweaking (such as for messages with a special icon which changes the height of their row) you can add php code to the four alloted modifier variables in the settings.php file.  Examples of this can be seen in the Classic and Emerald templates.  It is important to note that if you do not use one of the modifier variables, it should still be supplied simply with an empty string.<br />
<br />
The Classic, Emerald, and Lightweight templates are supported without any extra work on your part.<br />
<br />
<b>Todo:</b><br />
- Add support for more templates<br />
<br />
- Add features as requested.]]></description>
            <dc:creator>Joe Curia</dc:creator>
            <category>v5/v6 Modules/Add-Ons</category>
            <pubDate>Sat, 20 Dec 2008 09:16:08 -0600</pubDate>
        </item>
    </channel>
</rss>
