elgg

How can I go about passing data from one php file to another via JavaScript

无人久伴 提交于 2019-12-13 10:25:25
问题 How can I go about passing data from one php file to another via JavaScript data_from_here.php <?php $guid = 99; require_js('javascript_file.js'); javascript_file.js require(['elgg/Ajax'], Ajax => { var ajax = new Ajax(); $('.glyphicon-zoom-in').click(function(event) { ajax.view('root/data_to_here', { data: { guid: 99 // Save the $guid from data_from_here.php in here }, }).then(body => { $( '.full-image-view' ).html(body); }) }); }); data_to_here.php <?php echo $guid; 回答1: The fact that php

what's the best way to search a social network by prioritizing a users relationships first?

戏子无情 提交于 2019-12-12 09:17:25
问题 I have a social network set up and via an api I want to search the entries. The database of the social network is mysql. I want the search to return results in the following format: Results that match the query AND are friends of the user performing the search should be prioritized over results that simply match the query. So can this be done in one query or will I have to do two separate queries and merge the results and remove duplicates? I could possibly build up a data structure using

code not working in elgg?

旧巷老猫 提交于 2019-12-08 06:24:32
问题 $widget = $vars['entity']; $container = $widget->getContainerEntity(); $options = eligo_get_display_entities_options($widget); This Is The Main Line Code That Is Not Work In My owner_block.php file. and I don't know how to write that lines code in proper format elgg.2.2.1\mod\owner_followers_counter\views\default\profile\owner_block.php this code is not working in file name owner_block.php where I have inserted owner_followers_counter plugin. When I insert this code in my owner_block.php file

code not working in elgg?

纵然是瞬间 提交于 2019-12-07 03:22:27
$widget = $vars['entity']; $container = $widget->getContainerEntity(); $options = eligo_get_display_entities_options($widget); This Is The Main Line Code That Is Not Work In My owner_block.php file. and I don't know how to write that lines code in proper format elgg.2.2.1\mod\owner_followers_counter\views\default\profile\owner_block.php this code is not working in file name owner_block.php where I have inserted owner_followers_counter plugin. When I insert this code in my owner_block.php file, it's output is display most liked the post, but there is two line does not work properly, and I don't

what's the best way to search a social network by prioritizing a users relationships first?

不问归期 提交于 2019-12-04 18:02:46
I have a social network set up and via an api I want to search the entries. The database of the social network is mysql. I want the search to return results in the following format: Results that match the query AND are friends of the user performing the search should be prioritized over results that simply match the query. So can this be done in one query or will I have to do two separate queries and merge the results and remove duplicates? I could possibly build up a data structure using Lucene and search that index efficiently, but am wondering if the penalty of updating a document everytime

What's the difference between entity and class?

怎甘沉沦 提交于 2019-11-28 16:27:32
问题 Is entity an instance of class? 回答1: A class is a template for an object (among other things), and is a very general concept. An entity has more semantic significance and is usually tied to a concept (possibly about a real object for example, an Employee or a Student or a Music Album ) and is linked to business logic. Entities are usually used to establish a mapping between an object and to a table in the database. Entities are also known as domain objects. Like I mentioned before, entities