View Full Version : html in description field
subseo
12-13-2005, 06:52 PM
Perhas not bug but just minor inconsistency. I tested adding html (link code) to description field.
It doesn't work for categories page (it will display the html code in plain text on the category page), but it works for the detailed entry page where the link shows correctly.
echopulse
12-13-2005, 08:57 PM
I noticed that the other day when I was trying to add some space between my categories on the main page. My descriptions show on the main page.
Simon Gooffin
12-14-2005, 10:44 AM
can you please send me screenshots or link?
subseo
12-14-2005, 10:59 AM
URL sent via email. It's just a temporary testing directory so I have chosen not to post here so there are no non-working links later on.
Simon Gooffin
12-14-2005, 11:23 AM
well, I compared two pages.. In first one you use text_to_html custom function. it converts all html tags to words and allows to use own codes. Here is the code from your link-display.tpl file.
<div class="description">{text_to_html aText=$link.description aParagraph=true}</div>
to make your pages similar you should make the following changes:
<tr>
<td colspan="2">{text_to_html aText=$link.description aParagraph=true}</td>
in your view-link.tpl file
subseo
12-14-2005, 11:28 AM
well, I compared two pages.. In first one you use text_to_html custom function.
Not me - it's the default eThird template coming with default install. I don't remember making any changes to it.
Anyway, thanks for coming with the solution. It's making it into my folder of tips and tricks for esyndicat :).
Simon Gooffin
12-14-2005, 11:34 AM
:oops: it's a real bug. I checked zip file and I do these tpl files differs. I will fix it by default in the future version
you are welcome
echopulse
12-14-2005, 03:04 PM
You guys are talking about link description fields, right? I would like to know how to get html in category description fields to work. Can I do it?
subseo
12-14-2005, 03:39 PM
Most probably yes, with the text_to_html function as Simon outlined above. If you will need any help I can look at it tomorrow, unless someone else will be quicker.
subseo
12-14-2005, 03:46 PM
I couldn't resist to procrastinate from my current work at least for a moment. Comes untested however:
in the index.tpl file change
{if $category.description}
<div class="box" style="border: none;">{$category.description}</div>
{/if}
into
{if $category.description}
<div class="box" style="border: none;">{text_to_html aText=$category.description}</div>
{/if}
or maybe even
{if $category.description}
<div class="box" style="border: none;">{text_to_html aText=$category.description aParagraph=true}</div>
{/if}
Simon Gooffin
12-14-2005, 06:09 PM
well, here I am.. If you do not want to use special codes like underlined, bold and italic text then you should not use text_to_html function. Just use description as it is. In case you do not want to have html code, and use special tags instead of it you should use text_to_html function. You can see examples above
echopulse
12-14-2005, 08:12 PM
If this is fixed in update, I will close this topic. :)
Simon Gooffin
12-15-2005, 07:03 AM
If this is fixed in update, I will close this topic. :)
sure, Mr. Moderator ;)
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.