-
AuthorPosts
-
metastorm Friend
metastorm
- Join date:
- October 2012
- Posts:
- 48
- Downloads:
- 0
- Uploads:
- 8
- Thanks:
- 6
- Thanked:
- 5 times in 1 posts
January 22, 2013 at 11:13 am #184261Hello,
I have Ja SideNews module with settings “show description”. And description contain leaked title of the image in article (html code img title=”some title”). Please see screenshot, image title is marked green.
Just to make clear, there is no such text in the article text, SideNews gets it from the image tag “title”. And this is unwanted item, of course. 🙂
2. Is it possible to block in SideNews output (description) some text by class?
For example, if article starts with a <p class=”some_class”>TEXT</p> (Text=ERR at the screenshot), can I block this TEXT from being show in SideNews?Regards,
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
January 27, 2013 at 3:38 am #481217Hi,
1. I cannot reproduce such error in my end, pls post your url here and if possible, pm me admin and FTP account, I shall detect the code of this module for you
2. You need some 3rd party extension to hide specific part of content appearing in article
This thread was missed to reply and apologies for the same.
metastorm Friendmetastorm
- Join date:
- October 2012
- Posts:
- 48
- Downloads:
- 0
- Uploads:
- 8
- Thanks:
- 6
- Thanked:
- 5 times in 1 posts
January 27, 2013 at 8:05 pm #481247Hi Saguaros,
Please check PM
1. I just realized that this problem occurs when EasyImageCaption plugin is active. It’s a 3’rd party system plugin which automatically create image’s caption from “alt” or “title” tags.
Seems when SideNews module takes article content, EIC plugin executed and image in article now has a caption and this caption as part of article’s text is going to SideNews and shows in SideNews module. :((
I thought plugins are not executed this way?
Will be grateful for any advice for workaround this problem.
2. No, I don’t need to hide some text in article itself, I need to block some text in SideNews module.
For example, in JaNewsPro’s output I can block article’s text with class=”author” by adding in template.css code:
.ja-zincontent p.author {
display: none;}
I’ve tried to find out similar way for SideNews but failed. Looks like SideNews just strip all tags from article and I can’t block anything.Full example:
Article’s code:
<p class="author">NOBODY</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
I need in SideNews module after article’s Title:
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
But as for now SideNews looks like:
NOBODY Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
I’ve changed code in modulesmod_jasidenewshelper.php as in this post but old and new code are just strip all tags.
metastorm Friendmetastorm
- Join date:
- October 2012
- Posts:
- 48
- Downloads:
- 0
- Uploads:
- 8
- Thanks:
- 6
- Thanked:
- 5 times in 1 posts
January 29, 2013 at 11:01 am #481524Hi,
1. Problem solved by disabling in /modules/mod_jasidenews/helper.php code:
$item->introtext = JHtml::_(‘content.prepare’, $item->introtext);Since I don’t need any plugins to run in this module (at least I hope so), so this is acceptable workaround. 🙂
2. Problem with blocking text by class is still open.
Perhaps I need to get the right code from JaNewsPro module because there I can block what I need.Regards,
1 user says Thank You to metastorm for this useful post
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
metastorm Friendmetastorm
- Join date:
- October 2012
- Posts:
- 48
- Downloads:
- 0
- Uploads:
- 8
- Thanks:
- 6
- Thanked:
- 5 times in 1 posts
January 31, 2013 at 1:12 pm #481870Hi Saguaros,
Thanks for a tip, It works! 🙂
I’ve added <p> tag as exclusion in strip_tags function in 2 files:
file /modules/mod_jasidenews/helper.php , line 603:
return JString::substr( strip_tags($title, ‘<p>’), 0, $max );file /templates/ja_nex/html/mod_jasidenews/default.php , line 40:
<?php echo $helper->trimString( strip_tags($item->introtext, ‘<p>’), $descMaxChars); ?>And in css:
.ja-slidenews-item p.myclass {
display: none;
}Regards,
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
February 1, 2013 at 4:58 am #481942Glad it works :laugh:
And let me know if you need further help.
AuthorPostsViewing 7 posts - 1 through 7 (of 7 total)This topic contains 7 replies, has 2 voices, and was last updated by Saguaros 11 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Ja SideNews contain image title (from tag) in output
Viewing 7 posts - 1 through 7 (of 7 total)