SocialEngine Blog

ASK JOHN

Are you a developer wondering what might be possible with the SE framework?

For all of those burning questions about SE code, we present to you the most noteworthy of SocialEngine knowledge databases ever:

Our Engineer, JOHN. The Chief Architect of SE4.

We’re working to expand our Knowledgebase to make sure that you, our clients and third-party developers, have got information available to you when you need it. ASK JOHN will help you have a voice in that process.

Submit your questions here, and every few weeks we will feature a new article based on the best ones, along with remarks from our most remarkable of Johns.

Note: Support/Sales questions will not be answered here. This feature is designed to help you learn about SocialEngine’s nitty gritty insides. If you have a support question, please use the client area to submit a support ticket.

  • Steve

    Great. I'll start with two topic ideas.

    1. Search. How does Search code work and how can devs plug into the code to extend to 3rd party plugins and/or custom mods? Also, are there any expected changes to the Search code that may help improve its application/performance?

    2. CDN usage. What is possible with upcoming SE releases and what are best practices when delivering files via CDNs?

  • David

    Another great topic would be how to gracefully modify SE core code without breaking the system when the next upgrade is released. In an ideal world it would be best if the core code were never touched, but in reality this is often not possible. It would be great if there were a way to more easily extend core classes (then utilize those classes), or a mechanism like a "user" directory (that mimiced the core files directory structure) that could be used to hold "replacement" files for core files. Just possible ideas, but maybe you already have other ideas or ways to minimize breaking the upgradability of SE4. Thanks!

  • Steve J.

    Ok… there is one feature I am BEGGING you to incorporate into SE. I want to allow a group's moderator (or even an admin if need be) to be able to place a block of unique content on a group profile page. Essentially, it would be an html block that appears ONLY on that specific group's profile page – not universally across all group profile pages.

    Pretty please?

    Now, while you have me begging, there is one other thing I'd like to see. Rather than having members type in a name of a network (North America, South America, etc…) they would like to join, wouldn't it be SO much better if they were given either a dropdown selector or a checkbox list from which to choose?? Why must a user have psychic powers in order to have a clue what networks are available to join??

  • http://www.yaadbook.com Trevor

    Hello John,

    On facebook, one can post a picture and use that thread on which the picture is posted to hold a lengthy discussion for days, even months, with no end to the thread. I run a group on facebook and I will be migrating that group over to the new social network community I just launched using SocialEngine software. Is it possible for SE to make that feature available the next upgrade?

  • Charlotte

    @Steve, @Trevor – This isn't meant to be a feature request forum – this is a space where developers can ask John technical questions about the code so that they can more effectively create useful plugins. The goal is to foster growth within the third-party developer community so they can create even more powerful tools for SocialEngine in the future.

  • http://www.jompesh.com Saydujjaman

    This great initiative and thank you that. I have two question for now that want to how to do that:
    1. In the whats new text box there is option for add video,link,music , photo , i want to add another button for local virtual keyboard, by clicking that icon user will able to write status in their own language ( in our case it is "bangla"). I have java script to do that how can i place it below the status text box. please suggest

    2. while sending message to other user , i would like to give option for adding attachment from their computer (with file browse button), how can i do that?

    Please advise.

  • Glenn Norvic

    Hi John

    Is there a way to extract SE data (ex. display name, profile pic) and have them displayed from an external site (lets say a Joomla or WordPress site) – would PHP includes work, if so where could we start on those?

    Glenn

  • Ian

    A set of simple "How to basic's" would be hugely beneficial. Start simple for the 'junior developers' (such as I!)

    - Something that covers the use of Zend Framework, access database variables, initiate db connection
    - How to create a widget – what files are needed, what does each file do
    - How to create a module – what files are needed, what does each file do
    - Structure of the database – what's each table & field used for

    Then maybe some articles on the existing modules and widgets – how they work, what each file does/contains – so that anyone wanting to make modifications know's which files to edit!

  • Carlos

    SE is so easy to use out of the box I rarely look at the code although I have lots of ideas.

    I would like to recommend something as a customer and user of SE.

    PLEASE, require 3rd party developers to meet a minimum quality standard of development, description of functionality, list price and delivery so that plugins can be cleanly integrated.

    Thanks

  • Chris Moos

    @Stever R – Great questions. I really appreciate it since these are 2 of my main issues.

    I would like to ask about DB tuning, especially defragging and tuning tables.

  • Rich

    Dear John,

    What IDE do you recommend for SE development and how do you recommend setting it up? Also, what's your preferred work flow for developing and deploying?
    I'd like to get away from hacking away at .php and .tpl files in a text editor and step up to a more robust development environment.

    Thanks,
    Rich

  • Jeremy

    What is the best method for extending core features of SE without losing upgrade-ability.

  • Paula

    Is there an API or integration to Magento, Volusion or another robust shopping cart?

  • http://www.crucedesign.com Daniel

    I would like to echo Jeremy M's comment about extending core without losing upgrade-ability.

  • George

    How does work the task "Clean Up" for orphaned files ? I noticed that orphaned files/photos still in the server and never are deleted.

    Thanks.

  • http://www.quiba.nl Erik

    SE has been built in the best Object Oriented way possible, however this makes it very hard for us developers to modify core functionality without breaking the ability to upgrade.

    We developers want our clients to be happy after we are done, rather than being called by a stressed-out sysadmin who "broke" the SE install by updating.

    OO has been made for cleaner code, with a dedicated file for every action, but without the proper API documentation (and ZEND documentation) it is very hard for an experience PHP (and JAVA) Developer to know what is where, and what to change (or extend) in order to override some things.

    I've been trying to work on a plugin but the amount of searching (taking the Classifieds plugin as a base to learn from) in order to get things done is so difficult.

    Questions:

    1) What IDE is the SE team using and how are you performing tests (Zend server, or manual testing) ?
    2) Your code is documented properly (comments etc), why not have API documentation so you destroy the monopoly of knowing what goes where?
    3) WHy not use an "override" folder with core modifications.

    if (!empty("/application/override/overridefile")) {
    // inclde that file
    }

    This is the way that CodeIgniter does it, and you can easily upgrade packages without breaking core :)

    Thank you

  • Ed

    I would also like to echo Jeremy M's comments

  • http://www.indianscience.in Bhupender

    I would favor the point 'about extending the core without losing upgrade-ability.

    And second one most important tutorial (knowledge base article) could be "How to install third party software in subdirectory of SE4" like midiawiki, wordpress, forums or others.

    Or could be " How to integrate third party software (wiki, wordpress, blogs software, forums software) with SE4).

  • Brian

    We are currently experiencing some growing pains that are directly related to our database instances. Socialengine by default does not let you split up the database reads from the writes. Is there something that maybe I am over looking that might allow someone to quickly point all writes to one host and all reads to another (or cluster)?

  • Paula

    Is there an interface to PayPal Pro? How can we get this developed ?

  • Danny f.

    I would like to know if the current Tinymce editor can be changed to CKEditor? I know where the Tinymce main folder is but I need to know what files need to be modified in order for this to work.

  • http://www.121chatrooms.net Mike

    hi what ecryption does socialengine use for passwords?

  • http://daftstuio.com Cemre Pacun

    I would like to know if Social Engine can be integrated with Janrain Engage platform. A native integration would have enormous value on Social Engine member acquisition and login/signup process.

    http://janrain.com

  • http://seTweaks.com seTweaks Team

    I agree to Erik's comment. there should be a way to modify the core too but still keep the upgrade available to the client.

  • SocialEngineHacks

    does socialengine has support for nginx server? do it perform well? Please elaborate and fill us up with more infos .. Thanks !

  • Matt

    How do you use hooks? I specially want to continue the sign up for with my own custom form. The form i have to create does a lot of stuff and i want to make it a separate plugin. Thanks.

  • Simon H.

    I would also like to see a proper api documentation and some tutorials in how to create modules for socialengine.

    I.e. For Restful-Webservices

  • Jon

    @Brian W.
    I believe a MSQL Cluster is what you are looking for.

    But, you could create duplicate databases and have random reads from those two or three Read-only databases. (Writing to the main database of course.)

    (On a smaller scale – would writing to two different mysql databases at the same time cause any problems/ slowdowns?)

  • http://www.dafkesher.com Avraham

    I have an internal service that generates XML files in a folder on our server.
    I need SE somehow to scan this folder in a pre-defined interval and send emails with the content inside the XML file.

    We have full control of the XML contents and structures.

    Please advise how can i do that?

  • Rob Curry

    Hi John. Where in the code do you specify whether a module should use the code in an index.tpl file as opposed to a "layout editor" controlled page? I am tearing my hair out trying to find out where it is set!

  • Jason

    I imagine quiet a large proportion of the SE community are not developers by trade and are starting up their site on limited resources. I would like to know how to set up SE4 for an 'entry level CDN'. When I say entry I refer to simply using subdomains to serve all static content including theme files, javascript, user uploads on separate subs. To summarise:
    How can I utilise separate subdomains for static content
    How can I expand that by actually hosting those files on another server

    References:
    http://www.riyaz.net/blog/how-to-setup-your-own-cdn-in-30-minutes/technology/890/

    Hope you help answer this!

  • Donovan

    I was wondering if it was possible to have "patch" files instead of these upgrades that make my site go nuts. A set of files for the problem instead of doing the upgrade. I would have have a mod or small set of files to install say to fix the "mark as read" error instead of a large upgrade when installed I still do not know what the exact problem files is or error is really located in the files.

    The biggest options I would like to see on Social Engine 4 is an actual add rotation systems not the by click feature. If I could have a actual banner rotation and something that is possibly to add to all pages in layout editor would enhance my sites and allow me to sell banner advertisement. In my opinion no one wants to hear your banner ad will show for 10 clicks, etc.

    I also want my site to be public, but not allow the public to post anonymous on my sites. I do not know if this has been fixed by social engine 4 but this was such a headache when my sites where social engine 3.

    I used the import for social engine 4 from social engine 3 and it worked alright, but when I upgraded from SE 4.0.5 to Se 4.11 the upgrade killed my site. I would rather reinstall the software with upgrade as a fresh install on separate domain to make sure everything works then be able to import my site from the previous version of SE4

    Also I would like to edit my footer template, in SE3 we had the footer template, where is this located in SE4. I see the knowledge base has all sorts of ways to edit thru layout editor, but are there more tutorials that provide information like this to customize our sites. I like the layout editor, but my sites need to be something unique and this is hard to do when limited by the layout editor.

    Thank you for your time
    Donovan D. Denholm
    donovandenholm@aol.com

  • Saad

    Dear JOHN,

    With respect i would like to ask you that can you please guide us how we can photo-album plugin and video plugin through into Amazon S3 CDN? as you claim that SE4 have some hidden CDN features please guide us and share some easy codes so we can implement in the files and utilized.

    I understand for the moment its very difficult for you to move everything
    on CDN via control panel but atleast these two big sections
    we can move and free our application to serve FAST and handle other large requests?

    Not only serving 200mb video file to user or 1900×1900 pixal photos

    Best Regards,
    SAH

  • http://friendzbook.net lil kenya

    Please help me i really need help to solve this issue The problem is that i have lost all of my files on server , but i got back up of them so I'm trying to reinstall and use the same database information, but every time i try to type the database information it overriding the database, and i don't want that to happen i want use the same files on the database can you help to fix this issue please? and how can stop it from doing that?

  • Donovan Denholm

    John, Has anyone else been experiencing pop up boxes that collapse into either a crammed version of the current page or your profile. I had a member sign up and this happened along with a few other places on my site. Is there a setting I am missing, is there to have this open in a new page and not a pop up.

  • Fedor

    Hi, John! Please describe how to plugin can be completely uninstalled in SE4 (it can be disabled in admin panel, but not uninstalled). Thanks!

  • Brian

    Hi John,

    I am sure that it is possible to access and interact with multiple tables in a module. I just cannot figure out where.

    So my question is….

    How would I open, select from and insert into a non module specific database table using the same values that are sent to the module specific table?

    example: if I join a network, it also automatically places me in the group that shares the same title as that network.

    Is that something that you can answer on here?

  • http://geazle.com Milton

    @John:
    I am not sure if others have similar experience; I notice the site statistics is not the same as google analytic. the site stats will show more pages view than google analytic. Could you please explain such discrepancy?

  • Larry

    John,
    My question is what is the structure of the User Directory under Public when users starts using the site.
    In V3 it took the form "/users/1000000/1000/username" but i am struggling to see the logic in V4, as teh structure seems "random" and by that i mean "/users/random letter".
    Can you clarify please

  • http://klassifriends.com Larry

    Hi John,

    I would like to know 2 things:

    1. How do i get tinymc to work in the Message text area of V4.x
    2. I have bought the ImageManager plugin for Tinymc so that i can upload pics from my PC on the pages when usign groups etc….my question is how easy or hard is it to integrate them.

    A response will be greatly appreciated

  • Michael

    HelloJohn,

    With respect I would like to ask you that can you please guide me how to change file uploading path to Amazone EC2/ any other location except default location. Browse last days for a solution but nothing helps :-(

  • luke

    what echo code prints the users profile url as im making a widget and want to wrap profile link around image this is for widget thanks

  • Mara

    @Michael Version 4.1.6 will include support for external storage such as Amazon S3. This version is due for release later today.

  • Mara

    @Luke:

    $userObject->getHref() if it's internally in the site, 'http://' . $_SERVER['HTTP_HOST'] . $userObject->getHref() if it's outside the site

    You can get a user object by ID with Engine_Api::_()->getItem('user', $user_id);

    You can get a user on its profile page with Engine_Api::_()->core()->getSubject();
    publish

  • Blinky

    Hello John,

    I've been trying to render the ad-campaign widget using code such as this:

    echo Engine_Api::_()->content()->renderWidget('core.ad-campaign', array('adcampaign_id' => 16));

    So far I've been unable to get it to output anything. I tried variations on this but nothing's working.
    There must be some basic aspect of MVC programming I'm missing here.

    Sure would appreciate it if you could point me in the right direction. Thanks.

  • Mark

    Hi John,

    Once I've created a subdomain – images.domain.com.

    Which file (if possible) do i modify to change the directory path for any image uploads?

    Thanks,
    Mark

  • dalip singh

    Hi John,

    In social engine 4 all the content is accessible to guests , even without login, they can see photos and videos , which is quite good. But when if import social engine 3 to social engine 4 , then all this content needs login or sign up to view them. i want photos videos and all other content to be visible even without login, and after importing social engine 3 . how can i fix this?

    thanks.

  • Victor

    Hi John,

    I have created an extra field for mobile phone numbers during sign up, but I now need to change the sign up database query to include these changes. Which module or file is responsible for handling the Social Engine database queries. Thanks.

  • Mnaoj

    Hi John,

    I am a developer and working for my client, my client want to show updates which is showing on header, he want to show i left-side, plz suggest me that How can be possible to show updates without toggal in left side.

    thanks
    Manoj
    soyaljpr@gmail.com