How to add a new page to Joomla Admin panel - joomla

I'm new to Joomla. I need to add a new custom PHP page inside Joomla admin panel (not on the main site) to display some data from my own tables.
My Joomla version is 3.4.1 Stable.
Please help me.
Thank you.

You might be able to inject a single page to display the data - but I think more than likely your best bet (to do it properly without hacking stuff) might be to develop a small component to handle it best.
By creating the admin component you can create the page you want and display your data however you decide.
If memory serves me correctly, you can create a folder (say com_mycomponent) and create 'mycomponent.php' in that directory. Then you add your php code to that page to do whatever you want. Of course, this is for the most basic - barebones idea.
I will expand because to the best of my understanding we will need an installer to actually 'install' the component (although it's been a while since I've developed heavily in Joomla). If you don't create the installer I think it will cause errors within the system.
Create your directory
Create one or two directories in the directory
admin (required)
site (optional)
Create 'mycomponent.php' in the admin directory (and site directory if you created one) and write your desired
code into the admin file (and/or) site file.
Create 'mycomponent.xml' file in com_mycomponent
Open 'mycomponent.xml' file and paste the below code
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.4.0">
<name>Your Name</name>
<creationDate>2015-05-13</creationDate>
<author>You</author>
<authorEmail>you#example.com</authorEmail>
<description>My Joomla Component</description>
<files folder="site">
<filename>mycomponent.php</filename>
</files>
<administration>
<menu>MyComponent</menu>
<files folder="admin">
<filename>mycomponent.php</filename>
</files>
</administration>
</extension>
You can remove the following if you did not create the 'site' directory:
<files folder="site">
<filename>mycomponent.php</filename>
</files>
Zip All the contents under com_mycomponent lets name it
com_mycomponent.zip
Login to your joomla admin and install com_mycomponent (the same way
you would any extension you download)
After it installs, you can view your page at
http://yoursite.com/administrator/index.php?option=com_mycomponent

What I usually do is create an admin module to display the data. It's a bit quick and dirty but it works. Also there are some extensions in the JED that will let you display data from any table.

Related

Customized backend interface in Magento

Is it possible to customize the backend interface of Magento. The requirements include:
A custom theme for the backend
Removing all the default menu in the admin panel such as catalog, Mobile, Promotions, etc and replacing them with custom menus. For example, there will be a menu for managing all the order related tasks, another one for managing all the customer related tasks and so on.
The content of each page under the above mentioned menus will have custom layouts.
I am aware of the fact that, the layout changes can be managed through themes but I am not sure how to implement customized menus. Should I create a different module for rendering this customized backend interface? This is my first project on Magento. Please advise on the implementation of these requirements.
Add a new adminhtml theme
Start by adding a new folder inside the app/design/adminhtml/default folder. To start out, the folder should also contain one sub-folders called template.
So, for example, you add a folder called mytheme, and inside it you add another folder called template.
Overriding Magento configuration
All you have to do is add a new config.xml file inside app/code/local/MyCompany/Adminhtml/etc. Add the following code inside the file:
Note: if you created this file by following one of my earlier guides you don’t have to create it again and you would simply add the section at the appropriate location inside the existing file.
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<MyCompany_Adminhtml>
<version>0.1.1</version>
</MyCompany_Adminhtml>
</modules>
<stores>
<admin>
<!-- override default admin design package and theme -->
<design>
<package>
<name>default</name>
</package>
<theme>
<default>mytheme</default>
</theme>
</design>
</admin>
</stores>
</config>
You will also have to tell Magento about this new module in an XML file placed inside /app/etc/modules. This file could be called MyCompany.xml and inside you would copy/paste:
Note: if you created this file by following one of my earlier guides you don’t have to create it again.
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<MyCompany_Adminhtml>
<active>true</active>
<codePool>local</codePool>
<depends>
<Mage_Adminhtml />
</depends>
</MyCompany_Adminhtml>
</modules>
</config>
Changing template files
Now to change the default Magento templates you basically copy the .phtml files from the app/design/adminhtml/default/default/template folder into your own template folder and change the contents of the .phtml file to suit your needs.
For example, if you want to change the login box and remove the Magento copyright message:
Copy app/design/adminhtml/default/default/template/login.phml into the app/design/adminhtml/default/mytheme/template folder and then change the to put your own legal note.
It's possible to customize the Magento backend.Please try this way.
But developer must be the main admin user and client be the second admin user.Because the main admin user can set privileges for other users.
Step 1: Create a New User
From the Admin menu, select System > Permissions > Users.
Click the Add New User button.
In the Account Information section, do the following:
Enter the User Name for account.The User Name should be easy to remember. It is not case-sensitive. For example, if your user name is “John,” you can also log in as “john.”
Complete the following information:
First Name
Last Name
Email addressThis email address must be different from the one that is associated with your original Admin account.
Assign the Password for the account.
The password should be seven or more characters long, and include both letters and numbers.
In the Password Confirmation box, repeat the password to make sure it was entered correctly.
Set This Account is to “Active.”
Step 2: Define the Role
In the User Information panel on the left, click User Role. Then, in
the list of Roles, select Administrators. (Initially, it will be the
only role available.)
When complete, click the Save User button.You now have two accounts
with Administrator access.
Customize interface - Already have the extension to modify the interface. check it http://www.magentocommerce.com/magento-connect/v-admin.html
Customize menu - We need to work on seperate module and i think that it will be a big work.

Create admin front with a simple form via a module [Magento]

I am pretty new to Magento and am trying to understand how to create admin (backend) page. I have figured how to create/define the controller and action (along with editing the config.xml).
But now the next problem at hand is to display a simple form in that page. I understand that, I have an option to create blocks and mention the blocks in a layout.xml. But from what I figure is that layout.xml needs to be present in the theme folder. Which I can't do as my magento extension will be installed and I have no access to the user's system.
So the doubt is. How to display a simple from in a backend (admin) page
without having to make any changes to the theme's layout ?
For the admin panel module you don't need to mention the block in the layout.xml of your theme, you only need it to be defined in config.xml file in your "app/code/local///etc/" and a layout file is created in "app/design/adminhtml/default/default/".inside the Block create a folder named "Adminhtml" inside it your can create your form.
Refer this
http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/how_to_create_an_admin_form_module

Editing magento extension

I have downloaded Youama Ajax Login and Register magento extension.
Its working perfectly.But it has less fields in registration. I want to add more fields in the magento extension like phone no,pincode etc..how to edit magento extension?
Hello check below path & more fields.
app/design/frontend/base/default/template/youama/ajaxlogin/ajaxlogin.phtml
To keep extension more or less upgradeable and do some customization in same time you should copy key .phtml files to your theme folder and do customization over there.
For example copy
app/design/frontend/base/default/template/youama/ajaxlogin/ajaxlogin.phtml
to
app/design/frontend/default/{yourtheme}/template/youama/ajaxlogin/ajaxlogin.phtml
and edit it there (only files you want to edit).
On the other side blocks, models, helpers and controllers should be overridden if customization is needed. You can check overriding process in this article by one of my colleagues.

Editing Metadata on Joomla

I can not edit metadata on Joomla CMS. Where do si located the metadata file , the one who displays information on the description html meta tag ?
I need to edit by hand until discobver what is wrong.
Thank's in advance
Joomla is a database driven CMS, so metadata for articles, modules etc is stored in the database with the content of the article etc.
The only other meta data is the Global site metadata and that is stored in the configuration.php. The easiest way to change that is via the Site menu and the Global Configuration menu item (in Joomla! 2.5 it's in the Site tab of the Global Configuration).
It is not advisable to edit configuration.php directly as a single character can break the configuration file and take the website down.
If you really must edit configuration.php be aware that Joomla sets it to 444 permission after every change, i.e. read only or to to put it another way unwriteable. Using your websites control panel (cPanel or similar) you will have to change it to be writeable before you open it to make changes.
Don't forget to change it back.
Joomla's recommended permisions are:
Files should be 644 and
Directories should be 755
Joomla! also has an article on Verifying permissions

How can i change logo of magento in backend

How can i change the standard logo of magento in the back-end not front-end?
is there an option in the admin for that? or where is the exact line in the code where i can change this?
Thanks!
We don't want to override core code here, so let's do this the right way. Doing it properly will mean your change won't get overridden by a possible update carried out later on. It's a bit of a different process to doing this in the back-end than the front-end. But follow these steps and you can do it without touching core code.
Firstly, you're going to need to make a module in order to do it. Make your module, call it whatever you want and in your config.xml add this
<stores>
<admin>
<design>
<package>
<name>skin_name</name>
</package>
<theme>
<default>skin_name</default>
</theme>
</design>
</admin>
</stores>
Replace skin_name with something that makes sense. Then create this folder, replacing skin_name again:
{magento root}/skin/adminhtml/default/skin_name/images
Now, in the images folder you can create a GIF file named logo.gif which will override the default one. logo.gif is specifically stated in the adminhtml templates so if you want to change the file type/name you'll need to override the template that references the logo too.
Optional - Changing the file name/type
If you do want to change the image used, create this folder (same deal with replacing skin_name):
{magento root}/app/design/adminhtml/default/skin_name/template/page/
And create header.phtml within that folder. Copy the contents of:
{magento root}/app/design/adminhtml/default/defaut/template/page/header.phtml
and replace:
<?php echo $this->getSkinUrl('images/logo.gif') ?>
with your chosen image, located in the skin you created earlier like this:
<?php echo $this->getSkinUrl('images/my_shiny_new_logo.png') ?>
1.Save image at the below location
/magento/skin/frontend/default/default/images/<image name>
2.Go to admin section
System >Configuration >General > Design > Header > Logo Image Src
put the location as images/<image name>
Here change the source address
If you want to update/change logo from Magento backend (without using FTP or without updating any file) then you can do the following:
Login to your Magento admin
Edit any static block (CMS -> Static Blocks)
There you will see Insert Image button. Click on it.
Upload your logo image there. Suppose, your logo name is logo.png. Then, the image path will be http://your-website.com/media/wysiwyg/logo.png
Now, go to System -> Configuration -> Design -> Header
Update Logo Image Src to ../../../../../media/wysiwyg/logo.png. This has to be done because by default Magento fetches image from skin/frontend/smartwave/porto/images directory.
First take Copy of magento's default logo.gif From path Project_Name\skin\adminhtml\default\default\images\logo.gif And then save your own image by Replacing logo.gif ,means give same name to Your image too like logo.gif.Its simple.
Logo for admin page is located in /skin/adminhtml/default/default/images/
You can rename/remove the default logo and upload your designed logo, remember to name the file as: logo.gif
In case you dont want to replace the original file, you can make change to code in /app/design/adminhtml/default/default/template/page/header.phtml. Find the line $this->getSkinUrl('images/logo.gif') and change logo.gif to you new logo file's name, for example: newlogo.gif
Save changes and reload your admin page to see the new logo
Reference source: http://magentoexplorer.com/how-to-change-default-magento-logo-in-backend-and-frontend
You can replace the file directly on the server, for magento 1.9.2.1:
root/skin/frontend/rwd/default/images/logo.gif
Replace that file with your logo.gif, be sure to name it the same.

Resources