PDA

View Full Version : Quote w/Reply Button Not Show Up In Hidden Replies


Boofo
12-20-2002, 02:28 AM
I just installed Chen's Hidden Reply Hack and i want to be able to have the Quote w/Reply button not show up on any posts that are hidden. Is there an easy way to do this? I know I need to make a new template with the quote button in it, but I'm not sure where to add the code to do this. Can anyone please steer me in the right direction? :)

Xenon
12-20-2002, 04:05 PM
well, you can easyly use logicians conditional in templates hack, for such mods it's perfect :)

if you don't want to use it, you have to hack the getpostbit function in functions.php

Boofo
12-20-2002, 04:41 PM
Ok, I have Logician's hack installed but for the life of me I can seem to get the right condition to make it work. I have tried "post.visible=1", "$hiddenreply==1", "visible=1", etc. What condition can I use to make it work?

Xenon
12-20-2002, 07:20 PM
$post[visible]==1

Boofo
12-20-2002, 08:36 PM
Originally posted by Xenon
$post[visible]==1

Thank you, sir, it worked great! But now I am confused. Why wouldn't this work?

$post[visible]!=1

And what does the ==1 mean?

Thank you for getting me to try the conditional templates. I think I am going to have a blast now. :) There's a lot of hacking of php files I can save doing it this way. :)

Xenon
12-20-2002, 09:24 PM
==1 means is equal to 1
!=1 means is NOT equal to 1
$post[visible]=1 means set $post[visible]=1 which would be true always :)

Boofo
12-20-2002, 09:31 PM
Originally posted by Xenon
==1 means is equal to 1
!=1 means is NOT equal to 1
$post[visible]=1 means set $post[visible]=1 which would be true always :)

Ok, that makes sense. But why didn't this work then?

$post[visible]!=1

Oh, ok, I see, I think. This code turned it off for everyone. It made it think that all posts were hidden, but it should have worked backwards, shouldn't it? It should have turned on the quote button for hidden replies and off for normal replies. Or am I missing something elementary here? :)

Xenon
12-20-2002, 09:45 PM
yes right, normally it should have turned it on for hidden posts but don't show up for normal ones...

Boofo
12-20-2002, 10:28 PM
It turned it off for all posts. Strange. I'll have to play with it and see why it does that. :) In the meantime, the code you gave me does the job. Thank you again. :)

Xenon
12-20-2002, 10:30 PM
:)
you're welcome as always :)

hmm, maybe it's a bug in pal Logicians hack.
You might post it into the supportthread so he'll read about

Boofo
12-20-2002, 10:43 PM
I just tried it again with that code and now it works like it was supposed to. I must have been doing an "if" in front of it before when it didn't work. DOHH!! :) But with logician's hack, it basically does the if already, right?

Xenon
12-20-2002, 10:57 PM
yes, it does the if :)

as i know it adds an iif() around the part in the gettemplate function

Boofo
12-21-2002, 12:21 AM
Then that explains why it wouldn't work before. I'm going to have to remember that the next time. I keep wanting to say "if". :) Thanks again, my friend. ;)