Tribe Support

In this group #Anahita Tribe members provide support and help each other out. All the posts must be public on this group. #support

Stories

Rastin Mehr

Rastin Mehr commented on the topic

Access for notes set to public on private groups

I have a group that's set so only followers can see the profile and only admins can add new users. For all the social apps, only followers can add or comment.

I've been looking at the database thoug...

Read More

I have a group that's set so only followers can see the profile and only admins can add new users. For all the social apps, only followers can add or comment.

I've been looking at the database though and I see that notes still have their access set as public. For all other medium nodes, their access is set to followers. I can't seem to figure why this is happening only for notes.

Which permission defines the access level of new nodes? Is there anyway to set the default access level for new notes for a group to followers?

Thanks.

Read Less
I need to look in the code, but from what I remember, Anahita first checks with the Owner's privacy settings before checking the media nodes privacy setting.
Nick Swinford

Nick Swinford started a topic

Access for notes set to public on private groups

I have a group that's set so only followers can see the profile and only admins can add new users. For all the social apps, only followers can add or comment.

I've been looking at the database thoug...

Read More

I have a group that's set so only followers can see the profile and only admins can add new users. For all the social apps, only followers can add or comment.

I've been looking at the database though and I see that notes still have their access set as public. For all other medium nodes, their access is set to followers. I can't seem to figure why this is happening only for notes.

Which permission defines the access level of new nodes? Is there anyway to set the default access level for new notes for a group to followers?

Thanks.

Read Less
Rastin Mehr

Rastin Mehr shared a note

How's the upgrade to 4.3.5 going? Please report any issues or bugs so we can fix them.

Mohamed Abdi and Rastin Mehr commented on the topic

How do we modify the order of the results for a global search?

Hi Rastin Mehr, I wanted to know how the profiles that are result of a global search can be ranked by modifying the php class that handles the database query.  I want to be able to display the resu...

Read More

Hi Rastin Mehr, I wanted to know how the profiles that are result of a global search can be ranked by modifying the php class that handles the database query.  I want to be able to display the results of a string search in way that orders them by database attributes of said profile e.g. show the profiles of users in the same city first. 

Thanks Mo

Read Less
PS Can you tell us the path of that php file?
The search is handled by the com_search component. More than one classes are involved to make the search happen. The query class is here:

https://github.com/anahitasocial/anahita/blob/master/src/components/com_sear... Read More
The search is handled by the com_search component. More than one classes are involved to make the search happen. The query class is here:

https://github.com/anahitasocial/anahita/blob/master/src/components/com_search/domains/queries/node.php

and of course this is the controller https://github.com/anahitasocial/anahita/blob/master/src/components/com_search/controllers/search.php

I don't recommend touching any of those files. The com_search is functioning independently which means you can choose to build your own alternative com_search or com_searches and implement your own unique logic. Right now if you pass the nearby parameters the results will be filtered based on the viewer's obtained location. Isn't that enough for your purpose? Read Less

Mohamed Abdi started a topic

How do we modify the order of the results for a global search?

Hi Rastin Mehr, I wanted to know how the profiles that are result of a global search can be ranked by modifying the php class that handles the database query.  I want to be able to display the resu...

Read More

Hi Rastin Mehr, I wanted to know how the profiles that are result of a global search can be ranked by modifying the php class that handles the database query.  I want to be able to display the results of a string search in way that orders them by database attributes of said profile e.g. show the profiles of users in the same city first. 

Thanks Mo

Read Less

Hunter Wilkes and Rastin Mehr commented on the topic

How to make a custom app

As I said earlier, I would like to make gadget that will display suggestions on dashboard. I was wondering if anyone had any pointers they could give me on the process of making a custom app and ga...

Read More

As I said earlier, I would like to make gadget that will display suggestions on dashboard. I was wondering if anyone had any pointers they could give me on the process of making a custom app and gadget.

Thanks

Hunter

#HowTo #CustomApp #AppDevelopment

Read Less
Where is the query for $context->query in Todo's _actionBrowse($context) coming from? I don't see it in KCommandContext, KConfig, or KConfigInterface.
I'm still confused. To me, it doesn't look like $context-query should ever return something, since I don't see query as a member of KCommandContext or any of the classes it is inheriting from. I'm not incredibly famil... Read More
I'm still confused. To me, it doesn't look like $context->query should ever return something, since I don't see query as a member of KCommandContext or any of the classes it is inheriting from. I'm not incredibly familiar with php, but it seems like one of those classes should have a query member, if you're accessing it with the -> operator. Am I mistaken? Read Less
$context-query holds the query object which is an instance of the AnDomainQuery class https://github.com/anahitasocial/anahita/blob/master/src/libraries/anahita/domain/query/query.php You use it to construct a query a... Read More
$context->query holds the query object which is an instance of the AnDomainQuery class https://github.com/anahitasocial/anahita/blob/master/src/libraries/anahita/domain/query/query.php You use it to construct a query and you can add more arguments and conditions to it in the child controller classes.

What are you trying to do? Read Less
Nothing yet, I was just reading through the code and got confused at that part. I couldn't figure out where it was coming from, so I figured I'd just ask.
I think to make matters less confusing it would be better if you focus on what problem you are about to solve and use the API and the code examples in the apps to make it happen. At first you many not know what happen... Read More
I think to make matters less confusing it would be better if you focus on what problem you are about to solve and use the API and the code examples in the apps to make it happen. At first you many not know what happens underneath the app API and at the framework level and that's ok.

Anahita is the result of 4+ years of development and understanding the code at the framework level could take you months. You can however build apps without knowing the underlying magic within days. Gradually as you are developing more sophisticated apps, you can go to the deeper layers of the framework code and make sense of it over time.

You can always post your questions here. We have people here with little technical background who have successfully launched their projects with a few custom components and extensions. You can do that too. Read Less
Rastin Mehr

Rastin Mehr commented on the topic

How to make a custom app

As I said earlier, I would like to make gadget that will display suggestions on dashboard. I was wondering if anyone had any pointers they could give me on the process of making a custom app and ga...

Read More

As I said earlier, I would like to make gadget that will display suggestions on dashboard. I was wondering if anyone had any pointers they could give me on the process of making a custom app and gadget.

Thanks

Hunter

#HowTo #CustomApp #AppDevelopment

Read Less
Hunter, to start I recommend you to look into the Todos and Topics apps:

https://github.com/anahitasocial/anahita/tree/master/packages/Todos/src
https://github.com/anahitasocial/anahita/tree/master/packages/Topics/src

They are two examples of Media publishing apps for Anahita. Then look into the Groups App:
https://github.com/anahitasocial/anahita/tree/master/packages/Groups/src

which is a good example of actor app in Anahita.

As you can see Anahita follows MVC design patterns in it's components. Anahita's Model is repository and domain entities. Anahita also places a graph architecture on top of the mysql database which is a relational database. An MVC triad is called a component. A package may contain multiple components.

Anahita supports component inheritance. For example media publishing apps (Todos, Topics, et.) are extending the com_medium. Groups and People apps both extend the com_actors component.

Anahita controllers have the main actions called BREAD (Browse, Read, Edit, Add, and Delete). For example _actionBrowse displays a list of entities or _actionRead displays an individual entity. There are two entities that you will be used most the time. Nodes and Graphs, because social networks are a network of nodes connect with graphs and some of the nodes exchanges messages (stories) that's why we call it the Nodes-Graphs-Stories architecture.

This is an old article the describes Anahita's lingo

Anahita Lingo

Learn the Anahita lingo and terms

this article describes what an actor node is

The Actor Manifesto

Defining an Actor in Anahita

now for building the suggestions app (components used directly by users) you don't even need to implement BREAD. Only the BR would do. The most challenging part is implementing the algorithm where each request checks the viewer against the list of conditions that I posted for you earlier and comes up with 1 or multiple suggestions https://www.getanahita.com/topics/161217-suggest-friends#scroll=161353
I don't know how to implement it yet until I sit down and code it myself. It is one of the apps on our 4.* road map.

So start code reading and try building an example app of your own which does a BREAD operation on a node entity. For example Blogs or Books, etc. Code reading and practicing is the best way to learn a new framework. Read Less
Hunter Wilkes liked this

Hunter Wilkes started a topic

How to make a custom app

As I said earlier, I would like to make gadget that will display suggestions on dashboard. I was wondering if anyone had any pointers they could give me on the process of making a custom app and ga...

Read More

As I said earlier, I would like to make gadget that will display suggestions on dashboard. I was wondering if anyone had any pointers they could give me on the process of making a custom app and gadget.

Thanks

Hunter

#HowTo #CustomApp #AppDevelopment

Read Less
Rastin Mehr

Rastin Mehr shared a note

Keep me informed of how your upgrades to Anahita 4.3.5 go. A lot of issues that you have reported regarding custom templates and language packages are resolved. Also the JQuery parallax plugin is n... Read More
Keep me informed of how your upgrades to Anahita 4.3.5 go. A lot of issues that you have reported regarding custom templates and language packages are resolved. Also the JQuery parallax plugin is now part of the core library for now, so you don't have to import it in your custom templates. We don't know the makeup of 4.4 javascript library is going to be yet until it is ready. Also we have further optimized the code so enjoy the bit of extra speed. Read Less
Rastin Mehr

Rastin Mehr shared a note

Anahita 4.3.5 Birth release is out. It's time to update your installations because there are critical bug fixes in this release as well as significant performance boost. Our special thangs go to @s... Read More
Anahita 4.3.5 Birth release is out. It's time to update your installations because there are critical bug fixes in this release as well as significant performance boost. Our special thangs go to @scott and @NicholasJohn16 for the extensive testing, feedbacks, bug reports, and contributing PRs on Github. Their contribution and attention made a big difference. Read Less
Nick Swinford liked this
Rastin Mehr

Rastin Mehr commented on the topic

Use of "noreply@" email for notifications?

I'm curious what thoughts are in regards to using "noreply@..." emails for the notifications.  All my notifications coming from getanahita are treated as spam, and after researching a bit it seems ...

Read More

I'm curious what thoughts are in regards to using "noreply@..." emails for the notifications.  All my notifications coming from getanahita are treated as spam, and after researching a bit it seems the "noreply" from address is often, if not typically, treated as such by gmail, outlook, etc.

I am currently running a separate email account for my project, the address of which I have set the Site Settings to utilize.  I can though see the point of the email address itself conveying that what is being sent is informational only - e.g., no reply is to be expected - however I'm not crazy about the notifications defaulting to being treated as spam.

Thoughts?  Suggestions?

#mailnotifications

Read Less
Rastin Mehr liked this
I just changed the email to notification@getanahita.com to see if it would make a difference. I am also thinking of ways to reduce the number of email notifications. I don't think they serve much purpose unless import... Read More
I just changed the email to notification@getanahita.com to see if it would make a difference. I am also thinking of ways to reduce the number of email notifications. I don't think they serve much purpose unless important information is sent out such as password reset links. An alternative would be browser push notifications. Companies like https://onesignal.com are offering free unlimited packages for PNs. Read Less
Rastin Mehr

Rastin Mehr commented on the topic

mailAdmins available to com_pages?

I noticed in the com_mailer that the mailer.php behavior includes a function for mailAdmins, which I see is used, for example, by the com_people controller.

Would the mailAdmins funtion also availab...

Read More

I noticed in the com_mailer that the mailer.php behavior includes a function for mailAdmins, which I see is used, for example, by the com_people controller.

Would the mailAdmins funtion also available for use via com_pages?  I would assume a plugin would be required, but the intent would be a very lightweight contact form where the form is rendered via a com_pages page, and the submit button triggers the mailAdmins function.

I see the com_pages content controller primarily deals with the content path(s) being rendered... if a 'contact' plugin would be required, would it be correct to extend the ComPagesControllerPage class?

Read Less
com_pages is not intended to handle POST requests; only GET requests.
But you can make a component and make an ajax POST request to that component from any of the pages.
Unkown Person liked this
Nick Swinford

Nick Swinford commented on the topic

mailAdmins available to com_pages?

I noticed in the com_mailer that the mailer.php behavior includes a function for mailAdmins, which I see is used, for example, by the com_people controller.

Would the mailAdmins funtion also availab...

Read More

I noticed in the com_mailer that the mailer.php behavior includes a function for mailAdmins, which I see is used, for example, by the com_people controller.

Would the mailAdmins funtion also available for use via com_pages?  I would assume a plugin would be required, but the intent would be a very lightweight contact form where the form is rendered via a com_pages page, and the submit button triggers the mailAdmins function.

I see the com_pages content controller primarily deals with the content path(s) being rendered... if a 'contact' plugin would be required, would it be correct to extend the ComPagesControllerPage class?

Read Less
I currently just use https://formspree.io/ in a page for a contact page.

It would depend where you're submitting the contact form to (ei the form action). Sending the contact form to the main page controller prolly... Read More
I currently just use https://formspree.io/ in a page for a contact page.

It would depend where you're submitting the contact form to (ei the form action). Sending the contact form to the main page controller prolly wouldn't be the best idea. Read Less
Rastin Mehr

Rastin Mehr commented on the topic

User registration plugin

I'm trying this week to refactor a legacy registration plugin to be compliant with the 4.3.3 codebase; it had relied a bit on Joomla mainframe & other Joomla syntax.  Few questions:

  1. The plugin vali...

Read More

I'm trying this week to refactor a legacy registration plugin to be compliant with the 4.3.3 codebase; it had relied a bit on Joomla mainframe & other Joomla syntax.  Few questions:

  1. The plugin validations need to be performed prior to allowing the user to register, so is this best implemented as a 'system' plugin or a 'user' plugin ?
  2.  I see in the system/anahita.php plugin PlgAnahitaDefault class there are functions referenced for onAfterStoreUser and onBeforeDeleteUser ... is there one for onBeforeStoreUser already existing that can be accessed ?
  3. I had previously obtained the form variables using JRequest::getVar( 'variableName' ) syntax... how should these be picked up now that Joomla is removed ?
#plugin #events

Read Less
Why not? And yes there is no user object anymore. Viewer is the person object.

Although I like what the guys at Timble have done which is getting rid of plugins all together. All controllers have before and after ... Read More
Why not? And yes there is no user object anymore. Viewer is the person object.

Although I like what the guys at Timble have done which is getting rid of plugins all together. All controllers have before and after calls for their actions. Read Less
Unkown Person liked this
Plugins are hooks to intercept the execution process and get some tasks done. Plugins such as the authentication allow alternative ways of authenticating such as checking with a company's user database. Although we ca... Read More
Plugins are hooks to intercept the execution process and get some tasks done. Plugins such as the authentication allow alternative ways of authenticating such as checking with a company's user database. Although we can improve the overall architecture to support before and after calls for every action in a controller and also allow a component to inject behaviours to another component's controllers. This way we can gradually phase out the plugins and rely on components only. Read Less
Unkown Person liked this
Nick Swinford

Nick Swinford and Rastin Mehr commented on the topic

get_viewer()

I'm seeing get_viewer() being called, but I can't seem to find where it's defined. Could someone either tell me what it does or where it's defined?Thanks,

Hunter

I use WAMP on Windows to develop local. It's really a huge performance boost than working remotely.

No matter what, you should install an Integrated Development Environment (IDE). I've used Atom in the past which i... Read More
I use WAMP on Windows to develop local. It's really a huge performance boost than working remotely.

No matter what, you should install an Integrated Development Environment (IDE). I've used Atom in the past which is free and pretty good. I use Sublime Text which I love, but does cost $75.

You should download or git clone the anahita repo localy, create a project in the IDE, and from there you'll be able to do full text search of all the files. It makes it a lot easier to figure out where functions are defined and how everything works. Read Less
I use PhpStorm and Atom. I find myself using Atom more and more for both mobile and Anahita development.
@Scott, cp is a Linux command and there's no such command on Windows so the installer fails using the Command Prompt. You have to either install Cygwin or use a Linux dev enviroment. I use Cygwin.

Anahita CLI is a ... Read More
@Scott, cp is a Linux command and there's no such command on Windows so the installer fails using the Command Prompt. You have to either install Cygwin or use a Linux dev enviroment. I use Cygwin.

Anahita CLI is a bit buggy on Windows. I've tried patching things here and there as I find them, but there's a good amount of work to make it really cross platform. Read Less
Rastin Mehr liked this
We've gone way off topic here :) I think a vagrant box solution would be better similar to this https://github.com/joomlatools/joomlatools-vagrant that is something I'd like to accomplish if time allows.
@Scott, be sure to launch Cygwin as an Administrator.
Unkown Person liked this
Nick Swinford

Nick Swinford and 2 others commented on the topic

get_viewer()

I'm seeing get_viewer() being called, but I can't seem to find where it's defined. Could someone either tell me what it does or where it's defined?Thanks,

Hunter

Awesome, thanks!
What code editor are you using?
It is basically KService::get('com:people.viewer') use this if possible.
Since I'm on a windows machine and the server with the website is on a linux machine, and I'm not too familiar with all this stuff, I'm just using putty to connect to the server and then using vim.
You can use a virtual machine and vagrant to create a Linux environment on you windows machine

Hunter Wilkes started a topic

get_viewer()

I'm seeing get_viewer() being called, but I can't seem to find where it's defined. Could someone either tell me what it does or where it's defined?Thanks,

Hunter

Rastin Mehr

Rastin Mehr commented on the topic

User registration plugin

I'm trying this week to refactor a legacy registration plugin to be compliant with the 4.3.3 codebase; it had relied a bit on Joomla mainframe & other Joomla syntax.  Few questions:

  1. The plugin vali...

Read More

I'm trying this week to refactor a legacy registration plugin to be compliant with the 4.3.3 codebase; it had relied a bit on Joomla mainframe & other Joomla syntax.  Few questions:

  1. The plugin validations need to be performed prior to allowing the user to register, so is this best implemented as a 'system' plugin or a 'user' plugin ?
  2.  I see in the system/anahita.php plugin PlgAnahitaDefault class there are functions referenced for onAfterStoreUser and onBeforeDeleteUser ... is there one for onBeforeStoreUser already existing that can be accessed ?
  3. I had previously obtained the form variables using JRequest::getVar( 'variableName' ) syntax... how should these be picked up now that Joomla is removed ?
#plugin #events

Read Less
Rastin Mehr

Rastin Mehr commented on the topic

Where is the code for the profile page?

I think it's probably under com_people, but I can't seem to find it.

A person component is extending the actor component and therefore using the actor profile by default https://github.com/anahitasocial/anahita/blob/master/src/components/com_actors/views/actor/html/default.php
Hunter Wilkes liked this

Hunter Wilkes started a topic

Where is the code for the profile page?

I think it's probably under com_people, but I can't seem to find it.

Photos View All

Articles View All

Topics View All

Powered by Anahita