http://clkuk.tradedoubler.com/click?p=4286&a=390051&g=63955
Main Menu
Latest Articles
Popular Articles

Browsing this Thread:   1 Anonymous Users





Description field does not read html tags :S
Just popping in
Joined:
2006/3/9 0:38
Group:
Registered Users
Posts: 6
Level : 1; EXP : 47
HP : 0 / 11
MP : 2 / 625
Offline
I have installed the latest version of articles module but the description field does not read html tags. When i enter some html or editor tags (such as <table> or [img]) in the latest articles section, they are seen as if they are normal text. the codes can be read as it's written. Any solution to this problem?

Posted on: 2006/3/9 10:47
Transfer the post to other applications Transfer


Re: Description field does not read html tags :S
Webmaster
Joined:
2003/11/7 20:56
Group:
Webmasters
Registered Users
Posts: 137
Level : 10; EXP : 75
HP : 0 / 243
MP : 45 / 14613
Offline
Hmm, I've just double checked and it should show HTML...

What editor are you using? There is a chance that if you are using a WYSIWYG editor, it is converting the "less than" and "greater than" brackets into their respective HTML entities, I.E., &lt; and &gt;. If this is the case, try again with the standard XOOPS editor.

TTFN

Posted on: 2006/3/9 13:47
_________________
Andy Mills
E-mail: Open in new window
Transfer the post to other applications Transfer


Re: Description field does not read html tags :S
Just popping in
Joined:
2006/3/9 0:38
Group:
Registered Users
Posts: 6
Level : 1; EXP : 47
HP : 0 / 11
MP : 2 / 625
Offline
Unfortunately i'm already using the default xoops editor.

The interesting point is, in the full article text, all the tags are read correctly, that is i can create tables, insert pics by just writing html codes.

The description seciton does not do the same thing :S

Posted on: 2006/3/9 14:00
Transfer the post to other applications Transfer


Re: Description field does not read html tags :S
Webmaster
Joined:
2003/11/7 20:56
Group:
Webmasters
Registered Users
Posts: 137
Level : 10; EXP : 75
HP : 0 / 243
MP : 45 / 14613
Offline
Ah, hang on - I've just realised that I think you mean the description text in the latest articles block (I thought you meant in the index listing)...

This is intentional - the problem is that because the description text is usually truncated to save space, the text can be ended between an opening and end tag, for example, perhaps there is an URL; the description tag can be truncated before the closing (</a>) tag, causing the rest of the page to be turned into the link.

I've not yet found a way suitable way around this, but it is something that will be changed/addressed properly in the next version of Articles. However, you can change some code to allow you to do what you want. in blocks/articles_latest_main.php, change line 44:

$text $myts->makeTboxData4Show($myrow['art_description']);


To:

$text $myts->makeTboxData4Show($myrow['art_description'], 1,1,1,1,1);


And line 47:

$text $myts->makeTboxData4Show(substr($myrow['art_description'], 0, ($options[2] - 1))) . "...";


To:

$text $myts->makeTboxData4Show(substr($myrow['art_description'], 0, ($options[2] - 1)), 1,1,1,1,1) . "...";


This should allow HTML to be shown - but also make sure you set "Show xxx characters for article text" in the block preferences high enough so text doesn't get truncated (you could also copy the modified line 44 over line 47).

Posted on: 2006/3/9 14:47
_________________
Andy Mills
E-mail: Open in new window
Transfer the post to other applications Transfer


Re: Description field does not read html tags :S
Just popping in
Joined:
2006/3/9 0:38
Group:
Registered Users
Posts: 6
Level : 1; EXP : 47
HP : 0 / 11
MP : 2 / 625
Offline
I did both of them you mentioned but it's unfortunately still the same

One thing i should mention after modifying the article, when i press preview button, the tags are read there, but main page still does not show it.

May it be something related to my theme file?

Posted on: 2006/3/9 19:40
Transfer the post to other applications Transfer


Re: Description field does not read html tags :S
Webmaster
Joined:
2003/11/7 20:56
Group:
Webmasters
Registered Users
Posts: 137
Level : 10; EXP : 75
HP : 0 / 243
MP : 45 / 14613
Offline
Hmm, Well, at the moment I'm stumped.

In theory, the theme shouldn't make any difference.

The only thing I can think of at the moment, is if the output was cached?

I'll have a think about things...

Posted on: 2006/3/11 17:43
_________________
Andy Mills
E-mail: Open in new window
Transfer the post to other applications Transfer


Re: Description field does not read html tags :S
Just popping in
Joined:
2006/3/9 0:38
Group:
Registered Users
Posts: 6
Level : 1; EXP : 47
HP : 0 / 11
MP : 2 / 625
Offline
Well then i will also analyse a bit, i'm suspicious about a silly tag like <span lang="" or <pre style tag. thanks for your attention

Posted on: 2006/3/11 20:05
Transfer the post to other applications Transfer


Re: Description field does not read html tags :S
Just popping in
Joined:
2006/3/9 0:38
Group:
Registered Users
Posts: 6
Level : 1; EXP : 47
HP : 0 / 11
MP : 2 / 625
Offline
Well you haven't found anthing, have you? Cos it seems a very simple bug but affects a lot

Posted on: 2006/3/13 10:26
Transfer the post to other applications Transfer


Re: Description field does not read html tags :S
Webmaster
Joined:
2003/11/7 20:56
Group:
Webmasters
Registered Users
Posts: 137
Level : 10; EXP : 75
HP : 0 / 243
MP : 45 / 14613
Offline
OK, try the following articles_latest_main.php, unzip and replace it with the one in the blocks folder.

I've tested it, and it does work (at least for me)...

Posted on: 2006/3/13 16:31
_________________
Andy Mills
E-mail: Open in new window
Transfer the post to other applications Transfer


Re: Description field does not read html tags :S
Just popping in
Joined:
2006/3/9 0:38
Group:
Registered Users
Posts: 6
Level : 1; EXP : 47
HP : 0 / 11
MP : 2 / 625
Offline
Well it worked fine thank you so much

Posted on: 2006/3/14 22:10
Transfer the post to other applications Transfer






You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]


Login
Username:

Password:

Remember me



Lost Password?

Register now!
Donate!
Please consider donating to help continued development of my XOOPs modules. Read more here.

Search
Advertisements
Copyright © 2001-2009 sirium.net