PhocaCz / PhocaGalleryContentPlugin

Phoca Gallery Content Plugin is Joomla! CMS extension. Plugin which displays images of Phoca Gallery component in article.
http://www.phoca.cz/phocagallery-plugin
Other
2 stars 1 forks source link

Smart Search results not stripping Phoca shortcodes #4

Open Destroy666x opened 5 months ago

Destroy666x commented 5 months ago

Apparently it's responsibility of plugins to strip their own shortcodes as there's no API for that. So removing {phocagallery ...} could be added.

See https://joomla.stackexchange.com/questions/33803/how-to-remove-shortcodes-from-smart-search-article-text-results/33804?noredirect=1#comment41551_33804 for reference.

PhocaCz commented 4 months ago

Hi, can you be more specific?

Destroy666x commented 4 months ago

Sure, but about what exactly?

PhocaCz commented 4 months ago

I don't understand what do you exactly mean? Do you mean to add the protection against indexing in smart search?

Jan

Destroy666x commented 4 months ago

Or against showing it in the results. See the answer in the linked question.

PhocaCz commented 4 months ago

The answer does not include any info what to do directly in the plugin but in components/com_finder/tmpl/search/default_result.php

Usually, content plugins use the following protection:

if ($context == 'com_finder.indexer') {
            return true;
        }

to prevents from indexing the plugin content in smart search. Such condition is included in Phoca Gallery plugin. Which Phoca Gallery plugin version do you use?

Phoca Gallery plugin is a content plugin which renders in content or in parts with "oncontentprepare...". I cannot imagine, the plugin itself can somehow manage e.g. hundreds of possible instances where it should not be displayed. As content plugin is is fully managed by com_content or Joomla "oncontentprepare..." rules. :idea:

Destroy666x commented 4 months ago

I am using the latest version for Joomla 4. So 4.5.4.