Language based installation description - joomla

As you all know, once you have installed an extension in the Joomla backend, the description shows. You can either have a plain description from the XML or have a language based one. I have never had problems in the past with language based descriptions however this time I do. The extension is a admin component and has no frontend folder and is for Joomla 2.5.
When I install the component, the description appears as COM_PROJECTS_DESC
The language folder and files are in the correct location and the XML shows as
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="2.5.0" method="upgrade">
<name>Projects</name>
<author>JoomJunk</author>
<creationDate>15th Jul 2012</creationDate>
<copyright>Copyright (C) 2012 JoomJunk</copyright>
<license>http://www.gnu.org/licenses/gpl-3.0.html</license>
<authorEmail>admin#joomjunk.co.uk</authorEmail>
<authorUrl>http://www.joomjunk.co.uk</authorUrl>
<version>1.0.0</version>
<description>COM_PROJECTS_DESC</description>
<administration>
<menu img="components/com_projects/assets/images/cpanel_16.png">COM_PROJECT_TO_DO</menu>
<files folder="admin">
<filename>index.html</filename>
<filename>controller.php</filename>
<filename>helper.php</filename>
<filename>projects.php</filename>
<folder>views</folder>
<folder>tables</folder>
<folder>models</folder>
<folder>controllers</folder>
<folder>assets</folder>
</files>
<languages folder="admin">
<language tag="en-GB">languages/en-GB/en-GB.com_projects.ini</language>
<language tag="en-GB">languages/en-GB/en-GB.com_projects.sys.ini</language>
</languages>
</administration>
</extension>
The odd thing is, the description doesnt work when installing for the first time, but if I install the coomponent over it (upgrade) then it does work.
I have used the language debug tool the the language file seems to be loading so Im not sure what the problem is. I has only ever happend to me with extensions specifically for the admin backend and that have no frontend referrence.
Any help would be much apreciated.
Regards

You can display the installable description text and if you need to install any sample values through install.joomjunk.php.
I think this link will be helpful for you.
http://docs.joomla.org/Using_the_installer_API_to_support_package_installation

Related

Joomla - How can I locate Administrator Module to different page other than main Administrator page?

I am new to Joomla. I have to add an administrator module to the page where a specific module is being edited at administrator side. For example here is the module editing page where I want to add an Administrator module
But there isn't any option for menu assignment in administrator module editing page. It always shows on front administrator page
Here is XML file
<?xml version="1.0" encoding="utf-8"?>
<extension type="module" version="3.1" client="administrator" method="upgrade">
<name>mod_admincustom</name>
<author>Your Name Goes Here</author>
<creationDate>December 2015</creationDate>
<copyright>Copyright (C) 2015 Your Brand Goes Here</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>email#nomail.com</authorEmail>
<authorUrl>www.yoursite.any</authorUrl>
<version>1.0.0</version>
<description>Custom Module for Administrator</description>
<files>
<filename module="mod_admincustom">mod_admincustom.php</filename>
</files>
</extension>
Can you please specify that what kind of changes can I do to solve my problem. Thanks!
You can only show modules on the front page of admin section (Control Panel).
If you want to show your module on a specific view of a component, you can create a template override for that view and load the module manually.
Another option is cloning the default template of admin, then you can customize the new template and load any modules any where.

Updating a private gallery Visual Studio Extension

We have a Visual Studio Extension that we host in a private gallery. Having installed the initial version, if one returns to the Extension And Updates page, one sees it listed in the list of Installed extensions. Highlighting it shows the [Disable] and [Uninstall] links and in the right-hand pane, one sees the correct 'Created By', 'Date Installed', 'Version' and the 'Automatically update this extension' is checked.
When we prepare an update, we do the following release process:
In the AssemblyInfo.cs, we update the 'AssemblyVersion' and 'AssemblyFileVersion' to the next version, e.g. "1.12.1.0"
In the source.extension.vsixmanifest, we update the 'Version' to the next version (for which we use the same value, i.e. "1.12.1.0")
We then sign the VSIX package
We then put the VSIX file on our private gallery
We then update the atom.xml file - more on this later. The atom.xml file happens to exist in the same folder as our VSIX since we only have a limited number of these extensions.
However, the extension doesn't automatically update when you start Visual Studio, nor does it appear as an update when you visit the 'Extensions and Updates'. Users therefore have to be notified of the new version and then manually uninstall the existing one, and install the update.
Okay, I'm pretty sure that there is nothing untoward with the VSIX file itself; I suspect the atom.xml may be at fault. There are several posts on how to author the atom.xml file, but there is a little inconsistency between these, e.g. MSDN, justinmchase, Kornfeld Eliyahu Peter, stackoverflow etc.
Okay. Here is my atom.xml (slightly edited)
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title type="text">Our Extension Gallery</title>
<id>uuid:b62cf56a-8a60-4eb6-b217-5e2972e01b39;id=1</id>
<updated>2017-02-28T11:57:22Z</updated>
<entry>
<id>MyAssemblyName.Microsoft.0681eb6c-4275-4d64-9333-dfdabe14f286</id>
<title type="text">Description One</title>
<summary type="text">Description Two</summary>
<published>2017-01-31T11:57:22Z</published>
<updated>2017-02-28T11:57:22Z</updated>
<author>
<name>Me!</name>
</author>
<content type="octet/stream" src="http://server/VisualStudioGallery/MyAssemblyName.vsix" />
<Vsix
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://schemas.microsoft.com/developer/vsx-syndication-schema/2010">
<Id>0681eb6c-4275-4d64-9333-dfdabe14f286</Id>
<Version>1.12.1.0</Version>
</Vsix>
</entry>
</feed>
So what of this do we update in the atom.xml?
feed/updated
feed/entry/updated
feed/entry/Vsix/version
Format of the date
In some examples I've seen '2011-04-14T14:24:22-07:00', whilst in
others I've seen '2012-11-06T22:19:45Z'. Does it matter?
I've tried using the "Time" portion as 'T00:00:01Z' just in case there was any confusion between UTC, Server and Client time. No success.
'feed/entry/id' vs 'feed/entry/Vsix/Id'
Have I got the casing correct for these XML elements?
for 'feed/entry/id', I found that to download I needed to have 'MyAssemblyName.Microsoft.0681eb6c-4275-4d64-9333-dfdabe14f286', but for feed/entry/Vsix/Id it was just '0681eb6c-4275-4d64-9333-dfdabe14f286'.
I feel like I've tinkered with just about every part of the XML but to no avail. I'm sure it's simple....but what that is eludes me.
Thanks
Griff
For 'feed/entry/id', which is A unique id of the entry. It MUST be exactly the same as to id of the VSIX package!
For feed/entry/Vsix/Id, which is the id of the VSIX package.
Please modify them as the same as the product id of your vsix package.
Thanks to Cole Wu's helpful comments, I finally got this to work.
The two IDs needed to match to get the update to work.
So, just to clarify I have the following:
AssemblyInfo.cs
[assembly: AssemblyVersion("1.15.0.0")]
[assembly: AssemblyFileVersion("1.15.0.0")]
source.extension.manifest
ProductID: MyApplication.Microsoft.0681eb6c-4275-4d64-9333-dfdabe14f286
Version: 1.15
atom.xml
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title type="text">Our Extension Gallery</title>
<id>uuid:b62cf56a-8a60-4eb6-b217-5e2972e01b39;id=1</id>
<updated>2017-02-28T00:00:01Z</updated>
<entry>
<id>MyApplication.Microsoft.0681eb6c-4275-4d64-9333-dfdabe14f286</id>
<title type="text">Description 1</title>
<summary type="text">Description 2</summary>
<published>2017-01-31T00:00:01Z</published>
<updated>2017-03-01T00:00:01Z</updated>
<author>
<name>Me</name>
</author>
<content type="octet/stream" src="http://server/VisualStudioGallery/application.vsix" />
<Vsix
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://schemas.microsoft.com/developer/vsx-syndication-schema/2010">
<Id>MyApplication.Microsoft.0681eb6c-4275-4d64-9333-dfdabe14f286</Id>
<Version>1.15</Version>
</Vsix>
</entry>
</feed>
feed/entry/id = feed/entry/Vsix/Id = source.extension.manifest.ProductID
feed/entry/Vsix/Version = source.extension.manifest.Version

set language to administrator menu in joomla 1.5

i have develop a component in joomla 1.5 and make .xml file to install
in my .xml i have administrator menu like
<administration><menu>COM_MY_COMP</menu>
<submenu>
<menu task="display">COM_MY_COMP_MENU1</menu>
<menu task="additem">COM_MY_COMP_MENU2</menu>
</submenu>
and in language file i set the item like
COM_MY_COMP="My Component"
COM_MY_COMP_MENU1="Dispaly"
COM_MY_COMP_MENU2="Dispaly2"
it working on other item but not on administrator menu , it is not convert to COM_MY_COMP to My Component
i use joomla 1.5.
You can't just add the language file to the folder. You need to re-install the component WITH the language file. Here is what you need to add to the xml.
<languages folder="language-admin">
<language tag="en-GB">en-GB/en-GB.com_yourcomponent.ini</language>
<language tag="en-GB">en-GB/en-GB.com_yourcomponent.menu.ini</language>
</languages>
Also may I say that if its the menu you are trying to translate, you will need a separate language file like en-GB.com_yourcomponent.menu.ini
and below is how it should look.
COM_YOURCOMPONENT="Your Component"
COM_YOURCOMPONENT.CONTROL_PANEL="Control Panel"
Hope this helps
You have to put your translation in this folder:
/administrator/language/en-GB/

magento how do i create specific home page for specific templates

I have a good design on my website and i suddenly realized my design does not render pretty well in internet explorer 7 and 8, i tried all that i can but i still cannot fix it and i dont like how its displaying in those browsers so i decided to add exception on the design configuration coumn by adding MSIE 7.0 and then value of defaul, tested with internet explorer 7 and it works well but my problem is that my custom theme has some large images and texts and other materials that were aligned nicely with css but once i changed the theme to default and it does not see those css, they also just display anyhow and its really a pain for me, all that i need to do now is find a way to make the default theme load with a different cms page instead of the normal homepage for my main theme. i dont know if i can do that but i need some little help or guide to go about it.
I followed your guide and have created the files and now i can see the welspot template under the design field.
Now i need to still use the old homepage (the one i have installed with the hellowired theme), i want to copy magento default theme into my package now and edit it but i need to find a way to remove all the static blocks i created through maybe a layout file as i wont use those blocks in the default theme and even if possible add different images through xml so i would be using two themes with the same homepage but dynamic content based on the theme being used.
Sure, you can set default home page whatever you create but you should do some things.
First, create config.xml
<!-- path: app/code/local/Welspot/Page/etc/config.xml -->
<?xml version="1.0" encoding="utf-8"?>
<config>
<modules>
<Welspot_Page>
<version>0.1.0</version>
</Welspot_Page>
</modules>
<global>
<page>
<layouts>
<welspot_one_column_cms module="page" translate="label">
<label>Welspot One Column</label>
<template>page/welspot_one_column.phtml</template>
<layout_handle>welspot_one_column_cms</layout_handle>
</welspot_one_column_cms>
</layouts>
</page>
</global>
</config>
Second, create Welspot_Page.xml
<!-- path : /app/etc/modules -->
<?xml version="1.0"?>
<config>
<modules>
<Welspot_Page>
<active>true</active>
<codePool>local</codePool>
</Welspot_Page>
</modules>
</config>
Third, create welspot_one_column.phtml
<!-- path : /app/design/frontend/[your_package]/[your_theme]/template/page -->
<div>Hello World</div>
As you might guess, you should customize welspot_one_column.phtml file.
Finally, go to Admin > CMS > Pages > Home Page > Design Tab select your newly created template (Welspot One Column).

Will Firefox do XSLT on external entities?

What I'm trying to do is take an XML document, let's say http://example.org/data.xml and show it with an XSL stylesheet applied.
(I cannot modify the document itself and add a directive)
So there are a couple of utility XML files like this:
wrapper.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wrapper [
<!ENTITY content SYSTEM "http://example.org/data.xml">
]>
<?xml-stylesheet type="text/xsl" href="unwrap.xsl" ?>
<wrapper>
&content;
</wrapper>
unwrap.xsl:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="stylesheet.xsl"/>
<xsl:template match="/wrapper/node()[1]">
<xsl:apply-imports/>
</xsl:template>
</xsl:stylesheet>
So to summarize: stylesheet.xsl is written for http://example.org/data.xml, the browser is pointed to wrapper.xml and the user should see the transformed http://example.org/data.xml.
This is one of those rare cases where things work as expected in IE (and Chrome) but not Firefox.
AFAIK Firefox supports external XML entities, but it seems like they are invisible in XSL code. I found this article from 2006, it describes this problem in Firefox 1.5 (I'm using 3.5.3)
Is there any workaround for this?
That XML looks familiar ;)
Currently, FireFox will not load external DTD's and entity references, because of security and Denial of Service concerns. For example: http://en.wikipedia.org/wiki/Billion_laughs
There is an open Mozilla bug describing the reasons why and lengthy debate about whether or not to make it something that is configurable: https://bugzilla.mozilla.org/show_bug.cgi?id=22942
There does appear to be one workaround to loading DTDs, but I'm guessing that probably isn't a viable solution for you.
Firefox will load local DTD files
if you put them in this directory for Windows:
C:\Program Files\Mozilla Firefox\res\dtd\...
The directory for Linux:
/**mileage may vary**/MozillaFirefox/lib/res/dtd/
One idea to get around using the entity reference:
If you can control the content of the wrapper.xml, then you could fetch the contents of http://example.org/data.xml (server side) and echo it out as the full contents of the wrapper file, with the addition of the Stylesheet Processing Instruction(assuming you have some dynamic server-side capabilities).

Resources