• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

ParseHTML - Permission-enabled HTML BBCode

Status
Not open for further replies.
Mind me asking what was the actual problem?

I ended up with a crazy workaround to merge in the custom tags in my getTags function:

PHP:
        XenForo_Application::resolveDynamicClass('XenForo_BbCode_Formatter_Base', 'controller');
        XenForo_Autoloader::getInstance()->autoload('KingK_BbCodeManager_BbCode_Formatter_Base');
        if(class_exists('KingK_BbCodeManager_BbCode_Formatter_Base')){
            $bbcodeManager = new KingK_BbCodeManager_BbCode_Formatter_Base();
            $tags = array_merge($bbcodeManager->getTags(), $tags);
            $tags = array_filter($tags);
        }

Dunno if there's a cleaner way of doing it :/
 
With vBulletin if you had the WYSIWYG editor on by default, HTML post would be converted to BBCode and eventually break when editing a post with HTML. The work around was making the standard editor default, that way people would have the controls and HTML would not break. However with Xenforo it's either WYSIWYG or h4x0r no controls, and I don't feel making plain text mode is a good compromise.

Is there a some sort of option/url to edit a post directly in plain text mode when the user configuration is in WYDIWYG? That way I'll just have a second button for HTML edits :).
 
With vBulletin if you had the WYSIWYG editor on by default, HTML post would be converted to BBCode and eventually break when editing a post with HTML. The work around was making the standard editor default, that way people would have the controls and HTML would not break. However with Xenforo it's either WYSIWYG or h4x0r no controls, and I don't feel making plain text mode is a good compromise.

Is there a some sort of option/url to edit a post directly in plain text mode when the user configuration is in WYDIWYG? That way I'll just have a second button for HTML edits :).

Upper right hand corner of the editor.
 
Upper right hand corner of the editor.
By the time you press the A/A in the upper right hand corner and go into plain text mode, the links have already gone through the WYSIWYG, and are all broken with [url ] and [url="urlcode" ]. I was wondering if there was an edit button with an specific URL that would open the plain text editor directly and skip the WYSIWYG. That way you can normally have the rich text options, end skip it all together when posting/editing HTML.
 
I've come across a problem...

I don't think it's the add-on's fault, but wanted to see if there was a work-around. Any table code placed into a post cannot be styled or have classes added to it. I mean you can add them, but they are ignored and you have no control over tables. They all have borders, extra padding, etc, etc.

Any work-around for this?

I also posted for help here: http://xenforo.com/community/threads/unwanted-table-borders-in-posts.9807/
 
I've come across a problem...

I don't think it's the add-on's fault, but wanted to see if there was a work-around. Any table code placed into a post cannot be styled or have classes added to it. I mean you can add them, but they are ignored and you have no control over tables. They all have borders, extra padding, etc, etc.

Any work-around for this?

I also posted for help here: http://xenforo.com/community/threads/unwanted-table-borders-in-posts.9807/

If you add this to EXTRA.css or whatever it should fix the problem:

Code:
.baseHtml .parseHTML th, .baseHtml .parseHTML td { border: none; padding: 0; }

Failing that, try:

Code:
.baseHtml .parseHTML th, .baseHtml .parseHTML td { border: none !important; padding: 0 !important; }



And to actually override the padding/border on an individual basis, you'll probably have to include .baseHtml .parseHTML at the start of your selector or use !important/style attributes.
 
Hi :)

Not sure if I've missed seeing any configurations on this but all I get is the raw html. I've given only Admins persmission to use it. Are there any other settings I should look at?

I'm using Xenforo beta 5.

Regards,
Renada :)
 
You have to put it in BBC tags.

[parsehtml]your raw html[/parsehtml]

Also, don't forget to add your permissions on who can use the [parsehtml] tags.
 
You have to put it in BBC tags.

[parsehtml]your raw html[/parsehtml]

Also, don't forget to add your permissions on who can use the [parsehtml] tags.

The only permissions I could find were Usergroup permissions. I allowed admins to use this.

Yes, I used the bbcode - see below.

parsehtml.webp

That's how it turns out - have I missed any permissions or something else?

Regards,
Renada :)
 
make sure that if you set permissions for the say the "admin" group, that you are a "super admin". For some reason, when you set the permission for the admin group, it only applies to the super admin's, not regular admin's. I had that same problem...
 
make sure that if you set permissions for the say the "admin" group, that you are a "super admin". For some reason, when you set the permission for the admin group, it only applies to the super admin's, not regular admin's. I had that same problem...

Did you have Administrator as a secondary group before making yourself a super admin? There's been issues in the past with admin being your secondary rather than primary group.
 
Did you have Administrator as a secondary group before making yourself a super admin? There's been issues in the past with admin being your secondary rather than primary group.

Good heavens the only way I could make this work was to create a second Super Admin, and make the first one an admin with all permissions. I had done this already but it didn't appear to work giving myself (as a super admin) admin permissions. I probably went about it in a pear-shaped way but this permission format is very confusing.

Thanks both of you for your help :)

Regards,
Renada :)
 
Did you have Administrator as a secondary group before making yourself a super admin? There's been issues in the past with admin being your secondary rather than primary group.

No, I went to users > adminastrator > make xarcell admin

That still didn't work. Then I had to go to my profile and make xarcell an admin that way also. It didn't seem to work without one or the other. Both permissions had to be set. Looking at permissions right now, it still doesn't say I'm a super admin. I still haven't figured that out I guess.

But that's what I done to get it to work for me. My other account who IS is the super admin, was able to use this BBC tag after selecting permissions to this tag for admin group.
 
No, I went to users > adminastrator > make xarcell admin

That still didn't work. Then I had to go to my profile and make xarcell an admin that way also. It didn't seem to work without one or the other. Both permissions had to be set. Looking at permissions right now, it still doesn't say I'm a super admin. I still haven't figured that out I guess.

But that's what I done to get it to work for me. My other account who IS is the super admin, was able to use this BBC tag after selecting permissions to this tag for admin group.

Yeah that make administrator tool gives you Administrative as a secondary group rather than primary, which doesn't work in my addons for some reason.
 
Status
Not open for further replies.
Top Bottom