vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Hidden Posts (https://vborg.vbsupport.ru/showthread.php?t=27179)

tubedogg 09-01-2001 10:00 PM

I have updated this hack. It now hides hidden posts during replying, when they are shown below the newreply screen for review.

See the upgrade instructions below.

-------------------------------

Just for the record this IS NOT Lockdown. This allows the user to select an option when posting/editing a post that will make his post display a message that it is hidden, and to view it, click here. It's great for spoilers, off-color language, or anything else that you would want the viewer to make a conscious decision to view it.

Idea by amykhar.

Screenshot is here.

For version: 2.0.3

Files needed: install_hiddenposts.php

Files to edit: newthread.php, newreply.php, editpost.php, showthread.php, admin/functions.php

Templates to edit/create: newthread, newreply, editpost, postbit_hidden

Instructions are in the zip in a file named INSTALL.

Upgrading Instructions: To upgrade from the previous version of this hack (which didn't hide posts when replying), do the following:
In newreply.php, find
PHP Code:

          if ($ignore[$post[userid]]) {
            
$reviewmessage $ignoreduser

Right below that, add
PHP Code:

          } elseif ($post[hidden]) {
            eval(
"\$hiddenpost = \"".gettemplate("threadreviewbit_hidden")."\";");
            
$reviewmessage $hiddenpost

Then find
PHP Code:

        post.pagetext,post.allowsmilie,post.userid FROM post 

and replace that with
PHP Code:

        post.pagetext,post.allowsmilie,post.userid,post.hidden FROM post 

And that's it. :)

Please DO NOT email, PM, IM, or otherwise contact me off this board about this hack. Post in this thread.

Feedback appreciated. Enjoy!

This hack is ?2001 Kevin Schumacher and may not be redistributed, edited or not, without this copyright notice attached.

eva2000 09-02-2001 07:42 PM

busy bee huh :)

badmeetsevil- 09-02-2001 07:55 PM

Do you have a demo? I'm not exactly sure what this does.

tubedogg 09-02-2001 08:36 PM

No demo but there's a screenshot I just added to the first post.

Kajiro 09-03-2001 12:12 AM

i think is same to ubb hack too....
Great...~~

JJR512 09-03-2001 01:24 AM

I did a similar thing, only it's a lot simpler. Not quite as fancy...but I think the simpleness of it makes it just as good.

All it is is a custom vB Code tag called Spoiler. The vB Code tag is spoiler, the vB Code replacement is
PHP Code:

<font class=spoiler>{param}</font

...the vB Code explanation is
Quote:

The [spoiler] tag allows you to place text in your message that is unreadable, unless someone highlites it. This makes viewing the text a deliberate effort. This is for posting messages about movies or other things where you might not wish to give away plot points to those that haven't seen it yet.
...and the Use { option }? is No.

Note that this requires you to place this bit of code inside the style section of the Head Insert on your styles (same thing as the headinclude template):
PHP Code:

.spoiler    {colorblackbackgroundblack

And here is a demo: http://www.jjr512.com/forums/showthr...threadid=22710

Matt*is*thick 09-03-2001 02:36 AM

I am not sure if this is just me but I installed it and the hidden post shows that message, but when I click on the link to view the actual message that is hidden I get the warning message again ???

MrLister 09-03-2001 04:39 AM

Looks great. I just installed it!

tweak 09-03-2001 06:29 AM

Thanx man ill give it a shot :P

Kajiro 09-03-2001 07:58 AM

this hack after the install....
need do sth for active !?
coz my case is no change....:confused:

dxb 09-03-2001 09:18 PM

I think Kevin it's time to update your signature with another well done hack :)

maverick1236 09-03-2001 10:30 PM

i tried tubedoggs way-and although i got no errors...
it just didnt work

i would like to try JJR512's way, but i simply am not sure how to do it-ive never messed around with replacement variables

could someone be kind enough to write a VERY detailed way to do this-so i could give it a try-it would be much appreciated!!:):)

tubedogg 09-03-2001 11:20 PM

What didn't work about it? Did you make all the changes to the files? And create a new post marked as "hidden"?

maverick1236 09-03-2001 11:22 PM

and it just came out as a regular post

tubedogg 09-03-2001 11:39 PM

Most importantly, is this in admin/functions.php ?

PHP Code:

    if ($ignore[$post[userid]]) {
        eval(
"\$retval = \"".gettemplate("postbit_ignore")."\";");
    } elseif (
$hidden==1) {
        eval(
"\$retval = \"".gettemplate("postbit_userhidden")."\";");
    } else {
        eval(
"\$retval = \"".gettemplate("postbit")."\";");
    } 


tubedogg 09-04-2001 12:59 AM

It seems I messed up the directions a bit...hmm...well not exactly, but the thing I have you searching for in showthread.php actually appears twice, and it needs to go in the second place, not the first.

So here goes:
In showthread.php, find
PHP Code:

    $postdone[$post[postid]]=1;
  } 

and add right below it
PHP Code:

  if ($post[hidden]==1) {
      
$hidden=1;
  } else {
      
$hidden=0;
  } 

It should now work. I've updated the installer with this change.

theflow 09-04-2001 01:44 AM

Quote:

Originally posted by tubedogg
It's great for spoilers, off-color language, or anything else that you would want the viewer to make a conscious decision to view it.
I think this is a great feature -- expecially for movie discussions; good job. Kevin, correct me if I'm wrong, but this is an all-or-nothing option for any given post, correct? Did you consider an option that enables you to write a "public" portion of a post, then select another portion of the post to be treated as "hidden"? In which case in the post display, at the point where you encounter the hidden marker, your warning message appears, requiring you to click to see the rest?

I also tried JJR512's "blackout & highlight" scheme -- and it is a great idea and does accomplish the basic task of blockout, then requiring an active choice to display. Very cool. Nothing wrong with it at all.

For me, personally, I do think a click-through is a more certain form of protection than the active-choice highlight scheme. (I've been known to do cntrl-A at times, unintentionally, due to 2-finger hunt & peck clumsiness, but it's pretty far-fetched to worry about that :)

M ² 09-04-2001 02:37 AM

When someone quotes a hidden post, shouldn't the post default to hidden? A minor thing, but there are rude people out there that would do something like this not thinking they're giving it away for everyone else.

maverick1236 09-04-2001 02:37 AM

ill try this tomorrow and let ya know!!

JJR512 09-04-2001 05:14 AM

Quote:

Originally posted by Maverick1236
i tried tubedoggs way-and although i got no errors...
it just didnt work

i would like to try JJR512's way, but i simply am not sure how to do it-ive never messed around with replacement variables

could someone be kind enough to write a VERY detailed way to do this-so i could give it a try-it would be much appreciated!!:):)

I posted about it in a thread: http://www.vbulletin.com/forum/showt...threadid=16306

If anyone has any other questions or comments about my thing, I think it would be only fair to Tubedogg if you posted them in that thread. I didn't mean to steal Tubedogg's thread; sorry, dude. :)

tubedogg 09-04-2001 09:05 AM

s'ok JJR :)

Squashed another bug folks. Involving editpost.php...

Find
$signature=iif($signature=="yes",1,0);
Add right below it
$hidden=iif($hidden=="yes",1,0);

Then find
PHP Code:

  $DB_site->query("UPDATE post SET title='".addslashes(htmlspecialchars($title))."',pagetext='".addslashes($message)."',allowsmilie='$allowsmilie',showsignature='$signature',iconid='$iconid'$editedbysql$attachmentsql WHERE postid='$postid'"); 

and replace it with
PHP Code:

  $DB_site->query("UPDATE post SET title='".addslashes(htmlspecialchars($title))."',pagetext='".addslashes($message)."',allowsmilie='$allowsmilie',showsignature='$signature',iconid='$iconid', hidden='$hidden'$editedbysql$attachmentsql WHERE postid='$postid'"); 

and reupload editpost.php. Should now work. :o

amykhar 09-06-2001 02:58 PM

Works like a charm (at least for new posts, haven't fully tested edited posts and replies yet)

THANK YOU Kevin :)

Amy

squawell 09-07-2001 03:53 PM

after install find some problem~~

Database error in vBulletin: Invalid SQL: INSERT INTO post (postid,threadid,title,username,userid,dateline,at tachmentid,pagetext,allowsmilie,showsignature,ipad dress,iconid,visible,hidden) VALUES (NULL,'16','[ ???? ]???Ф@?|?s?}?x?׾?','squawell','1','999881856','0' ,'VWEVWEV','1','1','127.0.0.1','0','1','1')
mysql error:
mysql error number: 0
Date: Saturday 08th of September 2001 12:57:36 AM
Script: /vbb203/newthread.php
Referer: http://localhost/vbb203/newthread.ph...read&forumid=4

what's wrong??who can tell me??pls~~~

TWTCommish 09-07-2001 07:03 PM

Dang, I can't believe someone made this...I run a movie forum site, so a [spoiler] tag is becoming a must. I'll probably write my own version of it though, which can give users the option to automatically display spoilers anyway, have them show up in a JS alert, or have them show up in a popup window...or something. :)

amykhar 09-08-2001 08:36 PM

One of my users just noticed a slight hitch in the hack. When hit reply, all of the posts, hidden and not, are displayed down below.

I am going to poke around and see if I can fix it, but it might take a while. :D

Amy

tubedogg 09-08-2001 11:14 PM

I noticed that yesterday too. Shouldn't be too hard to fix...will work on it and release a new version probably by Tuesday.

tubedogg 09-11-2001 11:01 AM

OK all fixed up. See the first post. :)

amykhar 09-12-2001 06:00 PM

Way cool :)

Amy

butty 09-12-2001 10:10 PM

great hack thanks matey apart from a error on the instructions:

Quote:


Step 5 of 5 Find:


post.pagetext,post.allowsmilie,post.userid FROM post


Right below that, add

post.pagetext,post.allowsmilie,post.userid,post.hi dden FROM

whereas ur not sposed to add the code below your sposed to replace it with it.

i know its summet n nothin thought id just let ya know n e ways

keep up the good work matey

squawell 09-14-2001 03:16 PM

tubedogg master:

i download your new file but it still no work in my forum!!

can you help me~~i send need to edit php file to you

can you help me to edit those php file ??please~~~

i already fail too much time~~~

if you won't !! that's alright and sorry bother you too much time!

Goldfinger 09-14-2001 08:48 PM

The script works great when i post a new thread but when i try to post a new reply it comes up with this error:

Database error in vBulletin: Invalid SQL:
SELECT IF(post.userid=0,post.username,user.username) AS username,
post.pagetext,post.allowsmilie,post.userid FROM post
post.pagetext,post.allowsmilie,post.userid,post.hi dden FROM post
LEFT JOIN user ON user.userid=post.userid
WHERE post.visible=1 AND post.threadid='2'
ORDER BY dateline DESC
mysql error: You have an error in your SQL syntax near '.pagetext,post.allowsmilie,post.userid,post.hidde n FROM post
LEFT JOIN u' at line 4
mysql error number: 1064


Any ideas on how to fix it ?

tubedogg 09-14-2001 10:59 PM

Find
post.pagetext,post.allowsmilie,post.userid FROM post
and delete that whole line.

The instructions are fixed, sorry :(

Goldfinger 09-14-2001 11:54 PM

works like a charm now :cool:

excellent hack :)

DarkReaper 09-15-2001 06:01 PM

What about allowing a user to make only part of the post hidden, inside a [hidden] tag or someting.

If you can't do that, could there be an option for the user to specify why they hid the post?

Dakota 09-19-2001 04:01 AM

Nice hack, very useful for the anime forum that I help on.

Dakota 09-20-2001 04:49 AM

Ok, the users gave me this idea, like when you select the option to use a poll, have it take you to another page where you can specify what is in the post, like what the spoiler is about, so you can specify the reason the post it hidden in detail.

maverick1236 09-21-2001 12:22 AM

This person has specified this post as Hidden. It may contain some type of spoiler or less-than-family-friendly language, among other things. To view this post click [here]
when i click the "here" link, i get another window which says...

This person has specified this post as Hidden. It may contain some type of spoiler or less-than-family-friendly language, among other things. To view this post click [here]

the same window!!lol

any ideas?

maverick1236 09-22-2001 01:26 PM

^bump^

maverick1236 09-24-2001 10:22 PM

^bump^

slice 09-25-2001 10:56 AM

i have not installed it all all. how do i install it from scratch? your direction in the first post are for upgrade instructions? are there any instructions for 1st time installation of this hack?

thanks


All times are GMT. The time now is 03:51 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02611 seconds
  • Memory Usage 1,845KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (11)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete