MyBB Community Forums

Full Version: how can i hide forums on archive mode ??
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I create this thread and all fine.

http://community.mybb.com/thread-115858.html

All working fine and i put some new things, if i see a post i put the code to not shows the content. But if i enter on archive mode i use hooks of post_announcement and post_prev, but it does not work for this task.
use all the hooks of archive and something it's bad on my code xD.

How can i use something to hide the content of this area, i use $post['message'] = 'x content';

But i've no idea whats wrong, because in other things i use a $message on my function, but only changes te content of a part of post and if i use this all forum maybe goes wrong xD.

I´m working on it, but if someone tolds me some ideas i know solve this issue on a few minutes, thanks in advice.
Well another question is on printable version does not work either xD.

If i go to directly to the url the content shows, i´m working next week on it, but if someone helps on this task any help is apreciate xD.
if(THIS_SCRIPT == "printthread.php")
{
//Do your stuff
}

That should help you.
Thanks again, and i know your help serves if i use correctly that code.

I probe it and told what happens.
Sure, you're welcome.
Well works fine, but i have add the new function for index.php to archive mode, all works fine, but i see the $fid value not taken.

Only the usergroups and more things, but if i want to take a forums by id, i have the problem, i probe with

$fid
$forum['fid']

but still not works, i'm on it because is the last thing i want to solve, i want to only take the forums id to make this task works.

Thanks in advice again.
Did you defined $fid as global variable?
Yes, i probe with fchache, forum and fid declarated, and only with fid on global but only on printable version works, if i go to archive version only takes the usergroup value xD.

I did with same function and a separated function for printable and archive, but only printable works with forums id and the value fid works fine, but if i put on archive this value has ignored and the code does not work.

When i put the declaration for forums id something goes bad, because i'm using an OR sentence on usergroups and forums. If i'm user of the group x or y all works fine. Shows or not shows the extra message, but if i put an AND sentence then not works the code, the same when i have the other sentences xD.

I do not know why but my code still needs some var or additional code to works fine.

The code works on forum on normal and printable version fine, only on archive mode something happens.
Well finally i made it, i have something bad, but now the mod works fine, i have the archive, printable and normal posts of forums and all fine, thanks again and my mods are now on the site working and with latest stable versions.

Cheers.