4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: fitterashes on March 03, 2006, 03:57:18 AM

Title: [1.7.2] space between Categories and subcategories
Post by: fitterashes 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
Title: Re: [1.7.2] space between Categories and subcategories
Post by: IcEcReaM 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 />
Title: Re: [1.7.2] space between Categories and subcategories
Post by: yerpo 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?
Title: Re: [1.7.2] space between Categories and subcategories
Post by: Dragosius on March 22, 2006, 03:36:11 PM
I have the same problem.
Title: Re: [1.7.2] space between Categories and subcategories
Post by: V@no 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?
Title: Re: [1.7.2] space between Categories and subcategories
Post by: Dragosius 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.
Title: Re: [1.7.2] space between Categories and subcategories
Post by: Dragosius 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.
Title: Re: [1.7.2] space between Categories and subcategories
Post by: IcEcReaM 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.
Title: Re: [1.7.2] space between Categories and subcategories
Post by: Dragosius 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
Title: Re: [1.7.2] space between Categories and subcategories
Post by: yerpo 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.
Title: Re: [1.7.2] space between Categories and subcategories
Post by: Dragosius 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.
Title: Re: [1.7.2] space between Categories and subcategories
Post by: yerpo 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).
Title: Re: [1.7.2] space between Categories and subcategories
Post by: Dragosius on March 23, 2006, 05:49:17 PM
ah, good idea.

thx :D