Advertisement:

Author Topic: Hide Content  (Read 28901 times)

Offline kelvincool

  • Jr. Member
  • **
  • Posts: 212
Re: Hide Content
« Reply #100 on: December 22, 2015, 04:13:57 PM »
Any errors during installation?
What theme are you using?
What browser are you using?
Can you see references to "oEditorHandle_message" when you view the source of the page?
Mind sharing a link to the forum?

Offline Shkic

  • Semi-Newbie
  • *
  • Posts: 22
Re: Hide Content
« Reply #101 on: December 22, 2015, 05:18:42 PM »
Oh dude. I'm so sorry. I forgot that I'm using 2.1 SMF.

Great news for you: your mod almost perfectly working in future SMF version. I got only 2 errors in install, but there's no big deal. Mod can't find <br> (in 2.1 they use </ br> instead).

If you still interesting to figure out whats wrong in 2.1 I can send you a link to forum in PM.

Anyway, thanks for effort.

Offline kelvincool

  • Jr. Member
  • **
  • Posts: 212
Re: Hide Content
« Reply #102 on: December 22, 2015, 06:06:03 PM »
The javascript has changed a fair bit in 2.1, there's no chance it's going to work without some major tweaking and I don't plan on doing that until 2.1 is stable.

Offline Shkic

  • Semi-Newbie
  • *
  • Posts: 22
Re: Hide Content
« Reply #103 on: December 22, 2015, 06:18:28 PM »
Thanks for reply!

Offline Elizabeth II

  • Jr. Member
  • **
  • Posts: 245
  • E II R
    • @Ambrosia_News on Twitter
Re: Hide Content
« Reply #104 on: January 02, 2016, 12:26:29 PM »
What permission is required to view content by default without needing to be selected? For example if I don't want a forum mod to see it is that possible? As it seems I only select Admin to view yet they can still see.

As I understand the moderate board permission gives default to override and view any hidden content, is there a way to make a separate permission?

Offline Kortal

  • Semi-Newbie
  • *
  • Posts: 11
Re: Hide Content
« Reply #105 on: January 03, 2016, 09:59:25 PM »
Hello,

I have a little issue, hope someone can help.
I have installed the mod, but since it is lacking some options I was looking for, I uninstalled it.
However, all my links are still replaced by the "You are not allowed to view links" message.

I have re-installed it just in case, re-uninstalled, checked "erase all mod data" but still the same issue.
Also tried to disable to all forum, and tried all combination of checkboxes, but didnt worked either.
Deleted all browser cache aswell, tried with firefox, chrome and IE.

Running SMF v2.0.11

Does someone have any idea how I could fix that ?

Thanks

Offline Colin

  • Lead Developer
  • SMF Hero
  • *
  • Posts: 7,356
  • Gender: Male
  • SMF Developer
    • colinschoen on GitHub
Re: Hide Content
« Reply #106 on: January 04, 2016, 12:31:43 AM »
Parse the mod install instructions:

http://custom.simplemachines.org/mods/index.php?mod=4013

Manually edit the files and do the opposite of the instructions there.

Also, did you uninstall the mod even though it said errors were present?
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Offline Kortal

  • Semi-Newbie
  • *
  • Posts: 11
Re: Hide Content
« Reply #107 on: January 04, 2016, 01:42:06 PM »
Thanks for your answer.

I don't have any error. I can install and uninstall perfectly.
I did check all the modified files, and none of them has now the added code from the mod.

It is really weird lol

Any other thoughts ?

edit: found it !
There was still this code remaining in Sources/Subs.php
Code: [Select]
// Registered Links
if ($user_info['is_guest'])
{
$message = preg_replace('#<a href="(.*?)</a>#i', $txt['no_view_links'] . "\n" . ' <a href="' . $scripturl . '?action=register">' . $txt['txt_reg_links_register'] . '</a>&nbsp;' . $txt['txt_reg_links_or'] . '&nbsp;<a href="' . $scripturl . '?action=login">' . $txt['txt_reg_links_login'] . '</a>', $message);
}

// End Registered Links
« Last Edit: January 04, 2016, 02:36:00 PM by Kortal »

Offline kelvincool

  • Jr. Member
  • **
  • Posts: 212
Re: Hide Content
« Reply #108 on: January 04, 2016, 04:20:31 PM »
As I understand the moderate board permission gives default to override and view any hidden content, is there a way to make a separate permission?

I can reduce it down to "modify posts" permission instead if that helps.

Kortal, I think you have the wrong topic, the mod that's causing your issues is registered links

Offline Kortal

  • Semi-Newbie
  • *
  • Posts: 11
Re: Hide Content
« Reply #109 on: January 04, 2016, 05:14:29 PM »
Yeah, sorry kelvincool for the trouble. I figured this out later...
Thanks for your answer !

Offline Elizabeth II

  • Jr. Member
  • **
  • Posts: 245
  • E II R
    • @Ambrosia_News on Twitter
Re: Hide Content
« Reply #110 on: January 05, 2016, 07:55:06 PM »
As I understand the moderate board permission gives default to override and view any hidden content, is there a way to make a separate permission?

I can reduce it down to "modify posts" permission instead if that helps.

Kortal, I think you have the wrong topic, the mod that's causing your issues is registered links

I think it would only work for me if it was a separate permission entirely as I wouldn't wish Forum Mods to be able to see hidden content they can view because they have modify powers.

Offline kelvincool

  • Jr. Member
  • **
  • Posts: 212
Re: Hide Content
« Reply #111 on: January 06, 2016, 01:18:01 PM »
Surely it makes perfect sense that if they can modify the post they can view its contents. What would happen if they modify a post that has hidden content they cannot see, the hidden content will basically disappear when they save.

Offline Elizabeth II

  • Jr. Member
  • **
  • Posts: 245
  • E II R
    • @Ambrosia_News on Twitter
Re: Hide Content
« Reply #112 on: January 06, 2016, 01:50:08 PM »
Surely it makes perfect sense that if they can modify the post they can view its contents. What would happen if they modify a post that has hidden content they cannot see, the hidden content will basically disappear when they save.

In that case couldn't it show like if you quote hidden content?

Offline kelvincool

  • Jr. Member
  • **
  • Posts: 212
Re: Hide Content
« Reply #113 on: January 06, 2016, 02:51:21 PM »
It could do that but then you'll lose your hidden content as soon as you saved the post. The saving process does not care about what's in the post, only what's in the text box when you save, sure you could write some crazy regex to parse out hidden content and evaluate it but it's not worth doing imo.

Offline phpshiva

  • Semi-Newbie
  • *
  • Posts: 70
  • Gender: Female
    • Aquababe
Re: Hide Content
« Reply #114 on: January 19, 2016, 04:42:02 AM »
nice mod but i only mis the hide content and after post message to show could you do that to?

Offline kelvincool

  • Jr. Member
  • **
  • Posts: 212
Re: Hide Content
« Reply #115 on: January 21, 2016, 07:26:14 PM »
nice mod but i only mis the hide content and after post message to show could you do that to?

This has been asked before, the question I always ask is: can you justify the spam it generates? My suggestion is always to use the say thanks mod in conjunction with this so you don't generate that spam of one word posts just to see the content.

Offline dexter17

  • Newbie
  • *
  • Posts: 7
Re: Hide Content
« Reply #116 on: May 09, 2016, 07:35:32 AM »
Hello,
I installed the mod  hide content and say thanks and everything went well,
the problem I have is this:
if I log in as admin I see the tag button hide when I create new topic
if instead
I enter as a normal user does not see the tag button Hide while I create topic
I checked the permissions and hide content is checked appropriately.
Can anyone help me please? how can I fix this situation?

Use smf 2.0.11 with EZPortal

if it were possible from php code? you should be okay

regards

Offline kelvincool

  • Jr. Member
  • **
  • Posts: 212
Re: Hide Content
« Reply #117 on: May 09, 2016, 02:10:55 PM »
Are you using different permission profiles for different boards?

Can you post screenshot of your permissions and the groups you have?

Anything in the error log?

Have you got any other groups that you can try the permission on?

Offline dexter17

  • Newbie
  • *
  • Posts: 7
Re: Hide Content
« Reply #118 on: May 09, 2016, 05:35:17 PM »
you're right I had changed the categories allowed when I created ..
I solved :)
thank you very much and excuse the trouble !!!
regards

Offline GL700Wing

  • Jr. Member
  • **
  • Posts: 157
  • Gender: Female
Re: Hide Content
« Reply #119 on: March 20, 2017, 04:03:45 AM »
Just discovered an issue with this mod when trying to either copy or migrate a database.

As part of the installation values are added to the 'integrate_pre_include' variable in the settings table (eg, smf_settings) that include a long full path (eg, /home/website/public_html/forum/Sources/HideContent.php) instead of a short relative path (eg, $sourcedir/HideContent.php)

The added values that ideally should have relative paths are:
/home/website/public_html/forum/Sources/HideContent.php
/home/website/public_html/forum/Sources/HidePost.php
/home/website/public_html/forum/Sources/HideLogin.php
/home/website/public_html/forum/Sources/HideGroup.php
/home/website/public_html/forum/Sources/HideKarma.php