Topics

Tribe Support

Tribe Support's Topics

Michael G

Michael G

June 12 2013

modify avatar upload

Where is the source file for uploading profile avatars located, please? Thanks for help!

components/com_actors/controllers/abstract.php action edit
components/com_actors/domains/entities/actor.php

and the portraitable behaviour is in
libraries/default/base/domain/behavior/portraitable.php
Unknown Person liked this
Michael G
Michael G
June 12 2013 Permalink
thank you very much!
Darwin R.C.
Darwin R.C.
August 06 2014 Permalink
Hello, @rastin

I am trying to override this abstract #controller in order to add an aditional cover image apart from the #avatar (appending logic to #edit action).

I put the overriden controller in /packages/MyPackage/src/site/components/com_actors/controllers/abstract.php but it is not getting overriden.

Could you tell me please what am I doing wrong?

Thank you very much!
Darwin R.C.
Darwin R.C.
August 06 2014 Permalink
I am also trying to override ComActorsViewSettingsHtml in order to insert the new tab in profile's #settings and the new view to upload the image, as recommended here: http://www.getanahita.com/topics/95049-change-setting-view

No luck with it
Rastin Mehr
Rastin Mehr
August 06 2014 Permalink
How are you trying to overwrite those classes?
Darwin R.C.
Darwin R.C.
August 06 2014 Permalink
This is what I did:

/packages/MyPackage/src/site/components/com_actors/controllers/abstract.php

/packages/MyPackage/src/site/components/com_actors/views/settings/html.php
Darwin R.C.
Darwin R.C.
August 06 2014 Permalink
Basically what I am trying to do is this: http://www.getanahita.com/topics/90689-groups-cover-image

but including the cover not only for groups but for people as well.
Rastin Mehr
Rastin Mehr
August 06 2014 Permalink
so you are basically symlinking those files to your own custom files instead of what Anahita provides right? I've never tried that approach, but in theory it should work. What's not working?
Darwin R.C.
Darwin R.C.
August 06 2014 Permalink
Yes, that's what I am trying to do.

The problem is that files are not being ovewritten.

Is there a better approach to this change?
Rastin Mehr
Rastin Mehr
August 06 2014 Permalink
In theory you can create an Anahita project which will use Anahita as one of the vendors. Then inside the project's packages directory you can put your own custom components and rewrite the composer so it would symlink to your components rather than what Anahita provides by default. Again haven't had a chance to try it myself yet, but it should work. If you got results, please take sometime and publish a page about it here. Others could really benefit from it as well.
Darwin R.C.
Darwin R.C.
August 07 2014 Permalink
OK, @rastin

Thank you very much.

I will try it and let you know if it works. I thought I could overwrite any core's file just by putting the new one under my packages components hierarchy. I wouldn't know how to rewrite the composer as you advice.
Rastin Mehr liked this
Darwin R.C.
Darwin R.C.
August 07 2014 Permalink
I made it work by copying the entire com_actors #component from #Anahita vendor to my custom component and changing the files I need to change, but I feel that's not the best way to do it, cause I lose the updates to it.

Am I doing wrong?
Rastin Mehr
Rastin Mehr
August 07 2014 Permalink
Whenever you overwrite a class or component, you will be responsible for maintaining it from that point.
Unknown Person liked this
Darwin R.C.
Darwin R.C.
August 07 2014 Permalink
Well, @rastin

I guess mine is not a wrong approach after all. Thank you very much.

Just a note: I discovered #tags doesn't support underscore like #com_actors. Is it an expected feature?
Rastin Mehr
Rastin Mehr
August 07 2014 Permalink
no hashtags cannot contain underscores, dashes, dots, @, slashes, or start with numbers.
Unknown Person liked this

Powered by Anahita