Applies to Joomla 1.6+

What?
This is an article to describe how to add an article modal button in the Joomla Admin Panel (at time of print version 2.5.6) of your component including the all important clear button. What I found was that no one posted this solution which I found is compatible with almost any site and with all my components without having to modify the below script.

Why?
The article modal is a much easier way for the end-users to select a Joomla! article in the component parameters/options. The "clear" button is essential as some article_modal fields may not be required and are difficult to clear once set.

How?

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.


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

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!

What?
In not as many words as others, here's my MySQL query to extract details on images stored in the MediaWiki CMS system (v1.14).

Why?
Prior to a migration and just after another change freeze, I had sent all Wiki articles modified since the last export but then needed to send all images that had also been either added/modified since.

How?
Using MySQL, the following query lists the image name, size, user who uploaded, timestamp and the path. Remember that the paths are determined using the MD5 Hash of the filename:

This is for Joomla 1.5.x sites!
Note that this article is for Joomla 1.5.x sites to be converted to Wordpress 3.2.x sites. I started with a Joomla 1.5 as the move from Joomla 1.6 or greater is a lot easier since it uses nested categories like Wordpress.

There are lots of commercial migrators out there and they all seem to have this problem. I'm really keen not to ask all my users to have to change their passwords but that is what the commercial applications are doing.

What do I want?
Page ID, Title, Content, Category, AccessLevel (note that AccessLevel is extra to your standard MediaWiki setup and one that was customized for my day job).

Thought I already had this somewhere on my site, so it took a while again but I've posted my finished query here:

The base query to list mediawiki articles
Page ID, Title, Content, Category
copyraw
SELECT
		p.page_id AS PageID,
		CONVERT(p.page_title USING latin1) AS PageTitle,
		CONVERT(t.old_text USING latin1) AS PageContent,
		(SELECT GROUP_CONCAT(CONVERT(wikimedia_categorylinks.cl_to USING latin1)) FROM wikimedia_categorylinks WHERE wikimedia_categorylinks.cl_from=p.page_id) AS PageCategory
	FROM
		wikimedia_page p
	LEFT JOIN wikimedia_revision r ON p.page_latest=r.rev_id
	LEFT JOIN wikimedia_text t ON r.rev_text_id=t.old_id
	WHERE
		p.page_namespace=0
		AND t.old_text=''
		AND p.page_is_redirect=0
  1.  SELECT 
  2.          p.page_id AS PageID, 
  3.          CONVERT(p.page_title USING latin1) AS PageTitle, 
  4.          CONVERT(t.old_text USING latin1) AS PageContent, 
  5.          (SELECT GROUP_CONCAT(CONVERT(wikimedia_categorylinks.cl_to USING latin1)) FROM wikimedia_categorylinks WHERE wikimedia_categorylinks.cl_from=p.page_id) AS PageCategory 
  6.      FROM 
  7.          wikimedia_page p 
  8.      LEFT JOIN wikimedia_revision r ON p.page_latest=r.rev_id 
  9.      LEFT JOIN wikimedia_text t ON r.rev_text_id=t.old_id 
  10.      WHERE 
  11.          p.page_namespace=0 
  12.          AND t.old_text='' 
  13.          AND p.page_is_redirect=0 

Category: MediaWiki :: Article: 385

Migrating the articles:
  1. Change database name my_joomla_db to your joomla database and my_wordpress_db to your Wordpress database
  2. Change http://demo.joellipman.com/wordpress/ to the full URL of your WordPress site.
  3. If post_type is to be post then append with ?p= otherwise use ?page_id=.
Articles:
------ MIGRATING JOOMLA v1.5.# CONTENT TO WORDPRESS v3.2.# ------
-----------------------------------------------------------------

INSERT INTO my_wordpress_db.wp_posts
SELECT
	id 'ID',
	1 'post_author',
	created 'post_date',
	created 'post_date_gmt',
	CONCAT(introtext, ' ', `fulltext`) 'post_content',
	title 'post_title',
	'' post_excerpt,
	CASE state WHEN '1' THEN 'publish' ELSE 'draft' END 'post_status',
	'open' comment_status,
	'open' ping_status,
	'' post_password,
	alias 'post_name',
	'' to_ping,
	'' pinged,
	modified 'post_modified',
	modified 'post_modified_gmt',
	'' post_content_filtered,
	'0' post_parent,
	CONCAT('http://demo.joellipman.com/wordpress/', '?p=', id) AS guid,
	'0' menu_order,
	'post' AS 'post_type',
	'' post_mime_type,
	0 comment_count
FROM
	my_joomla_db.jos_content
ORDER BY
	id


Quick Fix
Check that this error isn't resolved by just changing the Mailer (Joomla > Global Configuration > Mailer settings). Alternate between PHPmail and sendmail just to check this isn't the problem. If the problem is still there then check the below:

Tried both PHPmail and sendmail
So if this happens irrespective of whether I have PHP mail or sendmail set as the Mailer.
copyraw
Notice
Could not execute: /usr/sbin/sendmail
Warning
Registration failed: An error was encountered while sending the registration email. A message has been sent to the administrator of this site.
  1.  Notice 
  2.  Could not execute: /usr/sbin/sendmail 
  3.  Warning 
  4.  Registration failed: An error was encountered while sending the registration email. A message has been sent to the administrator of this site. 
Check you can send email from that server
copyraw
ERROR:
Message not sent. Server replied:
Connection refused
111 Can't open SMTP stream.
  1.  ERROR: 
  2.  Message not sent. Server replied: 
  3.  Connection refused 
  4.  111 Can't open SMTP stream. 

One common problem people have is an incorrectly setup mail system. Here is a list of rules that must be followed:
Category: Joomla :: Article: 358

So there is other documentation out there. I'm basing most of this article on the official Joomla 1.6 documentation: http://docs.joomla.org/Creating_a_profile_plugin and I want to use an example that worked for me. Important: This is for Joomla version 1.6.x+.

Aim / Objective
  1. Add a field with a dropdown list.
  2. Add a button to upload an avatar (and sync with 3rd party avatar).
Not riveting stuff but something that all my clients want. Fortunately for me, I just created one plugin which I can install on any number of Joomla 1.6 sites and it does all this for me... Neat huh?

Folder
I'm going to shove all these files into a folder which I will then compress and install using the Joomla! CMS Extension Manager.

I'm going to call the folder "profile5" (without the double-quotes) and create a subfolder called "profiles".

So I should end up with the following file/directory structure:
copyraw
./profile5
     ./profile5/profiles
  1.  ./profile5 
  2.       ./profile5/profiles 
Also copy one of those handy blank "index.html" files into each of these folders in case "directory listing" gets enabled on your server.I'm going to refer to the files to create as being in this folder.

Category: Joomla :: Article: 351

What?
So this is a note to myself so that I have a checklist and can quickly update any extensions designed for Joomla 1.5.x and make these compatible with Joomla 2.5.x websites.

In the past, I have only ever changed the words <params> to <fields> but for more stability, there are a few more tweaks to do.

How?
For demo purposes we will be referring to a Joomla module called "mod_moduletoupgrade" in British English (en-GB). I don't think it actually exists in reality but you replace the name "moduletoupgrade" with whatever you're upgrading and follow the below instructions.

I'm also going on the basis tha.


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

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