Hot answers tagged

6

When you choose a CMS, you are usually best picking the one which has the most features you need out-of-the-box. The rest you will have to build for yourself (unless an extension does exactly what you need, which is unlikely, or you are happy settling for second best). This requires knowing PHP in the case of Joomla (and, indeed, most open source ones). ...


5

Look at https://gist.github.com/leFlea-snippets/4602845 PHP: Joomla - Get active template path // Get active template path from anywhere on Joomla: $app = JFactory::getApplication(); $path = JURI::base(true).'/templates/'.$app->getTemplate().'/';


4

An alternative way to do this is to apply the margins via a suitable CSS selector in a custom CSS file. You can limit the styling to a single page if you want by using a page class and including this in your CSS selector. For example, if you added a page class of "my-page", your CSS might look something like this: .my-page img {margin: 20px;} although ...


4

You have to use a more specific CSS selector in order to target only the main image, and not all images added to an article. The main article image (added through the "Images and links" tab in the article editor) are usually displayed within a <div class="item-image">, so you can simply change your CSS to target this image only: .item-image img { ...


4

You have either some files corrupted on update, or some outdated server software. Overwrite your web-site with Joomla 3.6.0 full package to be sure it's no a file corruption (extract the Joomla full package and upload everything except installation folder using overwrite). If this doesn't help, enable development error level and check the link. You'll see ...


4

I recently encountered this XMLHttpRequest error myself. The root of the problem caused 3 different issues. SOLUTION: In my case, the problem was caused by an incorrect setting for the public $live_site variable in the configuration.php file (which is located in the Joomla root folder). The website was https://website.com but I had set the public $...


4

When developing, error reporting should be enabled. You'll see this: Notice: Undefined property: Joomla\CMS\Table\Content::$item Access the images like this: $images = $article->images;


3

Basically, you could use an installer script, and create/copy the files after installation. The problem is that AFAIK templates does not trigger the script. I suggest you create a package, and then include your template there, because the package installer should call the installer script. Then create your postflight script by adding this to your XML file: ...


3

Thought I'd give my 2 cents on this. I'm sure there are other ways, but this is the one I came up with and tested. So, using a system plugin and JS, you can set a value for the full article image input. Here is the code I've written: class plgSystemMyPlugin extends JPlugin { public function onBeforeCompileHead() { $app = JFactory::...


3

Normally you won't find good answers that are specific to the template you use. All templates are different. I visited your page and in your case you have this in your template CSS (line 3891 in http://elitemaths.com.au/templates/elitemaths/local/css/themes/elitemaths/template.css): .article-intro img, .article-content img, .article-image-full img { ...


2

The answer depends on your requirements for the best image. It can the smallest image possible for a device You can deliver different images for each device You can show the biggest image possible to match social networks sharing requirements: References: Right-sizing Images - Mixing Responsive and Adaptive Techniques https://www.youtube.com/watch?v=...


2

There is no general rule for Joomla! It depends on the width of the position you are putting the image in. Which depends on the template used and the layout the site uses. For example the width of the position on your example seems to be 586px. But the position right of it (drm-free) is 266px. Easiest way to find the correct sizes is to use Firebug or some ...


2

go in an set the full path to the background images, this is a pain but it will fix your issue. When you include a page, sometimes the css path is not translate right,(relative url) right eg: /images/image.jpg <--- doesn't work eg: http://www.somesite.com/images/image.jpg <---- will always work


2

First of all, you might want to remove the following line from your code: <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.0.min.js"></script> Joomla 3 includes jQuery, so you probably won't need it. Loading jQuery twice is like asking about trouble... There are many plugins available at the Joomla! Extensions Directory ...


2

The file you want to edit is located here: ROOT/templates/YOUR_TEMPLATE/index.php If You're using a template based on a framework such as one from Rockettheme or Yootheme, the file may be different. I would suggest however that you don't edit the template file, and instead create a small plugin to implement your code.


2

You can maybe "cosider" some users dont have the image In this ratio. You can use JCE editor with plugin image manager extended to possibility user crop his image in this ratio. https://www.joomlacontenteditor.net/component/zoo/item/image-manager-extended-4


2

If your sites are on Apache web server, you can share images folder from one site to the other, by creating symbolic links. With this technique I successfully created common images folder, which is shared by three Joomla sites on the same hosting server, without any problem. I have used instructions from the following URL How to create a symbolic link in ...


2

The current version of TinyMCE (v4.4.3) now seems to have this option enabled (see below).


2

Sure there is an easier way of doing what you need, and also any other batch change in article... I've been doing it for ages... But for that you have to use editor more suitable for programmers than writers. That editor is RocketTheme RokPad. Once you install it and set it as default editor (you can also use Editor Switcher if you want to switch ...


2

This might not be the exact answer you are looking for, but if it is for a full website you are developing and not only for a template that you want to distribute, then the following ideas could work well. Generally, what Johanpw suggests is the quickest solution and can be applied easily. Personally, I would likely have combined things from all the other ...


2

Knowing a tiny bit about the joomla request-reponse lifecycle will help here. Joomla runs in the following order: 1. bootstrap the application 2. router 3. component (including your own layout overrides) 4. modules 5. template Various objects like the jsession and jinput allow you to get and set variables during the lifecyle so if you just set the html of ...


2

Update I had the issue again today, renaming the htaccess only without disabling Admin Tools and then updating worked for me. So it seems to have to do with the rules, set in the htaccess by Admin Tools. Initially given answer: For the update error "Ajax Loading Error: forbidden" try: 1) Disabling Admin Tools (if installed / component + system plugin) 2)...


2

Two possibilities I can think of: Installing the extension has changed the base tag. View the source and make sure this is still pointing to the site root, so that relative links to images/ are still correct. The extension contained multiple elements - plugins, componenents etc, and you have not uninstalled all of them. Do an audit of your extensions and ...


2

I don't agree. I never use the same image as intro- and full-text image. If you want to do that, it's very simple to copy/paste from intro- to full-text image, when have picked the into. And if you really wan't not to do that, you can make a very simple override in /html/layouts/joomla/content/intro_image.php - just change image_ with image_fulltext


2

The issue with the answer given in that other question is that it requires edits to Joomla core files so site updates eventually will undo your changes. That'll create a maintenance issue for you (ie, you'd need to check all those edited files after every Joomla update and re-apply the changes if they were un-done). If you always need the entire caption in ...


2

I would suggest using Joomla custom fields instead. The media field should work: https://docs.joomla.org/J3.x:Adding_custom_fields/Media_Field


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 ...


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 ...


1

Some ideas: Use the nth or :first selector in css, so only the first image in that area is 100% Add new style/styles they can select via the WYWIWYG using the editor.css file in your template - they can then choose what width an image should be by using this. Use the Full Article Image for your top image, and apply a style that only applies to that area. ...


1

So, I actually solved it. It was something pretty basic in that I was getting too many redirect loops. I added the line "RewriteCond %{HTTPS} !=on" right before my last rewrite rule. That way it wouldn't "re-process" an HTTPS get request. A bit obvious an staring me in the nose earlier... but hey, everything seems to be working now. I am not sure if this is ...


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