Author Topic: [1.7.2] space between Categories and subcategories  (Read 10343 times)

0 Members and 1 Guest are viewing this topic.

Offline fitterashes

  • Newbie
  • *
  • Posts: 30
    • View Profile
[1.7.2] space between Categories and subcategories
« on: March 03, 2006, 03:57:18 AM »
I just installed 1.7.2, it went fine but with this new version there is a space between "categories" and "subcategories" if there isn't any description (see screenshot).
Any idea to fix that ?

Thanks

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: [1.7.2] space between Categories and subcategories
« Reply #1 on: March 11, 2006, 10:03:15 AM »
check your category_bit.html in templates folder.

Code: [Select]
{if cat_description}<span class="smalltext">{cat_description}</span><br />{endif cat_description}
{if sub_cats}{sub_cats}{endif sub_cats}

remove the
Code: [Select]
<br />
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline yerpo

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: [1.7.2] space between Categories and subcategories
« Reply #2 on: March 11, 2006, 04:03:43 PM »
Nope, I have the same problem after upgrading and I didn't touch any files inside my templates folder (there wasn't a <br /> at the end).

Any ideas?
« Last Edit: March 11, 2006, 04:55:31 PM by yerpo »

Offline Dragosius

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • ePfirsich.de
Re: [1.7.2] space between Categories and subcategories
« Reply #3 on: March 22, 2006, 03:36:11 PM »
I have the same problem.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [1.7.2] space between Categories and subcategories
« Reply #4 on: March 22, 2006, 03:44:08 PM »
Works fine on my test gallery. I cant reproduce it...
@fitterashes: what if you add some description in the parent category?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Dragosius

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • ePfirsich.de
Re: [1.7.2] space between Categories and subcategories
« Reply #5 on: March 22, 2006, 03:51:09 PM »
I have in not categorie a description.




-------------------------------


<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top">
     <img src="./templates/default/images/folder.gif" width="20" height="13" alt="" />
      <!--   -->
    </td>
    <td>
     <a href="./categories.php?cat_id=1" class="maincat"> CATEGORIE </a>&nbsp;(1336)
      <sup class="new">neu</sup>   </td>

  </tr>
</table>
<span class="smalltext">  </span><br /><a href="./categories.php?cat_id=5" class="subcat">SUBCATEGORIE</a>, ...



In the version 1.7 this became red does not pretend at all indicated if no description exists. Here, however, already. In it probably lies problem. So, is also <br/> too much.



Hier nochmal in deutsch, falls durch den Übersetzer der Sinn verloren gegangen ist:

In der Version 1.7 wurde das rot markiere gar nicht angezeigt, wenn keine Beschreibung vorhanden ist.
Hier aber schon.
Daran liegt wohl das problem.
Deswegen ist auch ein <br /> zuviel.
« Last Edit: March 22, 2006, 04:28:40 PM by Dragonman »

Offline Dragosius

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • ePfirsich.de
Re: [1.7.2] space between Categories and subcategories
« Reply #6 on: March 22, 2006, 08:56:23 PM »
I have found it:

File / Datei
includes/functions.php:


Search / Suche:

      "cat_description" => format_text($cat_cache[$category_id]['cat_description'], 1),


Substitute by / Ersetze durch:

      "cat_description" => $cat_cache[$category_id]['cat_description'],


Then the announcement is right. / Dann ist die Anzeige richtig.


I hope the Coder still answer says to me whether this is bad if this was changed thus. / Ich hoffe der Coder sagt mir noch Bescheid, ob das Schlimm ist, wenn das so abgeändert wurde.

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: [1.7.2] space between Categories and subcategories
« Reply #7 on: March 22, 2006, 10:47:57 PM »
den code derart zu ändern ist keine gute lösung,
da entsprechende texte/eingaben dann nicht mehr entsprechend formatiert werden.

lieber die templates selbst bearbeiten,
dass die anzeige bei leer stehender kategorie beschreibung nicht angezeigt wird.
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline Dragosius

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • ePfirsich.de
Re: [1.7.2] space between Categories and subcategories
« Reply #8 on: March 23, 2006, 08:05:13 AM »
Das Template ist aber richtig.

Es wird nur immer das hier angezeigt: {if cat_description}<span class="smalltext">{cat_description}</span><br />{endif cat_description}

Auch wenn keine Kategoriebeschreibung drin ist.
Also muss doch wohl irgendwo etwas falsch sein, sonst würde der Inhalt von der IF-Schleife ja nicht immer angezeigt werden. (Deswegen ist auch immer das <nr /> zuviel.

Wenn mir jemand ne bessere Lösung wäre, wäre ich sehr froh darüber. :D

Offline yerpo

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: [1.7.2] space between Categories and subcategories
« Reply #9 on: March 23, 2006, 09:01:22 AM »
The most elegant solution is to remove the <br /> from

Code: [Select]
{if cat_description}<span class="smalltext">{cat_description}</span><br />{endif cat_description}
and add it at the end of your category description. That way the subcategories don't follow in the same line as the description and there is no blank space between the two.

Offline Dragosius

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • ePfirsich.de
Re: [1.7.2] space between Categories and subcategories
« Reply #10 on: March 23, 2006, 09:08:04 AM »
Sorry,
aber jetzt habe ich nicht ganz kapiert, was ich jetzt machen soll.

--------------------------------------

Sorry,
but now I have not got completely what I should do now.

Offline yerpo

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: [1.7.2] space between Categories and subcategories
« Reply #11 on: March 23, 2006, 11:31:09 AM »
In templates/(your template)/category_bit.html remove the <br /> from the above line. Then go edit your categories in the Control panel and add the BR tag at the end of each description you have (if you don't use category descriptions just skip this).

Offline Dragosius

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • ePfirsich.de
Re: [1.7.2] space between Categories and subcategories
« Reply #12 on: March 23, 2006, 05:49:17 PM »
ah, good idea.

thx :D