Modifying Plone Translation Content - internationalization

I assume that Plone has the base "system" messages stored in the Data.fs file (Zope DB?). Meaning, the text shown, for example, when you log out (in English) says "You are now logged out". This is stored somewhere in the Zope DB.
Is there a way to change what the content of these messages say? We have a Russian translation of the site which we'd like to modify the "You are now logged out" message - but I cannot find it anywhere in the ZMI or the filesystem.
If my assumptions are correct, and they are stored in the Zope DB, is there a good utility for browsing/modifying this content?

Plone uses Zope's translation service and standard gettext utilities for this task.
The best tutorial on i18n and l10n available is Internationalization in Plone 3.3 and 4.0 by Maurits van Rees.
Check specifically the Overriding translations part.

Related

Creating Magento Extension - Where to start?

I want to make an extension that injects videos on product pages.
I already read a lot of documentation in Magento website but, sincerely, I have no clue where to start. What's the difference between Magento Extensions and Widgets? Can I develop my extension using only JavaScript? Do I really need to use PHP to develop one?
So many questions, can't find a focus. Can you please share a simple follow trough for me to read on? Thanks.
Credits : Marius
https://magento.stackexchange.com/questions/8344/how-to-write-a-custom-extension/8345#8345
Here is what I usually do:
Always develop with error_reporting on.
Always develop with isDeveloperMode set to true. Just add SetEnv MAGE_IS_DEVELOPER_MODE 1 to your httpd.conf file (or corresponding file for nginx or something else)
If the extension is linked to a core functionality add the
dependency in the declaration file <depends><Mage_Catalog /></depend>
If the module is for community use, use community as codepool to
give the developers the chance to override some classes without
modifying the code directly
Put your frontend design files in app/design/frontend/base/default
to make them available for all themes.
Put your admin design files in
app/design/adminhtml/default/default and do not change the admin
theme. I may want to change it in one of my modules.
Prefix your layout file names and template folder name with the
company name to make it easier to isolate them.
easylife_articles.xml and app/design/.../easylife_articles
Put your static resources (js, css, images) in a similar folder as
the template files easylife_articles/images/doh.png
Attach a simple text file with how to uninstall the extension: What
files need to be removed, what tables need to be dropped, what
config settings need to be removed from core_config_data table.
Do not write queries directly in models, blocks or helpers, use a
resource model for that.
Do not write queries using the table names directly Select * from
sales_flat_order where .... Use a Zend_Select and transform the
table names using ->getTable('sales/order').
Use the base url to include js files in template. Wrong
<script type="text/javascript" src="../js/some.js"></script>.
Right <script type="text/javascript" src="<?php echo Mage::getBaseUrl('js').'some.js'?>"></script>
Do not rewrite classes unless is necessary. Use observers and if
it's not possible use helper methods that receive as parameter and
instance of a class that you wanted to override. Wrong:
Override Mage_Catalog_Model_Product to add the method
getProductArticles(). Right. In your helper add
getProductArticles(Mage_Catalog_Model_Product $product)
If you override classes put a list of them in a readme.txt file
Use the default admin path for the admin section of your module.
Wrong admin url articles/adminhtml_articles/index. Right admin url admin/articles/index
Add ACL for your admin sections. I may want to restrict access to
some of the admins.
Do not add an other js framework (jquery, mootools, ...) if it's not
necessary. Write you code in prototype.
Make you template html W3C valid (this is for OCD developers like myself).
Do not put images in the media folder. Use skin. The media
folder usually is not versioned and this makes it harder to move the
website on different environments.
Test you extension with flat catalog on and off. In order not to double the development time use Chaos Monkey
Test your extension with cache on and cache off.
Avoid using uppercase letter in the module and class names. If not
properly tested this may cause issues on different OS. This is more a recommendation, not a 'must'.
Dispatch events in your code to make it easier for developers to
alter the functionality.
Follow the same coding standards that Magento uses and comment your code.
[Edited] Do not use php short tags (<? $this->doSomething() ?>). Use full tags (<?php $this->doSomething()?>). Also don't use short echo tags, yet. (<?="D'oh";?>). Use (<?php echo "D'oh";?>)
Translate your texts using $this->__ and add the locale translation file with your texts (app/local/en_US/Easylife_Articles.csv) at least for en_US language. Not all
websites are build in English and the identification of texts to
translate is time consuming.
If you sell an extension offer at least basic support. Or at least
answer the support e-mails you receive.
Do not make constant calls to your servers through your extension for licence validation. Once, at installation is more than enough (I don't like this approach either, but it's better than to make calls all the time).
(Inspired by this question)
Develop with the log activated and from time to time take a look at
the var/log/system.log file. The errors listed here are not shown
even with developer mode on. If there is at least one error you end
up with a large log file after a few months of running the extension.
If your extension affects the checkout process or the orders in
some way, make sure it works with multi-shipping, or if it
shouldn't work with multi-shipping, make sure it doesn't affect it.
Do not replace the default Admin Notification bar (or feed URL). If
I'm interested on what you have to offer I will subscribe to your
newsletter. Let me see what Magento has to say. It's more important
to me.
If you encrypt your code files with Ioncube (or something
else)...well...I just hate you and I hope your business goes bankrupt
That's what have so far. I will add more as soon as I think of something else.
You will definitely need XML and PHP, because this is mainly what Magento is built on.
Additionally to the official documents, there are a lot of helpful and very diverse tutorials out there that explain the mechanics of Magento. A web search helps, and I can recommend everything by Alan Storm, for example this litte module: http://alanstorm.com/magento_list_module
As soon as creating an extension works for you, you will also find a lot of tutorials on how to alter the product-view, or you can then post a more specific question here or on magento.stackexchange.com.

How to use bootstrap size option in joomla 3.0?

I m new to joomla world. pls can any1 tell how to use bootstrap size option in joomla 3.0?
and i have 1 more question, what is the use of index.html in every modules folder which has no content in it ?
Second question answer
Web servers list all its directory-content in the browser if there's not present an index.html, making it easy for attackers to click on any of the links and view the contents; worse, if it's a PHP file, which will invariably execute upon clicking. That brings three risks:
Direct access to a PHP file exposes sensitive information (e.g. the
server's path structure) to directly alter codes.
It makes easier uploading hacking scripts to a site through any of
its vulnerable component. This allows for direct web access which
compromises the site.
It reveals the names and size of the site's files and helps
identifying any vulnerable extension, making it an easy target
The index.html files prevent the file listings from such exposures.
The "bootstrap size" option in the module parameters has to be supported by the used module chrome. From the default system chromes, only the html5 one does support it. Depending on your template, there may be other chromes as well which do support it. But since it's a rather new parameter, most templates probably don't support it yet.

Port X-Cart Module to Joomla (Cloudsearch) (might be impossible)

I have an X-cart store with a Joomla front-end. I have installed the x-cart module cloudsearch into my x-cart store. It creates a little search box in the upper right corner to search my x-cart store's products and pages. I would like for this box to also appear in my joomla sites header (which is the "front-end" for the store). Does anyone know if this is even possible?
Thanks for any help
Sure, create a new module of type "Custom HTML" and paste your cart form there (if it's just ajax) or load it by url creating a module of type "Wrapper"
Ok, so this required finding the libraries for the module (mainly handlebars.js and hoverintent.js) and making sure those were being loaded via the joomla header. Also had to add CSS from the modules template directory as well. Then I used "view source" to get the generated javascript source to initiate cloudsearch, as well as get the dynamically generated html for the search box I was using.
Thanks to everyone who tried to help. In the end it ended up being just a matter of getting the javascript, css, and html right. All the database connectivity and search features are controlled by an external js file loaded from the cloudsearch server.

How can I copy an event into Plone with WebDAV?

Is there way to copy a file into Plone with WebDAV and have Plone register it as an Event file (rather than a simple page)?
I would very much like to use Plone for it's standard CMS properties (which are brilliant) but I can't spend time programming up an application in Plone - it's way too complicated. The "Plan" is to generate information in another system and use scripts to export it into Plone - hence copying via WebDAV would be a perfect solution if these generated files could be recognized as Events.
If not an alternative, still using WebDAV, would be to generate and copy a python script, that uses API calls to create the events. Though I'm not sure where to copy and what API calls to make.
Or is there a way of importing iCal files?
Thanks
You can customize the code to accomplish any end -- but by default, out-of-the-box, you need to:
Upload text files with the file name extension .event -- you can edit this in the content type registry tool in the root of your Plone site. This tells the folder what type of item to create (an event).
Format you text file using RFC822-style key-value formatting (like mail headers or HTTP headers are formatted) in a text file you upload via WebDAV. You must use IS0 8601 formatted (YYYY-MM-DDThh:ss:mmTZD) timestamps for all date/time field values.
If in doubt on the specifics of the last point, refer to the source code in Products.Archetypes.Marshall.RFC822Marshaller and DateTime.DateTime (zope2).
If you wish to customize the marshaller in use, you could write your own marshaller, and monkey-patch ATEvent to use it. This would allow you to support upload/download of vcs/ics if you wrote the code to do so. This is NOT the path of least resistance. YMMV, this is under-documented, and requires some serious Plone development experience.

Joomla 1.7:- How do i do this please (kinda facebook)

Joomla comes out standard with registered user, and public user
If I add a third (registered) User that allows the third user to a) create a single separate page in Joomla that the user can input pictures (like you do on face book). b) Access all pages as the standard registered user does.
How do I go about that in Joomla 1.7, add a third (registered) User and give it level 2 accesses?
Then how I create a single page for each user. Somehow I need a reference to each user’s page and show that in a list and control the list search parameters. And i need the page viewable when selected and in the page info needs to be received by the third user. I’m not creating face book but I need that sort of techno somehow.
Can someone point me to what I need to look at, editorials, videos, etc. I know I need to lean PHP better.
Could I make a foulder for each registered user to hold photo's and name the folder acourding to the user's name or email address.
I would recommend to go with a component that offers the functionality that you need. You will find it easier to control the user rights there as they are standard settings available. This is more convenient than building everything from scratch.
Some well known components are:
Community Builder (main component free)
JomSocial (commercial component)
There are more components and plugins available, you may also want to search the Joomla Extensions Directory (JED) for something suitable (http://extensions.joomla.org/extensions/social-web)

Resources