Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] Lock Content
#31
Hi, I updated the code in the previous post, please do check for changes.
Reply
#32
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.
Reply
#33
(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;
}
Reply
#34
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.
Reply
#35
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
Reply
#36
How to increase Button size showing "Pay xxxx credit points" ?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)