This topic contains 18 replies, has 3 voices, and was last updated by Sean Sean 1 year, 7 months ago.

I'll cut my wrists


  • peterw97
    Participant

    Posts: 17
    Member Reply #2861

    Hello,

    Well , in hope to improve development time in my project. I decided to buy Metronic today. Right now, I trying to put him in my project.

    So, first of all….In my login page is set to show alert message that user was login successful. In my previous project, the alert is complete functional. But, when i put metronic, he’s jump automatically to home without show my alert. I try to use code from my previous project and I get the same problem if use metronic assets (js, etc).

    I would like instructions to how fix this.


    peterw97
    Participant

    Posts: 17
    Member Reply #2862

    I forgot to mention: I’m using CodeIgniter. CodeIgniter form validation errors with “alert danger” class is work, but “alert success” with my message, not.

    <?php if (isset($logged) && $logged === TRUE): ?>
    <div class=”alert alert-success”>
    Congratulations. You was logged in successfully!
    </div>
    <?php endif; ?>

    ^ don’t show this message correctly,

    • This reply was modified 2 years, 7 months ago by  peterw97.
    Sean
    Sean
    Keymaster

    Posts: 4377
    Support Staff Reply #2868

    Hi,

    Thanks for contacting our support.

    But we do not support the backend integration and server side coding issues since your issue seems related to PHP.  For more info please check our support policy here: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469

    Thanks.


    peterw97
    Participant

    Posts: 17
    Member Reply #2875

    Interesting. But, I pay $28 for that. You expect, that I’ll use in HTML pure? As I said, the problem was In METRONIC assets because If I remove everything about METRONIC, the alert message appears and works correctly.

    Resume: When I click (or press enter) to submit form, i redirect automatically (instantly) and my message not appear.

    • This reply was modified 2 years, 7 months ago by  peterw97.

    peterw97
    Participant

    Posts: 17
    Member Reply #2880

    Basically is more easy create my own template. I’m very disappointed, because I need to a lot of work to get all functional. I can’t use some assets in login page because his get .css and js functions of all 500 others scripts.

    And now I see ur answer: since your issue seems related to PHP No. My problem is not related to PHP code backend. I have 100% sure about that, before use metronic files, my message works normally. Example: I can use bootstrap.min.css original from bootstrap site, and my message appear, after 5 seconds, user is redirect to home. =)

    Repeat: Using METRONIC, user jump instantly to home without see any messages.

    Sean
    Sean
    Keymaster

    Posts: 4377
    Support Staff Reply #2881

    Hi ,

    We referred to your above PHP code which is not related to the theme’s functionality. For the rest of course we will do our best to help you out.

    Will it be possible to provide us a test link to your site ? Can you deploy it to your test server ? We will try to check your code online and help if there is any issue with Metronic integrating. Otherwise it will be hard to predict your issue.

    In general when you integrate Metronic with your server side code you will need to slightly modify the theme since the default theme comes in pure HTML, JS and CSS. For the login page there is login.js script that handles the login form validation and submit. As you noticed the login form is pointed to index.html so upon you submit it it will send the data to the defined action page. So you will need to set a proper action page(in your case maybe login.php):

    <form class=”login-form” action=”index.html” method=”post”>

    If you check the login.js script further you will see the form validation code that uses the jquery validate plugin from http://jqueryvalidation.org/

    Thanks.


    peterw97
    Participant

    Posts: 17
    Member Reply #2884

    I’ll try to put my project in online server.

    About this: <form class=”login-form” action=”index.html” method=”post”>

    I’m not using this code. It’s automatically generated by codeigniter.

    <form action=”https://localhost/panel/login/authenticate” method=”post” accept-charset=”utf-8″>

    • This reply was modified 2 years, 7 months ago by  peterw97.

    peterw97
    Participant

    Posts: 17
    Member Reply #2886

    How to add “active” class to current page?


    peterw97
    Participant

    Posts: 17
    Member Reply #2887

    Hi.
    I found a solution to fix the problem. Well, the bug occurred by the way metronic was coded. I changed some line of codes…My current problem now is, how to use “active” class for current/visted page?


    peterw97
    Participant

    Posts: 17
    Member Reply #2888

    I remember, active class need to be set in back-end code. I already fix it.

    Sean
    Sean
    Keymaster

    Posts: 4377
    Support Staff Reply #2890

    Hi,

    Yea, that’s right. You will need to handle the active link state in the sidebar menu from your backend code.

    If you need any further clarifications please let us know.

    Thanks.


    raidmoon
    Participant

    Posts: 17
    Member Reply #7531

    Hi,

    Participant,

    say I remember, active class need to be set in back-end code. I already fix it.

    how he fixed it in back-end.

    waiting,

    thanks.

    • This reply was modified 1 year, 8 months ago by  raidmoon.
    Sean
    Sean
    Keymaster

    Posts: 4377
    Support Staff Reply #7542

    Hi raidmoon,

    You should try to conditionally handle setting the active classes in your backend language. You can use simple “if” and “else” clauses to handle the class based on your menu structure and active page.

    Thanks.


    raidmoon
    Participant

    Posts: 17
    Member Reply #7545

     

    Can you work a case in point.

    Example by php ,

    how can i do.
    thanks.

    • This reply was modified 1 year, 8 months ago by  raidmoon.
    Sean
    Sean
    Keymaster

    Posts: 4377
    Support Staff Reply #7547

    Hi,

    Sorry, our support does not cover php and other server side languages. The server side integration is handled by buyers so our support only can help with the theme’s HTML, CSS and JS issues only. In your case i would suggest you to get some advice from experienced web developer or hire somehow to help you with your project since such server side tasks(menu integration, etc) are basics of web development.

    Thanks.

You must be logged in to reply to this topic.