Home arrow Articles arrow Programming arrow Joomla
Joomla
How to set custom javascript from within a component using $mainframe in Joomla 1.5 PDF Print E-mail
Tag it:
Delicious
blogmarks
Stumble
Furl it!
Digg
YahooMyWeb
Technorati
User Rating: / 0
You must re-declare your globals if you are within a function. If you are on the component level, then you dont even have to declare global variables.
 
How to insert data into the database using joomla 1.0 and 1.5 PDF Print E-mail
Tag it:
Delicious
blogmarks
Stumble
Furl it!
Digg
YahooMyWeb
Technorati
User Rating: / 19

This short snippet demonstrates how to insert data into a joomla database table using the built in $database global object. Note that you have to declare the variable if you are making this call from within a function. If this call is being made from within a component or module, then declaring the variable is not required.

For Joomla 1.5

For Joomla 1.5 the insertObject() and updateObject() functions can be used. 

 insertObject()

For inserting data, set the primary key in the stdClass object to null, then denote the same primary key field name as the third argument in the insertObject function. 

The insertObject function's first argument is the table name, the second is the stdClass object containing the name of the fields as the keys and the value you want to insert on the right hand side of the assignment and as I mentioned before, the third argument is the name of the primary key field, assuming it is an auto_increment in mysql, you can set it to null, and the object will create a new incremented id for you. 

updateObject()

The updateObject accepts the same number of arguments, the only important thing to note here is that in the stdClass object, the primary key field is set to the ID of the record that you are trying to update. So figure out what the ID is and set it to that numeric value.

Get the Last inserted ID

If you are creating a new record, and want to get the ID of the last inserted record, assuming that the table is set to auto increment on the PK field, call the insertid() method after you do the insert.

Last Updated ( Wednesday, 20 July 2011 )
 
How joomla 1.0.x passwords are encrypted PDF Print E-mail
Tag it:
Delicious
blogmarks
Stumble
Furl it!
Digg
YahooMyWeb
Technorati
User Rating: / 1

This article will briefly explain the Joomla 1.0.x encryption scheme.

This information is useful if you are in a position where you have access to your database, but have forgotten the password to the Joomla administrator. 

In order to create a new password simply add it to the $password variable in the variable that follows.

 

Last Updated ( Sunday, 11 January 2009 )
Read more...
 
How to modify the lost password feature in joomla community builder with the email address only PDF Print E-mail
Tag it:
Delicious
blogmarks
Stumble
Furl it!
Digg
YahooMyWeb
Technorati
User Rating: / 7

Joomla Community builder has a built in lost password facility that allows for the automatic reset of the password contained in an email sent to the user. The user can then log in with the new password and change it from within the community builder profile.

Often times people dont remember their usernames, only their email address. However, without the username, the form will not submit and the password will not be sent. 

Let us take a closer look at the code so we can modify it to use just the email address and not the username.

 

Last Updated ( Sunday, 11 January 2009 )
Read more...
 
Add custom fields in community builder administrator registration email PDF Print E-mail
Tag it:
Delicious
blogmarks
Stumble
Furl it!
Digg
YahooMyWeb
Technorati
User Rating: / 1
I searched the web for a way to do this with no success, and I ended up modifying the code myself.

These instructions show you how to add your custom field in the CB registration form, and have it included in the automated email sent to the administrator.

Last Updated ( Sunday, 11 January 2009 )
Read more...