5

Your plugin appears to be written for a very old version of Joomla! The event in current versions is onContentBeforeSave. You are also missing $context argument. It's a good idea to check for context to make sure that you're modifying the correct content type (e.g. article). public function onContentBeforeSave($context, $article, $isNew) { if ($context !...


4

To edit entire HTML output directly, create a system plugin with onAfterRender event. Use application's getBody() method to get the content and setBody() to save the modified content. defined('_JEXEC') or die; plgSystemExample { protected $app; public function onAfterRender() { if ($this->app->getDocument()->type !== 'html') ...


3

If you look at the page source of your site are the meta tags showing correctly? Assuming that they are, then my answer is as follows. Google will often provide its own metadescriptions, often different ones depending on the search and the searcher. It will use the one you provide if it is unique enough and relevant enough and is suitable for the search ...


3

Here is my first plugin: <?php /** * Plugin class for update the Cloudflare Cache after save a article */ class plgContentBk_onsave extends JPlugin { public function onContentAfterSave ($context, $article, $isNew) { // I have saved the URL in a custom field by the article to protect against duplicate content. // I use this field for &...


3

As far as I can remember since I haven't tested this recently, you don't need to clear CloudFlare's cache in order to display update's of article's with CloudFlare. CloudFlare will only cache static assets like css, js. In any case, there are ready made plugins that do the job. One I can recommend is the RegularLabs Cache Cleaner: https://www.regularlabs....


2

I found the file I needed to create an override of and edited the neccesary files accordingly. Thats what I did: In file /html/mod_articles_news_adv/_item.php <figure class="item_img img-intro img-intro__<?php echo htmlspecialchars($imgfloat); ?>"> <?php if (isset($urls) && (!empty($urls->urla) )) : $articleLinkAUrl = $...


2

I don't see set() in the JTable docs. You also need to remember to re-encode the full column value before storing. The following is an untested snippet. $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select(db->qn("item_id")) ->from($db->qn("#__fields_values")); // build all of the non-changing clauses for ...


2

$this->app->enqueueMessage($message, $type); Where $message is the message string and $type is an optional type (message, warning, error or notice; defaults to message).


2

With Joomla core you need to setup a menu structure that will correspond to what you want to achieve with your URLs. Menus are important in Joomla. From the example of the URLs in your question - it seems like you have created a menu item for the article1. If you want all articles of that category (cat1) to be reachable under the cat1/article1,art2,art3 ...


2

You would want to put this as a template override for com_content. Depending on whether you want it to appear on the category page or single article, the file would go /templates/TEMPLATE_NAME/html/com_content/category/blog_item.php /templates/TEMPLATE_NAME/html/com_content/article/default.php I would make a clone of existing view and then add code below ...


1

Although I followed various other articles on the internet that suggested various good fixes mine was caused by something different. I include the other articles for completeness. My Solution: I had 1 template set to the default template, but I had assigned another template to all pages which caused me this problem. I think my situation was unusual so ...


1

It's a bit unclear what's your exact goal and how you are going to use whatever possible answer you are going to get. Will you have all previous SEF URLs changed? Will you do a search and replace inside the database for all old links of the content? And how you could combine a possible API usage with the database operations. I think the whole task needs a ...


1

I'm end up with Quick Index of RegularLabs. It also has the Auto Index feature which auto generate the index for all selected articles.


1

The default Joomla code doing the call to display the icons can be found in .../components/com_content/views/article/tmpl/default.php starting at line 68. At Line 70 this calls a layout routine to process which options are set(edit,print,email) and write the html to display the icons. You can find the the layout code in.../layouts/joomla/content/icons.php ...


1

The menu item options are configured using xml files in the front-end views of your components. Could you compare the configuration file for the "Category Blog" view with one from a working website? /components/com_content/views/category/tmpl/blog.xml It should have a useglobal="true" parameter for all the fields that have the "Use Global" option. Does ...


1

To get menu items assigned to specific article, where $articleId is the article ID: $assignedItems = array(); // Get all Articles component menu items. $menuItems = JFactory::getApplication()->getMenu('site')->getItems('component', 'com_content'); foreach ($menuItems as $menuItem) { // Check that menu item is for article view and that IDs match. ...


1

It looks like there is a plugin in your site that provides short-codes, which can be used inside the content to help produce specific mark-up on the output. In this specific case and after inspecting the live webpage, it seems like the whole page content has been divided in 3 "columns" using something like: [fluid] [columns add_margins=true css="z-index:...


1

Okay, I'll explain by using a fictitious value. You will need to reference the #__users table and the #__fields_values table. Assuming you are only dealing with logged in users, you will need to acquire the user's id via JFactory::getUser()->id. Then you will need to know the field_id that the gender value is stored with in the #__fields_values table. ...


1

I've resolved this by doing the following for the sort order: // Sort Price ASC - Featured First elseif($sortopt == 'priceascfeatured') { array_multisort($sort['featured'], SORT_NUMERIC, SORT_DESC, $sort['product_price'], SORT_NUMERIC, SORT_ASC,$products); } // Sort Price DESC - Featured First elseif($sortopt == '...


1

What I actually ended up doing was installing JCE MediaBox and turning all of my images in to modal image popup links. To be clearer what I was doing was adding a lesson on using a forum with example screenshots, unfortunately I took the screenshots on the desk top version of the website so on mobile devices the text in the images was too small to read ...


1

If the images are tiny on mobile, then an alternative (and possibly) better solution is to use CSS media queries. For example, you can have the following CSS rule that gets triggered when the width of the screen is 360px and up: @media screen and (min-width: 360px) { .image-class{width: 300px; height: auto;} } You should then add additional rules for ...


Only top voted, non community-wiki answers of a minimum length are eligible