Hide Tag Special

Started by enik, April 11, 2005, 03:41:07 PM

Previous topic - Next topic

ディン1031

Quote from: kat on January 09, 2006, 03:57:58 PM
What about putting a link on that page, explaining why it's there?

I think an awful lot of people have fasterparse installed, my friend...

Just a suggestion. It'll stop people having to trawl through this whole thread. They might not even know that fasterparse interferes with it, after all.
There is a link to the post where the FP install of this Version is... (On the top site <<).

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

kat

I must've missed that, sorry!

kat

Apologies, if double-posts are frowned upon, here, but My mods and G-Mods are asking if they can be allowed to see hidden messages, as well as I, as admin, can.

Would it take much to allow this, by any chance?

Thanks!

ディン1031

Öhm yes i put this in my next Version, if you want made it by your self

In the Display.php Search this

// Find if there a post from you in this thread :) (For the hide tag)
if ($user_info['is_admin'] && !empty($modSettings['hide_adminshouldsee']))
$context['user_post_avaible'] = 1;
elseif (!$user_info['is_guest']) {
$request = db_query("
SELECT ID_MSG, ID_MEMBER
FROM {$db_prefix}messages
WHERE ID_TOPIC = $topic AND ID_MEMBER = $ID_MEMBER
LIMIT 1", __FILE__, __LINE__);

if (mysql_num_rows($request)) $context['user_post_avaible'] = 1;
else $context['user_post_avaible'] = 0;
mysql_free_result($request);
}
else $context['user_post_avaible'] = 0; //Anyway no way you should see it!

replace this with


global $user_settings; //important, without this variable, group ids is not avaible.
// Find if there a post from you in this thread :) (For the hide tag)
if (($user_info['is_admin'] || $user_settings['ID_GROUP'] == '2'  || $user_info['is_mod']) && !empty($modSettings['hide_adminshouldsee']))
$context['user_post_avaible'] = 1;
elseif (!$user_info['is_guest']) {
$request = db_query("
SELECT ID_MSG, ID_MEMBER
FROM {$db_prefix}messages
WHERE ID_TOPIC = $topic AND ID_MEMBER = $ID_MEMBER
LIMIT 1", __FILE__, __LINE__);

if (mysql_num_rows($request)) $context['user_post_avaible'] = 1;
else $context['user_post_avaible'] = 0;
mysql_free_result($request);
}
else $context['user_post_avaible'] = 0; //Anyway no way you should see it!


This allow GMods and Mods of this Board to see the contet (Should be the same in the 1.1rc1).

(In the next Version i add this to the options).
Also a Select for Groups :).

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

kat

You're an absolute gentleman!

I'll make the changes and let you know how it goes.

Thanks, Din. Appreciated!

kat

#165
Sorry to be a pain, here....

I'm assuming it's this line:

if (($user_info['is_admin'] || $user_settings['ID_GROUP'] == '2'  || $user_info['is_mod']) && !empty($modSettings['hide_adminshouldsee']))

that allows the membergroups concerned to see the text.

Can I ask how I would need to modify that, too allow a custom user-group to see the text?

Being a NooB, with very little knowledge of php, I'm not even sure how to find-out what their 'ID_GROUP' is... :(


That modification didn't work, for me. I might be able to make it work, though, if you can answer the above question, though, ay? :D

ディン1031

#166
did not work?

My postet code or your change? (Are there any errors in the error report?)

$user_settings['ID_GROUP'] == '2' are Global Moderators.
$user_settings['ID_GROUP'] is the Selected UserGroup (Not the alternativ group).
You can see the id in the admin panel.

Bye
DIN1031

Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

kat

The original works, fine!

Only admin (me) can see the posts, without replying, as it should be.

The modified script didn't change anything. My mods and G-mods still can't see the posts, either. :(

Where in the admin panel would I see the ID, Din? I've looked in "Manage membergroups" and there's nothing there, that I can see, to tell me what the ID number is.

Sorry about being such a nuisance.

ディン1031

#168
Ähm are there some errors in the error log?

because i think you forgot the global $user_settings;
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

kat

No errors, at all, I'm afraid.

I made sure that I put the global $user_settings; because I read your comment, in that line.

ディン1031

Hööö... thats strange... very strange...

(at the attached pic you can see where the id number is)...

Which is you forum Version?

i test it on my test install... but it work before <<
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

kat

Can't see that one mine! :(

What admin page is that on?

ディン1031

edit membergroup -> select group -> and than you see it in the link.

and i test it on my 1.05 install and it work... i look at the 1.rc version...

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

kat

Ah!

Hover the mouse over it and there it is!

Excellent!

I'll fiddle with that code, again, and see what happens.

Thanls for your help, my friend!

ディン1031

And the change work... i test it on all the version of my install and it work :P

I copied the code and replaced it and it work...

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

kat

I'll let you know how I get on.

I really MUST learn php... ;)

Danke!

kat

I've managed to get it working for userID 11, now, which is wonderful!

How would I need to modify that script, to add other groups, Din?

More specifically, groups 2 and 3.

ディン1031

#177
Öhm and why userid? i never see user id in my tag :P only usergroups :X


if (($user_info['is_admin'] || $user_settings['ID_GROUP'] == '11' || $user_info['is_mod'] || $user_settings['ID_GROUP'] == '3' || $user_settings['ID_GROUP'] == '2') && !empty($modSettings['hide_adminshouldsee']))


i hope you see the pattern... it's really simple << (now there is 11,3,2 to see the post and also Moderators of the board)

Bye
DIN1031... no support more for today... i'm tired...
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

kat

Dead simple, now that I've seen it!

I'll try it, right now, and get back to you.

Thanks for your help and patience, again, Din. ;D

kat

It only worked!!



Danke sehr sehr viel!

Advertisement: