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.

Allow & Render Static HTML in Profile Fields

Home Forums Community Forum Allow & Render Static HTML in Profile Fields

This topic contains 6 replies, has 3 voices. Last updated by  Raam Dev 4 years, 9 months ago.

Topic Author Topic
Posted: Tuesday Mar 20th, 2012 at 1:12 pm #8623

I am use the S2Member Pro module, and I would like to be able to include an iframe code in a two profile field for the highest member level, but when I insert the HTML and view it in the actual profile, the code isn’t rendered as HTML, just plain text. An example can be found here:

http://bargoggles.tv/dev/blitzsportsbar/

I just want to be able to include a Google Maps location iframe in one field, and an iframe that houses a video feed to an IP Cam.

  • This topic was modified 4 years, 9 months ago by  Daniel Garza.
  • This topic was modified 4 years, 9 months ago by  Daniel Garza.

List Of Topic Replies

Viewing 6 replies - 1 through 6 (of 6 total)
Author Replies
Author Replies
Posted: Tuesday Mar 20th, 2012 at 2:41 pm #8639

Is this not an acceptable topic, or is this not a possibility?

Posted: Wednesday Mar 21st, 2012 at 3:52 am #8703

Hi Daniel. Just saw your post now.

s2Member doesn’t offer that yet, you’ll need to customize the profile page to add those things.

To check the user’s Level you can read about conditionals here:
[hilite path]Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Conditionals[/hilite]

If you need help with this, you can get a freelancer from a site like oDesk.com, eLance.com or jobs.WordPress.org.

I hope that helps!

Posted: Wednesday Mar 21st, 2012 at 1:34 pm #8777

Thanks for the feedback. Would you be able to point me in the right direction as to what file(s) I need to edit/customize in order to achieve this? I have some knowledge of PHP, as well as a developer friend on hand that can be of assistance if we could just find a focal point to start with.

Posted: Thursday Mar 22nd, 2012 at 12:27 pm #8840
Raam Dev
Username: Raam
Staff Member

Hi Daniel,

I think what Cristian is suggesting is that you add PHP code directly to the page where you display the user profile. From there, you can use the Advanced PHP Conditionals (Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Conditionals) to check the level of the current user and then display the necessary HTML.

You could even store the iFrame information in a custom profile field and then extract that with PHP and use it when outputting the necessary HTML.

However, looking at your site, it appears that you’re using BuddyPress, which means the profile pages are generated automatically by BuddyPress. In that case, you’ll need to dig into the BuddyPress code and figure out how to modify that.

Posted: Thursday Mar 22nd, 2012 at 12:31 pm #8842

Thanks for the answer. I have edited the buddypress xprofile fields to allow HTML. I will take the information you’ve given me and attempt to make it work.

Posted: Friday Mar 23rd, 2012 at 12:18 pm #8922
Raam Dev
Username: Raam
Staff Member

Great! Thank you for the update. :)

Viewing 6 replies - 1 through 6 (of 6 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.