Firefox PHP

Tree lines like Phorum 3 module!

Posted by Brian Moon 
Re: Tree lines like Phorum 3 module!
March 26, 2007 06:05PM
I didn't see any sites posted which are using your edits, so I wasn't sure who was and who wasnt, :P..

I dont think my mods are very extensive, just more time consuming.. since all the modifications would be to code in loops, it shouldn't be that extensive, more just time consuming, I think.
I also dont have handy a test phorum, so I have to be careful about what I do in production.

if your mod solves the gap problems, then it's probably the right thing, although I'm a big fan of using CSS to do as much work as possible, and saving bandwidth.
Re: Tree lines like Phorum 3 module!
March 26, 2007 08:48PM
The Site I have for my testing is done on my internal/local web-server, I have tested it via other computers as well, externally locating via my referring URL.

By Extensive, that is what I meant, the time it takes to edit, LOL.

Not having a test forum is a swine, I was using only 1 test forum, & a server crash caused the whole thing to screw up completely. Now I have 2 test forums, development & stable. Soon as the MOD I'm working on, on the first test forum is working correctly, & I've tested the shit out of it, I copy it across to the second test Forum, replacing the database & the files for that forum.

Although I've done work with HTML for years, I'm a true beginner with PHP/MySQL/CSS Style Sheets. So I'm prone to use the easiest method available to me, until my knowledge/experience gets better, LOL.

As a side-note, for a different thread you posted on, I have a query for you on Multi level folder support for new index view, if you could kindly take a look, & see if you can help with that thread? I'll double check that thread regularly, for any new messages you post, instead of cross-posting on this thread.

Thanks.

---
Snake,
Fangs that bite!

Alternating Background in Thread & Message Views

Tree lines like Phorum 3 (by BrianLMoon) --- My working update
Re: Tree lines like Phorum 3 module!
May 04, 2008 08:59AM
hello folks,

this for solving the problem with the gaps between the lines in IE7. (tested for Version 5.2.7)

After studying a long time, i figured out, that the reason is the following in the css.tpl for the img: "vertical-align: middle".
IE7 is adding a pixel above the gifs in that case .. well :(

My way out of it:
Do eyerything as described in the last Update from Snake (TreeviewModUpdate.zip).
Then change all the 8 img-tag-lines in mods/treeview.php like this:
$t_gif="<img src=\"images/tree/t.gif\" width=\"9\" height=\"36\" border=\"0\" style=\"vertical-align: top;\" />";
with an extra style="vertical-align: top;"

Then there are 2 possibilities i found for changing the templates list_threads.tpl AND read_threads.tpl:

1)
Put a trans.gif after MESSAGES->indent_cnt, like:
      <td class="PhorumTableRow{altclass}">&nbsp;{MESSAGES->indent_cnt}
      <img src="templates/YOUR_TEMPLATE/images/trans.gif" width="1" height="36" border="0" />
The result is not quite perfect: In Firefox the subject is 1 or 2 pixel above the middle and in IE7 it is 1 or 2 pixel below ..:) But for those who don´t need it perfect, it´s ok.

OR

2) For the perfect ones :)
Change the templates list_threads.tpl AND read_threads.tpl in that way that you use a new table for the one td where the indent and the subject is!

for example:

      <td class="PhorumTableRow{altclass}" style="padding-left: {MESSAGES->indent_cnt}px">&nbsp;{MESSAGES->indent}{marker}
        {IF MESSAGES->sort PHORUM_SORT_STICKY}
          <span class="PhorumListSubjPrefix">{LANG->Sticky}:</span>
        {/IF}
        {IF MESSAGES->sort PHORUM_SORT_ANNOUNCEMENT}
          <span class="PhorumListSubjPrefix">{LANG->Announcement}:</span>
        {/IF}
        {IF MESSAGES->moved}
          <span class="PhorumListSubjPrefix">{LANG->MovedSubject}:</span>
        {/IF}
        <a href="{MESSAGES->URL->READ}">{MESSAGES->subject}</a>&nbsp;<span class="PhorumNewFlag">{MESSAGES->new}</span>
      </td>

change to:

      <td class="PhorumTableRow{altclass}">
	<table cellspacing="0" cellpadding="0" border="0">
	  <tr>
	    <td class="PhorumTableRow{altclass}">&nbsp;{MESSAGES->indent_cnt}</td>
	    <td class="PhorumTableRow{altclass}" style="padding-left: 0px;">
		{IF MESSAGES->sort PHORUM_SORT_STICKY}
		  <span class="PhorumListSubjPrefix">{LANG->Sticky}:</span>
		{/IF}
		{IF MESSAGES->sort PHORUM_SORT_ANNOUNCEMENT}
		  <span class="PhorumListSubjPrefix">{LANG->Announcement}:</span>
		{/IF}
		{IF MESSAGES->moved}
		  <span class="PhorumListSubjPrefix">{LANG->MovedSubject}:</span>
		{/IF}
		<a href="{MESSAGES->URL->READ}">{MESSAGES->subject}</a>&nbsp;<span class="PhorumNewFlag">{MESSAGES->new}</span>
	    </td>
	  </tr>
	</table>
      </td>

Please be careful if this code really fits in your files, because the MESSAGES->indent and the ROWS->indent -variables don´t exist any longer (my Version here: 5.2.7), but i´m not really sure about it. Well, in the treeview.php the MESSAGES->indent_cnt -variable is used and it works for list_threads.tpl and read_threads.tpl ..

(One more note: If the links "delete, move, merge threads" in the date-field bother, just delete the br there, and set the width for the td to 220, for example)

That´s it! Believe me, i feel much more relaxed now ..:)

PS: My special advice: Change the gifs with photoshop as you like it, but t,l,i,trans-gifs must have same width and m,n,c must have same width. All gifs must have same height, and it must be corrected in the files above, surely.
Re: Tree lines like Phorum 3 module!
December 12, 2008 07:55PM
tried to implement this in 5.2 but nothing happens
I know this is for 5.1 versions but I see last user implemented it succesfully in 5.2
any other experience with 5.2? I see missing tags like {marker} and others

thanks
Sorry, only registered users may post in this forum.

Click here to login