Page 1 of 1

Security badge

PostPosted: October 30th, 2011, 1:47 am
by Harty
Hi there.
Have tried to activate the badge at my site but keep getting a zero return instead of a 1.
I have read the instructions and followed them carefully.
I have two other sites with the same host, and the s2m security badge has worked / appeared first time.
Any suggestions.
Thanks,
Steve

Re: Security badge

PostPosted: October 30th, 2011, 9:13 am
by Eduan
Jason Caldwell wrote:If you know a little PHP, you might find it helpful to look at the PHP routine that s2Member uses to report your Badge Status. As seen here: viewtopic.php?f=40&t=13060&src_doc_v=111017#src_doc_line_40

For others, here is a complete list of things that s2Member looks for:

1. Is your Badge Status API enabled?
See: s2Member -> General Options -> Security Badge -> Badge Status API

2. Does your /wp-config.php file have all of these configuration values?
See: http://codex.wordpress.org/Editing_wp-c ... urity_Keys
( each of these MUST be at least 60 chars, and must NOT contain: "unique phrase" )

3. Have you created a Security Encryption Key for your s2Member installation?
See: s2Member -> General Options -> Security Encryption Key
( this MUST be at least 60 chars as well )

4. Does your /wp-config.php file have both of these configuration values?
DB_USER and DB_PASSWORD. These must be filled in, and must NOT be the same value.
See: http://codex.wordpress.org/Editing_wp-c ... abase_Name

5. Have you configured your Unique IP Restriction Options yet?
See: s2Member -> Restriction Options -> Unique IP Restrictions
( this must NOT be set to: infinite )

6. Have you configured your Brute Force IP Restrictions yet?
See: s2Member -> Restriction Options -> Brute Force IP Restrictions
( this must NOT be set to: infinite )

Hope this helps. :lol:

Re: Security badge

PostPosted: October 30th, 2011, 2:52 pm
by Harty
Thanks again Eduan.

It was number 5 I missed on the list.

Cheers.

Steve

Re: Security badge

PostPosted: October 30th, 2011, 3:05 pm
by Eduan
Great! Glad to be able to help. :)
Anything else you need just ask. ;)

Re: Security badge

PostPosted: November 27th, 2011, 5:34 pm
by luthimir
I'm also having an issue with my security badge. I'm using the shortcode
Code: Select all
[s2Member-Security-Badge v="1" /]
to try and display the badge. I've gone through steps 1-6 listed above multiple times and verified that everything is set up properly. When I use the shortcode mentioned above in a page, on my footer area, etc. it simply shows the shortcode in text format. When I use the shortcode in the widgetized footer or sidebar areas, it generates a 1x1 px image (at first I thought it was generating nothing) which links to s2member.com. I'm using s2Member Pro, the latest version, and the s2Clean theme.

Any assistance is greatly appreciated.

Re: Security badge

PostPosted: November 27th, 2011, 5:37 pm
by Eduan
Are you using it in the footer area the security badge panel offers? I think it's the only place the code works.

Re: Security badge

PostPosted: November 27th, 2011, 8:08 pm
by luthimir
To begin, I thought that the shortcode would work on other areas of the site because of this:
Customize WordPress® Footer:
[ Click HERE to insert your Security Badge ],
or use Shortcode [s2Member-Security-Badge v="1" /] in a Post/Page/Widget.
The v="1" attribute is a Security Badge style/variation. Try variations 1|2|3.


Anyway, I've also tried using the shortcode in the footer configuration settings (Theme Options>Footbar Configuration>Footbar Appendage/Footbar Companion Codes) and had no luck there.

Where does the badge show up on your pages if you use the area provided under s2Member>General Options>s2Member Security Badge? When I place the shortcode there, I don't see any changes in my footer area.

Re: Security badge

PostPosted: November 27th, 2011, 8:39 pm
by Eduan
Did you save your changes and refresh the page after putting the badge there? The place I told you to put it.

Re: Security badge

PostPosted: November 27th, 2011, 10:35 pm
by luthimir
Yes, I don't see the badge appearing anywhere on my pages though. I have the shortcode on s2Member>General Options>s2Member Security Badge>Customize Wordpress Footer.

Edit - I'm wondering if there is any sort of conflict between the security badge "footer" you (and I) mentioned above and the Theme Options>Footbar Configuration? That's the only other thing I could think of as far as why I'm not seeing the security badge. By default, the Theme Options>Footbar Configuration auto-fills with credits for wordpress, primo themes, etc. so I don't suspect that's the issue.

Re: Security badge

PostPosted: November 27th, 2011, 11:56 pm
by Cristián Lávaque
I just tried it and it worked for me, in a normal page, and the footer too.

Could you show a screenshot of each of those settings and of the place where you pasted the shortcode, please?

Re: Security badge

PostPosted: November 28th, 2011, 1:57 pm
by luthimir
Alright, I've tried a whole bunch of things here, so I'll post screen shots of each place I've stuck the security badge shortcode and the resulting footer.

Trial #1 - Dashboard>s2Member Pro>General Options>s2Member Security Badge>Customize Wordpress Footer
Code is here:
Image
Appearance:
Image

Trial #2 - Dashboard>Appearance>Theme Options>Footbar Configuration>Footbar Appendage
Code is here:
Image
Appearance:
Image

Trial #3 - Dashboard>Appearance>Theme Options>Footbar Configuration>Footbar Companion Codes
Code is here:
Image
Appearance:
Image

Trial #4 - Dashboard>Widgets>Logged-In Footbar>Text Widget
Code is here:
Image
Appearance:
Image

Note: I've also tried the Logged-In Sidebar area (which gives similar results to the logged-in footbar) and the AdCodes Widget ("Feel free to paste any type of ad code here. AdSense®, XHTML, PHP, IFrame, JavaScript, whatever: ") with no success.


Apologies for the long post, but you asked for screenshots. I'm not sure if you can even see the area I've circled on that last image (for Trial #4), but the red circle is around a small "dot", which is a 1x1px image generated by the code which simply links to s2member.com. So far, after all my tinkering around with the security badge, that's about the closest I've gotten to seeing it. I tried using the sidebar widget area and got similar results to the footbar widget area.

Anyway, I'm not sure what I'm doing wrong here, so any advice you guys have is much appreciated. Thanks again for your time.

Edit- Looks like it cut my images off a bit (I thought that might happen) - The screenshots are the bottom of my wordpress pages and my footer area. The white bar at the top of the screenshots is the bottom of my wordpress page content area.

Re: Security badge

PostPosted: November 29th, 2011, 4:51 am
by Cristián Lávaque
Thanks for those screenshots.

Jason Caldwell wrote:If you know a little PHP, you might find it helpful to look at the PHP routine that s2Member uses to report your Badge Status. As seen here: viewtopic.php?f=40&t=13060&src_doc_v=111017#src_doc_line_40

For others, here is a complete list of things that s2Member looks for:

1. Is your Badge Status API enabled?
See: s2Member -> General Options -> Security Badge -> Badge Status API

2. Does your /wp-config.php file have all of these configuration values?
See: http://codex.wordpress.org/Editing_wp-c ... urity_Keys
( each of these MUST be at least 60 chars, and must NOT contain: "unique phrase" )

3. Have you created a Security Encryption Key for your s2Member installation?
See: s2Member -> General Options -> Security Encryption Key
( this MUST be at least 60 chars as well )

4. Does your /wp-config.php file have both of these configuration values?
DB_USER and DB_PASSWORD. These must be filled in, and must NOT be the same value.
See: http://codex.wordpress.org/Editing_wp-c ... abase_Name

5. Have you configured your Unique IP Restriction Options yet?
See: s2Member -> Restriction Options -> Unique IP Restrictions
( this must NOT be set to: infinite )

6. Have you configured your Brute Force IP Restrictions yet?
See: s2Member -> Restriction Options -> Brute Force IP Restrictions
( this must NOT be set to: infinite )


Have you double checked that you completed those 6 points correctly?

There's also the possibility that the shortcode is not being parsed correctly because of the theme or other plugins you're using that could be messing up the shortcode parsing. Could you try, as a quick test, to change the theme to the default TwentyEleven? Also, deactivate other plugins one by one and see if the badge displays?

Re: Security badge

PostPosted: November 29th, 2011, 6:29 pm
by luthimir
First, I deactivated my only other active plugin, which was "Jetpack by Wordpress" and switched my theme to TwentyTen or TwentyEleven; there were no major changes as far as the security badge is concerned.

So, I ran through this checklist again one more time. I noticed my wp-config.php configuration values were 20 characters long, rather than 60, so I used the online generator linked to on this wordpress page to create new values: http://codex.wordpress.org/Editing_wp-c ... urity_Keys.

That got me thinking about my Security Encryption Key for s2Member... I counted manually and I believe my Security Encryption Key is only 56 characters (I have no idea why...), could this be causing my issue? (My DB_USER and DB_PASSWORD values are fine, as well as the options mentioned on #5 and #6) If the security encryption key is causing my issue, is there a way I can fix it? I'm a bit worried about tampering with my security key after reading:
Once you configure this, you do NOT want to change it; not ever. In fact, it is a VERY good idea to keep this backed up in a safe place, just in case you need to move your site, or re-install s2Member in the future. Some of the sensitive data that s2Member stores, will be encrypted with this Key. If you change it, that data can no longer be read, even by s2Member itself. In other words, don't use s2Member for six months, then decide to change your Key. That would break your installation.


I've checked the badge status after updating my values from #2, but still don't see the security badge. I'm afraid I've made an error with my security encryption key, but I'm not certain.

Edit - Then again, if I have an error with my security encryption key, wouldn't I still see the badge saying "unverified" or something in that regard?

Re: Security badge

PostPosted: November 30th, 2011, 4:09 pm
by luthimir
Today, when I logged in to do some work on my site, I noticed that my security badge on the back end (under S2Member>General Options>s2Member Security Badge) changed from the "Unverified" red badge to the "Verified" green badge, with yesterdays date on it. I'm hoping this is because I updated those configuration values. Still, I'm not seeing the badge on my pages although the code is there.

Edit - Well, it's been an hour or so since I originally noticed the badge on the back end, and now it's showing up properly on the front end of my site. Apparently, changing my security values from 20-digits to 60-digits did the trick. Thanks for your help, cheers!