In my custom component, I am using the following code to bring the Media Manager popup:
JToolBarHelper::media_manager('directory', 'Upload');
"directory" obviously sets the default directory that will appear when the button is clicked, which it does, but when I go to upload an image, it uploads to the standard "images" folder rather than images/directory.
I have looked around Google and the majority of pages say that it was a bug in Joomla 1.5 which I assume was fixed in Joomla 2.5. Is there another way to get the default directory working?
media_manager invokes with folder= and the directory you passed. But it expects the path below your images folder.
So if your folder is
/images/uploaddir
you would invoke it with
JToolBarHelper::media_manager('uploaddir', 'Upload');
Related
i'm using odoo 11 and i have installed open HRMS core which install a specific theme. After that i have installed another module which named overtime (bt_hr_overtime_automatic) to satisfy my needs but the problem is in the menu of the apps the new module doesn't has a icon and i want to add one(Ps: the module has a picture named "icon.png" in the folder /static/description/). Any idea on how to do that ?
You must use "web_icon" in your menu to show your own icon. Save your icon in a directory. Size can be 256x256 File format should be .ico
Don't forget to upgrade your module after adding this code. Sometimes cache will show the old icon, if so try this in incognito mode or clear the cache
web_icon="your_module_name,static/description/icon.ico".
Example Code:
<menuitem name="Overtime" id="your_menu_id" action="your_action_id" web_icon="your_module_name,static/description/icon.ico"/>
Front End:
If you want to add it in front end Go to
Settings-->Technical Settings-->Menu Item-->Your Menu-->Web Icon File Please refer screen shot
First: create static folder inside your module directory .
Second: create description folder inside static folder.
Third: Make sure that your icon image is in png format .. like : icon.png .. and put it in static/description/
Finally: Restart Odoo Server and refresh your browser .
i tried it with odoo12 and it works
I get the message "directory not writable" when trying to upload images into a normal cms page.
I have seen this before so I created a wysiwyg folder inside the media folder and chmod it to 777.
The images now upload but they dont appear in the wysiwyg folder on the backend. So I cant pick any images to inset into a page.
I tried copying the js folder from the original install folder, and it still doesn't work.
Any ideas?
Thanks
Check whether there is a folder named wysiwyg in media folder.
If no, then create /media/wysiwyg folder in magento installation folder and chmod 777.
If the problem still persists, then open the site in Firefox browser and activate firebug while opening the site.
Click on console and reload the page.
Now try to upload image. If there is some js error in console of browser, then download same version of magento you have, and replace the js folder from the download into your Magento installation and come back to minification later on.
Note: create a backup of your current js folder, just in case. Delete it once you have confirmed the fix works.
I would like to change the image of the "Check out now" button in the cart view of VirtueMart. I know the image is located at joomla_root/components/com_virtuemart/assets/images/vmgeneral/backgrounds.png and that I could change it there.
But I fear that this change will be reverted once I update VirtueMart somewhen. I heared about overrides in Joomla, but I found no description how to use them for images.
Edit
The image seems to be used multiple times for different buttons. I want to change them all, so that's no problem - but I would like to avoid overriding every single file using this image.
The css-file for these buttons is located at components/com_virtuemart/assets/css/vmsite-ltr.css. Maybe it would be the best solution to override this file? This should change every button. But where do I have to locate the new css-file and the new image?
In each template there is a "template" override folder... Usually at:
/templates/yourtemplate/html/
You can simply add another folder inside it for the component you wish to work on like so:
/templates/template_name/html/com_component/view_name/view_file.php
You have to figure out which view in virtumart uses your background image... then find the php file in that view and copy the file entirely to the path where you created for you override
Basically the file at
/templates/template/html/com_virtumart/view_name/view_file.php
Will override the one in the normal place like:
/components/com_virtuemart/views/view/tmpl/whereve.php
So when you update virtumart and it overrites the normal install path... your override file won't be touched!
Hope that helps
MORE SPECIFICALLY SOMETHING LIKE:
yoursite.com/templates/your_template/html/com_virtuemart/productdetails/default.php
I know how to add system images to the /media folder, but is there a way to have a folder and files added into the /images folder (i.e. the place where Media Manager expects to find files?
Take a look at the Joomla Component Creator. http://www.notwebdesign.com/joomla-component-creator/
You can add a field of the type "media" that will show the whole media manager and allow you to upload to it and insert it into the item you are editing.
Alternatively you can add it manually. Here is the documentation:
http://docs.joomla.org/Media_form_field_type
Joomla 1.5.22 new installation, no extensions added. I've only configured the Global Configuration pages. For some reason, I can't upload any pictures, either in articles or in the media manager. "Start Upload" does nothing, it just sits there.
The only thing I could find on this was a folder permissions issue and and so I set Images and all sub-folders to 777, but that still didn't help.
Any thoughts on what could be causing this and how to get it to allow for pictures to be uploaded?
First off change your folder settings back from 777 to something more secure (664 or 775). Then Prakash could be correct in that the flash uploader is not working on your system and you can disable it and use the normal file view uploader. Try that and let us know.
On global configuration, in media settings you've enabled the flash uploader which disallows to upload the files for some reason. Disable it, now you'll be allowed to upload files again