1
nmshah
How to enable html tags in Publisher Module blocks
  • 2010/12/14 20:45

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


What ever blocks I use in Publisher module stirps the html tags from the item summary.

Is there a way to display the item summary in the blocks and on the index page of the module without stripping the html tags?

Kindly Suggest...

2
nmshah
Re: How to enable html tags in Publisher Module blocks
  • 2011/1/3 6:00

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


Finally found a way to display articles in block without stripping the html.

Changes made to allow html in blocks for Publisher 1 (rev 219)

File modules/publisher/class/item.php (around line 257) right after
foreach ($wrap_pages as $page) {
                
$wrap_page_content $this->wrappage($page);
                
$ret str_replace("[pagewrap={$page}]"$wrap_page_content$ret);
            }
        }



Just delete the following lines

if (!empty($stripTags)) {
            
$myts =& MyTextSanitizer::getInstance();
            
$ret strip_tags($ret$stripTags);
        }


Be careful before deleting these lines as i am not sure of this is completely safe or not.

Kindly let me know if these changes will have any negative effects?

3
RiazShahid
Re: How to enable html tags in Publisher Module blocks

Dear nmshah! thanks for the support here,
Did the same as instructed above, I didn't noticed any change yet, there is no betterment in formatting (I might look into deeply and if some thing noticeable, will share with you).
Actually the problem is that "Block Summary" field does not have any formatting option at all, it does not support any editor. The work of editor relates to "Articles Body", but has nothing to do in "Block Summary" And on the index page of the module it shows summary, so there is no formatting possible at all.
If we use copy paste option, like from MS Word, all the formatting goes off, even if HTML code is copy pasted, it still has no impact.

4
nmshah
Re: How to enable html tags in Publisher Module blocks
  • 2012/2/16 3:11

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


If you do not use the "Block Summary" field while adding the article, then publisher automatically displays the first few words from the article body as summary.

The above changes should work if you are not using the block summary field and the summary on the index page is created automatically from the article body.

5
RiazShahid
Re: How to enable html tags in Publisher Module blocks

Yes, I checked it, but its totally different than what I wanted. I want to format the text in "Block Summary"
What is the impact of deleting above code? Its if you dont put any thing in "Block Summary" then the whole article will appear on "Block Summary" which is no way feasible to show at all.

6
nmshah
Re: How to enable html tags in Publisher Module blocks
  • 2012/2/16 17:55

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


There is some place in the module code where you can specify the number of characters to show in the automatic summary created from the article body. You can check the demo on my website: http://swayamsat.org/modules/blog

The summary on this page is created automatically and the formatting is same as the actual article.

7
RiazShahid
Re: How to enable html tags in Publisher Module blocks

Thanks for your reply, I have no issue of number of characters. I just want the formatting of the summary.
Can you please inform what is that code, to format the summary as the actual article?

8
nmshah
Re: How to enable html tags in Publisher Module blocks
  • 2012/2/17 13:20

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


its the same code as above, that worked for me.
If you want I can post a link to the publisher module which I am using post modification

9
RiazShahid
Re: How to enable html tags in Publisher Module blocks

OK, give the link and let me try it works for me or not

10
nmshah
Re: How to enable html tags in Publisher Module blocks
  • 2012/2/20 15:04

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


You can download it from here
http://swayamsat.org/publisher.zip

Login

Who's Online

317 user(s) are online (263 user(s) are browsing Support Forums)


Members: 0


Guests: 317


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits