PEAK XOOPS - How can I disable listing of Sub categories in the main page? in englishin japanese

How can I disable listing of Sub categories in the main page?

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2004/8/23 3:05
ori  二等兵   Posts: 4
Hi,

Right now Sub-Categories our listed in the main catalog page. i have uneven no. of Sub in the diferent categories and it looks bad on the front page.

I would like not to list the Sub under the categories in the main page Only the categories by them self.
When a user clicks on a category then he will see in the category page the sub to chose from.

Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2004/8/25 6:47
GIJOE  先任軍曹   Posts: 4110
hi ori.

I can't understand what you want.

What do you mean "main page"?

If you mean eliminating category part in "modules/myalbum/index.php",
edit myalbum*_index.html of your template set and eliminate the line:
[code] <{include file="db:myalbum_categories.html"}>[code]
If you mean sub-categories in category's part, edit myalbum*_categories.html of your template set.
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2004/8/27 5:20
ori  二等兵   Posts: 4
Hi GIJOE,

Thanks for your reply.

Im a newbie to Xoops and PHP

What i ment is like that :

When clicking on the button "my Album" it takes you to the "main album page" (1st page). On this page the categories as well as Sub categories are listed for the user to chose from. The problem is that i do not have equal amount of sub categories and the page looks realy cluttered.

I wonder how can i prevent the display of the sub categories on the "main album page" and only to show the sub-category when entering (chosing) a category.

You can see at my site www.yzcompany.com
Login: test
Password: 12345
GoTo "Catalog"

Thanks for the help
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2004/8/27 6:37
GIJOE  先任軍曹   Posts: 4110
hi ori.

You can edit myalbum_categories.html of your template set
like this:
<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="33%">
      <a href="<{$mod_url}>/viewcat.php?cid=<{$cat.cid}>"><span style="font:bold 150%;"><{$cat.title}></span></a> <{$lang_total}><{$cat.photo_total_sum}> (<{$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>   
        <{else}>
          <a href="<{$mod_url}>/viewcat.php?cid=<{$subcat.cid}>"><img src="<{$mod_url}>/images/folder16.gif" width="16" height="16" alt="" /><{$subcat.title}></a> (<{$subcat.photo_small_sum}>)   
        <{/if}>
      <{/foreach}>
    </td>
    <{if ($count+1) is div by 3}>
      </tr><tr>
    <{/if}>
  <{/foreach}>
  </tr>
</table>
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2004/8/27 14:14
ori  二等兵   Posts: 4
Hi GIJOE,

I pazzeled, I know i got something completly wrong but i can not figure what?

I went to /modules/myalbum/templates and deleted the lines you recommended from "myalbum**_categories.html" (** nothing, 0,1 and 2

and nothing happen there is no effect on the page, no change at all.

I must have made the changes in the wrong place but I can not find where would be the right place?

Thanks for the help,

Ori
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2004/8/27 16:17
GIJOE  先任軍曹   Posts: 4110
You should learn how to edit templates in XOOPS.

- copy template set from default to new name in template manager
- set default template set as the new template set in preferences
- edit myalbum_*.html in the new template set in template manager
(don't edit original template file)

And the template you have to edit is myalbum_categories.html only.
You need not to edit myalbum0_categories.html etc.
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2004/8/29 2:36
boufa  二等兵   Posts: 8
THANK YOU.... I had never bothered to look into editing the templates. I have done jsut enough HTML type coding to be dangerous, so I thought it best to leave them alone. This thread has inspired me to play.

- I removed the subcatagories listing ( I have dozens of subcatagories with over 1100 pictures) It really cleaned up the page.
- I removed the image counters from the Catagory headings as well.
-I centered the text and the thumbnail to more evenly use the new found space.

See the final look at KLVance.org Photography

This module rocks.

(edit) now I think I am out of control...
-added image name to the random block images.
-changed to table view and added image name and number of hits (never realy liked list view, but the table view was too boring).

I gotta stop before I screw something up and loose the improvements. Thanks again.
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2004/8/29 6:16
GIJOE  先任軍曹   Posts: 4110
hi boufa.
Quote:
See the final look at KLVance.org Photography
Good site! and what a cute baby!
I'm happy to see you use my works effectively.

Quote:
-added image name to the random block images.
This is the sample of customized the template of myalbum_block_rphoto.html
<table width='100%' cellspacing='0' cellpadding='0' border='0'>
  <tr>
    <{foreach item=photo key=count from=$block.photo}>
      <td align='center' style='margin:0px;padding:5px 0px;'>
        <a href="<{$block.mod_url}>/photo.php?lid=<{$photo.lid}>&cid=<{$photo.cid}>"><img src="<{$photo.thumbs_url}>/<{$photo.lid}>.<{$photo.ext}>" <{$photo.img_attribs}> alt="<{$photo.title}>" title="<{$photo.title}>" /></a>
        <br />
        <{$photo.title}>
      </td>
      <{if $count is div by $block.cols }>
        </tr>
        <tr>
      <{/if}>
    <{/foreach}>
  </tr>
</table>

Quote:
-changed to table view and added image name and number of hits (never realy liked list view, but the table view was too boring).
This is a sample of customized the template of myalbum_viewcat_table.html.
line 61:
        <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>
                <br />
                <{$photo.title}>   (<{$photo.hits}>)
              </td>
              <{if $photo.count is div by $colsoftableview }>
                </tr>
                <tr>
              <{/if}>
            <{/foreach}>
          </tr>
        </table>
Votes:0 Average:0.00
Previous post - Next post | Parent - No child | Posted on 2004/8/29 9:51
ori  二等兵   Posts: 4
GIJOE & boufa hi,

Yes it works
It is really is to work with.

Thanks for all the help !!!

I love this module this is the most importent module for my site.

"Everything is easy after you know it" LOL
Votes:0 Average:0.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!