latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Removing your css styles and your oops~ text

Home Forums Community Forum Removing your css styles and your oops~ text

This topic contains 8 replies, has 5 voices. Last updated by  Cristián Lávaque 4 years, 6 months ago.

Topic Author Topic
Posted: Sunday Jun 3rd, 2012 at 12:39 pm #15282
Carla Madni
Username: cmadni

Hi,

Can you tell me please, how I may add CSS styling to the javascript popup alert windows, which are shown when my form tries to validate? This alert box is a very inconsistent style with the rest of my site. I need a list of the style classes invoked, please.

I would also like a line of code which I may add to functions.php which will remove all s2-pro css from my site, as I did with s2-framework:
add_filter(“ws_plugin__s2member_login_header_styles”, “__return_false”);
How can I add another line which deletes all CSS added by S2-pro?

Also, I would like to change “Oops, you missed something”, and all text which says “Oops” and “Whoops”. This is the equivalent of WordPress’s “Howdy”, which is fine for some sites, but not everyone will want to say “Oops!”. How may I fix that too?

Thanks.

List Of Topic Replies

Viewing 8 replies - 1 through 8 (of 8 total)
Author Replies
Author Replies
Posted: Monday Jun 4th, 2012 at 7:39 am #15348

Hi Carla.

Pre Sale FAQs » How can I prevent s2Member® Pro from loading it’s default CSS?

I’ll ask Jason how to change those messages in the JavaScript pop-ups.

Posted: Monday Jun 4th, 2012 at 3:35 pm #15392
Carla Madni
Username: cmadni

Thanks – It seems like the Oops alert messages could be added in the control panel, like most other messages are. Use what you have as the default, since it would be fine for most applications. Just not for what I happen to be doing, which is a site that needs to be flawless.

While you’re at it, is there a way to request that S2 not overwrite my default body and header fonts that I apply in my CSS?

My entire site uses a serif font and the only thing that’s sans-serif is the alert message, so it sticks out like a thumb. But worse, many people will not even notice that they are switching Sans fonts on their sites, and will be randomly using Tahoma, Verdana, Calibri and Arial, depending on what plugins they added to what template.

The plugin authors need to use as little CSS as possible, describing only layout, not overriding the fonts, colors, line-heights, link colors and other basics, which belong in the template.

Thanks!
:)

  • This reply was modified 4 years, 7 months ago by  Carla Madni.
Posted: Tuesday Jun 5th, 2012 at 6:14 am #15452

Thanks for the great feedback, Carla. :)

Jason will see your comments as soon as he gets to the email I sent him. He’s checking his inbox once or twice a week lately, since he’s really busy developing the new s2Member. Thanks for your patience.

Posted: Thursday Jun 7th, 2012 at 6:21 pm #15849
Staff Member

Thanks for the heads up on this request for support.

Regarding the text “— Oops, you missed something: —”.

This text, like all front-end aspects of s2Member, can either be changed by translating s2Member in it’s entirety, into a different language, or on a one-off basis using the gettext_with_context filter built into WordPress®.

Translating s2Member’s POT file:

See: Pre Sale FAQs » Can s2Member® be translated into other languages?

Translating this particular message, without translating the entire plugin:

Create this directory and file:
/wp-content/mu-plugins/s2-o.php
( these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins )

<?php
add_filter('gettext_with_context', 'my_translator', 10, 4);
function my_translator($translated, $original, $context, $domain)
	{
		if($domain === 's2member' && $context === 's2member-front')
			{
				if($original === '— Oops, you missed something: —')
					$translated = 'I want to say this...';
			}
		return $translated;
	}
?>
Regarding CSS styles…

s2Member applies only basic structural CSS. It does NOT make any attempt to set font sizes, families, etc. I think what you’re referring to are JavaScript alerts, which browsers do NOT style via CSS. The fonts used in a JavaScript alert message, are dictated by the browser that is being used.

See also: Pre Sale FAQs » How can I prevent s2Member® Pro from loading it’s default CSS?

  • This reply was modified 3 years, 11 months ago by  Jason (Lead Developer). Reason: Updating file name. Changed to s2-o.php
Posted: Tuesday Jun 12th, 2012 at 8:09 am #16239

This is just an additional post to create content that will be picked up in search to help others looking for how to change the ‘Submit Form’ button text on the PayPal Pro forms.

That’s changing the ‘Submit Form’ button text on PayPal Pro forms.

One more time for good measure :)

That’s changing the ‘Submit Form’ button text on PayPal Pro forms.

I lost a whole day looking for this information!

Cheers
Steve

Posted: Wednesday Jun 13th, 2012 at 12:05 am #16336

Good idea, Steve. Thanks for adding those keywords to the thread.

By the way, the code Jason posted needs to be edited a bit to customize the pro-form’s submit button’s text. You need to change the values for [hilite mono]$original[/hilite] and [hilite mono]$translated[/hilite] in his code.

I hope that helps. :)

Posted: Thursday Jun 14th, 2012 at 6:09 pm #16515
Lifeischoice
Username: debo

Thanks…this worked…

Posted: Friday Jun 15th, 2012 at 7:18 am #16570

Cool. :)

Viewing 8 replies - 1 through 8 (of 8 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.