Recovering or Creating Joomla Administrator Account Password

Posted on September 29, 2009
Filed Under Code Snippets, Joomla CMS | Leave a Comment

I wrote a post about recovering your OpenRealty admin access permissions after having encountered a unique situation in trying to recover admin access to a project demo site. With a little foresight after scripting the version for OpenRealty, I thought that maybe a similar script to help people in the event of a Joomla password mishap would be worthy of creating to. So, I figured I’d put together this little snippet you can add to your snippet inventory just in case. Why would you need something like this? I’ll explain.

If you didn’t read the post regarding the similar OpenRealty script then this will help explain why something like this may be necessary. There are times people may install Joomla and then not use it for a period of time. Over time memory can fade and recovering your password using the normal process isn’t really an option because the email assigned to the account is no longer accessible. To make matters worse, there are actually hosting accounts that specialize in bulk hosting of Joomla or WordPress type sites that really don’t grant access to things like phpMyAdmin. What do you do? You use the script below to generate a temporary Super Administrators Account in order for you to reset or change your former account then you delete the file along with the temporary Super Administrators Account. Simply upload the script to your Joomla directory, navigate to it, and your done. It will create a super admin account called THEADMIN with the password of “password”. Its important to note that I set the number in the 9000 range because if you are not sure how many members you have this number is big enough to ensure you wont likely encounter an error. However, this number is so high that each and every new account created will follow this number so its something to consider changing if you want to keep the user ID lower.

But you might ask, why bother with creating a new account when we could simply reset the account to password? Well the very small script at the very bottom of this post will do just that providing the admin account hasn’t been renamed. Upload and access it the same way you would if you were creating the new account. Enjoy!

This one resets the existing super administrators account password to “password”

[snippet missing]

This one creates a new account and password.

<?php
/*
@ Copyright: (c)2007 - 2009 Jared Ritchey Design, All Rights Reserved.
@ Author URL: http://www.jaredritchey.com
@ Author Email: jared@jaredritchey.com
@ License: GNU/GPL Extended.
@ Config Notes: not knowing how many members are in your DB this has been set to create the account in the 9000 range.
*/

//////////////////////////////////////////////////////////////////////////////////////
// THIS SCRIPT IS USED TO CREATE AN ACCOUNT FOR THEADMIN WITH THE PASSWORD OF password
//////////////////////////////////////////////////////////////////////////////////////
require_once('configuration.php');
$link = mysql_connect($mosConfig_host, $mosConfig_user, $mosConfig_password) or die("Could not connect : " . mysql_error());
mysql_select_db($mosConfig_db) or die("Could not select database");
echo "Database Host: " .$mosConfig_host."<br />";
echo "Database User: " .$mosConfig_user."<br />";
echo "Database Password: " .$mosConfig_password."<br />";
echo "Database: " .$mosConfig_db."<br />";

$sql= "INSERT INTO jos_core_acl_aro VALUES(9001, 'users', '9491', 0, 'THEADMIN', 0)";
mysql_query($sql);

$sql= "INSERT INTO jos_core_acl_groups_aro_map VALUES(25, '', 9001)";
mysql_query($sql);

$sql= "INSERT INTO jos_users VALUES(9491, 'THEADMIN', 'THEADMIN', 'someone@somewhere.com', '7d83778ac1e89412de7bad3e3470dc21', 'Super Administrator', 0, 0, 25, '2007-03-06 11:55:23', '2009-08-11 15:32:15', '', 'editor=fckeditor\nexpired=\nexpired_time=')";
mysql_query($sql);

//echo "<br /><br />";
die("Your SUPER ADMINISTRATOR Account was added - be sure to make modifications prior to continuing and delete this file.");
?>

Hide Null or Empty Value Fields

Posted on September 29, 2009
Filed Under Code Snippets | 1 Comment

Hiding Search Forms Fields with Null Values from the Search String.

Have you ever wanted to reduce that long confusing looking and un-necessary search string in your “GET” type forms? In our line of work we may opt to use one of three primary tools in our projects; OpenRealty, UltimateIDX, or our home grown product we use on high end projects. Regardless of product, in each instance the search forms for the MLS Quick Search uses the form action type of “GET” and in doing so it passes the form value to the URL string for the query. But what happens when you have a null value or a field with NO value? Why bother to pass fields to your search string that have no value? Over time we noted that lengthy search strings regardless of empty values or not would reduce the response time for the results substantially when compared to shorter search strings.

This script was written to help in the reduction of processing burdens placed on servers for large search forms that use the GET method for form processing. It was designed in part to reduce the SQL search timeout issue common in Real Estate MLS Search forms that rely on the “GET” method to reduce the number of fields passed in the query string. If a search form field contains a NULL or no value it will not be passed on to the GET string.

With help from coder / blogger Greg Burghardt of Fundamental Disaster we hashed out this little snippet to achieve what we were after. The code has since been modified and has about 4 different variants in use but this one is the most true to the original.

You can download the snippet in a zip file from right here; SearchForms.zip

To use this script you should add a little php to display a variable in the body tag or you can simply permanently alter the body tag as follows;
EXAMPLE:
<body onload=”enableEmptyFields(document.something);”>

You must also add an onSubmit event handler (property) belonging to a Form object as follows:
EXAMPLE:
<form action=”the-name-of-your-script.php” method=”get” onsubmit=”disableEmptyFields(this);” name=”something”>

/* ############################### COPYRIGHT NOTICE BEGINS #############################
@ Copyright 2008 - 2009: WP Realty Team - Chad Broussard and Jared Ritchey
@ Copyright 2008: Greg Burghardt
@ Copyright URL: http://www.wprealty.org and http://fundamentaldisaster.blogspot.com/
@ Published by: Chad Broussard and Jared Ritchey
@ Scripting: In part by http://fundamentaldisaster.blogspot.com/ and Jared Ritchey Design
@ License: GNU / GPL
@ File Name: searchforms.js
############################### COPYRIGHT NOTICE ENDS ############################# */
/*
@ DISCLAIMER AND USAGE AND LICENSE:
You are free to use this script for whatever reason you so desire providing you leave the copyright details above in
tact as required and you do not redistribute this code rebranded as your own work. You are free to include this
code in any commercial or non-commercial application without further permission or obligation from WPRealty or
Chad Broussard. You may NOT republish this code absent of this copyright notice. LICENSED AS GNU/GPL Open Source
with provisions.
*/

function enableEmptyFields(form) {
  var i = 0;
  var field;
  var j = 0;
  var opt;
  while (field = form.elements[i++]) {
    switch (field.nodeName) {
      case "input":
        switch (field.type) {
          case "checkbox":
          case "radio":
            field.disabled = !field.checked;
            break;
          default:
            field.disabled = false;
            break;
        }
        break;
      case "select":
        if (field.multiple) {
          j = 0;
          while (opt = field.options[j++]) {
            opt.disabled = !opt.selected;
          }
        } else {
          field.disabled = false;
        }
        break;
      default:
        field.disabled = false;
        break;
    }
  }
}
function disableEmptyFields(form) {
  var i = 0;
  var field;
  var j = 0;
  var opt;

  while (field = form.elements[i++]) {
    switch (field.nodeName) {
      case "input":
        switch (field.type) {
          case "checkbox":
          case "radio":
            field.disabled = !field.checked;
            break;
          default:
            field.disabled = (field.value.length > 0) ? false : true;
            break;
        }
        break;
      case "select":
        if (field.multiple) {
          j = 0;
          while (opt = field.options[j++]) {
            opt.disabled = !opt.selected;
          }
        } else {
          field.disabled = (field.value.length > 0) ? false : true;
        }
        break;
      default:
        field.disabled = (field.value.length > 0) ? false : true;
        break;
    }
  }
}

WP Menu Creator for Theme Developers

Posted on September 27, 2009
Filed Under General | 2 Comments

The number one problem WordPress themes suffer from. Poor Menu Management!

A true CMS solution would not require you to manipulate the structure of your content in order to alter the structure of your menu or other navigation elements. Yet, nearly all modern themes on the market today require that you alter the position or assignment of your content in order to change the structure of your navigation. WordPress codex outlines the methods and techniques on how to achieve this relatively easily so many theme developers usually employ the codex examples in order to give their theme the appearance of having rich menu management features. Having done this myself many dozens of times its difficult for some to conceive of a simpler way without writing custom functions specific to the theme as an alternative. For this reason and those I’ll cover below were motive in our creation of the fully open source free Menu Creator for WordPress.

After having built almost a hundred themes for WordPress clients and template resellers, the number one of the big challenges we had often faced was turning WordPress into a CMS to replace a system they were migrating (or escaping) from. A good CMS requires good menu management. Publishing a free WordPress menu management tool turned out to be more of a challenge in terms of informing people of its potential than we had expected. After all, the design and styling possibilities of the WP Menu Creator are nearly endless. Since we did not include any example menus with the distribution of the Menu Creator, it ended up hurting us in terms of perception that the Menu Creator was in some way incomplete. So, I’ll first explain our motive in keeping examples out of the distribution then move onto how to make menu management a part of your themes.

When we set out to build all of our free plugins, we knew in advance that in order to get WordPress to behave much like popular CMS solutions we needed to have a few important plugins. The need for menu management was obvious. Then came form generation, member grouping tools, news feeds, lead management, post planning, and in the case of Real Estate CMS sites, important feeds to things like Zillow or Dwellicious. What those CMS requirements gave us was a road map to the ideal WordPress CMS solution powered by for the most part with all of our current FREE GNU/GPL plugins. When I say “our” I’m referring to myself and The UltimateIDX whom of which pretty much finances all of these projects. When it came to our motive in keeping these tools very basic yet open for design possibilities we kept theme developers in mind since we are theme developers and knew what was needed, requested and expected in terms of ease of integration.

How to add Menu Management Support to your WordPress Themes

After having published so many plugins and addons it was planned from the start that we would not only extend the offer to theme developers of every classification but also take the time to assist with the inclusion of our plugins by providing code for the clean and easy implementation. Naturally we keep our tools and plugins as unbranded as can be realistically expected, but do require that the license information remain in the source code unchanged.

To revisit what I started above about the lack of any CSS in our plugins, it was important for us to make sure all theme developers could easily distribute the plugins and faithfully know that the rendered output would adopt their CSS. If the theme developer creates the navigation elements styled as expected, we knew they would want a reliable way of ensuring that our plugins would play along nicely. So, we included NO CSS menu examples within any of our plugins and opted instead to publish examples of code on The UltimateIDX, this blog and our others including some at Pro Real Estate Network.

This has been a pain, so after careful planning and organizing, we decided to setup a repository of sorts that would allow us to publish all code in one convenient place and beginning this weekend (September, 24th 2009) we are doing just that. If you are a theme developer in need of good menu management in your free or commercial efforts, don’t bother writing functions into your theme when you can easily distribute the WordPress Menu Creator. We will even give you the code to make it possible, FREE.

WordPress IDX RETS

Posted on September 26, 2009
Filed Under General | 31 Comments

Adding MLS Listings to a WordPress Site from IDX or RETS sources.

Today we finally got the 2.0 version back for our latest WordPress plugin that ties in full listings management to your WordPress site without the need to install OpenRealty and a bridge. Although we have built several bridging and integration plugins capable of working with OpenRealty, the process for managing those solutions can become challenging to most website owners. What was needed was a full blown solution that didn’t require you to trick, modify or substantially alter the method by which you blog in order to achieve a truly clean MLS IDX or RETS integration solution. Our brand spanking new plug-in does just that. It fully integrates not only standard listing editor features but provides a way for bloggers to add IDX RETS listings to their sites.

The new plugin allows for you to turn your WordPress Real Estate site into a full blown MLS empowered solution unlike anything ever produced before. But its not just for IDX or RETS empowered sites either. Part of our plan in building this new version was to make sure it would work with a few types of sites we have built in the past in particular those not associated with Real Estate. Automotive sites, Virtual Magazines, Online Classifieds, even a sports and gun shop site have been successfully built using the beta version of this new application. Although a precursor to the much more advanced version scheduled for release March of 2010. There is no shortage of features in this release however; A super clean listing integration and unique characteristics guaranteed to make your WordPress site a powerful listings manager.

In the past versions we attempted to provide a rather complex bridging and integration tool for use with your install of OpenRealty. Problems mounted however as each successive update of OpenRealty usually breaks all previous versions to some degree. One bug fix in OpenRealty would present additional bugs that could break the sites structure. We have moved past that in our new plugin.

Free GNU/GPL Real Estate Listings Manager Plugin

Here is a quick summary of the features for your review pending the release this Tuesday.

  • Works fine with or without the All In One SEO Plugin, which was a requirement from the start.
  • Works with almost any modern WordPress theme including those from StudioPress and iThemes.
  • No need to bother with the installation of OpenRealty.
  • A more advanced user registration widget is included.
  • Powerful featured listings options allowing for you to put featured listings directly in posts throughout your site.
  • Designed to work with the WordPress Menu Creator.
  • Automatically generates title, meta and meta keywords based on user defined listings fields.
  • Full inline documentation
  • Contact / Client Tracking
  • CSV Export / Import
  • Export to Trulia, Google, Yahoo and other XML feeds.
  • Easily create contact forms that integrate well with the listings management features of the plugin.
  • The ONLY fully CSS/XHTML compliant output for listings data.
  • Google maps on search results.
  • Google maps on listing details pages.
  • Ajax integrated contact forms.
  • All features are template driven allowing for endless possibilities in design.
  • More to come….

With this plugin and your favorite theme, you will have the only true fully featured easy to manage listings manager available for WordPress. Although there are many real estate WordPress themes that have listings features in them, NONE of them have the potential to integrate IDX or RETS data effectively. Framing is an absolute waste of the effort and alternative methods using modified versions of the NextGen gallery are not only counter productive, but impossible to manage for any number of listings beyond a few dozen. Contact me today for more details!

Menu Creator and the BFA Atahualpa WP Theme

Posted on September 14, 2009
Filed Under General | Leave a Comment

Thanks Ron Goodman – Denver Realtor

Ron Goodman provided us an example of the Menu Creator being used in his BFA Atahualpa WP Theme and details his steps to modification of the theme. Its worth the read for anyone considering the same thing. On the UltimateIDX we published 12 of the 16 new tutorials late last night and I’m actively setting up the new categories with links so you can few them. Our client, turned voice over expert, provided the voice overs for the video tutorials that run down the ways in which you can use the Menu Creator to its maximum potential. It also includes examples in converting existing themes to work with the WordPress Menu Creator.

Encouraging Theme Developers to use WP Menu Creator

Its been a busy week in getting theme developers to look at the Menu Creator in hopes they will alter their code to support the Menu Creator. After sending out only 300 emails to many different theme developers, I am pleased to see that 21 have currently responded and will distribute the WP Menu Creator in their next theme updates. The code we provide is super clean and easy to implement and in most cases theme developers can preserve backward compatibility with their existing theme users. The nice thing about the WP Menu Creator is that its free for distribution, is not branded, does not have advertising or other promotion links and is fully compliant with XHTML menu designs.

sh404SEF Free Download Update

Posted on September 12, 2009
Filed Under General | 2 Comments

Download sh404SEF Free GNU/GPL Version 1.0.20 Beta build 237

People question why the version I post is at all important given the updates provided by Anything Digital and I simply want to reiterate that this version is the last version that was available on the Joomla extension downloads for those seeking it.

I personally believe that the $35 fee for the updated version is well worth the money given the support that they provide.  The model they use for the sale as “Support Ware” for this GNU/GPL is actually quite similar to the one we use for WPRealty.  Although the product is open source and in most cases freely available, support takes time and energy and those both equate to expenses.  By supporting a product like sh404SEF you ultimately end up with a better solution than a hit and miss open source project that is sparsely supported.

Some people have not been happy with the $35 membership fee but after careful review of what they offer, I think its a good solution to help maintain and update the component. Because of this, I won’t even bother to maintain any updates on this free download beyond the version below and will leave it here for those seeking the last version published to Joomla.

I highly recommend that if you do download this version, that after you configure and test for evaluation of the component you should ultimately get the latest version from Anything Digital to be sure you have the best possible results.

What about CMSRealty or JRealty Usage of the Component?

Our component JRealty does depend on the sh404SEF component to run effectively and as a result we will provide and install the latest version of sh404SEF for anyone using our plugins. I do actively maintain updates to the component as part of our service but will not provide it as a download. I really don’t want to undermine Anything Digital by providing a free download for versions beyond this one.

Although JRealty took a brief position on the back burner during the development of WPRealty, we do suggest and fully support Paul Bouchard’s CMSRealty as a great solution for Joomla Real Estate sites for those seeking immediate Joomla Real Estate site integration.

For those interested in purchasing a membership see the following URL http://dev.anything-digital.com/sh404SEF/License-and-Terms.html I think its a worthy investment.

Menu Creator Brian Gardner Themes

Posted on September 9, 2009
Filed Under General | Leave a Comment

Studio Press Menu Management – The Brian Gardner Themes

At least 4 or 5 times a week I get requests to take any number of the Studio Press themes and alter the code for use with the WordPress Menu Creator. Although I normally do this at no cost, there are times I have been so pressed for time that charging for the service became necessary. Now however even casual time away from client projects is at a premium so earlier this week I decided to get the voice over talent motivated to finish our series of tutorials on the subject. Once the voice over talent wraps up the work they are doing on our tutorials, I’ll publish them free of charge on the UltimateIDX website. What you can expect to learn is as follows;

  • How to use WP Menu Creator in Studio Press Themes
  • How to widgetize your theme
  • How to use WP Menu Creator in Thesis Themes
  • Introduction to the unlimited menu styling options of Menu Creator
  • The quick guide to using Menu Creator
  • How to include and distribute Menu Creator with your themes FREE of charge.
  • The quick guide to menu design.
  • How to externalize your WordPress sidebar, footer and header.
  • Others to follow.

sh404SEF FREE Download

Posted on September 9, 2009
Filed Under General, Joomla CMS | 51 Comments

I got an email this morning from a guy that asked me why sh404sef was going commercial and stated that no one can download it unless they pay a $35 fee. I replied quickly and said that its not likely that its commercial, its that its a support fee which is well worth it in my opinion.  After looking a bit into this, I realize that it does seem that my assessment is the likely motive in taking the open source product and offering a paid maintenance solution. Its the same exact approach we use with WPRealty.   $35 really isn’t a lot of money and given the features it offers for making your Joomla project SEO friendly as well as user friendly.

None the less, I’ve decided to make the OLD GNU/GPL Free version available for download for anyone that wants it.  I’m only doing this because some existing clients of mine requested a copy of the version for work on projects related to some of our Joomla plugins. This version is dated 09/02/09  (the date I downloaded it) and is file number and version ID com_sh404SEF-15_1.0.20_Beta_build_237.joomla1.5.x.zip

PLEASE understand that this download is made available in accordance to the license enclosed and I am NOT the developer, nor do I have a place to support sh404SEF.   I strongly suggest however that you invest in the project by purchasing a subscription at the vendors new site.  As I said above, its a worthy investment into the furtherance of this vital component.

Updated Similar Post

New Featured Listings Addon

Posted on September 5, 2009
Filed Under General | 2 Comments

SiriusFeatured AddonI just wrapped up fixes and updates to the Sirius Featured Listings addon today. Its ready for download and is FREE GNU/GPL. This addon is considered BETA as I have a few tiny bugs but it none the less works fine in all of our client sites. Future releases will include the following updates.

THE TO DO LIST

  • Adding options for multiple instances of slideshows based on user defined criteria.
  • Add more sample templates for slideshows.
  • Add the advanced slidewhow feature with our FormKit included.
  • Apply the new feature to allow the listings to be displayed externally via CURL.
  • Add RSS Support so featured listings will generate their own RSS XML
  • Build a video tutorial on some of the examples we have built.

The last feature listed above is actually semi working. You can see an example of this located at a site I put the MLS feed into here http://www.connesteefallshomes.com/ In the upper right hand corner you can see the RSS Links for their predefined search results.
SiriusFeatured Addon Screenshot


TEMP CODE: GDHXCDX17249629