WebSite X5Help Center

 
Michael O.
Michael O.
User

How to add custom PHP class and include it in Incomedia project  en

Autor: Michael O.
Visited 2104, Followers 1, Udostępniony 0  

Hi community,

…Goal…

I am a php/mysql/js coder and am working on one project for one of my clients. They have "for the time being" 3 simple HTML registration forms (3 types of users) where this data needs to be inserted in database.

…The team is made of…

1 designer and 1 web developer.

…Who is who here…

All the design is being made by designer I am here to handle backend code.

… What do I want to do/achive/question …

I want to add/include my custom php file inside Incomedia, somehow and I need help on how to do this. This php file includes a PDO PHP class that handles DB operations, again please don't write that I can use it inside Incomedia I saw I can, I want to have it and handle it by myself in the backend.

I have a workaround on it. I can create a custom directory in FTP /classes and copy/upload the file in there, and afterwards on my registration.php file I include that file with code {require_once classes/my_db.php';}, but that way I will lose my connection with Incomedia project and my designer will not have it in his project when I export it out, I want to handle everything through incomedia. At this stage if you want our incomedia is acting like version control repository. I export my project and send it to my designer after that he imports is works on it exports the projects and sends the project to me, then again I import it and so on. Just writing that so you get the story. I see few workarounds in that just want to see on the official forum what the best thing to do.

I would like to hear back from official dev’s in incomedia if that is possible it would be highly appreciated.

Here are few images for better understanding.

http://www.deviantpics.com/gsZ
http://www.deviantpics.com/gsa
http://www.deviantpics.com/gso
http://www.deviantpics.com/gsD
http://www.deviantpics.com/gsG

Thanks in advance for your time.

Kind regards.

Posted on the
4 ODPOWIEDZI - 1 PRAWIDłOWA ODPOWIEDź
Anthony A.
Anthony A.
User

why dont you create your database and add your database information inside your x5 project? in that case program will automaticaly uses database!


if this post is the correct answer, please mark this answer as correct answer.

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

Good Luck
http://www.usx5host.com (6 months free Web Host for x5 users, promo code: usx56m)
http://www.usx5.com (Templates and support for x5)
http://www.wdesigners.us

Czytaj więcej
Posted on the from Anthony A.
Michael O.
Michael O.
User
Autor

Hi Anthony,

Thank you for your time in answering my question, but sadly that was not the answer I was looking for. And if you red my post carefully you might saw that I wrote that I don't want to go that way but that my script handles the DB data custom (I refer to image http://www.deviantpics.com/gsa), in that step I would have use 2nd option there "" and allow incomedia to handle the data automatically with their generated script.

So, please allow me to rephrase the question.

Plain and simple. How do I add php file(s) that I want to include in a script in step 2 (image http://www.deviantpics.com/gsa), you can look at that script(s) as a 3rd party php libraries that I need for the project for example (dompdf, etc).So the script that I would pick in step 2 (image http://www.deviantpics.com/gsa) would look something like this

<?php

require_once '../class/dompdf.php'; //We have ../ syntax because we are in folder /imemail

/* Rest of the code to handle $_POST data */

?>

I aplogize for repeating my self but just want to be clear what I need here, I believe it is pretty plain and simple but I just don't see that option in Incomedia options.

For example today I need one 3rd party library as the project evolves I would need more of them.

Like the first time I would kindly ask Incomedia offical development team to answer, please.

Kind regards.

Czytaj więcej
Posted on the from Michael O.
Anthony A.
Anthony A.
User

Michael, Websitex5 does not give you that option, however, if you are a developer, you might be able to that, I suggest you to mark your post as private, Incomedia staff will get back to you on this.

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

Good Luck
http://www.usx5host.com (6 months free Web Host for x5 users, promo code: usx56m)
http://www.usx5.com (Templates and support for x5)
http://www.wdesigners.us

Czytaj więcej
Posted on the from Anthony A.
Incomedia
Claudio D.
Incomedia

Hello Michael,

You can include your files in one html code object in the advanced tab so when you upload the project the program will also add these php files automatically.

When you add a file to this object you can select in which folder this file needs to be exported.

Many thanks!

Czytaj więcej
Posted on the from Claudio D.