MyBB Community Forums

Full Version: Lock Content
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
Hi, I updated the code in the previous post, please do check for changes.
There is no such line at 164:
$points = strip_tags(newpoints_format_points($posts_prices[$post['pid']]));

But I added after below line. May be both same.
$points = newpoints_format_points($posts_prices[$post['pid']]);

Working perfect...

Should I have to add strip_tags in above code.
Thank you.
(2020-07-01, 12:44 AM)Omar G. Wrote: [ -> ]
(2020-06-16, 09:14 PM)Dr_The_One Wrote: [ -> ]Can we able to see points set for lock after lock the content.

Add before this line:
$cost_desc = '';
if(isset($cost) && function_exists('newpoints_format_points') && !isset($points))
{
        $points = newpoints_format_points($cost);
        $cost_desc = "[{$points} Points]";
}

Then paste {$cost_desc} anywhere you want it in thelock_wrapper` template.

(2020-06-30, 12:42 AM)jdmefsir Wrote: [ -> ]1. I am trying to get the unlock button to float right and the rest of the test to float left.

This requires just CSS. Something around the lines of:
.hidden-content-body > form {
        float: right;
}

(2020-06-30, 12:42 AM)jdmefsir Wrote: [ -> ]2. When they click unlock, i want it to unlokc right away and remove the second are you sure promt. how can we do that?

Remove onclick="javascript: return confirm('{$lang_confirm}');" from the lock_form template.

(2020-06-30, 04:12 PM)Dr_The_One Wrote: [ -> ]I want to show user's points below purchase button in post.
How to do it?
Thank you.

Add after this line:
$user_points = newpoints_format_points($mybb->user['newpoints']);

Then paste {$user_points} anywhere you want it in the lock_form template.


So i am having an issue where when the content is locked its red like it should. but when you unlock it should turn green. But it stays read.

Here is my css

.hidden-content {
    overflow: auto;
    background: #282828;
    border: 2px solid #ff0000;
    padding: 1px;
    text-align:left;
}

.hidden-content-body {
    padding: 5px;
    text-shadow: none;
    height: 100px;
    border-radius: 5px 5px 0 0
text-align:left;
}

.contentlock-head-locked {
    background: rgba(207, 0, 15, .5)
}

.contentlock-head-unlocked {
    background: #46842D
}

.contentlock-head-icon {
    background: rgba(0, 0, 0, .2);
    border-radius: 100%;
    padding: 4px;
    width: 20px;
    height: 20px;
    text-align: center;
    float: left;
    margin: 7px 6px 0 0
}

.contentlock-head-icon i {
    line-height: 20px
}

.hidden-content-title {
    background: #282828;
    padding: 5px;
    border-radius: 0 0 2px 2px;
color:#ff0000;
}

.hidden-content-body-locked {
      border: 3px solid #ff0000;
}

.hidden-content-body-unlocked {
    border: 3px solid #46842D
}

.contentlock-button {
    background: #1a1919;
    color: #a0a0a0;
    padding: 6px 12px;
    border-radius: 2px;
border: none;
    font-size: 12px;
    margin-top: 10px;
}

.contentlock-button:hover {
    background: #46842D;
    color: #fff;
}

.contentlock-addbutton {
    background: #303030;
    padding: 6px 4px;
    border-radius: 2px;
    width: 175px;
    color: #a0a0a0;
    text-align: center;
    text-shadow: none;
    font-size: 12px;
    margin-top: -2px;
}

.contentlock-addbutton:hover {
    background: #17687C;
    color: #fff;
}
I won't be sure, maybe the following works:
.hidden-content-body {
        color: green;
}
.hidden-content-body > form {
        color: red !important;
}

You can find CSS information by using a search engine like Google or Bing. CSS is out of the scope of this plugin or support provided.
What about once a user buys the content how can the header change to unlocked content?

Currently while its locked the header is Locked Content

when they buy i want it to change to Unlocked content
How to increase Button size showing "Pay xxxx credit points" ?
BOARD SETTING ISSUE:

I am understanding that 'Allow user prices' - Yes means users are allowed to set lock content points for their contents. & 'Allow user prices' - No means users are not allowed to set lock content points for their contents

1..... Allow user price - YES/NO + Default Price - 0 = 'Reply to view' mode ----> It is ok if someone keep [lock] xxxxxxx[/lock]

2..... Allow user price - NO + Default Price - 0 or 5 + Author post [lock=69] xxxxx [/lock] = 'Reply to view' mode or Pay 5 points FOR ALL FORUM POST which has lock contents.----> It is BUG. If someone keeps [lock=69] xxxxxxx[/lock] than that post locked content should be unlocked with buying of 69 points but with this condition BUT now it falls to 'Reply to view' or 'Pay 5 points' mode. Also, users are able to set price even 'Allow user price' set - NO

3..... Allow user price - YES + Default Price - 0 or 5 + Author post [lock=69] xxxxx [/lock] = 'Reply to view' mode or Pay 5 points for [lock] xxxx [/lock] and 69 points for [lock=69] xxxx [/lock]----> It is OK.


Please Omar G. look in this matter.
I don't want other users to set price  and I want only specific usergroups /admins to allow set price of lock content.
Can I get this lock_unlocked in "Lock Templates"? dude I would like to redesign Unlocked.

This is current lock_form template design,

[Image: 9ToiHhD.png]

but I don't want it like that and I wish you know what I want to mean.
Hello Omar G.,
I activated your plugin on our forum. Runs great!
How can I insert a "hide button" in the Sceditor, instead of adding the code manually every time?

Thx for the plugin and for an answer!
Hi, such feature isn’t available in this plugin, instead you will need a different plugin or tutorial.
Pages: 1 2 3 4 5 6 7