Jump to content

Community

Adriano Faria

+Clients
  • Posts

    28,065
  • Joined

  • Days Won

    397

Community Answers

  1. Adriano Faria's post in Enable "Recent Profile Visitors" by default? was marked as the answer   
  2. Adriano Faria's post in Possible to auto send a private message to new users? was marked as the answer   
  3. Adriano Faria's post in A "Who posted" block? was marked as the answer   
    Not out of the box.
    This plugin adds a block but not a sidebar block:
     
  4. Adriano Faria's post in Integração do RD Station com o Invision Community was marked as the answer   
    @Karina Harumi, o idioma oficial aqui é inglês. Dificilmente alguém irá traduzir e postar.
    Use o Google Translator e edite seu post. Suas chances aumentarão.
  5. Adriano Faria's post in Widget visibility settings? was marked as the answer   
    Make sure your configuration method starts with:
    public function configuration( &$form=null ) { $form = parent::configuration( $form );  
  6. Adriano Faria's post in Cannot change friendly URLs was marked as the answer   
  7. Adriano Faria's post in How to clean up attachment files after deleting content? was marked as the answer   
    Orphaned attachments are deleted regularly on a task that runs once per day, if I’m Not mistaken. 
    If you want to test it, go to Tasks and find one related to attachments or clean and run the task.
    EDIT: The task is cleanupattachments and runs at every 12 hours.
  8. Adriano Faria's post in restrict moderated members from posting in a forum was marked as the answer   
    Version 1.0.1 submitted to the marketplace:

    User can't create new topics in the chosen forums:


    Or reply to existing topics in chose forums:

  9. Adriano Faria's post in To turn off guest users from looking at the member profile was marked as the answer   
    Admin CP -> Applications -> click in System -> Profile -> click in the padlock-> remove Guests from the selection. 
  10. Adriano Faria's post in Large database after update my ips was marked as the answer   
  11. Adriano Faria's post in (4.5) Where is the option for anonymous logins? was marked as the answer   
    Account Settings-> Security and Privacy. 
    It’s an account feature from now on. 
  12. Adriano Faria's post in Reaction in topicRow - Counting author reactions only was marked as the answer   
    I’ll send a PM with the template when I reach my PC, if no one else helps here first. 
  13. Adriano Faria's post in How to use the Links Directory? was marked as the answer   
    If you're talking about this resource, it's just like create a topic. Create a category, give permission for those can create the link (record) and then click to create a new link. Give a title, the URL and the content and hit save. You're done. The app will add a screen capture of the site as the image record.
  14. Adriano Faria's post in Adding a field to registration was marked as the answer   
    Quick example, obviously not tested:
    /** * Build Registration Form * * @return \IPS\Helpers\Form */ public static function buildRegistrationForm( $postBeforeRegister = NULL ) { $form = parent::buildRegistrationForm( $postBeforeRegister ); $form->add( new \IPS\Helpers\Form\Text( 'field_name', NULL, TRUE ), 'password_confirm' ); return $form; } /** * Create Member * * @param array $values Values from form * @param array $profileFields Profile field values from registration * @param array|NULL $postBeforeRegister The row from core_post_before_registering if applicable * @return \IPS\Member */ public static function _createMember( $values, $profileFields, $postBeforeRegister = NULL ) { $member = parent::_createMember( $values, $profileFields, $postBeforeRegister ); $member->field_name = $values['field_name']; $member->save(); return $member; }  
  15. Adriano Faria's post in Adding a column to core_members table was marked as the answer   
    You can use $member->newcolumn when you load a member or \IPS\Member::loggedIn()->newcolumn for the current member. 
  16. Adriano Faria's post in ItemTopic trait was marked as the answer   
    I removed the topic trait as it doesn't allow me to create the topic in another moment.
    Tks.
  17. Adriano Faria's post in Issue with followed content that don't have a container was marked as the answer   
    Follow, tags and search requires a container. 
    You better add a dummy container as I did here and have everything working. 
  18. Adriano Faria's post in How to make profile fields visible in topics only for admin? was marked as the answer   
  19. Adriano Faria's post in Moderator permission on my content item was marked as the answer   
    A hook in \IPS\core\extensions\core\ModeratorPermissions\ContentGenerator  worked.
    Tks @newbie LAC
  20. Adriano Faria's post in Field position in the form. What can cause this 'error'? was marked as the answer   
    Oh God! I hate when I make such mistakes! 🤬
    I also have a hook in \IPS\Helpers\Form::add() to add my field in the social media registration screen and take a look at the error:
    class invite_hook_is_SocialMediaForm extends _HOOK_CLASS_ { public function add( $input, $after=NULL, $tab=NULL ) { $form = parent::add( $input, $after=NULL, $tab ); The right is:
    $form = parent::add( $input, $after, $tab ); Forgot to remove the default value for the $after parameter.
    Then:

     

     
    Tks, @bfarber.
  21. Adriano Faria's post in Table and join was marked as the answer   
    You'll probably have to use Custom table.
    Or
    use your content class in table Content and then join another table, like they do on members profile:
    $table = new \IPS\Helpers\Table\Content( $currentClass, $url, NULL, NULL, \IPS\Content\Hideable::FILTER_AUTOMATIC, 'read', FALSE ); ... $table->joins = array( array( 'select' => "core_reputation_index.id AS rep_id, core_reputation_index.rep_date, core_reputation_index.rep_rating, core_reputation_index.member_received as rep_member_received, core_reputation_index.member_id as rep_member, core_reputation_index.reaction as rep_reaction", 'from' => 'core_reputation_index', 'where' => array( "core_reputation_index.type_id=" . $currentClass::$databaseTable . "." . $currentClass::$databasePrefix . $currentClass::$databaseColumnId . " AND ( core_reputation_index.member_id=? OR core_reputation_index.member_received=? ) AND core_reputation_index.app=? AND core_reputation_index.type=?", $this->member->member_id, $this->member->member_id, $currentClass::$application, $currentClass::reactionType() ), 'type' => 'INNER' ) ); $currentClass would be your content item class.
  22. Adriano Faria's post in Secondary group list was marked as the answer   
    $groups = array(); foreach( explode( ',', $member->mgroup_others ) as $group ) { try { $groups[] = \IPS\Member\Group::load( $group )->formattedName; } catch ( \OutOfRangeException $e ) { \IPS\Output::i()->error( 'node_error', 'YOUR_ERROR_CODE', 404, '' ); } } echo \IPS\Member::loggedIn()->language()->formatList( $groups ); @~Jakso.`
    Quick edit to add try/catch, as groups can be deleted.
  23. Adriano Faria's post in Create new member programmatically? was marked as the answer   
    Example I use in one of my resources:
    $password = \IPS\Login::generateRandomString( 8 ); $member = new \IPS\Member; $member->name = 'Name'; $member->email = 'something@domain.com'; $member->setLocalPassword( $password ); $member->member_group_id = 3; $member->save();  
  24. Adriano Faria's post in Multiple Db/Table on same page, breaks pagination etc. was marked as the answer   
    Use:
    $table->resortKey = 'something'; It's enough to use a different resortKey per table.
  25. Adriano Faria's post in Does IPS use any kind of PHP framework? was marked as the answer   
    IPS uses its own framework. They made it..
×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy