What?
So this is a quick article to get your Google Translation services working with your website.

Why?
At time of print, Google now charge for every 2,000,000 characters (2 million) every month.

Microsoft's Bing has added itself to the fray pretending to offer free services but in the small print, you will find they too charge the same price.

How?

What?
Just a quick note on how to format a given filesize and to reduce the display output to a small string, eg:
copyraw
196 bytes          : displays as => "196 bytes"
   12945 bytes        : displays as => "12 Kb"
   1478515 bytes      : displays as => "1 Mb"
   8798745455 bytes   : displays as => "8 Gb"
  1.  196 bytes          : displays as => "196 bytes" 
  2.     12945 bytes        : displays as => "12 Kb" 
  3.     1478515 bytes      : displays as => "1 Mb" 
  4.     8798745455 bytes   : displays as => "8 Gb" 

Category: Personal Home Page :: Article: 468

What?
More for others than for myself, but this article is for those who do not have development/test environments of their Joomla website.

I have been doing this for years and still come across clients who have the one version of their website. They experiment on their customer-facing website and in most cases, they are paying for a hosting package which would allow them to have several copies of their website.


What?
In view of the fact that this error pops up in so many systems I take over, I have often gone down the wrong path following the red herring as it were when in fact the answer to this is very common.

Why?
Bespoke systems are the usual suspects. Developers will have told the system what to do when newline, carriage returns and tab characters are entered in the data. Those who are security-conscious will also make their system escape apostrophes (') and double-quotes ("). But who can honestly build a system that thinks of everything from day one?

How?

What?
Along with my DataJumble function and DataTumble procedure which also help scramble database tables sent to suppliers/developers, this is a function which simply finds random characters and inserts these.

I would recommend using the DataTumble script over this one as this leaves data very difficult to work with:
copyraw
Before:
           StudentID   StudentName          DateOfBirth
           ----------- -------------------- -------------
           1           John Smith           1990-03-21
           2           Fred Bloggs          1988-11-02
           3           Another User         1985-07-11
           4           Yet Another User     1977-06-25

       After:
           StudentID   StudentName          DateOfBirth
           ----------- -------------------- -------------
           1           PDUHjRWJcb           1926-01-02
           2           WRmNqQKxvuV          1969-03-14
           3           nBCkAVDrvdhe         1968-05-05
           4           RJDsFMaeNcLrcMWw     1964-08-08
  1.  Before: 
  2.             StudentID   StudentName          DateOfBirth 
  3.             ----------- -------------------- ------------- 
  4.             1           John Smith           1990-03-21 
  5.             2           Fred Bloggs          1988-11-02 
  6.             3           Another User         1985-07-11 
  7.             4           Yet Another User     1977-06-25 
  8.   
  9.         After: 
  10.             StudentID   StudentName          DateOfBirth 
  11.             ----------- -------------------- ------------- 
  12.             1           PDUHjRWJcb           1926-01-02 
  13.             2           WRmNqQKxvuV          1969-03-14 
  14.             3           nBCkAVDrvdhe         1968-05-05 
  15.             4           RJDsFMaeNcLrcMWw     1964-08-08 


How?
Category: Transact-SQL :: Article: 460

What?
This is a stored procedure I've nabbed from some consultants from my day job. It shuffles the records and matching data values:

Before:
copyraw
ID        Name         DateOfBirth
--------- ------------ -----------
1         John Smith   1988-06-24
2         Fred Bloggs  1972-11-17
3         Another User 1964-02-18
  1.  ID        Name         DateOfBirth 
  2.  --------- ------------ ----------- 
  3.  1         John Smith   1988-06-24 
  4.  2         Fred Bloggs  1972-11-17 
  5.  3         Another User 1964-02-18 
After:
copyraw
ID        Name         DateOfBirth
--------- ------------ -----------
1         Fred Bloggs  1964-02-18
2         Another User 1988-06-24
3         John Smith   1972-11-17
  1.  ID        Name         DateOfBirth 
  2.  --------- ------------ ----------- 
  3.  1         Fred Bloggs  1964-02-18 
  4.  2         Another User 1988-06-24 
  5.  3         John Smith   1972-11-17 
Looks pretty good, doesn't it? The advantages of this is that you can send this data to your developers and the data types will be correct and maybe they'll resolve issues faster than if they were given scrambled data (see my articles on DataJumble and DataScramble).

How?
Category: Transact-SQL :: Article: 459

What?
Quick article here as googling/binging for how to refer to Joomla articles after versions 1.5.x wasn't obvious. This article is to demonstrate how to write the webaddress for a Joomla article even when you have Search-engine-friendly website addresses enabled.

How?
Basically you have to include &view=article as opposed to Joomla v1.5.x when the option and id parameters would suffice:
copyraw
- SEF URL
http://www.joellipman.com/support/documentation/449-module-joes-word-cloud-jwc.html

- Direct Link (irrespective of SEF)
http://www.joellipman.com/?option=com_content&view=article&id=449
  1.  - SEF URL 
  2.  http://www.joellipman.com/support/documentation/449-module-joes-word-cloud-jwc.html 
  3.   
  4.  - Direct Link (irrespective of SEF) 
  5.  http://www.joellipman.com/?option=com_content&view=article&id=449 
Category: Joomla :: Article: 458

Event 1

A friend reported her phone was constantly being drained, wasn't lasting the day on a full charge and knew how to close apps running in the background (double-click "home" button and hold down app until red minus buttons appear, tap red button)...

I wouldn't usually take notice but I think this is a brilliant example where trying to fix the problem is the very cause of the problem in the first place:


The empty arrow next to the battery indicator tells you that location services is enabled but it is attached to a reminder that needs to constantly monitor your whereabouts in order to "remind you".

The reminder here was to charge the phone but it was the reminder which would drain a full charge in less than a day.

What?
We have a specific timetabling system for academic institutions and all our staff/students follow academic week numbers as opposed to calendar week numbers.

Why?
The aim of this article is to quickly generate a calendar for a full academic year for referencing by staff/students.

How?

What?
If you get something like the following error:

Warning: call_user_func() [function.call-user-func]: First argument is expected to be a valid callback in /home/.../templates/rt_affinity/rt_sectionrows.php on line 311

How?

  1. Copy & backup the file /public_html/.../templates/rt_affinity/rt_sectionrows.php
  2. Find the following piece of code around line 311:
    copyraw
    foreach($this->horizontalCookie[$row] as $block) {
    	$block = str_replace('-', '', $block);
    	$this->module_row1 .= call_user_func($block, $this, $mClasses);
    }
    1.  foreach($this->horizontalCookie[$row] as $block) { 
    2.      $block = str_replace('-', '', $block)
    3.      $this->module_row1 .= call_user_func($block, $this, $mClasses)
    4.  } 
  3. And change it to:
    copyraw
    foreach($this->horizontalCookie[$row] as $block) {
    	if(!empty($block)) {
    		$block = str_replace('-', '', $block);
    		$this->module_row1 .= call_user_func($block, $this, $mClasses);
    	}
    }
    1.  foreach($this->horizontalCookie[$row] as $block) { 
    2.      if(!empty($block)) { 
    3.          $block = str_replace('-', '', $block)
    4.          $this->module_row1 .= call_user_func($block, $this, $mClasses)
    5.      } 
    6.  } 
Category: Joomla :: Article: 451

What?
Really not work related but if you know your sharepoint site:

Custom Error
http://<My_SharePoint_Site>/_layouts/MySite.aspx?Error=You%20are%20a%20jerk%20and%20SharePoint%20does%20not%20share%20with%20jerks.


Installer?

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com

RSS Feed

Related Articles

Joes Revolver Map

Joes Word Cloud

value   would   joomla   table   name   find   parameter   first   file   note   error   user   client   used   google   report   case   files   need   form   source   deluge   database   system   script   function   zoho   date   work   where   website   code   using   field   display   uploaded   data   list   order   mysql   creator   added   server   windows   create   page   following   version   license   time   JoelLipman.Com

Accreditation

Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Paypal:
Donate to Joel Lipman via PayPal

Bitcoin:
Donate to Joel Lipman with Bitcoin bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4

Ethereum:
Donate to Joel Lipman with Ethereum 0xb038962F3809b425D661EF5D22294Cf45E02FebF
© 2024 Joel Lipman .com. All Rights Reserved.