Jump to content

Recommended Posts

Posted

I would like to modify my Guest Sign Up Widget to only show the Facebook sign in option, but still keep all of my current sign in options (~5) on the regular sign in page. Does anyone know how I can comment out some of the options from appearing in the widget?

Posted

Do you have IP.Pages?

I was thinking you could create your own custom block in IP.Pages ("custom guest sign up widget) and just copy and paste over the HTML from the guest sign up widget.  That way you can manipulate the HTML as much as you want while preseving the original.  

Posted

I do have Pages, so thank you for offering this as an approach, but I'm not exactly sure where the code is for the guest sign up widget...do you know? 

PS - I think I found it...I will try this and let you know.

{{$buttonMethods = $login->buttonMethods();}}
{{$usernamePasswordMethods = $login->usernamePasswordMethods();}}
{{if $orientation == 'vertical'}}
	<div class='ipsWidget_inner ipsPos_center ipsPad'>
		<div class="ipsAreaBackground_light ipsPad">
		    <h2 class="ipsType_sectionHead ipsSpacer_bottom ipsSpacer_half">{$title}</h2>
		    <p class="ipsType_richText ipsType_contained">
		        {$text|raw}
		    </p>
		    
		    {{if $usernamePasswordMethods}}
			    <ul class="ipsList_inline">
			        <li>
			            <a href='{url="app=core&module=system&controller=login" seoTemplate="login"}' class="ipsButton ipsButton_primary ipsButton_verySmall ipsPos_right">{lang="sign_in_short"}</a>
			        </li>
			        <li>{lang="or"}</li>
			        <li>
			            <a href='{url="app=core&module=system&controller=register" seoTemplate="register"}' class="ipsButton ipsButton_primary ipsButton_verySmall ipsPos_right">{lang="sign_up"}</a>
			        </li>
			    </ul>
			{{endif}}
		
		    {{if $buttonMethods}}
			    <div class=''>
					<form accept-charset='utf-8' method='post' action='{$login->url}' data-controller="core.global.core.login">
						<input type="hidden" name="csrfKey" value="{expression="\IPS\Session::i()->csrfKey"}">
						<input type="hidden" name="ref" value="{expression="base64_encode( \IPS\Request::i()->url() )"}">
				        {{foreach $buttonMethods as $method}}
					        <div class='ipsType_center ipsPos_center ipsSpacer_top'>
					            {$method->button()|raw}
					        </div>
				        {{endforeach}}
				    </form>
			    </div>
		    {{endif}}
		</div>
	</div>
{{else}}
	<div class='ipsWidget_inner ipsPos_center ipsPad_half'>
		<div class="ipsAreaBackground_light ipsPad">
		    <div class="ipsGrid ipsGrid_collapsePhone">
		        <div class='ipsGrid_span{{if $buttonMethods}}9{{endif}}'>
		            <h2 class="ipsType_sectionHead ipsSpacer_bottom ipsSpacer_half">{lang="widget_guestsignup_title"}</h2>
		            <p class="ipsType_richText ipsType_contained">
		                {lang="widget_guestsignup_text"}
		            </p>
		            
		            {{if $usernamePasswordMethods}}
			            <ul class="ipsList_inline">
			                <li>
			                    <a href='{url="app=core&module=system&controller=login" seoTemplate="login"}' class="ipsButton ipsButton_primary ipsButton_verySmall ipsPos_right">{lang="sign_in_short"}</a>
			                </li>
			                <li>{lang="or"}</li>
			                <li>
			                    <a href='{url="app=core&module=system&controller=register" seoTemplate="register"}' class="ipsButton ipsButton_primary ipsButton_verySmall ipsPos_right">{lang="sign_up"}</a>
			                </li>
			            </ul>
			        {{endif}}
		        </div>
		        {{if $buttonMethods}}
			        <div class='ipsGrid_span3 cSignInTeaser_right'>
						<form accept-charset='utf-8' method='post' action='{$login->url}' data-controller="core.global.core.login">
							<input type="hidden" name="csrfKey" value="{expression="\IPS\Session::i()->csrfKey"}">
							<input type="hidden" name="ref" value="{expression="base64_encode( \IPS\Request::i()->url() )"}">
				            {{foreach $buttonMethods as $method}}
					            <div class='ipsPad_half ipsType_center ipsPos_center'>
					                {$method->button()|raw}
					            </div>
				            {{endforeach}}
				        </form>
			        </div>
		        {{endif}}
		    </div>
		</div>
	</div>
{{endif}}

 

Posted (edited)

You're going to probably need something like below.

The foreach is a loop that is going to grab each button.  Since you only want facebook, we're going to add an if statement that says, if, during the loop, facebook shows up, output that button.  Obviously, if you don't have the facebook button active the button will now show.

Not sure about the $method->button()->facebook but it should be something like that.

{{if $buttonMethods}}
			        <div class='ipsGrid_span3 cSignInTeaser_right'>
						<form accept-charset='utf-8' method='post' action='{$login->url}' data-controller="core.global.core.login">
							<input type="hidden" name="csrfKey" value="{expression="\IPS\Session::i()->csrfKey"}">
							<input type="hidden" name="ref" value="{expression="base64_encode( \IPS\Request::i()->url() )"}">
                          
				            {{foreach $buttonMethods as $method}}
                          
                          		{{if $medthod->button()->facebook}}
					            	<div class='ipsPad_half ipsType_center ipsPos_center'>
					                	{$method->button()|raw}
					            	</div>
                          		{{endif}}
                          
				            {{endforeach}}
                          
				        </form>
			        </div>
		        {{endif}}

Just remember, modify the template code now, modify the template code forever.  If you do modify the template code, before and after the edit put:

<!--- MY MOD STARTS HERE -->

<!--- MY MOD ENDS HERE -->

Using the above allows you to search for "MY MOD" and that way you know where the edits are when you upgrade.

Hope this helps!

Edited by Bluto
Posted

Thank you for this. I've been testing but still can't get the facebook button showing. Here is what the facebook code looks like for that button:

					            <div class='ipsPad_half ipsType_center ipsPos_center'>
					                

<button type="submit" name="_processLogin" value="5" class='ipsButton ipsButton_verySmall ipsButton_fullWidth ipsSocial ipsSocial_facebook' style="background-color: #3a579a">
	
		<span class='ipsSocial_icon'>
			
				<i class='fa fa-facebook-official'></i>
			
		</span>
		<span class='ipsSocial_text'>Sign in with Facebook</span>
	
</button>
					            </div>

 

Posted

Anyone else who wants to do this try:

 

{{$buttonMethods = $login->buttonMethods();}}        
{{$usernamePasswordMethods = $login->usernamePasswordMethods();}}
{{if $orientation == 'vertical'}}
	<div class='ipsWidget_inner ipsPos_center ipsPad'>
		<div class="ipsAreaBackground_light ipsPad">
		    <h2 class="ipsType_sectionHead ipsSpacer_bottom ipsSpacer_half">{$title}</h2>
		    <p class="ipsType_richText ipsType_contained">
		        {$text|raw}
		    </p>		    
		    {{if $usernamePasswordMethods}}
			    <ul class="ipsList_inline">
			        <li>
			            <a href='{url="app=core&module=system&controller=login" seoTemplate="login"}' class="ipsButton ipsButton_primary ipsButton_verySmall ipsPos_right">{lang="sign_in_short"}</a>
			        </li>
			        <li>{lang="or"}</li>
			        <li>
			            <a href='{url="app=core&module=system&controller=register" seoTemplate="register"}' class="ipsButton ipsButton_primary ipsButton_verySmall ipsPos_right">{lang="sign_up"}</a>
			        </li>
			    </ul>
			{{endif}}
		
		    {{if $buttonMethods}}
			    <div class=''>
					<form accept-charset='utf-8' method='post' action='{$login->url}' data-controller="core.global.core.login">
						<input type="hidden" name="csrfKey" value="{expression="\IPS\Session::i()->csrfKey"}">
						<input type="hidden" name="ref" value="{expression="base64_encode( \IPS\Request::i()->url() )"}">
				        {{foreach $buttonMethods as $method}}
					        {{if $method->getTitle() == 'login_handler_Facebook'}}
                            <div class='ipsType_center ipsPos_center ipsSpacer_top'>
					            {$method->button()|raw}
					        </div>
                            {{endif}}
				        {{endforeach}}
				    </form>
			    </div>
		    {{endif}}
		</div>
	</div>
{{else}}
	<div class='ipsWidget_inner ipsPos_center ipsPad_half'>
		<div class="ipsAreaBackground_light ipsPad">
		    <div class="ipsGrid ipsGrid_collapsePhone">
		        <div class='ipsGrid_span{{if $buttonMethods}}9{{endif}}'>
		            <h2 class="ipsType_sectionHead ipsSpacer_bottom ipsSpacer_half">{lang="widget_guestsignup_title"}</h2>
                       <!-- lines below removed by scott
                  <p class="ipsType_richText ipsType_contained">
		                 {lang="widget_guestsignup_text"}
		            </p>
		                 END removed  -->		            
		            {{if $usernamePasswordMethods}}
			            <ul class="ipsList_inline">
			                <li>
			                    <a href='{url="app=core&module=system&controller=login" seoTemplate="login"}' class="ipsButton ipsButton_primary ipsButton_verySmall ipsPos_right">{lang="sign_in_short"}</a>
			                </li>
			                <li>{lang="or"}</li>
			                <li>
			                    <a href='{url="app=core&module=system&controller=register" seoTemplate="register"}' class="ipsButton ipsButton_primary ipsButton_verySmall ipsPos_right">{lang="sign_up"}</a>
			                </li>
			            </ul>
			        {{endif}}
		        </div>
		        {{if $buttonMethods}}
			        <div class='ipsGrid_span3 cSignInTeaser_right'>
						<form accept-charset='utf-8' method='post' action='{$login->url}' data-controller="core.global.core.login">
							<input type="hidden" name="csrfKey" value="{expression="\IPS\Session::i()->csrfKey"}">
							<input type="hidden" name="ref" value="{expression="base64_encode( \IPS\Request::i()->url() )"}">
				            {{foreach $buttonMethods as $method}}
					            {{if $method->getTitle() == 'login_handler_Facebook'}}
                                <div class='ipsPad_half ipsType_center ipsPos_center'>
					                {$method->button()|raw}
					            </div>
                                {{endif}}
				            {{endforeach}}
				        </form>
			        </div>
		        {{endif}}
		    </div>
		</div>
	</div>
{{endif}}

 

  • 1 year later...
Posted

How does one go about changing the color scheme of the Guest Sign Up Widget? Is there a setting in ACP or is it done with css?

Thank you.

  • Recently Browsing   0 members

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