Premium Members BBcodes [Deleted]

Status
Not open for further replies.
It was working very fine till now. But today noticed that this Premium BB Code become useless for Tapatalk users and also the secret is revealed if thread is linked on facebook page. :(

Sorry, If this issue has already been discussed but I didn't find in last 4 pages. Please help.
 
cclaerhout updated Premium Members BBcodes with a new update entry:

Version 1.3.1 released

2012/07/30 v.1.3.1 released
=> add a standalone integration to extend your content protection with external addons
IMPORTANT: if you want to use it, you will need to edit one of XenForo files (see instructions below)
=> To upgrade : upload files


Extend content protection for External Addons

  • XenForo files to edit: 1
  • Path: {yourforum}/library/XenForo/Helper/String.php

Search:
PHP:
     public static function censorString($string,...

Read the rest of this update entry...
 
  • Like
Reactions: DFI
It was working very fine till now. But today noticed that this Premium BB Code become useless for Tapatalk users and also the secret is revealed if thread is linked on facebook page. :(

Sorry, If this issue has already been discussed but I didn't find in last 4 pages. Please help.

1) The addon was working on Tapatalk with message content BUT not with message preview. To fix this, use the new manual method described above.
2) I don't understand for the facebook page. You can't "like" a xenforo message and promote it to Facebook, am I wrong ? Anyway test with the manual method too.
 
  • Like
Reactions: DFI
1) The addon was working on Tapatalk with message content BUT not with message preview. To fix this, use the new manual method described above.
2) I don't understand for the facebook page. You can't "like" a xenforo message and promote it to Facebook, am I wrong ? Anyway test with the manual method too.

You Rock (y) Tapatalk Issue solved. But Facebook Issue is same. Please check the below extract of one of my facebook post. " Premium " Code is not working and extracts of the post are visible. Tapatalk was having the same issue but now its resolved.

Please help in rectifying this issue too.

Ee1OC.png
 
You Rock (y) Tapatalk Issue solved. But Facebook Issue is same. Please check the below extract of one of my facebook post. " Premium " Code is not working and extracts of the post are visible. Tapatalk was having the same issue but now its resolved.

Please help in rectifying this issue too.

Ee1OC.png
I can't... I don't know how you got this message on Facebook. Is it an addon ?
 
Really wish this worked with XenCarta WIKI! It works like 10%... it says "Premium Content" like it should if you aren't logged in but doesnt change when you do log in, it still says "premium content"

HOWEVER, if you "Edit" then you click "Save" it will update and show your content.

Can you think of a way to fix this? I need this feature desperately for http://www.ceintegrator.com

See: http://ceintegrator.com/index.php?wiki/urc-total-control-programming/

I would definitely donate if we could get the Wiki to work - I need this feature.

From what I can tell it has to do with updating. I can get the code to change by EDITING TEXT - I thought maybe it was just a cache or something but I tried another browser and it still showed. If i update so it no longer shows - it wont show on any other browser either so my only conclusion is that whatever looks at your code for permissions only checks the permissions/bbcode upon EDIT and then renders whatever it sees on it's own or something?

Any way to fix this?
 
Also, currently you do not support $ signs. So [premium]$1[/premium] would not render anything and [premium]$1,999.99[/premium] only renders ",999.99"
 
P.P.S: On line 105 of PremiumMembersBBCode.php there is a bug:

<div class="bbcode_is_not_premium2_content">' . new XenForo_Phrase('PremiumBBcode_is_not_premium_content') . '</div>';

As you see - you reference the _is_not_premium_content phrase when you should be referencing the _is_not_premium2_content phrase :-)
 
From what I can tell it has to do with updating. I can get the code to change by EDITING TEXT - I thought maybe it was just a cache or something but I tried another browser and it still showed. If i update so it no longer shows - it wont show on any other browser either so my only conclusion is that whatever looks at your code for permissions only checks the permissions/bbcode upon EDIT and then renders whatever it sees on it's own or something?

Any way to fix this?

I can't support this script for all addons ^^ You should ask his author if datas are cached, which seems to be when I see "Last Modified: Today at 6:17 AM (Cached)".

Also, currently you do not support $ signs. So [premium]$1[/premium] would not render anything and [premium]$1,999.99[/premium] only renders ",999.99"
Correct, this is a bug. I used preg_replace (regex) so the function is looking for any backtracking reference in the content (for ie, if you put $0, you will have a surprise ^^). My mistake. Anyway a simple str_replace is good enough here. I will correct this very soon. (tonight or tomorrow ; I need to update some other hacks which use the same bbcode framework).

P.P.S: On line 105 of PremiumMembersBBCode.php there is a bug:

<div class="bbcode_is_not_premium2_content">' . new XenForo_Phrase('PremiumBBcode_is_not_premium_content') . '</div>';

As you see - you reference the _is_not_premium_content phrase when you should be referencing the _is_not_premium2_content phrase :)

Confirmed ! :)

Thanks !
 
Well, if there is anything I can do to get this working in Wiki it would be huge - it makes the most sense to have sensored content in the Wiki than anywhere! :)

http://ceintegrator.com/wiki/urc-total-control-products/

For example, when my dealers view this site: they could see another row that shows "Cost:" which doesn't even appear if they aren't authorized! Goshhh I need that bad!

... Hey, next time before asking for a new function, first take a look at the options of the addon. XenCarta (Wiki) does have an option to set up the cache and disable it. It even tell you which command to type (now).

By the way, after installing XenCarta I had an error when using the premium tags.
Code:
"Fatal error: Method XenForo_BbCode_TextWrapper::__toString()" ... "EWRcarta/ViewPublic/PageView.php on line 64"

I don't know why, but if some of you have also this problem after a fresh installation go the "Premium Members BBcodes" options and turn off the "BBcode Wrapper" option. It should work again. I try to turn on the option and this time it was working... I've got no explanation for this.

I will update this addon sunday or monday (just to correct the two little bugs described in the previous messages).
 
Wow sorry I am so noobish!!! :)

Thanks for your help Cedric! I have donated what I could afford and will donate more if ever I am able! Great addon!
 
Wanted to share this change in case anyone needs it. So my goal was to make the protection much less subtle (say I wanted to make a very small portion of my message private). In my case, I will have dealers of product AND end-users on my site. When we are discussing things like product cost, I want my users to be able to decide to share a specific part of the message ONLY with other dealers. Because of this, I wanted the message inline.

For example, "Wow! I just got a new TV from AVAD and sold it for $3,499.99 and paid [premium]$1,999.99[/premium]!"

Because of this, I didn't want it to be big and say "PROTECTED CONTENT" etc.

So I edited the "PremiumMembersBBCode.php" with the following:
Code:
if (isset($options->BBcode_Premium_Wrapper_Premium2_Raw) AND empty($options->BBcode_Premium_Wrapper_Premium2_Raw))
{
$formatter['code'] = '{$content}';
}
else
{
$formatter['code'] = '<div>{$content}</div>';
}
 
}
else
{
if (isset($options->BBcode_Premium_Wrapper_Premium2_Raw) AND empty($options->BBcode_Premium_Wrapper_Premium2_Raw))
{
$formatter['code'] =  '<b>[DEALERS ONLY]</b>';
}
else
{
$formatter['code'] =  '<div>' . new XenForo_Phrase('PremiumBBcode_is_not_premium2_content') . '</div>';
}
 
}

Now there is one thing I did since it's only for myself that should be made easier for you.

This part of the code:

Code:
{
$formatter['code'] =  '<b>[DEALERS ONLY]</b>';
}

this is hard coded to provide a bold [DEALERS ONLY] to non-dealers. If you wanted to use the phrase I BELIEVE (untested) you would make it:

Code:
{
$formatter['code'] =  . new XenForo_Phrase('PremiumBBcode_is_not_premium2_desc') . ;
}

I very well could be wrong there though - that's just my guess based on looking at the code - I'm in no way a programmer :p

You could also just edit my <b>[DEALERS ONLY</b> with whatever you want (it will output HTML there).

Example: http://ceintegrator.com/threads/welcome-to-ce-integrator.17/#post-30
 
Wanted to share this change in case anyone needs it. So my goal was to make the protection much less subtle (say I wanted to make a very small portion of my message private). In my case, I will have dealers of product AND end-users on my site. When we are discussing things like product cost, I want my users to be able to decide to share a specific part of the message ONLY with other dealers. Because of this, I wanted the message inline.
For example, "Wow! I just got a new TV from AVAD and sold it for $3,499.99 and paid [premium]$1,999.99[/premium]!"

I don't know if you have seen, but you can go to Xenforo Style Properties and set up Premium Members BBcodes display options. If you don't want any visual options and don't want a title annonces "Hey, what is below me is private", you can also select the "Only display raw content?" option in this addon options panel.

I think the only problem in your case I would have been it still have a carriage return (because of the <div>). It would make more sense that the raw format doesn't have it... I will see that.

Thank you for your donation :)
 
Ugh - so these problems with not being able to format within the Wiki is killing me. Gonna work on a solution :)

Ok well I fixed it.. kind of - it's a bad fix... but perhaps this will help you understand what it is cedric?

So I noticed that the only page that has the 403 Forbidden Page was the board.com/wiki/ page. Every other part of the Wiki works flawlessly!

Then I noticed that if i manually went to http://www.board.com/wiki/index.php it worked - so if i change the index URL to that, everything would work!

Well here is the code it is outputting to get that link: 'full:wiki' - this will output the www.board.com/wiki so we need "full:wiki" to output wiki/index.php instead. Don't know how to do that so I had to hard code to make it work for myself :(


EWRCarta > Listener > Navtabs.php - This will fix the Top Tab
Code:
 $extraTabs['wiki'] = array(
'title' => new XenForo_Phrase('wiki'),
[B] 'href' => XenForo_Link::buildPublicLink('full:wiki'),[/B]
'position' => 'middle',
    'linksTemplate' => 'EWRcarta_Navtabs',
'perms' => $perms,
'index' => $index,
);

Change that to this
Code:
$extraTabs['wiki'] = array(
'title' => new XenForo_Phrase('wiki'),
[B] 'href' => XenForo_Link::buildPublicLink('/wiki/index.php'),[/B]
'position' => 'middle',
    'linksTemplate' => 'EWRcarta_Navtabs',
'perms' => $perms,
'index' => $index,
);
Next we need to fix the Navtabs after selecting the Wiki
This is in the Admin CP - go to templates and find "EWRCarta_navtabs"
Code:
<li><a href="{xen:link 'wiki'}">{xen:raw $index.page_name}</a></li>
Change to:
Code:
<li><a href="{xen:link 'wiki/index.php'}">{xen:raw $index.page_name}</a></li>
Next we need to fix up the sidebar with the patch so in the XF Admin CP edit the EWRCarta_Sidebar
Find this
Code:
<div class="secondaryContent" id="wikiNav">
<h3><a href="{xen:link 'wiki'}">{$sidebar.index.page_name}</a></h3>
Change to this
Code:
<div class="secondaryContent" id="wikiNav">
<h3><a href="{xen:link 'wiki/index.php'}">{$sidebar.index.page_name}</a></h3>
I think that should fix it all up!?
Not a pretty patch but it works for now... maybe that gives you an idea why the error is coming up in the first place? I'll post a link to this in the Wiki too so others can find it.


P.S: Since I am using SEO - I actually use /wiki/index/ instead of /wiki/index.php - but I wanted it to work for everyone and that will work whether or not you are using SEO.

P.P.S: I am in no way a programmer - I am sure this is a terrible way to patch this problem... it's just the way I figured out how to fix it for me and I like to share things so others can figure out problems/fix them (I know this has nothing to do with this module/addon but it seems like this module/addon can be used to it's potential when you do this.

 
I have installed the resource along with the bb-codes and using [premium] coupon codes here [/premium] and have certain usergroups checked in order to view the content but all i see once the thread is up is this:

Premium Member Content:
Protected content
It is Enabled, usergroups checked and chose no wrapper.​
 
Status
Not open for further replies.
Top Bottom