Jump to content

(DF42) Members Social Info (Support Topic)


Recommended Posts

1 minute ago, FGN said:

Don't know if you know this...

But if you have custom theme, and have a Cover photo, after putting in the update, it moves the Cover photo down and takes away the option to position it again

other that, works great @TheJackal84

Moves it down what do you mean? what version are you using? And create me a account on your site so I can see, Some themes use different elements or custom ones and it could be a simple custom.css edit for your theme

Link to comment
13 minutes ago, FGN said:

Screenshot_20170624-031115.png

Screenshot_20170624-031213.png

Screenshot_20170624-031138.png

I think I get what you mean, The button what adds allows you to add it?

Add this to your custom.css for now and I will sort it in a update, The avatar is sitting on top of the buttons so the code below will tell the buttons to site on top of the avatar

#elEditProfile {
    z-index: 9999;
}

 

Edited by TheJackal84
Link to comment
6 hours ago, TheJackal84 said:

I think I get what you mean, The button what adds allows you to add it?

Add this to your custom.css for now and I will sort it in a update, The avatar is sitting on top of the buttons so the code below will tell the buttons to site on top of the avatar


#elEditProfile {
    z-index: 9999;
}

 

Worked like a charm!

Thx @TheJackal84 

Link to comment

@TheJackal84

you may want to think about putting it back in the edit profile.......

members are not recognizing it as a need to add the icons

but you need to make sure it doesn't take over other tabs.......

classifieds has a tab called "member store"......

and i noticed the first time before you changed the tab, that it took over the classifieds tab in edit profile

Link to comment
3 hours ago, FGN said:

@TheJackal84

you may want to think about putting it back in the edit profile.......

members are not recognizing it as a need to add the icons

but you need to make sure it doesn't take over other tabs.......

classifieds has a tab called "member store"......

and i noticed the first time before you changed the tab, that it took over the classifieds tab in edit profile

I will put a choice of where to show it. You could always change the language of the button to add/edit social info. And with classifieds if they are hooking into the same code as mine then it will conflict and only show one of them as you can't hook a hook

Link to comment
1 hour ago, FGN said:

i agree with the option part

also, i dont know who made the hook first.......i just know i had classifieds 4.2 before social info.....you both have tabs for the edit profile

but if you add the option part in the admincp.....that will work, 

Its not who made first if both are trying to override something only 1 will work, if it was both plugins then the plugin sitting at the top of the list will be the one what it will use, but a plugin and a app then it's pot luck, the button works with both installed because the button is my own code where the edit profile is my code injected into IPS' code

Edited by TheJackal84
Link to comment
10 minutes ago, TheJackal84 said:

Its not who made first if both are trying to override something only 1 will work, if it was both plugins then the plugin sitting at the top of the list will be the one what it will use, but a plugin and a app then it's pot luck, the button works with both installed because the button is my own code where the edit profile is my code injected into IPS' code

No. If you extend the class correctly, you can have hundreds of hooks in same class. Your plugin probably isn't returning the parent class, which will kill any ither plugin in same class.

Link to comment
7 minutes ago, Adriano Faria said:

No. If you extend the class correctly, you can have hundreds of hooks in same class. Your plugin probably isn't returning the parent class, which will kill any ither plugin in same class.

its to go in the edit profile settings on the profiles \IPS\core\modules\front\members\profile hooking into protected function edit()

I made my own and placed it in it's own button but he wants it back in the edit profile settings, I ain't found a way to do it keeping IPS settings there as well without replacing the whole code, while adding my own

Edited by TheJackal84
Link to comment
Just now, FGN said:

Sry, didn't mean to cause confusion, what ever works best for you as the dev, I was just suggesting as to a lot of my members have to go back to add the new icons......but if it works best in the banner, then keep it

That's cool, I will add the option of where to show it, What do you mean go back to add new icons?

Link to comment
15 minutes ago, TheJackal84 said:

its to go in the edit profile settings on the profiles \IPS\core\modules\front\members\profile hooking into protected function edit()

I made my own and placed it in it's own button but he wants it back in the edit profile settings, I ain't found a way to do it keeping IPS settings there as well without replacing the whole code, while adding my own

Sorry if I misunderstood. Thought you were talking about add a new tab with a form in Edit Profile. If so, that's what I do in Classifieds:

Hook in \IPS\core\modules\front\members\profile::buildEditForm():

    /**
     * Build Edit Form
     *
     * @return \IPS\Helpers\Form
     */
	protected function buildEditForm()
	{
		$form = call_user_func_array( 'parent::buildEditForm', func_get_args() );	
		$form->addTab( 'your_tab_title' );
		$form->add( new \IPS\Helpers\Form\YesNo...
		return $form;
	}

	/**
	 * Save Member
	 *
	 * @param $form
	 * @param array $values
	 */
	protected function _saveMember( $form, array $values )
	{
		$member = parent::_saveMember( $form, $values );

		$this->member->YOUR_COLUMN 		= $values['YOUR_FIELD'];
	
		$this->member->save();
		return $member;
	}

 

Link to comment
2 minutes ago, Adriano Faria said:

Sorry if I misunderstood. Thought you were talking about add a new tab with a form in Edit Profile. If so, that's what I do in Classifieds:

Hook in \IPS\core\modules\front\members\profile::buildEditForm():


    /**
     * Build Edit Form
     *
     * @return \IPS\Helpers\Form
     */
	protected function buildEditForm()
	{
		$form = call_user_func_array( 'parent::buildEditForm', func_get_args() );	
		$form->addTab( 'your_tab_title' );
		$form->add( new \IPS\Helpers\Form\YesNo...
		return $form;
	}

	/**
	 * Save Member
	 *
	 * @param $form
	 * @param array $values
	 */
	protected function _saveMember( $form, array $values )
	{
		$member = parent::_saveMember( $form, $values );

		$this->member->YOUR_COLUMN 		= $values['YOUR_FIELD'];
	
		$this->member->save();
		return $member;
	}

 

No worries,

that was the first thing I done and it replaced it with only the stuff I added (removing all IPS settings) I had to add IPS plus mine to get it to show, Plus I had to edit the save value bits too

Edited by TheJackal84
Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...