Thread Rating:
  • 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] Lock Content
#11
Omar please, spare us the copy pasta from neko's plugin.
I get that neko doesn't develop or update his plugin anymore but you are frankly the last person I would want to take his work as you have the most unstable xss filled plugins I know.
Reply
#12
(2020-05-16, 08:36 PM)Omnipotent Wrote: Omar please, spare us the copy pasta from neko's plugin.

This isn't a copy pasta, it is a fork. Credit is given accordingly.

If Neko thinks credit can be giving on a more appropriate way I shall kindly respond to his suggestion.

Thank your taking the time to bring this up in case there is confusion.
Reply
#13
1.....Now not able to activate after reinstall with the latest version updated on 16.5.2020. It gives a message to install Plugin library 13 even I installed it.

I install the version of dated 15.5.2020 and it gives no error.

2.....It shows hidden content to admin but not showing the "pay point button" to other members. It show them a message 'Hidden content" rather than showing hidden content. It might interact with previous plugins. At present, no other hide plugins installed except this Lock. Can anyone help to sort out this? Please.

   

And after reload that same page, Admin also not able to show hidden contents.

   

3...I need one help... Is it possible to get only [lock*] abcdddd[/lock] in plugin files. No any [hide**] abdcd[/hide] related codes in plugin files.

Please guide what to remove to make plugin which only work with [lock*][/lock] code.
I search 'hide' word in all plugin files so please guide what to remove.


1. lock.php
function lock_highlight_start($message) {
  global $mybb, $replacement;

  if(!empty($mybb->input['highlight'])) {
    $replacement = substr(str_shuffle(str_repeat("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWYXZ", 20)), 0, 20);
    $message = str_replace('hide', $replacement, $message);
  }

  return $message;
}

function lock_highlight_end($message) {
  global $mybb, $replacement;

  if(!empty($mybb->input['highlight'])) {
    $message = str_replace($replacement, 'hide', $message);
  }

  return Shortcodes::parse($message);
}
 

2...shortcodes.class

	public function set_tag()
	{
		global $mybb;

		self::$tag = $mybb->settings['lock_type'] == 'hide' ? 'hide' : 'lock';
	}

3...install.php
'type'	=> array(
    'title' => $lang->setting_lock_type,
    'description'	=> $lang->setting_lock_type_desc,
    'optionscode' => 'radio
hide=Hide
lock=Lock',
    'value' => 'hide',
  ),

4....shortcode.php

function lock_hide($params, $content)
{
  global $mybb, $post, $templates, $lang, $db;

  isset($lang->lock) || $lang->load('lock');


global $mybb;

switch((string)$mybb->settings['lock_type'])
{
  case 'lock':
    Shortcodes::add("lock", "lock_hide");
    break;
  default:
    Shortcodes::add("hide", "lock_hide");
    break;
}

Please help.
Reply
#14
(2020-05-19, 12:28 PM)Dr_The_One Wrote: 2.....It shows hidden content to admin but not showing the "pay point button" to other members. It show them a message 'Hidden content" rather than showing hidden content. It might interact with previous plugins. At present, no other hide plugins installed except this Lock. Can anyone help to sort out this? Please.

Please list your plugin list. It seems weird to me that the content is displayed once but not after.

Quote:Please guide what to remove to make plugin which only work with [lock*][/lock] code.

There is a setting for that.

Also, please avoid sending me PM like the one you sent me, I'm very busy but I don't ignore messages, I keep tabs open for when I have the chance to reply.

I just don't understand how people get so many issues installing this. It works for me out of the box so I need to assign time to review issues.
Reply
#15
Thanks.
Reply
#16
Hey Omar thanks for the plugin
i was wondering what does the Key setting do?
Reply
#17
(2020-05-24, 03:44 PM)8guawong Wrote: Hey Omar thanks for the plugin
i was wondering what does the Key setting do?

From reviewing the code I think it is used to encrypt input data between use operations. I'd assume the intention is for the data not being intercepted by some man in the middle like tactics. But it doesn't seem to me like valuable information is sent for encryption to be worth it.

The original author might have a better understanding and explanation for this.
Reply
#18
(2020-05-24, 05:55 PM)Omar G. Wrote:
(2020-05-24, 03:44 PM)8guawong Wrote: Hey Omar thanks for the plugin
i was wondering what does the Key setting do?

From reviewing the code I think it is used to encrypt input data between use operations. I'd assume the intention is for the data not being intercepted by some man in the middle like tactics. But it doesn't seem to me like valuable information is sent for encryption to be worth it.

The original author might have a better understanding and explanation for this.

thanks for the info
Reply
#19
Please help...Why hidden content is again hidden after refresh page for everyone even with administrator. It is not issue with this plugin. Any code to be added so it can work for me.

Sorry if I disturbing. Thank you.
Reply
#20
Do you use the following plugin? I mean, is it activated in your board?

Preparser Cache (1.12)

I suppose Hide content 1.3 is the one from MyBB-Plugins.com?

Try disabling the Preparser Cache plugin. I will need to check how does this plugin behaves with others of mine but that won't be soon.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)