Can I Program Plugin or make edit on Elgg By Python

Articles of knowledge if it is possible to modify or create an addition component via Python or other languages and link it to the script

  • Elgg is PHP but not Python.

    Anyway, I think you can do it.

    Look at this Elgg distribution Pleio. It's use Python/Django with Elgg much more

  • RvR Thank you for responding
    I have prior knowledge that the elgg is programmed with php but I asked this question since it is possible to add some java codes to the plug-ins and I have seen previously that some sites use a group of programming languages so it came to my mind if it is possible if python could be added by designs
    thank you for your reply

  • RvR Did he make an plugin to Elgg or did some modifications

  •  RvR What clarifies a point here? What I mean is, is there an existing Plugin for a verb in Python?

  • You had asked the same question already recently in another thread where I replied. And my answer is still the same: there's no point in using python or any other script language instead of PHP. The Elgg API function that you must use to some extent in any case are written in php. So, you need a core functionality of your plugin in php. If you are only starting to learn programming concentrate on php and don't try to come up with any other coding language to begin with. If you want to write only simple plugins, you probably don't need anything else than php anyway for the start.

    Apart from the Elgg API written in php the different programming languages have specific use cases. PHP is for web applications. Python is not.

    I hope that answers your question. And if you ask a 3rd time my answer will still be the same.

  • iionly I answered a lot of what I wanted to know Thank you
    Also, for asking the question in another way, which is that RVR proposes an Elgg project with Python modifications, so it came to my mind to do the modifications only, or can you create a complete additional component
    Also, as I read about Python, it is dedicated to many specialties, including the web

  • You can surely do a lot with python. BUT ELGG IS WRITTEN IN PHP AND YOU CAN'T MAKE USE OF ANY ELGG FUNCTION WITH PYTHON! You can call a python script with the exec() function of php but that is not much of interaction either.

    I don't think the Pleio project linked above does much in python. It has been created based on Elgg 1.8 and then developed on its own since then. The python scripts included are only doing some maintenance task but I don't think they are any good example of how to make use of python in Elgg.

    Again: as a beginner start with php. That will keep you busy enough for a while.

  • Regardless of the comparison between programming languages, what I am trying to reach is it possible to link an additional component written in Python even if with a few php codes or in any way that leads me to this question, it is possible to add some JavaScript files to some addition to elgg and some other languages and it works well Also, I have read that it is possible to link Python to other languages, for example Facebook is built mainly by PHP, but some use Python.

  • Yes, you can use Javascript with Elgg. But Javascript is not Python. Regardless, you can also make use of Python code, i.e. call it from PHP. Would it make sense? That not for me to decide. How would you do it? I won't spend anymore time with this matter. Maybe someone else tells you more or you just start trying to learn it yourself and see for yourself if it works as you imagine or not.

  • Little bit curious to know, what it is that cannot be done via php / Elgg - is there no existing mod or plugin already? In any case I also noted these statement from various articles

    "As developers, we have time constraints (that’s an understatement, I know!), therefore, in order stay competitive and relevant we need to be open to supporting additional languages when packages suit our needs."

    "Python script is powerful than PHP and some CPU intensive task can be a death for PHP and hence need a tricky way to execute python script in PHP."

    @Abdulaziz - If you are interested, there may be some clues here :
    https://medium.com/@rossbulat/python-to-php-communication-how-to-connect-to-php-services-using-python-f48893a2c98e
    https://stackoverflow.com/questions/166944/calling-python-in-php

    https://www.quora.com/How-do-I-integrate-Python-script-into-PHP-script
    http://www.netmare.in/blogs/how-to-run-python-code-in-php/
    "if you want a permanent reliable solution then you should create that python script as a webservice(Python client) and Flask is better for this job and then just user CURL() method to call that python client(endpoint) in your PHP script. CURL will return proper response from Python script and you can alos use this API with jQuery or as simple as get() post() in JS."

    Last solution will be (if you must need it and have financial resources) getting a very reliable paid dev, who is ambient and does small (or medium) projects. Thanks.