Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other editing joomla components

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #37715
    amyth91
    Participant

    how easy it is to edit and customize joomla components. i want to add extra functionality to a component called Course Manager. Is it gnna be easy to creak into the source files and add extra functionality ? and how much knowledge am i gnna need ?

    #101541
    chrisjg
    Member

    Very broad question, you should be much more specific about what functionality you want to add and your knowledge level(s).

    I will try and answer it though…

    From the little I know about that component the source code has an MVC structure that you can override and extend in your template – so any updates to the component will not mean loosing or having to re-write your changes/additions. It is a Joomla! component so it will most likely be PHP and MySQL based, you can read the source and look at the database schema to see what each part is doing and where the data comes from. Once you have done that you will have a good idea of how hard adding any functionality will be.

    If you didn’t understand what you have just read then the answer to “how much knowledge” is “more than you have at the moment.”

    If you are still reading then the source files are easy to read, but the complicated bit is the detail about the extra functionality – that could be very complex or very easy depending on what you want it to do. For example, combining the output of 2 existing parts of the component into 1 place is easy – but if you wanted to write a completely new module to show existing data in a new way, or add more data to the database and integrate it with the component then that will be tricky.

    It is a commercial Joomla! add-on (you have to pay for it) so will have forums – ask there, but be specific.

    Your general “how hard is it to customize?” question is far to broad.

    Ask in the component forums “I want to add blahblah functionality to the Course Manager, is this possible and can you advise me on the best way to achieve this?”

    Of course, if you are wanting functionality that exists already in a linked add-on that they sell you will be told to buy that add-on.

    If you do not get any answers, then I would advise against buying it – if they won’t answer questions in order to get a sale, it is likely they won’t answer once they have your money.

    Have you looked at other options on JED?

    Does it have to be Joomla! , have you thought of trying moodle instead?

    Good luck,

    Chris.

    #101564
    chrisjg
    Member

    OK, first point is that you do not seem to have the skill level required to make the new functionality – make your project co-ordinator understand that it will take you more time to do make the changes because you have to learn new things – tell them how long you think it will take and why, keep them informed of your progress, both good and bad.

    The changes themselves do not look that hard to implement, the necessary code and data is already available – it just needs your time and patience to run through the code while looking at the page(s) in action and seeing where each bit of HTML is created.

    The modifications themselves…

    1. Automatically adding a button to link to the course details…

    In order to link to an article, that article must exist first (or you have to know the alias or id number that will be assigned to the article once it is written) – or you will deliver a 404 page when someone clicks the button.

    Assuming the article is written, then all you need to do when creating a new course is to enter the hyperlink to the article in the hyperlink field in the course editor backend. This field already exists in the course manager software – check out the demo to see it.

    To modify the component you need to find the part of the code that writes the table for the course (view=courses in the demo) and change it to use the hyperlink field instead of the course id for the button link. This should be pretty easy to do.

    2. IF payment is required…

    You already have this information when the table is written.

    A simple IF statement added to the code – at the same point where you changed the default button link to the article link – to say if the cost > 0 then create a link to the payment page.

    Again the code for this link and the button to use is already present in the View code (view=paypal as you can see in the demo frontend).

    This is pretty simple to do once you find the right bit of the code to use/copy/modify.

    Remember to make the changes in your template directory structure, not the component itself – so you override the default code instead of changing it.

    Basically copy the view file from the component to your template:

    from: components/com_courseman/view/default.php
    to: your-template-name/html/com_courseman/default.php

    where default.php is the file that contains the functionality you want to change.

    Now any changes you make to the code in the “your-template-name/html/com_courseman/default.php” file will be used instead of the code in the “components/com_courseman/view/default.php” file.

    The changes you want to make do not sound hard, you just need to spend some time with the code in one tab, with the page open in another (with the inspect element pane open). Look at the page, look at the elements, the class names, etc and find where they are in the code. Make a change and see what happens.

    Good luck,

    Chris.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Other’ is closed to new topics and replies.