Premium Members BBcodes [Deleted]

Status
Not open for further replies.
You should have told me sooner, there was a little bug i've just corrected ;)

Thanks !
Thanks alot! I wanted to embed a video inside parsedhtml then put that inside a spoiler code and put that spoiler code inside premium bb code.
 
I've just made a test with the spoiler tag and it's working now. It should be the same with the parsehtml bbcode, can you confirm me please?
 
I've tested with the parsehtml bbcode, and it looks the content of bbcode (parsehtml) isn't parsed when it used inside another bbcode (
or [premium]). I don't know why and to be honest I don't have much time to see if there is a way to make it work now. You might ask Darkimmortal.
 
If it's a video... why don't you the Xenforo BB Code Media ? On this purpose, it will replace the bbcode parsehtml perfectly.

Ex:
Code:
[premium][spoiler]video URL[/spoiler][/premium]
or
[spoiler][premium]video URL[/premium][/spoiler]
 
=> of course you must configure the BB Code Media manager to tell XenForo what to do with that video URL
 
I've modified the PremiumMembersBBcode.php for you to fusion the premium and spoiler bbcodes together. I've tested it and it works.

This file is located here:
Code:
library/PremiumBBcode/BbCode/Formatter/PremiumMembersBBcode.php
 

Attachments

I've modified the PremiumMembersBBcode.php for you to fusion the premium and spoiler bbcodes together. I've tested it and it works.

This file is located here:
Code:
library/PremiumBBcode/BbCode/Formatter/PremiumMembersBBcode.php
This works perfectly! I would also like to use the original one though. How could I use this file as a separate bbcode?
 
This works perfectly! I would also like to use the original one though. How could I use this file as a separate bbcode?

I will duplicate the premium bbcode with another name, but please give me a few days. I've got a job interview on Tuesday so I want to prepare myself for it.
 
I will duplicate the premium bbcode with another name, but please give me a few days. I've got a job interview on Tuesday so I want to prepare myself for it.
Thanks Cédric! You the man, broham. I have a job interview next week too. Good luck to you!
 
This looks great, but I'm curious if this will work on the XenCarta wiki? Considering it can do both bbCode and HTML, I figured perhaps I might be able to protect wiki content with this. Anyone currently doing this or know if it's possible?
 
You can try and tell us but watch out, if XenCarta has a reply option or a subscribed option, they would need to be protected to avoid to leak content.

@The8thLegion I don't forget you... but I've found a bug in my picasa bbcode (preview) that I need to correct first. And I was busy with two others xenforo things ;)
 
You can try and tell us but watch out, if XenCarta has a reply option or a subscribed option, they would need to be protected to avoid to leak content.

@The8thLegion I don't forget you... but I've found a bug in my picasa bbcode (preview) that I need to correct first. And I was busy with two others xenforo things ;)
Seems to work for logged in users, but if you're a guest you see it no matter what. :confused:

Edit: Disabled addon / bbcode, renabled and now I get this error when trying to preview a wiki page with [premium] tags.

Fatal error: Method XenForo_BbCode_TextWrapper::__toString() must not throw an exception in /var/www/htdocs/library/EWRcarta/ViewPublic/PageCreate.php on line 22

Line 22:
PHP:
                $this->_params['input']['HTML'] = (string) $this->_params['input']['HTML'];

Function Snippet:
PHP:
    public function renderHtml()
    {
        $parserModel = XenForo_Model::create('EWRcarta_Model_Parser');
 
        if (!empty($this->_params['input']['page_type']))
        {
            if ($this->_params['input']['page_type'] == 'phpfile')
            {
                $this->_params['input'] = $parserModel->parsePagePHP($this->_params['input']);
            }
            else
            {
                $bbCodeParser = new XenForo_BbCode_Parser(XenForo_BbCode_Formatter_Base::create('Base', array('view' => $this)));
                $bbCodeOptions = array(
                    'stopLineBreakConversion' => ($this->_params['input']['page_type'] == 'html' ? true : false)
                );
                $this->_params['input']['HTML'] = new XenForo_BbCode_TextWrapper($this->_params['input']['page_content'], $bbCodeParser, $bbCodeOptions);
                $this->_params['input']['HTML'] = (string) $this->_params['input']['HTML'];
 
                if ($this->_params['input']['page_type'] == 'html')
                {
                    $this->_params['input']['HTML'] = htmlspecialchars_decode($this->_params['input']['HTML']);
                }
 
                $this->_params['input'] = $parserModel->parseContents($this->_params['input']);
                $this->_params['input'] = $parserModel->parseTemplates($this->_params['input']);
                $this->_params['input'] = $parserModel->parseAutolinks($this->_params['input']);
            }
        }

I guess I'm going to do a reinstall tomorrow and do some further testing...
 
cclaerhout updated Premium Members BBcodes with a new update entry:

Version 1.2 released

2012/03/11: v.1.2 released
  • add customized premium and customized private bbcodes (so now there are four bbcodes)
  • new function to wrap these bbcodes inside another one (automatically)
  • bbcodes php code has been rewritten
  • these bbcodes can now have options without breaking the security of their content
  • To upgrade: upload files on server, import addon xml file and import new tags xml files.

Read the rest of this update entry...
 
Status
Not open for further replies.
Back
Top Bottom