1
Szico_VII
Alignment Issues in WFDownloads and MyAlbum-p
  • 2009/4/3 22:16

  • Szico_VII

  • Just popping in

  • Posts: 32

  • Since: 2009/4/3 0


Can anyone clue me in as to what files I need to edit to get good alignment in these 2 modules? As you can see here:
http://szicovii.com/modules/wfdownloads/

The alignment is a-ok. But if you go into a subcategory (see here:http://szicovii.com/modules/wfdownloads/viewcat.php?cid=20 ), it suddenly becomes a huge mess. I dont mind having one category per line if thats what it takes, but I don't know how to do it!

The same thing is true of myalbum-P, except even the top categories are messed up and I don't know why. See here:
http://szicovii.com/modules/myalbum/

There the second main category down is fine, but the 1st and 3rd categories have strange alignment and the images are on the wrong lines, I don't know why. In the subcategories it looks like this:
http://szicovii.com/modules/myalbum/viewcat.php?cid=2

But the folder images are on the wrong lines!!

Any help would be extremely appreciated!

2
ghia
Re: Alignment Issues in WFDownloads and MyAlbum-p
  • 2009/4/4 1:01

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


For the subcategories of wfdownloads it seems the correct display of what is in the html source.

For the myalbum, I think it is best to add a <br /> after each item in the template.

3
Szico_VII
Re: Alignment Issues in WFDownloads and MyAlbum-p
  • 2009/4/4 7:34

  • Szico_VII

  • Just popping in

  • Posts: 32

  • Since: 2009/4/3 0


I'm not really familiar with template editing, I can mess with html a bit and luck my way around some things but this has me stumped: For a start, I'm not even sure which template file I need to be editing :P

Judging by the names it could be one of three for myalbum,

myalbum_categories.html
<table width="100%" border='0' cellspacing='5' cellpadding='0' align="center">
  <
tr>
  <{foreach 
from=$subcategories item=cat key=count}>
    <
td valign="top" align="right">
      <{if 
$cat.imgurl != ""}>
        <
a href="<{$mod_url}>/viewcat.php?cid=<{$cat.cid}>">
          <
img src="<{$cat.imgurl}>" width="120" border="0" alt="" />
        </
a>
      <{else}>
        <
a href="<{$mod_url}>/viewcat.php?cid=<{$cat.cid}>">
          <
img src="<{$mod_url}>/images/folder32.gif" width="32" height="32" border="0" alt="" />
        </
a>
      <{/if}>
    </
td>
    <
td valign="top" align="left" width="100%">
      <
a href="<{$mod_url}>/viewcat.php?cid=<{$cat.cid}>"><span style="font:bold 150%;"><{$cat.title}></span></a>&nbsp;<{$lang_total}><{$cat.photo_total_sum}>&nbsp;(<{$cat.photo_small_sum}>)
      <
br />
      <{foreach 
from=$cat.subcategories item=subcat}>
        <{if 
$subcat.number_of_subcat}>
          <
a href="<{$mod_url}>/viewcat.php?cid=<{$subcat.cid}>"><img src="<{$mod_url}>/images/folder16.gif" width="16" height="16" alt="" /><{$subcat.title}><img src='<{$mod_url}>/images/subcat.gif' width='15' height='15' /></a> &nbsp
        <{else}>
          <
a href="<{$mod_url}>/viewcat.php?cid=<{$subcat.cid}>"><img src="<{$mod_url}>/images/folder16.gif" width="16" height="16" alt="" /><br><{$subcat.title}></a>&nbsp;(<{$subcat.photo_small_sum}>) &nbsp
        <{/if}>
      <{/foreach}>
    </
td>
    <{if (
$count+1is div by 1}>
      </
tr><tr>
    <{/if}>
  <{/foreach}>
  </
tr>
</
table>


myalbum_viewcat_list.html
<{strip}>
<
table width="100%" cellspacing="0" class="outer">
  <
tr>
    <
td class="even">
      <
br />
      <{include 
file="db:myalbum_header.html"}>
      <
table broder='0' cellpadding='0' cellspacing='0' width='100%'>
        <
tr>
          <
td align='left'>
            <
span style="font-weight:bold;"><a href='index.php'><{$lang_album_main}></a>&nbsp;:&nbsp;<{$album_sub_title}></span>&nbsp;<{$lang_total}><{$photo_total_sum}>
          </
td>
          <
td align='right'>
            <{if 
$lang_add_photo}><a href="submit.php?cid=<{$category_id}>"><{$lang_add_photo}><img src="<{$mod_url}>/images/pictadd.gif" border="0" alt="<{$lang_add_photo}>" title="<{$lang_add_photo}>" /></a><{/if}>
          </
td>
        </
tr>
      </
table>
      <{if 
count$subcategories ) > }>
        <
hr />
        <{include 
file="db:myalbum_categories.html"}>
      <{/if}>
    </
td>
  </
tr>
</
table>
<
br />
<{if 
$photo_small_sum }>
  <
div align="center">
    <{
$lang_nomatch}>
  </
div>
<{else}>
  <
table width="100%" cellspacing="0" class="outer">
    <
tr>
      <
td class="even" align="left">
        <{if 
$photo_small_sum }>
          <
div align="center">
            <{
$lang_sortby}>&nbsp;&nbsp;
            <{
$lang_title}> (<a href="viewcat.php?cid=<{$category_id}>&amp;uid=<{$uid}>&amp;orderby=titleA"><img src="images/up.gif" border="0" align="middle" alt="" /></a><a href="viewcat.php?cid=<{$category_id}>&amp;uid=<{$uid}>&amp;orderby=titleD"><img src="images/down.gif" border="0" align="middle" alt="" /></a>)&nbsp;
            <{
$lang_date}> (<a href="viewcat.php?cid=<{$category_id}>&amp;uid=<{$uid}>&amp;orderby=dateA"><img src="images/up.gif" border="0" align="middle" alt="" /></a><a href="viewcat.php?cid=<{$category_id}>&amp;uid=<{$uid}>&amp;orderby=dateD"><img src="images/down.gif" border="0" align="middle" alt="" /></a>)&nbsp;
            <{if 
$canrateview }>
              <{
$lang_rating}> (<a href="viewcat.php?cid=<{$category_id}>&amp;uid=<{$uid}>&amp;orderby=ratingA"><img src="images/up.gif" border="0" align="middle" alt="" /></a><a href="viewcat.php?cid=<{$category_id}>&amp;uid=<{$uid}>&amp;orderby=ratingD"><img src="images/down.gif" border="0" align="middle" alt="" /></a>)&nbsp;
            <{/if}>
            <{
$lang_popularity}> (<a href="viewcat.php?cid=<{$category_id}>&amp;uid=<{$uid}>&amp;orderby=hitsA"><img src="images/up.gif" border="0" align="middle" alt="" /></a><a href="viewcat.php?cid=<{$category_id}>&amp;uid=<{$uid}>&amp;orderby=hitsD"><img src="images/down.gif" border="0" align="middle" alt="" /></a>)
            <
br />
            <
b><{$lang_cursortedby}></b>
            <
br />
            <
br />
            <
table broder='0' cellpadding='0' cellspacing='0' width='100%'>
              <
tr>
                <
td align='left'>
                  <{
$photonavinfo}>
                </
td>
                <
td align='right'>
                  <{
$photonav}>
                </
td>
              </
tr>
            </
table>
          </
div>
          <
hr />
        <{/if}>
        <
br />
        <
table width='100%' cellspacing='0' cellpadding='10' border='0'>
          <{foreach 
from=$photos item=photo}>
            <{include 
file="db:myalbum_photo_in_list.html"}>
          <{/foreach}>
        </
table>

        <{if 
$photo_small_sum }>
          <
hr />
          <
div align="center">
            <
table broder='0' cellpadding='0' cellspacing='0' width='100%'>
              <
tr>
                <
td align='left'>
                  <{
$photonavinfo}>
                </
td>
                <
td align='right'>
                  <{
$photonav}>
                </
td>
              </
tr>
            </
table>
          </
div>
        <{/if}>

      </
td>
    </
tr>
  </
table>
<{/if}>
<
br />
<
table width="100%" cellspacing="0" cellpadding="0" border="0">
  <
tr>
    <
td align="center">
      <
br />
      <{include 
file='db:system_notification_select.html'}>
      <
br />
      <{include 
file="db:myalbum_footer.html"}>
    </
td>
  </
tr>
</
table>
<{/
strip}>


myalbum_viewcat_table.html
<{strip}>
<
table width="100%" cellspacing="0" class="outer">
  <
tr>
    <
td class="even">
      <
br />
      <{include 
file="db:myalbum_header.html"}>
      <
table broder='0' cellpadding='0' cellspacing='0' width='100%'>
        <
tr>
          <
td align='left'>
            <
span style="font-weight:bold;"><a href='index.php'><{$lang_album_main}></a>&nbsp;:&nbsp;<{$album_sub_title}></span>&nbsp;<{$lang_total}><{$photo_total_sum}>
          </
td>
          <
td align='right'>
            <{if 
$lang_add_photo}><a href="submit.php?cid=<{$category_id}>"><{$lang_add_photo}><img src="<{$mod_url}>/images/pictadd.gif" border="0" alt="<{$lang_add_photo}>" title="<{$lang_add_photo}>" /></a><{/if}>
          </
td>
        </
tr>
      </
table>
      <{if 
count$subcategories ) > }>
        <
hr />
        <{include 
file="db:myalbum_categories.html"}>
      <{/if}>
    </
td>
  </
tr>
</
table>
<
br />

<{if 
$photo_small_sum }>
  <
div align="center">
    <{
$lang_nomatch}>
  </
div>
<{else}>
  <
table width="100%" cellspacing="0" class="outer">
    <
tr>
      <
td class="even" align="left">
        <{if 
$photo_small_sum }>
          <
div align="center">
            <{
$lang_sortby}>&nbsp;&nbsp;
            <{
$lang_title}> (<a href="viewcat.php?cid=<{$category_id}>&amp;orderby=titleA"><img src="images/up.gif" border="0" align="middle" alt="" /></a><a href="viewcat.php?cid=<{$category_id}>&amp;orderby=titleD"><img src="images/down.gif" border="0" align="middle" alt="" /></a>)&nbsp;
            <{
$lang_date}> (<a href="viewcat.php?cid=<{$category_id}>&amp;orderby=dateA"><img src="images/up.gif" border="0" align="middle" alt="" /></a><a href="viewcat.php?cid=<{$category_id}>&amp;orderby=dateD"><img src="images/down.gif" border="0" align="middle" alt="" /></a>)&nbsp;
            <{if 
$canrateview }>
              <{
$lang_rating}> (<a href="viewcat.php?cid=<{$category_id}>&amp;orderby=ratingA"><img src="images/up.gif" border="0" align="middle" alt="" /></a><a href="viewcat.php?cid=<{$category_id}>&amp;orderby=ratingD"><img src="images/down.gif" border="0" align="middle" alt="" /></a>)&nbsp;
            <{/if}>
            <{
$lang_popularity}> (<a href="viewcat.php?cid=<{$category_id}>&amp;orderby=hitsA"><img src="images/up.gif" border="0" align="middle" alt="" /></a><a href="viewcat.php?cid=<{$category_id}>&amp;orderby=hitsD"><img src="images/down.gif" border="0" align="middle" alt="" /></a>)
            <
br />
            <
b><{$lang_cursortedby}></b>
            <
br />
            <
br />
            <
table broder='0' cellpadding='0' cellspacing='0' width='100%'>
              <
tr>
                <
td align='left'>
                  <{
$photonavinfo}>
                </
td>
                <
td align='right'>
                  <{
$photonav}>
                </
td>
              </
tr>
            </
table>
          </
div>
          <
hr />
        <{/if}>
        <
br />
        <
table width='100%' cellspacing='0' cellpadding='0' border='0'>
          <
tr>
            <{foreach 
from=$photos item=photo}>
              <
td align='center' style='margin:0px;padding:5px 0px;'>
                <
a href='<{$mod_url}>/photo.php?lid=<{$photo.lid}>'><img src='<{$photo.imgsrc_thumb}>' <{$photo.width_spec}> alt='<{$photo.title}>' title='<{$photo.title}>' border='0' /></a>
              </
td>
              <{if 
$photo.count is div by $colsoftableview }>
                </
tr>
                <
tr>
              <{/if}>
            <{/foreach}>
          </
tr>
        </
table>

        <{if 
$photo_small_sum }>
          <
hr />
          <
div align="center">
            <
table broder='0' cellpadding='0' cellspacing='0' width='100%'>
              <
tr>
                <
td align='left'>
                  <{
$photonavinfo}>
                </
td>
                <
td align='right'>
                  <{
$photonav}>
                </
td>
              </
tr>
            </
table>
          </
div>
        <{/if}>

      </
td>
    </
tr>
  </
table>
<{/if}>
<
br />
<
table width="100%" cellspacing="0" cellpadding="0" border="0">
  <
tr>
    <
td align="center">
      <
br />
      <{include 
file='db:system_notification_select.html'}>
      <
br />
      <{include 
file="db:myalbum_footer.html"}>
    </
td>
  </
tr>
</
table>
<{/
strip}>


or one of these for wfdownloads:

wfdownloads_viewcat.html
(Here's the template atm)
<{include file='db:wfdownloads_header.html'}>

<
div class="wfd_view_top">
    <{if 
$cat_rssfeed_link !== ""}>
        <{
$cat_rssfeed_link}>&nbsp;&nbsp;
    <{/if}>

    <{if 
$category_title !== ""}>
        <
h1><{$category_title}></h1>
        <{if 
$category_image}>
            <
img src="<{$category_image}>" alt="<{$category_title}>" title="<{$category_title}>" />
        <{/if}>
    <{/if}>

    <{
$description}>
</
div>
<
br />

<
div class="wfd_view_subs">
    <{if 
$subcategories}>
        <
fieldset>
            <
h4><{$smarty.const._MD_WFD_SUBCATLISTING}></h4>
            <
table class="wfd_view_subslist">
                <
tr>
                    <{foreach 
item=subcat from=$subcategories}>
                        <
td>
                            <
a href="viewcat.php?cid=<{$subcat.id}>"><img src="<{$subcat.image}>" alt="<{$subcat.title}>" title="<{$subcat.title}>" align="middle" />&nbsp;&nbsp;<{$subcat.title}></a>&nbsp;(<{$subcat.totallinks}>)<br />
                        </
td>
                         <{if 
$subcat.count is div by 2}>
                              </
tr>
                            <
tr>
                                <
td>&nbsp;</td>
                         <{/if}>
                    <{/foreach}>
                </
tr>
            </
table>    
        </
fieldset>
    <{/if}>
</
div>

<
div class="wfd_view_catpath">
    <{
$category_path}>
</
div>
<
br />

<{if 
$show_links == true}> 
    <
div class="wfd_view_sortlist" align="center">
        <
b><{$smarty.const._MD_WFD_SORTBY}></b>&nbsp;<{$smarty.const._MD_WFD_TITLE}> (
        <
a href="viewcat.php?cid=<{$category_id}>&amp;orderby=titleA">
        <
img src="images/up.gif" align="middle" alt="" title="" /></a>
        <
a href="viewcat.php?cid=<{$category_id}>&amp;orderby=titleD">
        <
img src="images/down.gif" align="middle" alt="" title="" /></a>
        )
        &
nbsp;
        <{
$smarty.const._MD_WFD_DATE}> (
        <
a href="viewcat.php?cid=<{$category_id}>&amp;orderby=dateA">
        <
img src="images/up.gif" align="middle" alt="" title="" /></a>
        <
a href="viewcat.php?cid=<{$category_id}>&amp;orderby=dateD">
        <
img src="images/down.gif" align="middle" alt="" title="" /></a>
        )
        &
nbsp;
        <{
$smarty.const._MD_WFD_RATING}> (
        <
a href="viewcat.php?cid=<{$category_id}>&amp;orderby=ratingA">
        <
img src="images/up.gif" align="middle" alt="" title="" /></a>
        <
a href="viewcat.php?cid=<{$category_id}>&amp;orderby=ratingD">
        <
img src="images/down.gif" align="middle" alt="" title="" /></a>
        )
        &
nbsp;
        <{
$smarty.const._MD_WFD_POPULARITY}> (
        <
a href="viewcat.php?cid=<{$category_id}>&amp;orderby=hitsA">
        <
img src="images/up.gif" align="middle" alt="" title="" /></a>
        <
a href="viewcat.php?cid=<{$category_id}>&amp;orderby=hitsD">
        <
img src="images/down.gif" align="middle" alt="" title="" /></a>
        )
        <
br />
        <
b><{$lang_cursortedby}></b>
    </
div>
    <
br />
<{/if}>

<{if 
$page_nav == true}>
    <
div class="wfd_pagenav">
        <{
$smarty.const._MD_WFD_PAGES}>: <{$pagenav}>
    </
div>
    <
br />
<{/if}>


<!-- 
Start link loop -->
<{
section name=i loop=$file}>
    <{include 
file="db:wfdownloads_download.html" down=$file[i]}>
<{/
section}>
<!-- 
End link loop -->

<{if 
$page_nav == true}>
    <
div class="wfd_pagenav">
        <{
$smarty.const._MD_WFD_PAGES}>: <{$pagenav}>
    </
div>
<{/if}>

<{include 
file='db:wfdownloads_footer.html'}>


Would anyone mind pointing out exactly what I need to change to get everything aligned properly?

4
ghia
Re: Alignment Issues in WFDownloads and MyAlbum-p
  • 2009/4/4 18:41

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Try once to add a <br /> before the first <{/foreach}> in myalbum_categories.html (don't forget to update the module to see the changes).

5
Szico_VII
Re: Alignment Issues in WFDownloads and MyAlbum-p
  • 2009/4/5 12:16

  • Szico_VII

  • Just popping in

  • Posts: 32

  • Since: 2009/4/3 0


Thanks for the advice - that did help a little bit, everything at least now has it's own line. Unfortunately, the image and (+ button) alignment is still off in both the main:
http://szicovii.com/modules/myalbum/

and the subcategories:
http://szicovii.com/modules/myalbum/viewcat.php?cid=2

(Here the image should be on the same line as the text but each has its own line :P)

6
Szico_VII
Re: Alignment Issues in WFDownloads and MyAlbum-p
  • 2009/4/5 12:37

  • Szico_VII

  • Just popping in

  • Posts: 32

  • Since: 2009/4/3 0


Oh nevermind, it must've been something i did when messing with the other 2 templates I mentioned a while ago as i just replaced em with the default ones and it works fine. Now just the WFDownloads issue

Which appears to be that it is left aligning the first line of categories and centralising the rest :| Thoughts?

http://szicovii.com/modules/wfdownloads/viewcat.php?cid=20

7
ghia
Re: Alignment Issues in WFDownloads and MyAlbum-p
  • 2009/4/5 14:52

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Leave out the
<td>&nbsp;</td>
in wfdownloads_viewcat.html or insert it also before the
<{foreach item=subcat from=$subcategories}>

8
Szico_VII
Re: Alignment Issues in WFDownloads and MyAlbum-p
  • 2009/4/6 4:00

  • Szico_VII

  • Just popping in

  • Posts: 32

  • Since: 2009/4/3 0


Awesome that did the trick, cheers for all your help Ghia it is hugely appreciated. I believe there's one last issue...which I only just noticed as I dont think it was present before in myalbum-p. Basically its inserting really big gaps between the module header image and the start of the categories but only when looking at the main categories:

http://szicovii.com/modules/myalbum/index.php

And the furthest in sub-categories:
http://szicovii.com/modules/myalbum/viewcat.php?cid=4

Every other category page looks fine! Any thoughts on this? (I think it only started happening after the modifications I made to the template file to fix the original issue.

9
ghia
Re: Alignment Issues in WFDownloads and MyAlbum-p
  • 2009/4/6 7:26

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


What version is your module?

10
Szico_VII
Re: Alignment Issues in WFDownloads and MyAlbum-p
  • 2009/4/6 11:38

  • Szico_VII

  • Just popping in

  • Posts: 32

  • Since: 2009/4/3 0


2.84

Login

Who's Online

215 user(s) are online (126 user(s) are browsing Support Forums)


Members: 0


Guests: 215


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits