Wiki Wednesday 9 May 2012

54 views
Skip to first unread message

Chris Davenport

unread,
May 9, 2012, 3:42:52 PM5/9/12
to joomla-de...@googlegroups.com
Thanks this week go to Brian Teeman for taking on the task of killing orphans!  That is, flagging orphaned pages on the wiki for deletion.

All tasks from the last two weeks are still open, so don’t be shy, if you fancy helping us out, just get started.

Here are this week’s tasks:

Task #6
http://docs.joomla.org/Developers
This is a task that will hopefully lead to a significant reorganisation of this important page.  As a first step we need each of the pages listed on this page to be flagged according to which version (or versions) of Joomla it is applicable to.  This is done by adding a tag after the event name, like this {{JVer|1.6}}.

So, for example, if you see a link like this:

* [[a link to a developer page]]

and you discover that it only applies to Joomla 1.5, then change the link to

* [[a link to a developer page]] {{JVer|1.5}}

If the page applies to multiple Joomla versions then add tags for all the applicable versions.  For example:

* [[a link to a developer page]] {{JVer|1.6}}{{JVer|1.7}}{{JVer|2.5}}

Ideally, I'd like to see all the links on the Developers page flagged like this before we move on to the next stage.

Task #7
Following the deprecation of JRequest we will need to update the secure coding guidelines page (http://docs.joomla.org/Secure_coding_guidelines) to use the JInput class instead.  I’d like to see two different versions of this page: one for Joomla 1.5 and one for Joomla 2.5, so for the time being do not update the current page.  Instead, create a new temporary page, such as your user page, and put your updated version there.  Once complete I will move things around so we have a multi-version resource.

Task #2
Rather than set a new task for non-developers, I'm going to re-state an earlier task that seems to have dropped off the radar.

http:///docs.joomla.org/Administrator_goals
Think about your day as a Joomla site administrator and the tasks you had to perform.  Think about the goals you were trying to achieve then break those goals down into a set a of short titles and add them to this page.  

To begin with don't worry about whether a particular goal can be broken down into sub-goals or how you would reach a particular goal by breaking it into a list of tasks that need to be completed; we'll do that stuff at a later date.  For now we just want to capture as complete a list of goals as we can. And don't worry about grouping or ordering them; just add them to the page and we'll organise it in some way later on.

Wiki Wednesdays will be taking a two-weak break starting next week as I’ll be too busy with J and Beyond to put the time into writing it up.  But please don’t stop working on stuff and, as always, if you have any suggestions for future Wiki Wednesdays just drop me an email at chris.d...@joomla.org.

Cheers,
Chris.

--
Chris Davenport
Joomla Leadership Team - Production Working Group
Joomla Documentation Coordinator

Francesco Mulassano Gmail

unread,
May 9, 2012, 3:58:16 PM5/9/12
to joomla-de...@googlegroups.com
Hi, i'm trying to put some language string in my custom js file

i find the method for Joomla 1.6 ->
http://www.joomla-wiki.de/dokumentation/Benutzer:Elkuku/Proyektz/EasyCreator/Language_handling/Javascript_translations


now i have in my view.html.php

JText::script('COM_MYCOMP_EVENT_FEEDBACK_SENDING');

JHTML::script( 'myjsfile.js',
'components/com_mycomponent/script/' );

in the myfile.js i have

alert(Joomla.JText._('COM_MYCOMP_EVENT_FEEDBACK_SENDING',
'Sending message...'));

in my language file

COM_MYCOMP_EVENT_FEEDBACK_SENDING="Sending message..."


but this does not work
in webdeveloper consolle i see:

[21:56:02.573] Joomla.JText._ is not a function

has anyone had this problem and solved it?

Naouak

unread,
May 9, 2012, 5:03:01 PM5/9/12
to joomla-de...@googlegroups.com
Whenever I use strings in javascript that may be translatable, I call a parametre of an object. You would have then to fill in your template that object with the requested translation strings.

it would be something like that :
var strings = {
mystring1: "foo"
someotherstring: "bar"
}
//Need to use a string
document.write(strings.mystring1);

With a bit more of work, you can integrate it in a design pattern to do it without declaring global variable.

Naouak, Grade 2 de Kobal.
Site web: http://www.naouak.net




--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-dev-general@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-general+unsub...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.


Takeaweb

unread,
May 9, 2012, 5:06:34 PM5/9/12
to Joomla! General Development
I'm sorry but I do not understand ... I do not have much knowledge of
javascript

On 9 May, 23:03, Naouak <tard...@gmail.com> wrote:
> Whenever I use strings in javascript that may be translatable, I call a
> parametre of an object. You would have then to fill in your template that
> object with the requested translation strings.
>
> it would be something like that :
>
> > var strings = {
> > mystring1: "foo"
> > someotherstring: "bar"
> > }
> > //Need to use a string
> > document.write(strings.mystring1);
>
> With a bit more of work, you can integrate it in a design pattern to do it
> without declaring global variable.
>
> Naouak, Grade 2 de Kobal.
> Site web:http://www.naouak.net
>
> On Wed, May 9, 2012 at 9:58 PM, Francesco Mulassano Gmail <
>
>
>
>
>
>
>
> francesco.mulass...@gmail.com> wrote:
> > Hi, i'm trying to put some language string in my custom js file
>
> > i find the method for Joomla 1.6 ->
> >http://www.joomla-wiki.de/**dokumentation/Benutzer:Elkuku/**
> > Proyektz/EasyCreator/Language_**handling/Javascript_**translations<http://www.joomla-wiki.de/dokumentation/Benutzer:Elkuku/Proyektz/Easy...>
>
> > now i have in my view.html.php
>
> >        JText::script('COM_MYCOMP_**EVENT_FEEDBACK_SENDING');
>
> >        JHTML::script( 'myjsfile.js', 'components/com_mycomponent/**script/'
> > );
>
> > in the myfile.js i have
>
> >        alert(Joomla.JText._('COM_**MYCOMP_EVENT_FEEDBACK_SENDING'**,
> > 'Sending message...'));
>
> > in my language file
>
> >        COM_MYCOMP_EVENT_FEEDBACK_**SENDING="Sending message..."
>
> > but this does not work
> > in webdeveloper consolle i see:
>
> >        [21:56:02.573] Joomla.JText._ is not a function
>
> > has anyone had this problem and solved it?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Joomla! General Development" group.
> > To post to this group, send an email to joomla-dev-general@**
> > googlegroups.com <joomla-de...@googlegroups.com>.
> > To unsubscribe from this group, send email to joomla-dev-general+**
> > unsub...@googlegroups.com<joomla-dev-general%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group athttp://groups.google.com/**
> > group/joomla-dev-general?hl=**en-GB<http://groups.google.com/group/joomla-dev-general?hl=en-GB>
> > .

Adam Stephen Docherty

unread,
May 9, 2012, 6:15:01 PM5/9/12
to Joomla! General Development
Can you post the output between the <head> tags of the page you are
getting the error? Basically this file:

<script src="/media/system/js/core.js" type="text/javascript"></
script>

should be there BEFORE myfile.js

Francesco Mulassano Gmail

unread,
May 9, 2012, 5:38:46 PM5/9/12
to joomla-de...@googlegroups.com
i can't see the core.js in my head...

<head><script src="//platform.twitter.com/js/tfw/widget/hubclient.js" async="" type="text/javascript" id="LR1"></script><script async="" src="https://apis.google.com/_/apps-static/_/js/gapi/plusone/rt=j/ver=TyaHpoLAS4o.it./sv=1/am=%215VdQ9Ii80V-IH20oNg/d=1/rs=AItRSTPtncfiREA-0jqVGM0xQd4vkUQnNA/cb=gapi.loaded_0"></script><script gapi_processed="true" src="//apis.google.com/js/plusone.js" async="true" type="text/javascript"></script><script src="//platform.twitter.com/widgets.js" type="text/javascript"></script><link media="all" href="//s7.addthis.com/static/r07/widget082.css" type="text/css" rel="stylesheet">
<meta charset="utf-8">
  <base href="http://localhost/htdocs/development/Joomla/J17_dev/index.php/component/timereturns/event/1059-carole-king">
  <meta name="keywords" content="recensioni, foto, eventi, news, concerti, events, concerts, music, instruments, photos, strumenti musicali, festival, festivals, pop, rock, electronic, doom, trip-hop, classic, jazz, ambient, glitch, cd, dvd, mp3, video, youtube, google, facebook">
  <meta name="description" content="Ultrasonica - Portale Musicale Indipendente">
  <meta name="generator" content="Joomla! - Open Source Content Management">
  <title>Lunedì, 09 Febbraio 1942 - Carole King</title>
  <link href="http://localhost/htdocs/development/Joomla/J17_dev/index.php/component/search/?id=1059&amp;format=opensearch" rel="search" title="Ultrasonica - OpenSearch" type="application/opensearchdescription+xml">
  <link href="/htdocs/development/Joomla/J17_dev/media/com_favicon/icons/1/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon">
  <link rel="stylesheet" href="/plugins/system/jqueryintegrator/jqueryintegrator/ui-lightness/jquery-ui-1.8.6.custom.css" type="text/css">
  <link rel="stylesheet" href="/htdocs/development/Joomla/J17_dev/components/com_timereturns/assets/timereturns.css" type="text/css">
  <link rel="stylesheet" href="/htdocs/development/Joomla/J17_dev/cache/widgetkit/widgetkit-b48a9bcd.css" type="text/css">
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
  <script src="/htdocs/development/Joomla/J17_dev/plugins/system/jqueryintegrator/jqueryintegrator/jquery.noconflict.js" type="text/javascript"></script>
  <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/jquery-ui.min.js" type="text/javascript"></script>
  <script src="http://cdn.jquerytools.org/1.2.5/all/jquery.tools.min.js" type="text/javascript"></script>
  <script src="/htdocs/development/Joomla/J17_dev/components/com_timereturns/script/jquery-1.7.min.js" type="text/javascript"></script>
  <script src="/htdocs/development/Joomla/J17_dev/components/com_timereturns/script/quickpager.jquery.js" type="text/javascript"></script>
  <script src="/htdocs/development/Joomla/J17_dev/components/com_timereturns/script/timereturns.js" type="text/javascript"></script>
  <script src="/htdocs/development/Joomla/J17_dev/media/widgetkit/js/jquery.js" type="text/javascript"></script>
  <script src="/htdocs/development/Joomla/J17_dev/cache/widgetkit/widgetkit-e12e9d1f.js" type="text/javascript"></script>
  <script type="text/javascript">
    (function() {
      var strings = {"COM_TIMERETURNS_EVENT_FEEDBACK_SENDING":"Invio in corso..."};
      if (typeof Joomla == 'undefined') {
        Joomla = {};
        Joomla.JText = strings;
      }
      else {
        Joomla.JText.load(strings);
      }
    })();
  </script>

<link rel="apple-touch-icon-precomposed" href="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/apple_touch_icon.png">
<link rel="stylesheet" href="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/css/base.css">
<link rel="stylesheet" href="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/css/layout.css">
<link rel="stylesheet" href="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/css/menus.css">
<style>body { min-width: 980px; }
.wrapper { width: 980px; }
#maininner { width: 980px; }
#menu .dropdown { width: 200px; }
#menu .columns2 { width: 400px; }
#menu .columns3 { width: 600px; }
#menu .columns4 { width: 800px; }</style>
<link rel="stylesheet" href="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/css/modules.css">
<link rel="stylesheet" href="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/css/tools.css">
<link rel="stylesheet" href="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/css/system.css">
<link rel="stylesheet" href="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/css/extensions.css">
<link rel="stylesheet" href="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/css/custom.css">
<link rel="stylesheet" href="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/css/animations.css">
<link rel="stylesheet" href="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/css/header/black.css">
<link rel="stylesheet" href="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/css/color/red.css">
<link rel="stylesheet" href="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/css/background/black.css">
<link rel="stylesheet" href="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/css/font1/ubuntu.css">
<link rel="stylesheet" href="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/css/font2/furore.css">
<link rel="stylesheet" href="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/css/font3/furore.css">
<link rel="stylesheet" href="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/css/style.css">
<link rel="stylesheet" href="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/css/print.css">
<link rel="stylesheet" href="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/fonts/ubuntu.css">
<link rel="stylesheet" href="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/fonts/furore.css">
<script src="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/warp/js/warp.js"></script>
<script src="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/warp/js/accordionmenu.js"></script>
<script src="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/warp/js/dropdownmenu.js"></script>
<script src="/htdocs/development/Joomla/J17_dev/templates/yoo_streamline/js/template.js"></script>
<div id="_atssh" style="visibility: hidden; height: 1px; width: 1px; position: absolute; z-index: 100000;"><iframe src="//s7.addthis.com/static/r07/sh087.html#" style="height: 1px; width: 1px; position: absolute; z-index: 100000; border: 0pt none; left: 0pt; top: 0pt;" title="AddThis utility frame" id="_atssh773"></iframe></div>
<script src="http://s7.addthis.com/static/r07/core007.js" type="text/javascript"></script></head>

Adam Stephen Docherty

unread,
May 9, 2012, 7:19:06 PM5/9/12
to Joomla! General Development
yeah this is your problem, seems you are not loading the framework js.
You need to have this call somewhere in the template you are using:

<?php JHtml::_('behavior.framework', true) ?>

although you are using jquery so you might not want mootools which
means you may need to get your lang in there some other way - I used
to do it like this, not so clean but it works:

<script>
COM_MYCOMP_EVENT_FEEDBACK_SENDING = '<?php echo
JText::_('COM_MYCOMP_EVENT_FEEDBACK_SENDING') ?>';
</script>

then in you file you should be able to use that constant:

alert( COM_MYCOMP_EVENT_FEEDBACK_SENDING );


On May 9, 6:38 pm, Francesco Mulassano Gmail
<francesco.mulass...@gmail.com> wrote:
> i can't see the core.js in my head...
>
> <head><script  src="//platform.twitter.com/js/tfw/widget/hubclient.js"async=""type="text/javascript"id="LR1"></script><script  async=""src="https://apis.google.com/_/apps-static/_/js/gapi/plusone/rt=j/ver=TyaH... <view-source:https://apis.google.com/_/apps-static/_/js/gapi/plusone/rt=j/ver=TyaH...>"></script><script  gapi_processed="true"src="//apis.google.com/js/plusone.js"async="true"type="text/javascript"></script><script  src="//platform.twitter.com/widgets.js"type="text/javascript"></script><link  media="all"href="//s7.addthis.com/static/r07/widget082.css"type="text/css"rel="stylesheet">
> <meta  charset="utf-8">
>    <base  href="http://localhost/htdocs/development/Joomla/J17_dev/index.php/componen... <view-source:http://localhost/htdocs/development/Joomla/J17_dev/index.php/componen...>">
>    <meta  name="keywords"content="recensioni, foto, eventi, news, concerti, events, concerts, music, instruments, photos, strumenti musicali, festival, festivals, pop, rock, electronic, doom, trip-hop, classic, jazz, ambient, glitch, cd, dvd, mp3, video, youtube, google, facebook">
>    <meta  name="description"content="Ultrasonica - Portale Musicale Indipendente">
>    <meta  name="generator"content="Joomla! - Open Source Content Management">
>    <title>Luned�, 09 Febbraio 1942 - Carole King</title>
>    <link  href="http://localhost/htdocs/development/Joomla/J17_dev/index.php/componen... <view-source:http://localhost/htdocs/development/Joomla/J17_dev/index.php/componen...>"rel="search"title="Ultrasonica - OpenSearch"type="application/opensearchdescription+xml">
>    <link  href="/htdocs/development/Joomla/J17_dev/media/com_favicon/icons/1/favicon.ico"rel="shortcut icon"type="image/vnd.microsoft.icon">
>    <link  rel="stylesheet"href="/plugins/system/jqueryintegrator/jqueryintegrator/ui-lightness/jquery-ui-1.8.6.custom.css"type="text/css">
>    <link  rel="stylesheet"href="/htdocs/development/Joomla/J17_dev/components/com_timereturns/assets/timereturns.css"type="text/css">
>    <link  rel="stylesheet"href="/htdocs/development/Joomla/J17_dev/cache/widgetkit/widgetkit-b48a9bcd.css"type="text/css">
>    <script  src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"type="text/javascript"></script>
>    <script  src="/htdocs/development/Joomla/J17_dev/plugins/system/jqueryintegrator/jqueryintegrator/jquery.noconflict.js"type="text/javascript"></script>
>    <script  src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/jquery-ui.min.js"type="text/javascript"></script>
>    <script  src="http://cdn.jquerytools.org/1.2.5/all/jquery.tools.min.js <view-source:http://cdn.jquerytools.org/1.2.5/all/jquery.tools.min.js>"type="text/javascript"></script>
> <div  id="_atssh"style="visibility: hidden; height: 1px; width: 1px; position: absolute; z-index: 100000;"><iframe  src="//s7.addthis.com/static/r07/sh087.html#"style="height: 1px; width: 1px; position: absolute; z-index: 100000; border: 0pt none; left: 0pt; top: 0pt;"title="AddThis utility frame"id="_atssh773"></iframe></div><script  src="http://s7.addthis.com/static/r07/core007.js <view-source:http://s7.addthis.com/static/r07/core007.js>"type="text/javascript"></script></head>
> ...
>
> read more »

Francesco Mulassano Gmail

unread,
May 10, 2012, 2:54:39 AM5/10/12
to joomla-de...@googlegroups.com
Ok! now it works,
i added

<?php JHtml::_('behavior.framework', true) ?>

tnx Adam

On 05/10/2012 01:19 AM, Adam Stephen Docherty wrote:
> yeah this is your problem, seems you are not loading the framework js.
> You need to have this call somewhere in the template you are using:
>
> <?php JHtml::_('behavior.framework', true) ?>
>
> although you are using jquery so you might not want mootools which
> means you may need to get your lang in there some other way - I used
> to do it like this, not so clean but it works:
>
> <script>
> COM_MYCOMP_EVENT_FEEDBACK_SENDING = '<?php echo
> JText::_('COM_MYCOMP_EVENT_FEEDBACK_SENDING') ?>';
> </script>
>
> then in you file you should be able to use that constant:
>
> alert( COM_MYCOMP_EVENT_FEEDBACK_SENDING );
>
>
> On May 9, 6:38 pm, Francesco Mulassano Gmail
> <francesco.mulass...@gmail.com> wrote:
>> i can't see the core.js in my head...
>>
>> <head><script src="//platform.twitter.com/js/tfw/widget/hubclient.js"async=""type="text/javascript"id="LR1"></script><script async=""src="https://apis.google.com/_/apps-static/_/js/gapi/plusone/rt=j/ver=TyaH...<view-source:https://apis.google.com/_/apps-static/_/js/gapi/plusone/rt=j/ver=TyaH...>"></script><script gapi_processed="true"src="//apis.google.com/js/plusone.js"async="true"type="text/javascript"></script><script src="//platform.twitter.com/widgets.js"type="text/javascript"></script><link media="all"href="//s7.addthis.com/static/r07/widget082.css"type="text/css"rel="stylesheet">
>> <meta charset="utf-8">
>> <base href="http://localhost/htdocs/development/Joomla/J17_dev/index.php/componen...<view-source:http://localhost/htdocs/development/Joomla/J17_dev/index.php/componen...>">
>> <meta name="keywords"content="recensioni, foto, eventi, news, concerti, events, concerts, music, instruments, photos, strumenti musicali, festival, festivals, pop, rock, electronic, doom, trip-hop, classic, jazz, ambient, glitch, cd, dvd, mp3, video, youtube, google, facebook">
>> <meta name="description"content="Ultrasonica - Portale Musicale Indipendente">
>> <meta name="generator"content="Joomla! - Open Source Content Management">
>> <title>Luned�, 09 Febbraio 1942 - Carole King</title>
>> read more �

Reply all
Reply to author
Forward
0 new messages