MyBB Community Forums

Full Version: Parse this HTML
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I want to see the result of my coding. I do NOT want to see the HTML tags displayed on the screen (which is what's happening now). How would I edit this snippet to do that?

The page displays on the UserCP panel and I'm using this snippet to allow further customization/editing the layout of the UserCP (which can NOT be done using templates).

Right now when I put
<b>bold</b>
I see the tags. I want to see the word "bold" in bold text.

Here's the section I'm referring to:

$profilefield['specialstuffs'] = htmlspecialchars_uni($profilefield['specialstuffs']);

I believe it has to do with that section that says "htmlspecialcharacters_uni" but I can't seem to find the correct way of telling it to parse. Help? I'm also a novice, so if you can be pretty straightforward or provide the corrected code, I'd appreciate it.
This is not possible without either a core edit or plugin.
Yes, this is a core edit to the usercp.php file.

Smile I've already made the other edits (actually, a friend made them for me), but now it's just showing plaintext html instead of what the code is actually calling for. I'm just looking for how to change it so that it'll show (bold for example) instead of plaintext.
Revert the changes your friend made and use this plugin.mods.mybb.com/view/html-in-posts
I am 99% sure there is not a plugin for what I'm trying to do. I've seen the html in posts pluggin and that's not what I'm trying to do. The html I want to see is not something users can input - it will not be visible in profiles, posts, or postbit, and I can already see html that users put in those areas.

This is something that admins (me basically) will put in once and the html I'm putting in will edit the LAYOUT of the usercp page - which as far as I have searched, it's not editable (at least, the area I'm talking about isn't because there is no template for it).

The 'specialstuffs' is a field put into the database/table-column to store that data. It is not a custom profile field or anything that users can edit themselves, so I'm not worried about misuse or security threats to the board based on that.

The only other thing I tried was something like this:

$profilefield['specialstuffs'] = $parse->parse_message(htmlspecialchars_uni($profilefield['specialstuffs']));

Which changed my html tags to some funky symbols like &lt;b&gt;Testing Bold&lt;/b&gt; - so it still didn't work. I'm really just looking for how to change that line from "showing the plaintext" to showing what I've actually coded in there. For example, if I put something like

<table bg=black><tr><td> text </td></tr></table>

I want to see the table I just coded.
Sorry man. I was way off base. I need to slow down I suppose as opposed to skimming.
(2014-05-05, 03:19 AM)DrXotick Wrote: [ -> ]Sorry man. I was way off base. I need to slow down I suppose as opposed to skimming.

That's okay. Smile Smile The pluggin you mentioned is a good plugin, just not what I'm looking for. And my original post was fairly vague.
You can use a plugin instead.
http://mybbhacks.zingaburga.com/showthread.php?tid=1271

Please read the full thread first, as the feature you want need to be enabled within the files first IIRC
EDIT: I DOWNLOADED THAT PLUGIN. - It doesn't do what I'm requesting, but it did have another feature I'm interested in... so the issue is still unsolved.

-----

I'm a bit concerned about what areas that plugin is going to edit/change (especially since I'd also have to install XThreads before even using that plugin so that brings up another set of questions). Would I have to recode my profile pages/things since it appears this changes the variables for the individual fields that appear on that page?

I'm not trying to change the memberprofile page or the postbit.

What I'm actually doing is a work-around that will allow me to add coding into the Usercp page between each of the custom profile fields (which will customize how they appear so they're not in a straight list on the "Edit Profile" page).

here's what I have so far...
Do those two fields already exist in your forum? The best approach would be to install the Template Conditionals plugin and do this at a template level.
Pages: 1 2