What?
This is an article to demo the crudest form which uses Joomla's version 2.5 core mootools (uncompressed?). This is intended for absolute novices (like me) who just want to see an example of an AJAX form within Joomla 1.6.x - 2.5.x in it's most basic state. At time of print, I am using this with Joomla 2.5.6.

Why?
The examples of the official site (mootools.net) did not work in my Joomla environment nor did most people's examples across the web. All I wanted was a basic example to show me how to send a form asynchronously (ie. running in the background without loading a new page).

APPLIES TO Joomla 2.5.x

Why?
I'm building a Joomla component which is to be compatible with Joomla versions 1.6.x to 2.5.x. Because I use dynamic scripts running in the background (mootools), some of these need to connect to the database but as they sit outside of the MVC structure, we need them to use the existing configuration file in order to retrieve the credentials (ie. username, password, database, etc.). For obvious reasons, these cannot be hardcoded.


Why?
This has taken me too long to figure out and I hope I don't lose this note again. The only website that was titled similarly kept slowing down my computer too much so I decided to work out my own. The complexity is due to content also being dynamically resized in height.

What?
Basically I have a menu in a sidebar, I don't want it to overlap the header nor the footer.I have a content page next to it which changes in height dynamically (a separate mootool function to this one).

How?

What?
Trying to make a component and can't remember how to store HTML code when the save command is clicked (ie. submitted from a PHP form). This is for the Opensource Content Management System (CMS - phew what a mouthful) Joomla! version 1.6.x to 2.5.x; no wonder customers have difficulty following.

How?
So it's the field on the XML file /models/forms/whatever.xml which needs the filter=raw attribute, for example:
copyraw
<field name="item_desc" type="editor" filter="raw" rows="15" cols="40" default="" />
  1.  <field name="item_desc" type="editor" filter="raw" rows="15" cols="40" default="" /> 

Other searches:
  • Stripping HTML from my joomla 2.5 component
  • Leave my HTML alone for admins
  • field types for Joomla 1.6
Category: Joomla :: Article: 425

Why?
Hmm... I was writing a stored procedure that will scramble data given a table as a parameter. Because I only want to update a temporary table and not the original (source) table, I needed the following stored procedure (or part of).

What?
This will copy a given table into a temporary table all the while maintaining the structure and data.

Thinking inside of the box
I think everyone suggests the following (or at least the idea of):
copyraw
SELECT *
INTO #MyTempTable
FROM @GivenTable
  1.  SELECT * 
  2.  INTO #MyTempTable 
  3.  FROM @GivenTable 
If @GivenTable is a parameter then the above will simply return an error. Also, if it was this easy, I wouldn't need to post this note on my website.

Category: Transact-SQL :: Article: 424

What?
Some people have been suggesting you can use "CREATE OR REPLACE ... VIEW ... FUNCTION" but my SQL Server 2008 Management Studio doesn't like this and refuses to understand what I'm trying to do.

Why?
As this data seemed to be across various websites, I wanted a page which has all of them in one place. So here you go, I hope it's of some use. If it's wrong then just post a comment at the bottom of this page.


This was called a Data-Scrambling Function but it depends on what you mean by "scrambling". This is a function which merely uses the same characters but switches their order randomly, so I've renamed it DataJumble as opposed to my article on Data-Scrambling.

Why?
We want to scramble sensitive data that we send to suppliers for support or analysis. With inspiration from: "Obfuscating your SQL Server Data" by John Magnabosco but tweaked for our purposes. NOTE that the following has only ever been run on development environments and I would not recommend running this on a production system as I have not tested the performance and database load.

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           mStnoh iJh           1926-01-02
           2           lgreg BFdos          1969-03-14
           3           onrUest ehAr         1968-05-05
           4           otentre AhYe Usr     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           mStnoh iJh           1926-01-02 
  13.             2           lgreg BFdos          1969-03-14 
  14.             3           onrUest ehAr         1968-05-05 
  15.             4           otentre AhYe Usr     1964-08-08 

Category: Transact-SQL :: Article: 422

Why?
A friend asked me if there was a quick way to simply right-click on a folder in Windows Explorer and it would generate a text file with the contents of the directory he right-clicked.

What?
We can do this by adding an entry to the context menu (when you right-click on an object). The following is a method of adding this as a single command similar to how we add the "Command prompt from here" option (now built-in to Windows 7). I added this option for him in Windows 7 Ultimate using the system registry (see "How: for Windows 7" below).
copyraw
-- yield

a_subfolder_in_this_folder
a_file_in_this_folder.txt
another_file_in_this_folder.doc
  1.  -- yield 
  2.   
  3.  a_subfolder_in_this_folder 
  4.  a_file_in_this_folder.txt 
  5.  another_file_in_this_folder.doc 

How?
Category: Windows OS :: Article: 420

Intro
Prefixing lines with their respective line number in a text file using a Microsoft Windows Operating System... I've just googled this as I couldn't remember how I did this last time and a number of people showing off their MS-DOS batch skills have proposed stupid extensive solutions when all you need is one command-line.


Why?
Working with programming languages, I often need to write the accompanying documentation. Within the documentation, I may want to refer to a line of code within a text file. I also find myself copying amounts of code into the same document and then needing lines prefixed so that I can explain the code.


What?
Change contents of "original_file.txt"
copyraw
The first line of my code
The second line of my code
The third line of my code
  1.  The first line of my code 
  2.  The second line of my code 
  3.  The third line of my code 
To "results_file.txt"
copyraw
1:  The first line of my code
  2:  The second line of my code
  3:  The third line of my code
  1.  1:  The first line of my code 
  2.    2:  The second line of my code 
  3.    3:  The third line of my code 


How?
Category: MS-DOS :: Article: 419

Thought I'd put a quick note here, I tried a fair few solutions that didn't work and then found this hidden away in a forum:

Quick Count
copyraw
=INT(SUMPRODUCT((A3:A1000<>"")/COUNTIF(A3:A1000,A3:A1000&"")))
  1.  =INT(SUMPRODUCT((A3:A1000<>"")/COUNTIF(A3:A1000,A3:A1000&""))) 

This returns the number of unique values in the range A3 to A1000 and excludes the blank/empty cells.

Display all Unique
Found this note on one of Microsoft Help sites:
Category: Excel :: Article: 418

Thought I'd add the migration script I've been using to test my JComments migration from my Joomla CMS site version 1.5.20 to Joomla CMS site version 2.5.6.

DISCLAIMER

  1. I do not work for either Joomla or JoomlaTune (Jcomments)
  2. This script is provided as is without warranty
  3. If you do not understand what this script is doing, let someone who does run it instead

INSTALL INSTRUCTIONS

  1. Install JComments on your upgraded website (at time of print: Jcomments v2.3.0 on Joomla v2.5.4)
  2. Copy the below script to a text file
    1. Change the database names to match your setup
    2. Change the table name prefixes to match your setup
  3. Run the modified SQL script against your database.
Note: It is not advisable to run this on a production website!

Given Data
Activities by employees with start dates and end dates in a mySQL database.

Objective
copyraw
User		Mon	Tue	Wed	Thu	Fri	Sat	Sun	Total
--------------- ------- ------- ------- ------- ------- ------- ------- ---------
Me		09:00	07:30	08:00	07:00	06:00	00:00	02:00   36:00
Myself		07:30	07:30	07:30	07:30	07:00	00:00	00:00   37:00
I		03:45	03:30	03:00	03:30	00:00	00:00	00:00   23:00
  1.  User        Mon    Tue    Wed    Thu    Fri    Sat    Sun    Total 
  2.  --------------- ------- ------- ------- ------- ------- ------- ------- --------- 
  3.  Me        09:00    07:30    08:00    07:00    06:00    00:00    02:00   36:00 
  4.  Myself        07:30    07:30    07:30    07:30    07:00    00:00    00:00   37:00 
  5.  I        03:45    03:30    03:00    03:30    00:00    00:00    00:00   23:00 

Category: MySQL :: Article: 416

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

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