Showing posts with label Joomla. Show all posts
Showing posts with label Joomla. Show all posts

Friday, January 30, 2015

How to Show Breezing Form Data in Front End With Content Builder

Hi Ezent,

let me list all necessary - and even the tiniest - steps to create an administrative panel with ContentBuilder + BreezingForms, I will really describe all steps that I think that might be useful for other readers as well:

- Install BreezingForms (at least 1.7.3 backport 3)

- Install ContentBuilder

- In BreezingForms, create your form as usually

- In ContentBuilder, open the views

- Click "New"

- In the new view's first tab, choose the source (com_breezingforms)

- Enter a name for your view

- Enable email notifications

- Click "Advanced Options" button

- Choose "Backend" in "Display In"

- In "Show Columns" check "Select", "Edit", "Publish" to display the administrative columns

- SAVE YOUR VIEW

- Choose the BreezingForms form you would like to connect with this view

- SAVE YOUR VIEW

- Check "Editable" for elements (in BreezingForms you usually want to edit all fields)

- SAVE YOUR VIEW

- Choose "Edit by Type"

- Check "Include In List" for all elements you would like to display in the list

- Open the Content Template tab

- Check the "Create Sample" checkbox

- Open the Permissions tab

- Uncheck all permissions in Backend panel and check "List Access", "View", "New", "Edit", "Publish" and "Article Settings" for the Super Users group --- do _NOT_ use any of the checkboxes in "Force Permission On Owner", as this would be for a different use-case.

- Uncheck "Limited Article Options"

- SAVE YOUR VIEW

- CLOSE YOUR VIEW

- PUBLISH YOUR VIEW

- Hover over Joomla's Components => ContentBuilder Views and you should see the view for your custom admin panel.

- Open it and you should be able to add, edit, delete, publish records and edit the underlying article settings.

Hope I covered everything but this should be it. The whole process is very similar for the built-in form builder, except that there you would need to create an Editable Template (which is given here already with the BreezingForm itself).




Source :
http://crosstec.de/en/forums/37-contentbuilder-general-forum/61647-bug-in-updateediting-record.html?limit=6&start=12#62375

Monday, July 8, 2013

How to trouble shoot Joomla CMS:

Somtime when you transfer your joomla website from one to another host joomla website stop responding and sometime show blank index and admin pages. This may be to conflicting somting,

So how we can check exactly which plugin or component or module is causing the problem?

Here is a Quick Method:

1..Install new joomla
2..on this new joomla installation Install as much component and plugins and module you

have that was in previous faulty CMS. (specially install K2).
3..upload your backup files into "Backup" folder.
4..Import your backup database into mysql.
5..take backup of all new joomla installation files and folder into "joomla" folder.
6..edit joomla configuration file and connect with your backup database.
7..copy template folder from "Backup" folder.
8..refresh the home page.
9..now copy one by one subfolders of plugin, Component, modules from "Backup".
and refresh the home page each time you copy the folder to see the effect.

when you see page blank or any error after copying any folder, revert it back from

"joomla" folder and note down the module or plugin folder name which is causing problem.

10..when you found the exact plugin or modules you can just disable from joomla admin panel.

The Best thing of this method, you can login from admin panel and you will see all option where you can disable SEF URL (which usualy caused problem) and all module, component  and plugins.

Sunday, June 16, 2013

Copying a Joomla website

This tutorial is for Joomla! CMS Version(s) Joomla 2.5 Joomla 3.x

Copying a Joomla! website is a two-part process: you must copy the files and you must copy the database (which is where the content is stored). Copying the files and copying the database are separate operations. Which you carry out first will depend on your particular circumstances but in most cases it does not really matter. If your website is being updated frequently and you need to take your website offline while the copy takes place then you will probably want to perform the database copy last so as to minimize downtime.

Copying a website (common method)

Copying the files with FTP

One method of copying the files from one Joomla! installation to another is to use standard desktop FTP software to first download all of the files comprising your Web site from their location on your Web server, then upload these files to the location of the new Joomla! installation. Depending on where you're placing the copy of your Joomla! site, the new location could be a different directory on the same Web server, or it could be a new location on a completely different Web server.
It is important to maintain the same directory structure for all of your folders and files as you move them from one location to another. Fortunately, desktop FTP software will handle this automatically as you upload and download sets of files and folders. (Your FTP software should contain Help documentation which explains FTP and how to use the FTP software interface.)
Note that after you move the files from one location to another, you may still need to edit Joomla! configuration files to get your copy of Joomla! working at the new location; you may also need to change settings for aspects of your Web server to get the copy of your Joomla! site working.
In rare instances, a file may become corrupted during an FTP transfer, where only part of the file is successfully transmitted. If you encounter strange or unexpected errors with your new Joomla! installation after you copy over the files, you may want to try re-uploading your files in case of corruption during transfer.

Download files from server to your computer

  1. Use FTP software (e.g. FileZilla) to connect to the server
  2. Select the directory you want to download (mostly /public_html/ or /htdocs/)
  3. Right click + select files/folder to download, or drag + drop the folder from the "Remote site" view to the "Local site" view
  4. The downloading of the remote files will start
  5. After you've downloaded the files, check the "Failed transfers" to see if there weren't any errors

Upload files from your computer to a server

  1. Make sure that configuration.php has the right settings for the server (especially: localhost, database, database user, database password, log_path, tmp_path)
  2. Use FTP software (e.g. FileZilla) to connect to the server
  3. Select the directory you want to upload, and to where (mostly to /public_html/ or /htdocs/)
  4. Right click + select files/folder to upload, or drag + drop the folder from the "Local site" view to the "Remote site" view
  5. The uploading of the local files to the remote server will start
  6. After you've uploaded the files, check the "Failed transfers" to see if there weren't any errors


Copying the database with phpMyAdmin

The phpMyAdmin tool can be used to export and import a database, providing a simple way to duplicate a copy of a database using a different name on our servers.

Exporting a copy of the database to your computer

  1. Login to the database that you want to duplicate using phpMyAdmin
  2. Click the database name on the left-hand side of the page.
  3. Select the Export tab
  4. Select the Save as file option
  5. Click Go
You'll then be prompted to save the database file on your personal computer.

Importing the copy into a new database

You'll first need to create the new, empty database on your server using the account control panel. It needs to be UTF8 (utf8_generic_ci). After the new database has been created:
  1. Login to the new database using phpMyAdmin
  2. Click the database name on the left-hand side of the page
  3. Select the Import tab
  4. Click the Browse button under "File to import", then select the database file from your computer
  5. Click Go to import the database
Hint: If you see a "No database selected" error, it's probably because you forgot to first click on the database name in the left-hand column.

Changing configuration.php

In order to get Joomla to work on the new server, you should make the necessary changes in configuration.php to reflect the new server settings. You should check/edit the following to
        var $host = 'localhost'; // usually "localhost". If it's different for your server then your hosting provider should be able to tell you that.
        var $user = 'the_db_username';
        var $db = 'the_databasename';
        var $password = 'the_db_password';
        var $live_site = ''; // is usually empty.
Joomla will work, even if $log_path and $tmp_path are wrong, though you won't be able to install extensions. Login into the back-end of your new Joomla site.
In Joomla 1.5 goto: Help > System Info > Directory Permissions. Look at the bottom 4 rows:
Cache Directory /var/www/example.com/cache/ Writable
Cache Directory /var/www/example.com/administrator/cache/ Writable
Log Directory ($log_path) /var/www/some/other/folder/example.com/logs/ Unwritable
Temp Directory ($tmp_path) /var/www/some/other/folder/example.com/ Unwritable
If the $log_path and $tmp_path are "Unwritable", you'll need to change the values in configuration.php.
Use the values of the "Cache Directory" without the "/cache/" part and change $log_path and $tmp_path to
   var $log_path = '/var/www/example.com/logs';
   var $tmp_path = '/var/www/example.com/tmp';
If the Directory Permissions show that $log_path and $tmp_path are "Writable", then you should be able to install extensions.

Copying a website using SSH command line (method for experienced users)

Copying the files using a compressed archive file method

Copying a large number of individual files using FTP can sometimes be unreliable. If you have command-line access to the both source and destination systems then you can create a compressed archive file containing all the files on the source system, then transfer that single file to the destination system where it can be decompressed.

Creating an archive file

On Unix-style systems (eg. Linux) you can use the gzip program to create .zip files, or the tar program to create .tar.gz or .tar.bz2 files. For detailed instructions type man gzip or man tar at the command line. For example,
tar cvfz joomlabackup.tar.gz /path-to-joomla
will create a gzip-compressed archive file, called joomlabackup.tar.gz, containing all of the files in your Joomla! installation.
Important note! You need to make sure you are NOT in the folder you are trying to backup when you run the tar command or you will create an endless loop.

Extracting an archive file

Having copied the archive file to the destination system, you now need to unpack it. Use the equivalent command that you used to create the archive file. For example, to unpack the archive file created in the example above, enter
cd /path-to-joomla
tar xvfz joomlabackup.tar.gz
If the user or group IDs are not the same between the source and destination systems, then you will need to amend the ownership of the files you just extracted. For example, on an Apache system, you might need to enter the command
cd /path-to-joomla
chown -R www-group.www-user *
so that Apache has ownership of the Joomla! files.
Please ask your hosting provider for the correct group and user names, www-group and www-user, on your system.


Copying the database with MySQL command line method

Usually you run mysqldump to create a database copy:
$ mysqldump -u user -p db-name > db-name.out
Copy db-name.out file using sftp/ssh to remote MySQL server:
$ scp db-name.out user@remote.box.com:/backup
Restore database at remote server (login over ssh):
$ mysql -u user -p db-name < db-name.out


Special Notes

Tools

Akeeba

  • Akeeba Backup produces a .jpa file
  • The .jpa file contains all the folders/files and database files.
  • The .jpa file also contains an installer
  • Kickstart.php (from Akeeba) unpacks the .jpa file
  • You then run the installer and install your site like a Joomla install.
  • The installer changes the configuration for restoring to a different location and prompts for the new database details.
After you create the Database for your Joomla download and install Akeeba, it can be download from Joomla extension directory. There is a link to full instructions there as well.

GoDaddy.com Migrations

If using GoDaddy.com, different steps are required for import to be successful. In the Database section of the hosting control panel, find the database you wish to export and click the "edit details" icon (the little pencil). From there you will see a toolbar menu at the top with the option to Backup the database. Select that option and backup the SQL database to a _db_backups folder.
To import, go to the new hosting panel (if still using Go Daddy)and navigate to the new database you are importing to, following the same steps for export. This time, click on Restore in the menu and select the previously backed up database. After a few minutes, your database will be as good as before.


Source:
http://docs.joomla.org/Copying_a_Joomla_website

How do you put a module inside an article? Jump to: navigation, search

You will usually want to associate modules with articles in some way. The modules are allocated to module positions and the module positions appear somewhere on the Web page as determined by the template. However, it is sometimes useful to have a module actually embedded within the article.
To insert a module inside an article, use the {loadposition xx} command, as follows:
  1. Create a module and set its position to any value that doesn't conflict with an existing template position. You can type in the position value instead of selecting it from the drop-down list. For example, use the position myposition.
  2. Assign the module to the Menu Items that contain the articles that you want the module to show in. You can also just assign the module to all Menu Items. The module will not show unless you put the command to load the module in an article.
  3. Edit the articles where you want this module to appear and insert the text {loadposition myposition} in the article at the place where you want the module.


loadmodule

An alternative to "{loadposition xx}" is the "{loadmodule yyy}" variation which is handled by the same plugin.
In this case the plugin looks for the first module that who's type matches the string 'yyy'. So, you could load a "mod_login" module by placing {loadmodule login} in your text.

Modules within Modules

It is possible in Joomla! 2.5+ to include a module within a "Custom HTML" module as they are processed by content plugins in the same way as articles.
You should remember when doing this that you may experience formatting issues as the "chrome" of the "Custom HTML" module will surround the "chrome" of the included module potential having undesirable effects of the formatting or layout.


Sources:
http://docs.joomla.org/How_do_you_put_a_module_inside_an_article%3F

Joomla Blank (White) Frontend Page

So, a couple of days ago, I got myself into this project where the previous developer have used Joomla as the platform for the whole website which had a store as well.
Everything was working just fine on the old server, however, the client wasn’t happy and wanted to move it to another hosting provider, and the trouble just began here.
Well, to make it shorter, the transfer went smoothly (or so we thought). We could login to the admin backend and everything was just fine, we could publish articles and delete old ones. All was perfect, BUT, the front end did not want to appear! That was it, just a blank Joomla home page, a blank white page, that’s it. We could login to the admin panel, but the Joomla frontend was always blank!
So, reading about this on the internet, we found many solutions, and after lots of trials and errors, we managed to solve this.
So, read on to see what was the cause of the problem.
1. (.htaccess) File
Though we have checked the file and it was completely fine, nothing could make sense of why this joomla blank white frontend was there. So, a simple solution, DELETE the .htaccess file. But, it might be wise to make a local copy of it first. Usually the file would be created by itself if it’s needed. Problem solved
2. Corrupted File(s)
Sometimes, joomla’s core files get corrupted or overwritten or deleted for whatever reason. If one of the core files is missing, chances are, you will have the blank page issue. To solve this, try to login to your joomla root folder through an FTP client. Find out what is your joomla version. (usually, this is located at /libraries/joomla/version.php). Look for the “Release” and take note of the version number. Once you have done this, head to joomla’s official website and download a fresh copy of the same version you have. All versions will be available in joomla’s archive. Now, unzip the downloaded files and transfer them through FTP to your joomla root folder and accept all replacements.
Note: it’s always a good idea to keep a backup before you do this. Note that this will not affect your existing content. However, it will affect your themes if you have modified any of the original themes that come with the fresh joomla pack.
3. Directory Structures
If you have migrated your joomla website from one server to another, chances are, there might be something extra you need to do in order to get it running aside from transferring the files and importing the database. Different servers use different files structures. While this will not be an issue for joomla’s core components, it might be an issue for third part components and plugins. So, to solve this, make sure your plugins and components point to the correct directories after a hosting transfer and that might actually solve your issue.
4. PHP Related Errors
Another error could be caused by wrong or deprecated PHP codes in joomla’s modules, plugins, or components (third party ones). To debug these errors, enable the debugging mode under the Global Configuration in joomla’s administration backend. Now, visit your website and see what errors does it display and act accordingly to fix those errors.
5. Error Logs (Contributed by Afroz)
This solution was suggested by Afroz in the comments section. Try to check the Error logs under your website control panel and see if that will give you any heads up.
I guess that is it for now!
Have a great time, and if you found this useful, perhaps you could share it with your friends.
If you yourself have had any experience with a blank screen with Joomla and you managed to solve it, maybe you could just drop us a line in here and share with us how did you manage to solve it.


Source:
http://itscoding.com/joomla-blank-white-frontend-page

A Guided Tour of Joomla's configuration.php File

In our forum we are often asked to help with problems with paths, passwords, data base connections and other basic configuration issues. This is especially true after a migration or move of a site.
Most of the fixes for these problems can be made in your configuration.php file. We're going to help you get to know it this very important file.
In this lesson, were going to tell you:
  • Where you can locate your configuration.php file.
  • What each line affects and common settings.
This is not a comprehensive coding guide, but is a general reference to help you understand this file.

Location of the configuration.php file

tutuploadsLocation.png
Here's a picture of the location using Filezilla. This installation is in a sub directory called "joomla" .
Your configuration.php file is located in the root of your joomla installation. If it's in the main directory the path to it would look something like this:
  • /home/username/public_html/configuration.php
In a sub directory or sub domain:
  • /home/username/public_html/subdirectory/configuration.php
On your computer (using XAMPP as an example)
  • C:\Documents and Settings\Ed\My Documents\xampp\htdocs\J17\configuration.php
I shouldn't have to say this, but I will. Make a backup of your current file before you do anything to it. Use a test site or play with it in a text editor offline for practice. Don't make changes without a backup. Make a backup before you move a file to a different server or directory.
We'll go through the file line-by-line and create a quick reference for each line, with some notes where further explanation might be needed.

Site Settings

tutuploadsSite_Settings.png
  • $offline : When set to "0" the site is online. Set to "1" the site is offline
  • $offline_message : You can write any text message on this line.
  • $sitename : The name of the site as it appears in headings
  • $editor : The editor that is chosen as default in global configuration
  • $list_limit :The length of lists in the Control Panel for all Users. By default, this is set to 20.
  • $access : The default access level to the site. "1" is public access; "2" is registered; "3" is special

Debug Settings

tutuploadsDebug_Settings.png
  • $debug : "0" is off. "1" is on.
  • $debug_lang : "0" is off. "1" is on.
Notes:
$debug : This will turn on the debugging system of Joomla!. When set to Yes, this tool will provide diagnostic information, language translations, and SQL errors. If any such issues or errors occur, they will be displayed at the bottom of each page, in both the front-end and back-end.
$debug_lang : This will turn on the debugging indicators (*...*) or (?...?) for the Joomla! Language files. Debug Language will work without the Debug System tool set to on. But it will not provide additional detailed references which would help in correcting any errors.

Database Settings

tutuploadsData_Base_Settings.png
  • $dbtype : "mysqli" or "mysql"
  • $host : "localhost" on many servers, not all.
  • $user : The name of the data base user that has access to the data base.
  • $password : The password associated with the data base user. Not your admin password or FTP password.
  • $db : The data base name created when you created the data base.
  • $dbprefix : At least three characters ending in an underscore. (Set when you installed joomla)
Notes
You need this information when you install the site. Forgetting to change this is often the cause of problems when moving a site. Before moving any site, make a backup copy of configuration.php so you can refer to the original settings if you need them.
$dbtype : only change this if you have changed servers and using a different type.
$host : most servers this is localhost. Godaddy and a some others have different names. Check with your hosting company if you're not sure.
$user : On shared cPanel servers it is often prefixed with the user name - for example edandrea_ed. On your local machine there will not be a prefix unless you created one. It shouldn't be root in any case. If you create a site on your local server and don't specify password when you create a data base, you will be able to access the data without a password. This is not secure when you move to web server online.
$db : On shared cPanel servers this is usually prefixed with a username - for example edandrea_jml1. On your local machine there will not be a prefix unless you created one. On Godaddy servers this name is generated by their service and you will not be able to create your own, see their documentation if you need it.
$dbprefix : You cannot create a new one here. This must be the one that was used when the data base was created, or that is actually used by the database. If you have more than one data base prefix, you can change this, but you can't create a new one.

Assorted extra features

tutuploadsmedia_1323186823566.png
$live_site : The actual URL of the site for example - http://yourdomain.com (unless your site is in a subdirectory)
$secret: : DO NOT CHANGE
$gzip : "0" is off; "1" is on.
$error_reporting : "-1" is the appropriate level.
$helpurl : default is joomla help. Can be set to your own help pages.

Notes
$live_site : In the newest versions this should not have a value. There may be times you do need to fill in a value. If you are redirecting a url you need to put the actual url to the live site on this line. Or if you are creating a copy of a site for testing and modification. For example, I have a test site at http://dashhelp.com/joomla17 which is a copy of my main site. had to change this to line in the configuratiion.php file on the copy. You will get a page not found error if this is not set to 'http://yourdomain.com/directory" or in the case of a subdomain "http://subdomain.yourdomain.com" Joomla uses this url to create relative paths. Essential to check this on test sites.
$secret : This is generated when Joomla! is first installed and is not changeable. It is used internally by Joomla! for security purposes.
$error_reporting : This sets the appropriate level of reporting. The default setting is System Default. Errors can occur that don't have any effect on the site. You don't need to log all errors unless you're doing some detailed debugging work. Your logs will just eat up your disk space otherwise.
$helpurl : The place Joomla! looks for help information when you click the Help button (visible in many screens and options of the administration panel). By default, it uses Joomla!'s main help site, but you could create your own help site, or link people to your ticket system for help.
tutuploadsmedia_1323192679184.png
$ftp_host: : "127.0.0.1" is the default IP for localhost. Your server may be different.
$ftp_port : "21" is normal default. Check with your host if you are having problems. Not all servers are the same.
$ftp_user : your FTP user name
$ftp_pass : your FTP password
$ftp_root: : usually a path like /home/username/public_html (no trailing slash)
$ftp_enable : This setting tells Joomla! to use it's built-in FTP function instead of the process used by PHP.

Time Zone Settings

tutuploadsLocale__Time_Zone__Settings.png
$offset : default is UTC
$offset_user : default is UTC
Notes
$offset. This tool sets the current date and time. The set time should be where the site's server is located. The default setting is (UTC 00:00) Western Europe Time, London, Lisbon, Casablanca.Here's an example of the offset if the server is in California - US Pacific time $offset = 'America/Los_Angeles';

Email Settings

tutuploadsEmail_Settings.png
$mailer : "mail" uses the PHP mail function; "sendmail" uses SMTP mail on the server.
$mailfrom : From E-mail. The email address used by Joomla! to send site email.
$sendmail : The path where the Sendmail program is located. This path is only used if Mailer is set to Sendmail.
$smtpauth : If the SMTP server requires authentication to send mail, set this to Yes. Otherwise leave it at No. This is only used if Mailer is set to Sendmail.
$smtpuser : The username to use for access to the SMTP host. This is only used if Mailer is set to Sendmail.
$smtppass: The password to use for access to the SMTP host. This is only used if Mailer is set to Sendmail.
$smtphost : SMTP Host. The SMTP address to use when sending mail. This is only used if Mailer is set to Sendmail.
$smtpsecure : Select the security model your SMTP server uses - Default is None. Options are SSL and TTL.
$smtpport : SMTP Port. Most unsecured servers use port 25 and most secure servers use port 465. Check with your host.

Log Settings

tutuploadsmedia_1323186985799.png
$log_path : '//home/username/public_html/j/logs';
$tmp_path : :'//home/username\public_html/tmp';
Notes

$log_path : The path where the logs should be stored. The Joomla! installer should automatically fill in this folder. It's not critical to the operation of the site, so if it's wrong you will only know it if you try to check the logs.
$tmp_path : This is an important setting and should be filled in properly. Many problems found when moving sites are caused because joomla is looking for the old tmp folder. If you get any errors regarding the tmp folder check this path and make sure it's correct..

Cache Settings

tutuploadsCache_Settings.png
$caching : "0" is off; "1" Conservative setting; "2" Progressive Setting
$cache_handler : "file" full cacheing ; "cachelite" lite cacheing
Notes
$caching : This setting sets the maximum length of time (in minutes) for a cache file to be stored before it is refreshed. The default setting is 15 minutes.
$cache_handler : This setting sets how the cache operates. There is only one caching mechanism which is file-based.
Cachelite is an alternative to full caching.

Metadata Settings

tutuploadsMeta_Data_Settings.png
$MetaDesc : Create a text description for SEO.
$MetaKeys : Insert keywords separated by a comma.
$MetaAuthor : "0" is no; "1" is yes.
Notes
$MetaDesc : This is the Site Meta Description. This is the description of the site which is indexed by search engine spiders.
$MetaKeys : These are Site Meta Keywords. These keywords describe the site and are the basis for improving the ability of search engine spiders ability to index the site.
$MetaAuthor : This shows Author Meta Tag. It shows the Author Meta information for articles and is used by search engine spiders when indexing the site.

SEO Settings (Search Engine Optimization)

tutuploadsSEO_Settings__Search_Engine_Optimization_.png
$sef : "0: is no; "1" is yes
$sef_rewrite : "0" is no; "1" is yes
$sef_suffix : "0" is no; "1" is yes
$unicodeslugs : "0" is no; "1" is yes
$feed_limit : default is 10 - any integer can be used
Notes

$sef : This controls Search Engine Friendly URLs. When set to Yes, URLs are rewritten to be more friendly for search engine spiders. For example, the URL: www.example.com/index.php?option=com_content&view=etc..., would turn into: www.example.com/alias. Most of the items created in Joomla! have an Alias box where a search engine friendly URL can be inserted. The default setting is No.
$sef_rewrite : When set to Yes, Joomla! will use the mod_rewrite settings of Apache when creating search engine friendly URLs. Please note: it is advised that you do not modify any .htaccess file without an understanding of how it works. You must use the .htaccess file provided with Joomla! in order to use this setting. To use this file, rename the htaccess.txt file (found in the root directory) to .htaccess. By default, this setting is set to No.
$sef_suffix : When set to Yes, Joomla! will add .html to the end of the URLs. The default setting is No.
$unicodeslugs : Choose between transliteration and unicode aliases. Transliteration is default. This is an advanced setting and you probably will not need to change this unless you are and SEO expert.

Session Settings

tutuploadsSession_Settings.png
$lifetime : a whole number indicating minutes.
$session_handler : "database" or "none"
Notes

$lifetime : This setting sets how long a session should last and how long a user can remain signed in for (before logging them off for being inactive). The default setting is 15 minutes.
$session_handler : This setting sets how the session should be handled once a user connects and logs into the site. The default setting is set to Database.


source:
http://www.ostraining.com/blog/joomla/guided-tour-your-joomla-configurationphp-file/

Monday, June 3, 2013

How to remove branding into joomla template.

How to remove branding into joomla template.
--------------------------------------------
1..Install quickstart joomla template
2..Remove template from Extension/manager.

you will also find a standalone template in package now we shall use it.

just follow the following steps.

1. extract the stand alone template folder
2. open stand alone template in dreamweaver
3. Rename template folder as you like
4. Rename template name in templateDetails.xml
5. search and replace the template name in sourecode with your new template name.
6. also search the old template name into database with supper text search.
7. Install this as new template (standard installation).
8. make this template as default.

all module associated with it should work.

Best way to making new Custom HTML module in Joomla

In any standard joomla template you should see typography section where you can find many
css examples i.e buttons style, table style, heading style and code for useing these styles.

you can use these css style and make your work fast that will also match your current template theme.

1..configure your site with dreamweaver
2..make new HTML document
3..attached template.css or typography.css into this document.
4..use code that describe in typography section of template.

make desirable changes and you can flow with current theme of template.

Now just copy this code and paste into new custom HTML module of joomla.

Thursday, April 18, 2013

How to Hide Selected K2 Extra Fields from the front end?

K2 component (getk2.org) for Joomla 2.5 and Joomla 3.0 is still a very useful extension. K2 was built as a complete replacement of the default article system in Joomla! but many people use it in a surprising way, like the people's profiles in the online Marriage Agency.
K2 can keep the information in articles about thousands of women/men of different age, appearance and occupation. For personal characteristics you can use K2 Extra Fields so you and your users will be able to sort people according to certain characteristics (age, eye color), like the products in the store.
Sometimes you might want to hide the selected custom fields, but only the front view of the article. And then what? Unfortunately, component K2 did not foresee such a possibility. If anyone is a programmer can modify the code, but I wanted to use a simple solution, non-invasive method.

CSS Pseudo-classes  Can Help You with K2 Extra Fields

Depending on which field you want to hide in order to select one of the solutions:
  • :first-child - this pseudo-class matches an element only if it's the first child element of its parent element.
  • :nth-child(N) - matches elements on the basis of their positions within a parent element’s list of child elements.
  • :nth-last-child(N) - matches elements on the basis of their positions within a parent element’s list of child elements.

Now edit your template.css file or K2.css file and add only one line of CSS code at the bottom:

div.itemExtraFields ul li:first-child { display:none; }


It will hide first element of list, in our case, the first field.
This example selector will match the first three rows of Extra Field list:

div.itemExtraFields ul li:nth-child(-n+3) { display:none; }

This solution has "only one" defect - browser support - this pseudo-classes are currently not supported in Internet Explorer 8 and in older versions.

Tuesday, April 2, 2013

Import a large MySQL database over SSH

By default, most PHP uploaders limit the import file size of a MySQL database to 50MB. You may not always be able to change the limit yourself (depending upon your host) so the alternative way to import the database is to use SSH.

Start by uploading the .sql file onto the server using your regular FTP/FTPS/SFTP client.
Log into the server using SSH and navigate to the directory where your .sql file is.
Run this command:
mysql -p -u username database_name < file.sql
Notes:
The -p will prompt for your database password.
Replace username, database and file.sql with their appropriate values.
--------------------------------------------------------------------------------

If you are accessing via cPanel root use following command :
root $: cd /home
root $: ls
root $: cd /home/username of domain


Monday, April 1, 2013

How to Add ReCaptcha in K2 Joomla

The new version of Joomla - 2.5 has a captcha form element built in - which is great.  However, if you install K2 (2.5.6) this also uses the same ReCaptcha element.  Unless you get the settings just right the two will conflict in strange ways.  In order for the system to work you need to
  1. Disable the Captcha -ReCaptcha component in the Joomla Comonent Manager
  2. Go to the User Manager and then to the Options (Users Configuration) and set Captcha to be "none selected"
  3. Go to the K2 configuration and enable Captcha and enter your public and private keys.
If you don't do this, then both captcha's will be used but only one will be displayed (the K2 one I think) and you will get error messages similar to this:
"The words you typed did not match the ones displayed. Please try again."
Or if you disable just the K2 Captcha then you get this error message:
Empty solution not allowed.


 -------------------------------------------------------------------------------------------------


I have resolved the problem
You don't have to disable anything, just to get the Captcha - ReCaptcha plugin working on K2 comment you have to follow these steps:

1 - ON www.google.com/recaptcha Go to
- USE reCAPTCHA ON YOUR SITE
- ADD Gmail account if you don't have, or log in if you have.
- Go MY ACCOUNT -> + Add a New Site
- Create a reCAPTCHA key -> ADD your Domain -> Create a Key.
- Copy (Public Key and then you will copy the Private Key)

2 - On your admin panel go to:
- Component -> K2 -> Parameters -> Comments-> Active reCaptcha -> Yes.
- Go to Component -> K2 -> Parameters -> Advanced -> Anti-spam.
- Past the two Key that you have from Google. (Public and Private Key)
-> Refresh you site and you got it ^_^

IF YOU STILL DON'T HAVE THE CAPTCHA WORKING:
Make sure you have enabled the K2 plugin and Comments on the Category options.
That should be resolving your problem.

- IF, IF that is still not working:
- Go to your site
- Click " F12 " on Google Chrom / Control+F12 (Firebugs, Firefox)
- Refresh your web site
- If you have a JavaScript errors try to find what is your problems and solutions.
- Last thing if you don't have any JS problem, You should re-install joomla xD

That is all


If there is still problem do following step:
----------------------------------------
Hi there; it seems jQuery is not well loaded in your site.
Do the following:
1. Go to plugin, and ensure that K2 system plugin is enabled (i.e on the back end, go to Extensions, select plugin manager, check out k2 system plugin and ensure it is enabled).
2. Ensure that you setup correctly the jQuery handling options under K2 parameters. All you need to do is go to admin back end, click under components, go to K2 component. Once it is, click on k2 parameters. Check under 'layout & views'. Check jQuery library handling; set it to load v.1.8.2 local; also do the same under Backend jQuery & jQuery UI handling; set it to local copy.

Ensure your k2 comments are enabled and alas, everything will work.

IF THE ABOVE FAILS -- I AM DEAD SURE IT WONT; DO THE FOLLOWING:

Make sure that there is no other javascript error on your page preventing reCAPTCHA from operating. Have in mind that you only need one copy of jQuery on your site. K2 namespaces jQuery with $K2.

Instead of the following:

$(document).ready ....

You can use the following:

$K2(document).ready ....




Cheers!

Sunday, February 10, 2013

How to Migrate Magento Products into K2 Items (Joomla)

Whenever we need to transfer any database from one program to another program, we just need to study the Targeted program Tables (schema) then we have to transform our data according to targeted tables (schema) by following this approach we can transfer any data into any program as I have done with
Magento to K2 joomla transfer.


How to Migrate Magento Products into to K2 Items (Joomla)
-------------------------------------------------------------------

1..Go into joomla database from phpmyadmin and open k2_items table and see how many field are there.
 
2..Make an excel file and type all field name into columns.

3..paste at least one record for all fields from phpmyadmin (so you will be able to examine the   

recording format.)

4..you may have to make extra filed in K2 to match you data fields in magento.
  
3..Export all Product from Magento back-end panel from Export.
   (if your database is too big so you can partially export products then
    import all in excel)

4..sort all your magento product in excel by using filter and delete unnecessary columns.

5..Now we need to prepare our k2_items tables.
(MS Excel filter is the best tool for transforming data that I use mostly)


(in K2_items records you will see that extra fields records are enter in "one" field with code

[{"id":"16","value":""},{"id":"17","value":"1"},{"id":"19","value":"3137 Lorna Rd"},

{"id":"20","value":"Birmingham"},{"id":"21","value":"35216"},{"id":"22","value":"1"},

{"id":"23","value":"(205) 822 8224"},{"id":"24","value":""},{"id":"25","value":""}]    


the above mention code filed name are as below for example: (your field name will be different)

Contact Person: [{"id":"16","value":"Rameez"},
State:         {"id":"17","value":"29"},            (this is drop down list 29 is for Hawaii)
Address :    {"id":"19","value":"230 Highway 34"},
City:        {"id":"20","value":"Aberdeen"},
Zip Code:    {"id":"21","value":"07747"},
Country:    {"id":"22","value":"1"},
Phone1:        {"id":"23","value":"732-290-1900"},
Phone2:     {"id":"24","value":"732-290-1901"},
Email:        {"id":"25","value":"rameez@aol.com"}]
(you can see the IDs and name of extra field from the record easily by K2 Items in backed)


So you will have to make this code by using excel merge columns technique as follows)

    Merge columns of data without spaces between the data: =A1&B1&C1&…
    Merge columns of data with spaces between the data: =A1&" "&B1&" "&C1&…

see following link for a better understanding
http://www.extendoffice.com/documents/excel/510-merge-columns-keep-data.html


6..copy and paste all Magento product filed into corresponding filed of K2 accordingly.

7..copy and paste all others default values of k2 into k2_items columns in each record.

8..save as this excel file into csv format.


9..Now import this file into a k2_items table by using phpmyadmin panel.


Troubleshooting:
--------------------
If you found any error importing csv file into phpmyadmin
THEN save excel file into sql format AND import it again.


the above mention approach is applicable for all manually transfer of databases
From any program to any program.

Sunday, July 22, 2012

How to Change Joomla Database Prefix

1...Make change.php file with following code and changes according to your new prefix:

----------------------------------------------------------------------------------------
<?php
$db_server = "localhost" ;
$db_name = "type dabase name here";
$db_username = "type dabase username here";
$db_password = "type database password here";

$old_pattern = "jos_" ;
$new_pattern = "type new prefix here_" ;

$session_id = mysql_connect( $db_server, $db_username, $db_password);
if (!$session_id) { die('Connection Failed: ' . mysql_error());}

$query = "SHOW TABLES FROM `" . $db_name . "`" . " LIKE '%" . $old_pattern . "%'";
$result = mysql_query ( $query, $session_id );
if (!$result) {die("Query Failed: " . mysql_error( $session_id ));}

while ( $row = mysql_fetch_array ($result) ) {
$old_table_name = $row[0];
$new_table_name = str_replace ($old_pattern, $new_pattern, $old_table_name);
$query = "RENAME TABLE `".$db_name."`.`".$old_table_name."`"." TO `".$db_name."`.`".$new_table_name."`";
if (mysql_query ( $query, $session_id )) {
echo "$old_table_name renamed to $new_table_name <br />";
} else {
echo "Error: $old_table_name not renamed" . mysql_error( $session_id ) . "<br />";
}
}
mysql_close( $session_id );
?>
------------------------------------------------------------------------------------------

2...Open this file into the browser

3...Go to configuration.php file and change
     var $dbprefix = 'new prefix_';



You are done.......:)