On Tuesday, November 13, 2012 1:06:28 AM UTC+8, Ismayil Khayredinov wrote:
> Let's say you have the following URL structure:
> www.my-elgg-site.com/custom_handler/view/2560/my-very-long-blog-title
> When you hit this URL, elgg will attempt to call a registered page handler
> for 'custom_handler' (e.g. a handler function registered with
> elgg_register_page_handler('custom_handler', 'my_custom_handler_function'))
> Elgg will call your my_custom_handler_function($segments, $handler); where
> $segments is an array of segments in your url following your $handler =
> 'custom_handler'.
> In case of activity, $segments are probably empty.
> You can have as many handlers defined as you want. Just keep in mind that
> handlers must be unique, or they might be overridden, depending on the
> plugin priorities.
> Perhaps, it would be best for you to seek help in the Elgg community.
> On Mon, Nov 12, 2012 at 5:34 PM, Lin Ma <lin...@gmail.com <javascript:>>wrote:
>> Hi Pjotr,
>> Thanks for the detailed reply. I have made some further study and have
>> two more questions,
>> 1. In Elgg's document for function "elgg_register_page_handle" =>
>> http://docs.elgg.org/wiki/Elgg_register_page_handler, the first
>> parameter represents page type.
>> My first question is how many page types are defined in Elgg, and what is
>> the principle of defining page type (so that I can understand in the future
>> what is the best
>> practices to reuse or define new page type in the future);
>> 2. I read through code of elgg_river_page_handler, I am totally lost
>> about what happens when input is 'activity' for function call
>> forward('activity') of index.php.
>> I think elgg_river_page_handler is called, and input parameter is $page.
>> And what is the value of $page when called from forward('activity') ofindex.php?
>> regards,
>> Lin
>> On Sunday, November 11, 2012 4:21:36 PM UTC+8, Pjotr wrote:
>>> Activity is part of the Elgg Core, it is not a plugin. It is registered
>>> within <ELGG-ROOT>/engine/lib/river.**php line 643
>>> It reads like this:
>>> elgg_register_page_handler('**activity', 'elgg_river_page_handler');
>>> As that is part of an *_init function, you can make an educated guess
>>> that it is loaded when engine starts.
>>> This is the line taking care of that:
>>> elgg_register_event_handler('**init', 'system', 'elgg_river_init');
>>> This is not an action, it is more of a page. Actions are different
>>> things in Elgg, those are mostly about being places when some from sends
>>> information to get something done. Se some of the start.php files within
>>> the plugins for examples, you are looking for elgg_register_action calls.
>>> Hope that helps.
>>> On Sunday, November 11, 2012 10:10:42 AM UTC+2, Lin Ma wrote:
>>>> Hi Steve,
>>>> Thanks for your reply. I am new to Elgg and I feel I like its simple
>>>> style and extensible framework design and passion to write some plug-ins.
>>>> For my question, I searched the source tree, and there are multiple
>>>> start.php files. Then I tried to search "activity" (which is the Url mapped
>>>> to), but find no results.
>>>> Two more questions,
>>>> - appreciate if you could let me know what is the rule to find which
>>>> start.php takes effect in my specific scenario/question?
>>>> - could you help to point me where Url "activity" is mapped to an
>>>> action? Sorry for that and I did investigation, but never found out as I am
>>>> new to the code base.
>>>> regards,
>>>> Lin
>>>> On Sunday, November 11, 2012 2:06:07 AM UTC+8, Steve Clay wrote:
>>>>> On 11/10/12 10:25 AM, Lin Ma wrote:
>>>>> > I think this code snippet will forward current user to Url
>>>>> "activity". My question is, I
>>>>> > cannot find there is any php file called activity in the source
>>>>> tree. Any ideas?
>>>>> Most Elgg pages do not call PHP scripts directly. Most requests are
>>>>> handled by
>>>>> /engine/handlers/page_handler.**php, which passes on control to the
>>>>> page handling system
>>>>> http://docs.elgg.org/wiki/**Engine/Controllers/PageHandler<http://docs.elgg.org/wiki/Engine/Controllers/PageHandler>
>>>>> Steve
>>>>> --
>>>>> http://community.elgg.org/**profile/steve_clay<http://community.elgg.org/profile/steve_clay>
>>>> --
>> You received this message because you are subscribed to the Google
>> Groups "Elgg development" group.
>> To post to this group, send email to elgg-dev...@googlegroups.com<javascript:>
>> To unsubscribe from this group, send email to
>> elgg-developme...@googlegroups.com <javascript:>
>> Elgg: http://elgg.org/
>> Remember, bug reports should be filed at http://trac.elgg.org/elgg!
> --
> *Ismayil Khayredinov*
> hypeJunction
> web development and services
> ismayil.k...@gmail.com <javascript:>
> +420 774 693 672
> ismayil.khayredinov
> *"Hope is a state of mind, not of the world. Hope, in this deep and
> powerful sense, is not the same as joy that things are going well, or
> willingness to invest in enterprises that are obviously heading for
> success, but rather an ability to work for something because it is good"* -
> Vaclav Havel