Not signed in (Sign In)

Categories

Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    •  
      CommentAuthorKrak
    • CommentTimeJan 24th 2007 edited
     # 1
    Hidden Text is an extension that allows a user to hide parts of their post, on a new discussion or
    as a comment on an existing discussion. I originally made this for hiding things like movie spoilers
    but it can actually be applied to anything. (Read the old discussion)

    Just add the brackets [hide]with your text here[/hide] and anything inside them will be hidden until
    the user clicks a link, which can be toggled on/off. For further detailed information see the read me included.

    Examples of use

    Movie spoilers, lots of images, anything NSFW, etc...

    Installation

    If you have NOT had any previous version installed, nothing special is required. If you HAVE had a
    previous version installed you must delete a few lines in /conf/settings.php. Delete:

    $Configuration['HIDDEN_TEXT_MARKER'] = '(Hidden)';
    $Configuration['HIDDEN_TEXT_SETUP'] = '1';


    Then activate version 2.0, hit refresh, and everything "should" be OK. Let me know how it works out.

    (Multiple hidden texts within the same comment ARE NOW POSSIBLE with this extension!! Yes, you read that right! Now you can!)

    Limitations

    None that I currently know of other than the issues that affect the other Mootools addons (incompatibilities with Mootools).

    As of Hidden Text 2.1 and Mootools 1.8, the loading of the Mootools JS should work. You must have at
    least Hidden Text 2.1 AND Mootools 1.8. The difference from 2.0 and 2.1 is minor. Alternatively
    instead of re-downloading you can follow these instructions and manually make changes.


    03-30-07 - 1.0b - Updated the versions so they match.
    06-04-07 - 1.1b - Made changes recommended on post #5 - http://lussumo.com/community/?CommentID=70254
    06-04-07 - 1.1b - Can now configure with user roles.
    06-22-07 - 1.2b - Made the "(Hidden)" text a link to unhide the hidden text, as requested.
    07-12-07 - 1.2 - Rewrote the readme, removed beta tag.
    07-20-07 - 1.3 - Added the ability to change the hidden text marker.
    11-08-07 - 1.4 - Made some code changes to fix a bug (comments 27-29)
    11-15-07 - 1.5 - Last change didnt fix the bug, only moved it, hope its fixed this time.
    11-16-07 - 1.6 - Made a small CSS change, still version 1.6.
    02-22-08 - 2.0 - Rewrote JS to use Mootools (1.11) making multiple hidden texts now possible.
    03-02-08 - 2.1 - Change loading process of Mootools JS. Works with Mootools 1.8

    •  
      CommentAuthorgarvin
    • CommentTimeApr 4th 2007
     # 2
    Any chance you could make this so only those given permission (via roles) can see the hidden text, while it doesn't show to anyone else?
    •  
      CommentAuthorKrak
    • CommentTimeApr 4th 2007
     # 3
    The problem with that is the text is always there. This ext just toggles the css class of the div. So you can always right click, view source, and see the hidden info, or "block comment/user" and see the info.
    •  
      CommentAuthoremsef
    • CommentTimeApr 24th 2007
     # 4
    garvin, i think you should try using whispers
    • CommentAuthorscherem
    • CommentTimeJun 3rd 2007
     # 5
    To enable it to be on by default, make the following changes:

    Line 23:
    $PreferencesForm->AddPreference('Hidden Text', 'Disable Hide hidden text', 'HideHiddenText', 1);
    (change made was adding the word Disable)

    Line 31:
    if (!$Context->Session->User->Preference('HideHiddenText')) {
    (change made was adding the ! infront of context)
  1.  # 6
    Uploaded version 1.1 Beta of Hidden Text.
    • CommentAuthorKronok
    • CommentTimeJun 22nd 2007 edited
     # 7
    Users seem to have a hard time finding the "unhide" button at first. I think it would be a lot better if the (Hidden) part was actually the link to unhide it.
  2.  # 8
    Uploaded version 1.2 Beta of Hidden Text.
    •  
      CommentAuthorKrak
    • CommentTimeJun 22nd 2007
     # 9
    Kronok, wish granted.
    • CommentAuthorKronok
    • CommentTimeJun 23rd 2007
     # 10
    I just installed the new version and I think it's an excellent addition :)

    Thanks!
    • CommentAuthorchris
    • CommentTimeJun 24th 2007 edited
     # 11
    i was trying to type hidden text for ages, manually adding the tags to the post. then i realised that you ave to use square brackets - doh! [hide] is the only tag on my board which uses the square brackets, i think it would be much cooler if it was used like this - < hide>spoiler< /hide>. cool, nonetheless.
  3.  # 12
    Uploaded version 1.3 of Hidden Text.
    •  
      CommentAuthorKrak
    • CommentTimeJul 12th 2007 edited
     # 13
    I rewrote the Readme. Removed the "unhide" link. And removed the beta tag.

    The new Readme can be viewed here
  4.  # 14
    Uploaded version 1.4 of Hidden Text.
  5.  # 15
    Uploaded version 1.4 of Hidden Text.
    •  
      CommentAuthorKrak
    • CommentTimeJul 21st 2007 edited
     # 16
    Uploaded the wrong file, thats why the bot posted twice - whoops.

    **NEW**

    Added the ability to change the hidden text marker/link. This is the text that is displayed
    as a place holder of what is hidded. Default is "(Hidden)", but now you may change it to anything
    you like. Simply log in as the administrator and go to the settings tab. On the left pane you will
    now see another option - "Change Hidden Text Marker". Click this and enter your desired text.

    It has not been thoroughly tested so let me know of any kinks.
    •  
      CommentAuthormonstr
    • CommentTimeJul 23rd 2007
     # 17
    Hm. Is there a way to let useres only see hidden text but not use it?
    We want this plugin to seperate offtopic from relevant posts, so when anyone posts offtopic we put the tags round it, but that doesnt make very much sense when the useres got the ability to use it, too :/
    •  
      CommentAuthorblizeH
    • CommentTimeJul 29th 2007
     # 18
    How awesome! I was just about to request a spoiler extension and found this at the very top of the add-ons page ;p
    •  
      CommentAuthorblizeH
    • CommentTimeJul 29th 2007
     # 19
    But the readme is down ;_;
    •  
      CommentAuthorKrak
    • CommentTimeJul 29th 2007
     # 20
    ohnoes! Server was down. Looks like apache decided it wanted to go to sleep. Back up now, thanks for the notice.
    •  
      CommentAuthorKrak
    • CommentTimeJul 29th 2007
     # 21
    monstr: Not at the moment. But as soon as I have some time (busy with moving atm) I will look into it - but no promises.
    •  
      CommentAuthormattucf
    • CommentTimeOct 14th 2007
     # 22
    I think that the ".Hidden" class in Hidden Text is interfering with Vanilla's "li.Hidden". Whenever I set the permission for Hidden Text on a role, that role can't view deleted comments (verified that the comment is present in the source, but not visible).
    •  
      CommentAuthorblizeH
    • CommentTimeOct 25th 2007 edited
     # 23
    Hi,

    I get the following error message for some reason:

    Could not save Hidden Text marker settings to configuration file!

    ... yet the extension is working fine, odd eh? Anyway to get rid of it please?
    •  
      CommentAuthorWanderer
    • CommentTimeOct 25th 2007
     # 24
    Could this be a write permissions problem?
    Take a look at the config file, it might have become corrupt?
    •  
      CommentAuthorblizeH
    • CommentTimeOct 26th 2007 edited
     # 25
    Cheers Wanderer, I was having write permission problems but they're fixed now, and the config file looks just fine anyway, it's odd.

    For now I've commented out the error message code, not the most ideal of solutions but it's working fine for now!
    • CommentAuthorscherem
    • CommentTimeNov 7th 2007 edited
     # 26
    I'm not seeing this hidden text configuration panel. Currently no hidden text is working on my site. And for the posts that used the old hidden extension, they now no longer have an option to unhide...

    EDIT: Sorry need to read the readme file closer.
    • CommentAuthorscherem
    • CommentTimeNov 8th 2007 edited
     # 27
    New question:
    I've been finding my Database.php file is getting wiped out, and replaced with just ?> . After fixing it today, I changed the permissions of it from 777 to 755. Now hidden comments is giving me a configuration error/warning on my form saying changes can't be saved.

    Why does hidden text care about the permissions of my database.php?

    Update:
    So I set the permissions of my database.php file to 755, and my users started getting this error when they tried to login:
    Notice: Undefined variable: NoticeCollector in
    /****/forums/extensions/HiddenText/default.php on line 43

    Fatal error: Call to a member function AddNotice() on a non-object in /*****l/forums/extensions/HiddenText/default.php on line 43

    Line 43 is:
    $NoticeCollector->AddNotice($Context->GetDefinition('ErrCreateConfig'));
    • CommentAuthorscherem
    • CommentTimeNov 8th 2007
     # 28
    Users at the forum I operate are asking if there is any chance of getting multiple hidden texts in the same comment to work. Any word on this?

    Wow I feel like I've been flooding this discussion with comments today.
    • CommentAuthorscherem
    • CommentTimeNov 8th 2007
     # 29
    Okay... so I made the following changes to the default.php :
    if (!AppendToConfigurationFile($Configuration['APPLICATION_PATH'].'conf/database.php', '')) $Errors = 1;

    TO:

    if (!AppendToConfigurationFile($Configuration['APPLICATION_PATH'].'conf/settings.php', '')) $Errors = 1;

    As, you need to test if the settings.php is writable, as this is where the configurations go. Doing this lets me change the database.php permissions to 455 (from 777). Users are able to login, and no error message about not being able to write to the database.php
    •  
      CommentAuthorKrak
    • CommentTimeNov 8th 2007 edited
     # 30
    Hmm, not exactly sure to be honest... I haven't played with Vanilla in ages, don't know exactly where to dig. I think it has something to do with the way it handles error messages. I messed with it a little bit and it appears to rewrite the database.php file every time. If I toss in some text after the ?> it adds another ?> after what I've added.

    (Anyone else have any thoughts?)

    I can remake the same error you get by doing the same thing. Although no one else has had the same issue (or have not mentioned it). What other extensions do you have running?

    As for multiple hidden texts in the same comment - no, not with this extension. We have gone over that a few times before (a popular request), and that would take some extra work with JS, which is over my head. Someone else would have to take over from here.

    Update: Nice, we posted at the same time.... I'll check that out, and update the extension.
  6.  # 31
    Version number changed from 1.4 to 1.5.
  7.  # 32
    Uploaded version 1.5 of Hidden Text.
    • CommentAuthorscherem
    • CommentTimeNov 8th 2007 edited
     # 33
    My update ended up blanking out my settings.php

    Other extensions I have running:
    ModTools
    Poll
    ForcedBBCode
    Statistics
    WhosOnline
    NewDiscussions
    Notify
    MyGamerCard
    ApplicantEmailVerification
    PreviewPost
    Vanillacons
    Signatures
    ReportPost
    Audioscrobbler
    MyComicVine
    CAPTCHA
    GuestWelcome
    AjaxQuote
    CategoryJumper
    PrivateMessages
    Nugget
    DiscussionFilters
    ParticipatedThreads
    SpellChecker
    UserFilters
    CategoryRoles
    AccountPictures
    ChatStatus
    PredefinedAttributes

    Maybe its something with the changes in van 1.14?
    I'm going to comment out the whole Writable check line for the time being.
    •  
      CommentAuthorSkyBoy
    • CommentTimeNov 13th 2007 edited
     # 34
    @Comment 27~30, 33
    Now it wipes out the Settings.php, and replaced with just ?> sometimes. (It make my forum redirect to setup/index.php today.)

    I think the codes in default.php:
    if (!AppendToConfigurationFile($Configuration['APPLICATION_PATH'].'conf/database.php', '')) $Errors = 1;

    if (!array_key_exists('HIDDEN_TEXT_SETUP', $Configuration)) {
    AddConfigurationSetting($Context, 'HIDDEN_TEXT_MARKER', '(Hidden)');
    AddConfigurationSetting($Context, 'HIDDEN_TEXT_VERSION', '1.4');
    AddConfigurationSetting($Context, 'HIDDEN_TEXT_SETUP', 1);
    } elseif($Errors == 1) {
    // Could not save configuration
    $NoticeCollector->AddNotice($Context->GetDefinition('ErrCreateConfig'));
    }
    have to change with if (!array_key_exists('HIDDEN_TEXT_SETUP', $Configuration)) {
    if (!AppendToConfigurationFile($Configuration['APPLICATION_PATH'].'conf/settings.php', '')) $Errors = 1;
    if ($Errors = 0){
    AddConfigurationSetting($Context, 'HIDDEN_TEXT_MARKER', '(Hidden)');
    AddConfigurationSetting($Context, 'HIDDEN_TEXT_VERSION', '1.5');
    AddConfigurationSetting($Context, 'HIDDEN_TEXT_SETUP', 1);
    }elseif($Errors == 1) {
    // Could not save configuration
    $NoticeCollector->AddNotice($Context->GetDefinition('ErrCreateConfig'));
    }
    }
  8.  # 35
    Uploaded version 1.6 of Hidden Text.
    •  
      CommentAuthorKrak
    • CommentTimeNov 15th 2007
     # 36
    Made a small change from Dinoboffs suggestion, and it seems to have worked. I have tried it on my local install and the bug is gone. I tried settings.php and database.php as read-only and no error (like there was before). It appears to no longer be rewriting either file.

    If someone that had this problem can give it a shot and let me know if it solved your issue. Please backup both settings/database.php just to be safe.

    It is the original code in version 1.4 with lines 35 and 39 commented out. 35 was the issue, 39 was just not needed.
    Line 35: if (!AppendToConfigurationFile($Configuration['APPLICATION_PATH'].'conf/settings.php', '')) $Errors = 1;
    Line 39: AddConfigurationSetting($Context, 'HIDDEN_TEXT_VERSION', '1.5');
    •  
      CommentAuthormattucf
    • CommentTimeNov 16th 2007
     # 37
    While you're in there, would you be willing to change the .Hidden class in your stylesheet to be more specific to your extension (to fix the conflict with the vanilla stylesheet)? Something like .HiddenText or .HiddenText_Hidden would work. I only saw one line in default.php that would need to change. :)
  9.  # 38
    Uploaded version 1.6 of Hidden Text.
    •  
      CommentAuthorKrak
    • CommentTimeNov 16th 2007
     # 39
    Oh mattucf I'm sorry! I remember reading that and completely forgot all about it.

    I changed it,
    Line 173: class="Hidden"to
    Line 173: class="HiddenText"
    And the appropriate changes to style.css as well.

    I didn't think that small change warranted a version change so it is still 1.6....
    •  
      CommentAuthorWanderer
    • CommentTimeNov 18th 2007
     # 40
    Pedantic convention indicates it should at least be 1.6.1 because if the change was important and it made a difference, people need to know about it.
  10.  # 41
    Uploaded version 1.6.1 of Hidden Text.
    •  
      CommentAuthorKrak
    • CommentTimeNov 18th 2007
     # 42
    :)
    •  
      CommentAuthorWanderer
    • CommentTimeNov 18th 2007
     # 43
    • Message to Krak ->   
    •  
      CommentAuthormattucf
    • CommentTimeNov 21st 2007
     # 44
    Thanks Krak!
    •  
      CommentAuthorblizeH
    • CommentTimeFeb 7th 2008 edited
     # 45
    Hi, just updated this and have a few problems - first of all none of the hidden text is actually hidden any more, but it still toggles when you click the (hide) button.

    Also, is there anyway to get more than one piece of hidden text per page/post please? I've got some text I use myself to do hidden text etc but I've no idea how to implement it into Vanilla :(
    •  
      CommentAuthorblizeH
    • CommentTimeFeb 9th 2008
     # 46
    Bump, please - I'd really, really like to get this resolved if possible since it's ridiculously useful for our forum :-)
    •  
      CommentAuthorKrak
    • CommentTimeFeb 9th 2008
     # 47
    Upgraded from a previous version? Make sure the settings are correct (enabled) for the user role, and that it is enabled in your user settings. If thats all good, I'd try erasing the lines it adds in the /conf/settings.php file.

    $Configuration['HIDDEN_TEXT_MARKER'] = '(Hidden)';
    $Configuration['HIDDEN_TEXT_SETUP'] = '1';

    I don't recall the changes I made from one version to the other, make sure the .js files were uploaded overwriting the old ones. As far as more than one hidden text per message, nope, not with this version. This would require an entirely new/different piece of JS, and I am not that great with JS.

    What do you mean by "'Ive got some text I use myself to do hidden text etc but I've no idea how to implement it into Vanilla." ?
    •  
      CommentAuthorKrak
    • CommentTimeFeb 9th 2008 edited
     # 48
    A lot of people ask for multiple hidden texts per message. This script is fairly simple.

    function handleParent(parentId) {
    myParent = document.getElementById(parentId)

    if (myParent.style.display=='block') {
    myParent.style.display='none'
    } else {
    myParent.style.display='block'
    }
    }

    Thats the code that does the hidding. It simply changes the CSS display tag from block to none. So its always there (viewable from the source) it just changes its CSS display. The script grabs the posts row number and adds it to the hidden text code. The hidden text code has to have a number associated with it to distinguish one hidden text field from the other. If they were all the same, when you click "show hidden text" all the hidden text on the entire page would show, or hide. Giving it a number tells it to show/hide #3 or #6, etc. The number I use is already there, created by Vanilla for that particular post.

    To make multiple hidden texts per message you would have to append another number, or letter to that. So you would have to make the hidden texts for one message something like "hidden text 1a" and "hidden text 1b" or 1.1, 1.2, etc.. I have no idea how to do this. You would have to make it add the extra letter/number to the current one, and make sure you were not creating one with a number/letter combo already in use on the page or you would end up showing/hiding more than one set per message.

    I simply dont know how to do it, but I am sure it can be done.

    There are other ways to show/hide text as was discussed in the discussion before I made this, but I either, did not like the way it worked (too messy), I was unable to get it to work, or I was unable to use it because of the code needing a specific number attached.

    I get this request constantly, which I would love to have honestly. I just can't do it. Maybe this will help explain everything.
    •  
      CommentAuthorblizeH
    • CommentTimeFeb 19th 2008
     # 49
    Many thanks for the reply - I've got it working again now and it's a great script :-) Like I said, incredibly useful and I appreciate you going through how it works - I'll at least have a look at doing multiple cases per post but I'm really not very good myself, my coding abilities are far below yours for sure!

    Would it be an idea to... I don't know, instead of going from the post number, have a loop that goes from 1 -> 100 (or whatever) and as soon as it can't find an element on that page with a number it'll return that particular number, or something?

    :(
    •  
      CommentAuthorKrak
    • CommentTimeFeb 19th 2008
     # 50
    Ive thought about a few things, I am just not sure how to implement them. One of my ideas was to use a random string. It doesn't matter what is used, just as long as it is attached to the hidden blurb and the link to show/hide that blurb. A random string would work perfectly I'm sure, what are the chances that it would duplicate on one page?

    Every once in a while I dig out the extension and fiddle with it to see if I can get it. Just waiting till one day I do, or someone comes along and points me in the right direction. I'm just horrible with JS.

    Glad you like it though!