Add new image field to Joomla 2.5 com_content - joomla2.5

I want to add new field for uploading file to com_content component for back-end in joomla 2.5.2. What would be the process for that for db related changes and files related changes? I have tried to generate a field with help of this 'echo $this->item->addfile; but it's not displaying any title or textbox or anything Please explain....
Thanks...

You should avoid hacking the core like this. Doing so will cause issues when it is time to update your Joomla install. Any changes you make in the core will likely be overwritten in the update process.
Rather than hacking the core, there are several content construction kit type extensions that are a replacement for com_content. Zoo, K2, and Seblod support content item images out of the box and there are quite a few others that can probably do it with a little tinkering.
http://extensions.joomla.org/extensions/authoring-a-content/content-construction

Related

Sitecore add here button not showing the Add rendering dialog

All of a sudden the Add here button in experience editor to add a rendering is not working. When clicked nothing happens. Do you have any idea where can I start look into? I already tried to remove the custom styles and scripts in my Editing theme. Sitecore version is 9 update 2 and SXA is 1.7
You have started from the right thing. Please make sure that you have the valid base themes defined in the Media Library: /sitecore/Media Library/Base Themes, especially, the Editing Theme with the logic used to edit components in Experience Editor.
Another idea is to check the order in which the layers load in Sitecore. The default order is defined in Website/App_Config/layers.config, make sure that SXA configuration loads last in the Modules layer, so that all custom modules are processed ahead of the SXA. It is recommended to create a custom patch file instead of modifying the standard configuration.
Hope this helps.
Did you check the console?
Maybe you have some error caused by some new custom script and that's preventing the add button to work
We had this issue for a specific set of placeholders, fortunately affecting only a single project in our solution. To fix the behavior, we had to manually set "editable" to false -> save item and then back to true -> save item for every affected placeholder.
[EDIT]
We finally found the culprit, it was related to a Sitecore bug documented here: https://kb.sitecore.net/articles/706490
Setting the value for Query.MaxSize from 100 to 400 permanently fixed the issue

Custom MVC Views in WFFM

I am in the process of fitting Sitecore Web Forms for Marketers to a solution. For that to work I need 3 things:
The ability to inject JavaScript from a rul
Rewriting all generated code to use Foundation (instead of Bootstrap)
Be able to read the submittet data of a "changed" form. Ie. a form where there is injected extra field through JavaScript.
My initial questions for this is to the second point: How do I write these views?
I have followed this article: http://www.hhogdev.com/blog/2015/september/customizing%20wffm%20in%20sitecore%208.aspx but unfortunately He does not elaborate on how to generate proper names/ids for fields and the form.
Can anybody point me in the right direction for that?
The blog post you linked to was written based on Sitecore 8.0, and although the module is the same the implementation of WFFM has since changed (unfortunately for the worse IMO).
We are currently using WFFM with Foundation, so it is possible to have them both working together but there are a few things you have to do.
I config disable Bootstrap CSS, this will mean Bootstrap markup but without the CSS files being included. I suggest you style around the given settings as much as possible to save future upgrade issues:
<settings>
<setting name="WFM.EnableBootstrapCssRendering">
<patch:attribute name="value">false</patch:attribute>
</setting>
</settings>
If you need to edit the markup then the default views for the form field markup files can be found under: Website\Views\Form and the EditorTemplates folder under that. Here's the kicker. In versions earlier than 8.0 update-5 the markup did not use the Bootstrap helper and therefore the markup was all present. The latest implementation hides this all away and therefore harder to edit in my opinion.
If you struggle with the Bootstrap markup then take a look at the view files from WFFM 8.0 update-5 or earlier. The markup is much more obvious and you should be able to (essentially) port these over to Sitecore 8.1 and then amend the markup as required (although we have found added the correct surrounding foundation DIV's were enough)
I have no idea what you mean by point 1, but for point 3, you can't. WFFM only works on the fields that you create on the back end, any new fields you create with JS will get lost. If you need to do something clever then use a hidden field (this requires adding a custom field type unfortunately) and then populate this hidden field with the data that you need passed back to the server.

django-tinymce modern theme

I'm having issues getting the modern theme to work with django-tinymce. Both the simple and the advanced themes render correctly, but when I switch to the modern theme nothing renders and I get a 404 error for /static/tiny_mce/themes/modern/editor_template.js in the console
I am attempting to do all of this in the django admin. The error is coming from /static/tiny_mce/tiny_mce.js which is interesting because I don't have anything installed in that directory. I'm using /static/js/tinymce as my TINYMCE_JS_ROOT in settings.py. When switching between simple and advanced theme, everything works correctly.
I've tried to copy a version of editor_template.js in the exact location it's looking, but I still get the 404. It's like it wipes out /static/tiny_mce if it exists and replaces it with something, but I can't figure out how/where it's getting that from.
I'm using an install of TinyMCE 4.1.3 from http://www.tinymce.com/download/download.php and django 1.6.5
I've been struggling with TinyMCE recently, as well. I'm using TinyMCE v4 and Django 1.6. I went down the django-tinymce/django-flatpages-tinymce route because I had these working on another project. Some how it wasn't working for this new project. I did some research and decided to just go straight TinyMCE, no Django applications (eg, no django-tinymce or django-flatpages-tinymce).
This method cuts down on all configuration in Django, and it can be completely handled within the tinymce.init call. I found this much easier than dealing with Django's settings files, overriding models, etc. Just simply find the template you want TinyMCE to spice up and add the init call there.
The example here for full featured example really helped me:
http://www.tinymce.com/tryit/full.php
This use the modern theme...
I simply added this to whichever change_form.html template for whatever model I was needing the rich editor. For instance for flatpages:
admin/flatpages/flatpage/change_form.html
Or custom model in app:
admin/custom_app/model_name/change_form.html
I know this is exactly an answer to your question, but I think it's worth thinking about and might help you ultimately get what you need.
Also, I should note, it looks like only modern theme is available for TinyMCE v4:
http://www.tinymce.com/wiki.php/Tutorial:Migration_guide_from_3.x

How to replace ManytoMany widget against an iPad compatible widget?

Personally I don't think Django's built-in widget for ManyToManyField relationship is particularly good. Especially when it comes down to use it on an iPad, the widget is neither intuitive nor practical (you have no ctrl button to hold down to multi select).
So I am battling this issue now for one week, trying to make a formset with forms that include each a dropdown.
My attempts to achieve the solution above, have also been fruitless so far.
So I thought maybe its a good time to take a step back and ask the community:
What would you do in my shoes? If you were given a requirement like this, how would you replace the M2M widget? What options do I have?
I just found out about the admin M2M widget according to this question on Stackoverflow.
django.contrib.admin.widgets.FilteredSelectMultiple
It is a bit big and not very pretty, but would do the job.
I have found this tutorial and followed every step. But the widget is still showing as a plain M2M widget instead of the admin one. The css and js are loaded correctly (no indication of 404) but still the old widget shows up.
Many Thanks,
Try using chosen library. You can download it from here: http://harvesthq.github.com/chosen/.
To integrate it with django try django-chosen application. You could install it from PIP or directly download sources from github.

Opencart module development - Inject javascript/html code in some pages

I'm a beginner on Opencart and just started developing a module for Opencart which it must inject some lines of javascript and html code in these pages:
- Cart Page
- Product Page
- Confirmation Order Page
- Register form page
The official documentation doesn't have informations about how can i do that, I've tried to find a good documentation about OpenCart but I didn't find anything.
I need help. How can I do that?
Diggin necro topics;) :
The easiest way i think:
upload/catalog/view/theme/[themename]/template/product/product.tpl - here you can add your custom html for product page
[your theme name, you shouldnt overwrite default theme because it can cause damage after update]
It depends on where you're trying to insert the HTML/JavaScript.
Doing things the proper way in OpenCart, you're limited to the column-left, column-right, content-top, and content-bottom positions.
The files you'll need to create are:
admin/controller/module/mymodule.php
admin/language/english/module/mymodule.php
admin/view/template/module/mymodule.tpl
catalog/controller/module/mymodule.php
catalog/language/module/mymodule.php
catalog/view/theme/default/module/mymodule.php
To learn how to do this the first time, it's easiest to replicate an existing stock OpenCart module (preferably a simple one, such as information). Once you've replicated it you'll need to go through each of those files and replace any references to "information" with "mymodule".
After that, if you've done it properly, you should be able to navigate to Admin > Extensions > Modules and see your module in there. Then install it, use the "Add module" button to position the module on all the relevant layouts, hit save and hey presto you have a working module on the front-end.
To modify the front-end output, just edit catalog/view/theme/default/module/mymodule.php
If you want to insert your HTML somewhere other than the 4 available positions OpenCart gives you, position your module in the content-bottom position and use JavaScript/jQuery to inject some HTML where you want.
If this is for your own personal website then as Pawel S suggested it would be easiest to simply modify the relevant view files (ie. catalog/view/theme/[themename]/template/product/product.tpl), however if you're making a module which you plan to distribute then this should be a last resort.
Hope that helps!
I realize this is probably long dead by now, but if you're creating a module that needs to modify existing controllers, languages, models or views the correct tool to use is vQMod.
vQMod allows you to modify existing code on the fly using XML.
https://code.google.com/p/vqmod/