News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Hide Content

Started by kelvincool, January 03, 2015, 11:08:17 PM

Previous topic - Next topic

OCJ

I just put a new theme on the site and reinstalled mods. This is a new one for me but I cannot get it working. It is set to login/default.

If I select text in a post and use the bbc it comes up with a box showing the login option checked. I click 'apply' and it refreshes the page deleting the subject and does nothing. I can't post using it.
I do not know if this is related to Simple Portal , other mod, or theme.
Andy

kelvincool

What browser and version are you using?

Can you open up the browser console and see if there's anything there when you click the apply button?

PM your forum link, might be easier to debug that way.

OCJ

Firefox 37.0.1 Linux Mint

Will check out the console later tonight and test a few other browsers. My forum link is in my signature.

kelvincool

Quote from: igirisjin on April 08, 2015, 06:30:33 AM
Firefox 37.0.1 Linux Mint

Worked fine when I tried it, I'm also on 37 but on Windows.

OCJ

I tried with Chromium and Midori also but still not working. Only firefox seems to refresh a new post and delete the subject line.
Another mod or theme then perhaps. I uninstalled the ' hide using code tags' mod but still the same.

Sesquipedalian

Quote from: kelvincool on April 04, 2015, 09:20:22 AM
Thanks Jon, got a fix for that, will be in the next release.

I don't mean to be impatient, but do you think that you'll be able to put out that next release soon, Kelvin? If not, would you mind posting some manual instructions here so that I could modify the code myself in the meantime?

Thanks again!
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

kelvincool

Display.php

$context['hc_current_post'] = $message;
$message['body'] = parse_bbc($message['body'], $message['smileys_enabled'], $message['id_msg'], array('hide'));
unset($context['hc_current_post']);


To

$context['hc_current_post'] = $message;
$autoLinkUrlsSetting = $modSettings['autoLinkUrls'];
$modSettings['autoLinkUrls'] = "";
$message['body'] = parse_bbc($message['body'], $message['smileys_enabled'], $message['id_msg'], array('hide'));
$modSettings['autoLinkUrls'] = $autoLinkUrlsSetting;
unset($context['hc_current_post']);


I'm sure I'll need to change this in a number of other places too like the PMs page but this one should fix it on the post page.

Sesquipedalian

Quote from: kelvincool on April 09, 2015, 06:34:39 PM
I'm sure I'll need to change this in a number of other places too like the PMs page but this one should fix it on the post page.

Awesome. Thank you!
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

kelvincool

Didn't mean to omit the unset($context['hc_current_post']); for the replacement. I've added it back into the post but just in case you missed it.

Sesquipedalian

Quote from: kelvincool on April 09, 2015, 06:42:35 PM
Didn't mean to omit the unset($context['hc_current_post']); for the replacement. I've added it back into the post but just in case you missed it.

Thanks once again. :)
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

kill_seth

I'd just like to say thanks for creating this mod. It has made hiding content much easier!
Also, do you think you can add the option to hide content until users have replied to that specific topic?

kelvincool

Quote from: kill_seth on May 17, 2015, 11:33:05 AM
I'd just like to say thanks for creating this mod. It has made hiding content much easier!
Also, do you think you can add the option to hide content until users have replied to that specific topic?

I was wondering how long it would take for someone to ask this, the reason it is not currently included is because in my opinion it's a spam generator. If you can give me an example where it doesn't generate spam (one line posts that just say "thanks") then I will consider adding it in.

kill_seth

Quote from: kelvincool on May 17, 2015, 02:10:56 PM
I was wondering how long it would take for someone to ask this, the reason it is not currently included is because in my opinion it's a spam generator. If you can give me an example where it doesn't generate spam (one line posts that just say "thanks") then I will consider adding it in.

You got me on that one. I have links on my site which I'd like to hide from people until they at least give the thread a little love.
The old mod I was using had it, and it did generate a lot of spam posts. Although, a thanks post is better than none in my opinion.

kelvincool

1.1.4

  • Fixed preview which wasn't working in 2.0.10
  • Fixed auto URL bug

MESWEB

Can You update this mod to hide content for guest but not for crawler bot?

kelvincool

Doesn't that kind of defeat the purpose? All your hidden content will appear in search engines.

I suppose it's possible but there'll need to be some kind of mechanism to identify bots (headers or IP), both of which can be spoofed. I don't think this is something I'm going to implement but with the hooks in the mod it's possible for someone else to create a plugin to support it.

waplist

Please add support for hide post by captcha

kelvincool

Why would you want to hide by captcha? If you are already blocking bots from registering with captcha you can just hide by logged in.

waplist

I need to use solvemedia captcha only for guest so when anyone want to see post he should pass the captcha

Shkic

Great mod! Thanks.

Only have one issue, when I click on BBC, there's no Pop-up window with "Hide content options". Instead this window, BBC add only code for itself in textarea:

[hide post=1 login=1][/hide]

I checked for errors and got this one:

Uncaught TypeError: Cannot set property 'hide' of undefined hidecontent.js?fin20:20

hidecontent.js:
oEditorHandle_message.oSmfExec.hide = 'hideOptions';

Advertisement: