Please provide as the user to choose the option to remove or not tags.
I read the forums, it gives a lot of inconvenience.
now function include
public static function _cleanIntrotext($introtext)
{
$introtext = str_replace('<p>', ' ', $introtext);
$introtext = str_replace('</p>', ' ', $introtext);
$introtext = strip_tags($introtext, '<a><em><strong>');
$introtext = trim($introtext);
return $introtext;
}
i want change on
$introtext = strip_tags($introtext, '<a><em><strong><img><div><span><br>');
because after all update resets
Hmm it looks like the importend part is missing (github cuted them out :) can you please told us which tags you want to filter with strip_tags?
No, I want to cancel the filter or change the filter options.
Why do you want to have img div span and br tag in there? As it is a module i think it would be a mess with the tags in there (e.g. A image one a module position in the intro text may break the layout same for div and br. For span i'm not sure i think this can be added as i can't see any issues with that.
Can you show us examples where this tags (e.g. img div and br) are useful to use in that context?
http://unik.place-testing.ru/
for print all objects on front page
if I can use my desired tags will not have problems with the layout for different devices
I agree that it is sometimes necessary to display a text, but the use of the module in this embodiment is also very convenient and does not require the invention of crutches
it would be nice to give the possibility to determine the necessary tags from the admin panel for this module
I don't really understand your request, but wonder if you can't achieve what you want with a template override or another template style (eg "none" adds nothing around the output).
The request is very simple. Whatever is stripped should be configurable at the module instead of hardcoded!
No, that is not something you can do with overrides or style. It would require a clone.
The request is very simple. Whatever is stripped should be configurable at the module instead of hardcoded!
The usage of method _cleanIntrotext(), should be moved to be inside the template / layout files and not inside the code of the Module Helper class
But before the above is done,
thus it will be reusable to more places
You probably can't just move it to the layouts because it would break existing overrides.
But you can store the raw introtext into a $item->introtextRaw before cleaning it. Then an override could use that and do its own cleaning instead.
I am looking to do the same (change the tags that are allowed in introtext). Forgive what may be a naive question, but is the comment:
"But you can store the raw introtext into a $item->introtextRaw before cleaning it. Then an override could use that and do its own cleaning instead."
a suggestion for how helper.php should be enhanced, or is there some way to do so ( store the raw introtext into a $item->introtextRaw ) as an override within a template?
You need to do that in the helper.
So second stupid question. Is there a way to override the existing helper.php or do I need to create a new module?
No, there is no way. Either copy the module or submit a PR to change the existing one.
See https://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests
thx.
Status | New | ⇒ | Discussion |
Title |
|
@webman85 Is this issue still relevant?
Otherwise @nibra will look at it
Status | Discussion | ⇒ | Information Required |
set Status on "Information Required".
If this PR get no Response, it will be closed at 23th July 2017.
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-07-23 08:33:17 |
Closed_By | ⇒ | franz-wohlkoenig |
Closed_Date | 2017-07-23 08:33:17 | ⇒ | 2017-07-23 08:33:18 |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/13253
closed as stated above.
I have read your report twice now and i have no idea what do you want or what do you mean. Can you please explain or show (e.g. screenshot) what is wrong and what do you want us to change?
Thanks