Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Arantor on September 01, 2009, 06:26:49 AM

Title: Moderator and Administrator Comment Tags
Post by: Arantor on September 01, 2009, 06:26:49 AM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=2104)

Moderator and Administrator Comment Tags





Written by: ArantorCurrent version: 1.9
Suitable for: 1.1.x, 2.0.xSupported languages: (https://www.simplemachines.org/site_images/lang/english.gif) (https://www.simplemachines.org/site_images/lang/english_british.gif) (https://www.simplemachines.org/site_images/lang/french.gif) (https://www.simplemachines.org/site_images/lang/spanish.gif) (https://www.simplemachines.org/site_images/lang/german.gif) (https://www.simplemachines.org/site_images/lang/danish.gif) (https://www.simplemachines.org/site_images/lang/dutch.gif)
(https://www.simplemachines.org/site_images/lang/portuguese_pt.gif) (https://www.simplemachines.org/site_images/lang/portuguese_brazilian.gif) (https://www.simplemachines.org/site_images/lang/russian.gif)

Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2104) | Mod support topic (https://www.simplemachines.org/community/index.php?topic=334033.0)





Summary

This mod adds three tags - [admin], [gmod] and [mod] - to the system which provide the ability for moderators and administrators to add comments clearly delineated as such.

All three are permission controlled; you can give out each button to any user group independently; for example you may have co-admins who are effectively admins without them having the 'administrate forum' permission, and this would allow you to grant it to them.

Groups who are not authorised to use these tags cannot do so and the tags are removed if they attempt to use them.

For themers: you can customise the resultant blocks by styling .admin_comment, .gmod_comment and .mod_comment respectively.

Thanks to @ngel for French translation, 130860 for Spanish translation, Eclipse16V for German translation, Akyhne for Danish translation, Pentaxian for Dutch translation, qnub for Russian translation and Costa for the Portuguese translation.

Installation

Package Manager should work in most cases. If you need to make any edits, the full list can be obtained from the Parse function on the right.

Useful links
Manual Installation Of Mods (http://docs.simplemachines.org/index.php?topic=402)
How Do I Modify Files? (https://www.simplemachines.org/community/index.php?topic=24110.0)

Support

Questions should be address to the mod support topic (https://www.simplemachines.org/community/index.php?topic=334033.0).

Updating

To update from 1.8 or below, please uninstall then install 1.9 from the package manager.

Changelog

1.9 - 28 December 2017
Modified the security routine to work on PHP beyond 5.5. PHP 5.3 is now required for mod v1.9.

1.8 - 29 December 2009
Added Russian and Portuguese support.
Cleaned up package contents (not a visible change)

1.7 - 9 November 2009
Added Dutch support

1.6 - 26 October 2009
Added 2.0 RC2 support.

1.5 - 25 September 2009
Added Danish translation.

1.4 - 10 September 2009
Made Moderator tag board specific.
Added German translation.

1.3 - 4 September 2009
Bugfix from French translation.
Added Spanish translation.

1.2 - 4 September 2009
Bugfix from 1.1 regarding the new Global Moderator tag permissions not being enforced correctly.
Added support for French translation.

1.1 - 4 September 2009
Added support for the global moderator tag, plus moved all three to permissions-based from the admin panel

1.0 - 14 August 2009
First release

Files modified by Moderator and Administrator Comment Tags

Sources/Subs.php
Sources/Subs-Post.php
Sources/ManagePermissions.php
Themes/yourtheme/Post.template.php (1.1 only)
Sources/Subs-Editor.php (2.0 only)

Themes/yourtheme/Modifications.*.php for supported languages.

Also adds 3 .gif files into Themes/yourtheme/images/bbc, and 3 into Themes/yourtheme/images
Title: Re: Moderator and Administrator Comment Tags
Post by: bullbreedluverz on September 01, 2009, 06:55:34 AM
nice tweek
Title: Re: Moderator and Administrator Comment Tags
Post by: Rohan_ on September 01, 2009, 08:30:02 AM
8: Undefined index: tag_comment_admin
File: /home/vhosts/www.site.com/Sources/Subs.php
Line: 3759
Title: Re: Moderator and Administrator Comment Tags
Post by: nitkayni on September 01, 2009, 09:17:46 AM
Thanks


Turkish language
$txt['tag_comment_mod'] = 'Moderator Yorumu';
$txt['tag_comment_admin'] = 'Yönetici Yorumu';
Title: Re: Moderator and Administrator Comment Tags
Post by: qtime on September 01, 2009, 09:29:11 AM
Is this comment visible for all members, or only moderators/admins?
Title: Re: Moderator and Administrator Comment Tags
Post by: CiQ on September 01, 2009, 09:47:01 AM
for all

ps. thx for nice mod  :D
Title: Re: Moderator and Administrator Comment Tags
Post by: qtime on September 01, 2009, 09:51:18 AM
ok thanks for your quick responds.
Title: Re: Moderator and Administrator Comment Tags
Post by: funkenwerner on September 01, 2009, 01:50:46 PM
Thanks

Fine Mod



German Language

$txt['tag_comment_mod'] = 'Moderator Kommentar';
$txt['tag_comment_admin'] = 'Administrator Kommentar';


Title: Re: Moderator and Administrator Comment Tags
Post by: Rohan_ on September 01, 2009, 02:21:20 PM
what about my error ? does anybody getting the same ?
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 01, 2009, 02:27:15 PM
Rohan_, are you using English? The mod only supports English and English British. Please note I've been out today and wasn't able to pick up on this earlier - please have patience as remember that real life takes priority.

qtime: the comment is visible to all. However only the mods and admins can use the tags, much like [html] tags.

funkenwerner: Thanks for the translation, I'll add that to the next version.
Title: Re: Moderator and Administrator Comment Tags
Post by: Rohan_ on September 01, 2009, 02:30:02 PM
ya i only use English
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 01, 2009, 02:33:14 PM
Check your custom theme's Modifications.english.php file. You may have to add these lines to it:

$txt['tag_comment_mod'] = 'Moderator Comment';
$txt['tag_comment_admin'] = 'Administrator Comment';
Title: Re: Moderator and Administrator Comment Tags
Post by: Rohan_ on September 01, 2009, 04:06:16 PM
okay and 1 more thing .. i want the border color red .. and the text i want is administrator's i want to add 's .. i tried it in modifications.english but i got error :(
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 01, 2009, 04:22:51 PM
For the border: add it to your CSS. I even left notes in the mod's description what to change.

For the ', make it \'

E.g.
$txt['tag_comment_admin'] = 'Administrator\'s Comment';
Title: Re: Moderator and Administrator Comment Tags
Post by: Rohan_ on September 01, 2009, 04:36:04 PM
okay everything done .. now i didn't understand how to change the color of border
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 01, 2009, 04:47:21 PM
Go into your CSS file for your forum - style.css in your theme.

Try:

.admin_comment, .mod_comment {
  border-color: red;
}


Styling isn't my forte, however (which is why my dev forum is still using the default!) so maybe that needs tweaking.
Title: Re: Moderator and Administrator Comment Tags
Post by: Rohan_ on September 01, 2009, 04:57:01 PM
hey thanks .. it worked .. here is a look .. i also changed something to use this mod for warning puposes


(http://i32.tinypic.com/2ibor37.jpg)
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 01, 2009, 04:57:49 PM
Awesome :)

Note that it'll give you a red box on both right now but you can break it into two blocks easily enough.
Title: Re: Moderator and Administrator Comment Tags
Post by: Rohan_ on September 01, 2009, 05:01:04 PM
yes i understand now

Thanks again Arantor .. today i am very happy because of this mod and the ban expire mod .. Do u have any other great mods waiting approval ?

(http://i32.tinypic.com/2rdw18g.gif)(http://i32.tinypic.com/2rdw18g.gif)(http://i32.tinypic.com/2rdw18g.gif)(http://i32.tinypic.com/2rdw18g.gif)(http://i32.tinypic.com/2rdw18g.gif)
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 01, 2009, 05:07:05 PM
I have 5 mods still awaiting approval at present. You can see my personal tracker of mods in my signature - Arantor Developments.
Title: Re: Moderator and Administrator Comment Tags
Post by: Rohan_ on September 01, 2009, 05:11:05 PM
lets wait for them :)
Title: Re: Moderator and Administrator Comment Tags
Post by: Sabre™ on September 01, 2009, 11:09:43 PM
I was thinking of this idea only a couple days ago.
Very nice mate! and thanks :)
Title: Re: Moderator and Administrator Comment Tags
Post by: Cal O'Shaw on September 02, 2009, 12:13:18 AM
Hi,

Looks good!  Just to make it clear to me (and maybe others), this essentially does what Aaron's Modbreak MOD does, but has the changes you developed for that MOD incorporated.  And expanded the concept into two BBCodes to differentiate between Moderators and Admins, yes?

Would it be possible to add a permission to allow another group to also use the Admin tag?  On our site we have some folk who can do everything an Admin does except the Admin System Management.  They have full authority but as they are not technically inclined, reduces the risk of something being changed unintentionally.  They're based on the Global Moderator group with a few extra tweaks.

Really like the mod...
Title: Re: Moderator and Administrator Comment Tags
Post by: Sabre™ on September 02, 2009, 01:28:13 AM
Would you know how to center the Moderators Comment & Admins(immortal in my attachment) Comment text so it stays inline with the border?
I've tried to center it via text-align within span and divs, but that brings the text within the border.
Maybe Im looking in the wrong place.

Any suggestions are always appreciated.

Cheers :)
Title: Re: Moderator and Administrator Comment Tags
Post by: Blinker on September 02, 2009, 03:03:41 AM
Great mod Arantor, I've been using modbreak but I like this one more.

For the admin/mod box title tags:

I've changed the titles to my own handle and my mod's handle and also used css to change the colour to the admin and mod membergroup colours. Also, I've changed the font weight to bold. You need to add 'legend' to the css otherwise the text in the box will be the same as the title.

.admin_comment legend {
   color: #0099FF;
   font-weight: bold;
}

.mod_comment legend {
   color: red;
   font-weight: bold;
}
Title: Re: Moderator and Administrator Comment Tags
Post by: Groundhog on September 02, 2009, 03:57:42 AM
Looks really good Arantor  8)

It appears to work just fine in my SMF 2.0 RC1
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 02, 2009, 06:38:29 AM
Quote from: Cal O'Shaw on September 02, 2009, 12:13:18 AM
Looks good!  Just to make it clear to me (and maybe others), this essentially does what Aaron's Modbreak MOD does, but has the changes you developed for that MOD incorporated.  And expanded the concept into two BBCodes to differentiate between Moderators and Admins, yes?

Yes, it is all of that. Plus it adds permission-geared buttons on the post editor.

Quote from: Cal O'Shaw on September 02, 2009, 12:13:18 AM
Would it be possible to add a permission to allow another group to also use the Admin tag?  On our site we have some folk who can do everything an Admin does except the Admin System Management.  They have full authority but as they are not technically inclined, reduces the risk of something being changed unintentionally.  They're based on the Global Moderator group with a few extra tweaks.

It would be possible, but that was out of the scope I originally had for the mod - which was essentially modbreak + enforcement of permissions + editor buttons. I can definitely add it to the list for the next version though I cannot guarantee if/when that'll get done.


Sabre: I don't think you can without modifying the raw HTML it generates to a style better suited to you. I've never before really encountered anyone styling a fieldset+legend in that way. You may have some luck styling the legend element as Blinker suggests.


Blinker: thanks for the tip! I deliberately didn't get into how to style it, because I figured anyone that knew about the two classes would be able to style the legend too - but in all honesty I'm not a CSS guru.
Title: Re: Moderator and Administrator Comment Tags
Post by: edi67 on September 02, 2009, 09:20:30 AM
excellent
Title: Re: Moderator and Administrator Comment Tags
Post by: Blinker on September 02, 2009, 09:27:48 AM
Quote from: Arantor on September 02, 2009, 06:38:29 AMBlinker: thanks for the tip! I deliberately didn't get into how to style it, because I figured anyone that knew about the two classes would be able to style the legend too - but in all honesty I'm not a CSS guru.

No probs Arantor. :) I'm certainly no guru either, I just look at the way other mods have used css and work it out from there.

BTW I also managed to use your code from the post template to get the BBC buttons working on my Enhanced Quick Reply Box. If anyone has trouble, just make sure you put Arantor's code under the button array between ); and $found_button = false;
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 02, 2009, 09:48:02 AM
Another excellent tip there, thanks Blinker :)
Title: Re: Moderator and Administrator Comment Tags
Post by: booch_21 on September 02, 2009, 09:57:14 AM
Very nice mod!  Thanks for the work on this!
Title: Re: Moderator and Administrator Comment Tags
Post by: bbmtalk on September 03, 2009, 10:19:04 AM
Arantor, thank you for this great mod. It installed easily and works great.

Maybe it is a given knowledge but you may want to mention the images files that need to be uploaded to the two folders (images and images/bbc) on the custom theme. I thought the package only contained bbc images until I saw the screencap in an earlier post that has an image in the post.

One question -

Is it possible to have tag for global moderators? I know global moderators can use mod tag but it would be nice to give them a tag of their own.



Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 03, 2009, 10:24:10 AM
Well, the thing is that internally there isn't a separate 'global moderator' permission. The only permission you can rely on for mods is the ability for 'moderate_board'.

That said, I'm adding the permission in the next version to assign the admin tag to user groups, meaning that I could do the same for moderators.
Title: Re: Moderator and Administrator Comment Tags
Post by: bbmtalk on September 03, 2009, 10:26:26 AM
That makes sense. Sounds great too.

Looking forward to your great work! Thanks!!
Title: Re: Moderator and Administrator Comment Tags
Post by: Rohan_ on September 03, 2009, 10:26:42 AM
Quote from: bbmtalk on September 03, 2009, 10:19:04 AM
Is it possible to have tag for global moderators? I know global moderators can use mod tag but it would be nice to give them a tag of their own.

i am also thinking about this :)
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 03, 2009, 10:34:24 AM
Quote from: Rohan_ on September 03, 2009, 10:26:42 AM
i am also thinking about this :)

And as ever I'll get to it when I get to it, not before. Right now my paid vBookie mod is being developed which takes priority.
Title: Re: Moderator and Administrator Comment Tags
Post by: Rohan_ on September 03, 2009, 11:18:27 AM
what does ur Vbookie do ?
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 03, 2009, 03:05:10 PM
Does what vBookie does for vBulletin - or at least it will when it's finished - and people are buying it.

Essentially it allows users to put up sporting events and have friendly bets on who they think will win.
Title: Re: Moderator and Administrator Comment Tags
Post by: Rohan_ on September 03, 2009, 03:12:14 PM
i really don't know about vbookie
Title: Re: Moderator and Administrator Comment Tags
Post by: Sabre™ on September 03, 2009, 04:58:42 PM
[Information about Vbookie] (http://lmgtfy.com/?q=vbookie)

Back on topic....
Your next release sounds pretty good, and very flexible.
Look forward to it.
Thanks mate :)
Title: Re: Moderator and Administrator Comment Tags
Post by: @ngel on September 04, 2009, 11:45:58 AM
Here's the FRENCH translation
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 04, 2009, 02:53:27 PM
Thank you @ngel, I'll bundle that up into the file for v1.2, which I'll try and sort out later on tonight :)
Title: Re: Moderator and Administrator Comment Tags
Post by: bbmtalk on September 04, 2009, 03:10:29 PM
Hi Arantor,

I see you posted 1.1 version which includes 3 groups. That is awesome!! Thank you!

Should I wait for 1.2?
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 04, 2009, 03:35:47 PM
The only difference between 1.1 and 1.2 will be the French translation; 1.1 already has both the 3 groups and permissions to individually control them (for both SMF 1.1 and 2.0 series)
Title: Re: Moderator and Administrator Comment Tags
Post by: Dzonny on September 04, 2009, 03:57:12 PM
Wow, really nice mod... :D
Title: Re: Moderator and Administrator Comment Tags
Post by: mirahalo on September 04, 2009, 04:05:21 PM
good mod Arantor, here is Spanish translation:

$txt['tag_comment_mod'] = 'Comentario del Moderador';
$txt['tag_comment_admin'] = 'Comentario del Adminstrador';



it doesn't use any rare character so it could be use on utf-8 and normal ;)
Title: Re: Moderator and Administrator Comment Tags
Post by: Rohan_ on September 04, 2009, 04:28:24 PM
i uninstalled the old one and installed the new :) thanks ..... my super mods ate my head for this feature to give them
Title: Re: Moderator and Administrator Comment Tags
Post by: bbmtalk on September 04, 2009, 05:01:24 PM
I also installed 1.1 and my global mods are happier with their own color showing their status. Thanks for adding it.

I have one issue though. In member permission, I assigned "mod squad" to only the mod tag and they can only see the mod BBC icon.

However, if they manually type [gmod] comment [/gmod], it will display global moderator comment and not remove the tag.

It is the same for regular members who didn't even assign to any mod tag - only happens for gmod.

Any idea why?

Title: Re: Moderator and Administrator Comment Tags
Post by: Rohan_ on September 04, 2009, 05:20:57 PM
same problem here .. everyone can use gmod tags :( ... the image for gmod tag did not appears but if anyone type gmod manually then everyone can use it
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 04, 2009, 05:41:43 PM
130860, thanks for the translation - unfortunately with 1.1 I added a ton new strings which would also need translation.

Guys, thanks for the report. I'm not sure which version of SMF you're using so I'll just have to recheck both sets of code.

I'll roll the update for French in to the fix for this one too, expect to see 1.2 later on tonight, all fixed plus with French translation.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 04, 2009, 05:53:07 PM
In fact... expect to see it momentarily. Stupid error on my part, fixed now for both 1.1 and 2.0, mod updated to 1.2 on the site - with French translation added.
Title: Re: Moderator and Administrator Comment Tags
Post by: Sabre™ on September 04, 2009, 06:09:57 PM
lol
I was wondering how that line couldve been gmod, you had me going over the install.xml trying to find the mystery code that achieved it lol

Good work mate :)
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 04, 2009, 06:14:00 PM
It's the regular expression and the replaces in the middle block in Subs-Post, it was supposed to strip [gmod except where I copy/pasted from the admin block I kinda modded the permission set - and forgot to edit the code, so it would be stripping [admin again.
Title: Re: Moderator and Administrator Comment Tags
Post by: mirahalo on September 04, 2009, 06:17:24 PM
Quote from: Arantor on September 04, 2009, 05:41:43 PM
130860, thanks for the translation - unfortunately with 1.1 I added a ton new strings which would also need translation.




lol I missed it   :P , I will translate all and post it again ;)
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 04, 2009, 06:23:24 PM
Many thanks - I'll add to 1.3 when that's done :)
Title: Re: Moderator and Administrator Comment Tags
Post by: mirahalo on September 04, 2009, 06:43:45 PM
ok, here you go:

utf-8:

$txt['tag_comment_mod'] = 'Comentario de Moderador';
$txt['tag_comment_gmod'] = 'Comentario de moderador global';
$txt['tag_comment_admin'] = 'Comentario de Administrador';
$txt['permissiongroup_modtag'] = 'Control de tags de moderador';
$txt['permissiongroup_simple_modtag'] = 'Control de tags de moderador';
$txt['permissionname_allow_mod_tag'] = '¿Permitir a este grupo usar el tag [mod] ?';
$txt['permissionhelp_allow_mod_tag'] = 'Este permiso, permite a los usuarios en este grupo usar el tag [mod] para usar comentarios al moderador. Estos comentarios no son removidos si el usuario abandona el grupo.';
$txt['permissionname_allow_gmod_tag'] = '¿Permitir a este grupo usar el tag [gmod] ?';
$txt['permissionhelp_allow_gmod_tag'] = 'Este permiso, permite a los usuarios en este grupo usar el tag [gmod] para usar comentarios al moderador global. Estos comentarios no son removidos si el usuario abandona el grupo.';
$txt['permissionname_allow_admin_tag'] = '¿Permitir a este grupo usar el tag [admin] ?';
$txt['permissionhelp_allow_admin_tag'] = 'Este permiso, permite a los usuarios en este grupo usar el tag [admin] para usar comentarios al administrador. Estos comentarios no son removidos si el usuario abandona el grupo.';





ANSI:



$txt['tag_comment_mod'] = 'Comentario de Moderador';
$txt['tag_comment_gmod'] = 'Comentario de moderador global';
$txt['tag_comment_admin'] = 'Comentario de Administrador';
$txt['permissiongroup_modtag'] = 'Control de tags de moderador';
$txt['permissiongroup_simple_modtag'] = 'Control de tags de moderador';
$txt['permissionname_allow_mod_tag'] = '¿Permitir a este grupo usar el tag [mod] ?';
$txt['permissionhelp_allow_mod_tag'] = 'Este permiso, permite a los usuarios en este grupo usar el tag [mod] para usar comentarios al moderador. Estos comentarios no son removidos si el usuario abandona el grupo.';
$txt['permissionname_allow_gmod_tag'] = '¿Permitir a este grupo usar el tag [gmod] ?';
$txt['permissionhelp_allow_gmod_tag'] = 'Este permiso, permite a los usuarios en este grupo usar el tag [gmod] para usar comentarios al moderador global. Estos comentarios no son removidos si el usuario abandona el grupo.';
$txt['permissionname_allow_admin_tag'] = '¿Permitir a este grupo usar el tag [admin] ?';
$txt['permissionhelp_allow_admin_tag'] = 'Este permiso, permite a los usuarios en este grupo usar el tag [admin] para usar comentarios al administrador. Estos comentarios no son removidos si el usuario abandona el grupo.';


it is valide to use on spanish_latin and spanish_es as well ;)
Title: Re: Moderator and Administrator Comment Tags
Post by: bbmtalk on September 04, 2009, 06:49:30 PM
Arantor, thanks for the update.

I think the issue with gmod is fixed. After I installed the updated version, all of the following three show up French.


$txt['tag_comment_mod'] = 'Moderator Comment';
$txt['tag_comment_gmod'] = 'Global Moderator Comment';
$txt['tag_comment_admin'] = 'Administrator Comment';


My forum is only English. After removing all French text in Modification.english.php, they all now show in English.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 04, 2009, 06:52:16 PM
Today just isn't my day, is it? Thanks for the heads-up, I know precisely what I did wrong there.

Another stupid mistake from trying to do too much.

Will repackage, fixed, with Spanish support in just a moment as v1.3.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 04, 2009, 07:01:42 PM
Right, Spanish version added plus French issue fixed - for some reason the wrong version of the french.xml file was in the zip.
Title: Re: Moderator and Administrator Comment Tags
Post by: Sabre™ on September 04, 2009, 07:10:40 PM
Quote from: Arantor on September 04, 2009, 06:52:16 PM
Today just isn't my day, is it?

lol
* scratches 'MIT director' from the ~~ Who is Arantor? list
Im personally sticking with your original release, as I have no need for the added function [gmod].
For now that is.
Title: Re: Moderator and Administrator Comment Tags
Post by: bbmtalk on September 04, 2009, 07:11:04 PM
1.3. cool. You are making a great progress and thanks for the prompt support and update.

It seems now all installing and working fine. Another question for you. (I know I have been asking too much , sorry)

The permission for moderators is only available globally, right? Can it be set locally for mods only assigned to a certain boards?
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 04, 2009, 07:16:08 PM
Sabre: Fair enough, if it works for you and you don't need the translations or the custom permissions, stick with it.

bbmtalk: Argh. I thought it was too easy to set permissions; I forgot the Moderator group is kinda special in that regard.

Interim solution while I figure out how to make it work on the special group would be per-board permissions, and a special custom group that does basically the same job as Moderator but isn't subject to the way Moderator is set up. Ugly but it'd work for that member group.

I'll look into that one tomorrow.
Title: Re: Moderator and Administrator Comment Tags
Post by: bbmtalk on September 04, 2009, 07:46:02 PM
Arantor, no hurry. I was just curious and I know it is gonna turn very complicated with permissions.

I can understand Sabre for sticking with original release. Sometimes less is more. I thought it was good enough for me - but not for my global mods.

Thanks again for all the great work.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 04, 2009, 07:51:41 PM
Actually it shouldn't be that hard, I just have to remember to move it to the board permissions rather than the general permissions at group level. In theory the correct approach would be splitting [mod] to board and [gmod] and [admin] to group level but I think that would be confusing.

It's quite late here but I'll get on that one in the morning and repackage as 1.4.
Title: Re: Moderator and Administrator Comment Tags
Post by: Rohan_ on September 05, 2009, 02:53:56 AM
Arantor Brother if the error is fixed then please give me the manual change of the code that u updated :(

Edit : okay then its too long now so i done it ...
Title: Re: Moderator and Administrator Comment Tags
Post by: ოկtђ on September 05, 2009, 04:43:27 AM
Turkish


$txt['tag_comment_mod'] = 'Moderatör Yorumları';
$txt['tag_comment_gmod'] = 'Global Moderator Yorumları';
$txt['tag_comment_admin'] = 'Administrator Yorumları';
$txt['permissiongroup_modtag'] = 'Moderator etiket kontrolleri';
$txt['permissiongroup_simple_modtag'] = 'Moderator etiket konrolleri';
$txt['permissionname_allow_mod_tag'] = 'Kullanmak isteyen bütün kullanıcılara izin ver? [mod] ?';
$txt['permissionhelp_allow_mod_tag'] = 'Bu izin tüm kullanıcıların moderatör yorumlarını kullanmasına olanak verir.(mod)';
$txt['permissionname_allow_gmod_tag'] = 'Tüm kullanıcılara izin ver.[gmod] ?';
$txt['permissionhelp_allow_gmod_tag'] = 'Bu izin tüm kullanıcıların gmod blokunu kullanmasına olanak verir';
$txt['permissionname_allow_admin_tag'] = 'Kullanıcılara izin ver [admin] ?';
$txt['permissionhelp_allow_admin_tag'] = 'Bu izin kullanıcıların admin bloğunu kullanmasına olanak verir.';
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 05, 2009, 06:52:00 AM
Quote from: Rohan_ on September 05, 2009, 02:53:56 AM
Arantor Brother if the error is fixed then please give me the manual change of the code that u updated :(

Edit : okay then its too long now so i done it ...

The fix was in 1.3, and as for your 'too long now' of 2 hours patience, I couldn't reply before because I was trying to catch some sleep.


Mythcomeback: Thanks for the translation: I'll roll that into 1.4 well as the change in permissions to make moderator board-level, should be sometime today.
Title: Re: Moderator and Administrator Comment Tags
Post by: edi67 on September 05, 2009, 10:02:28 AM
nice mod i can purpose one idea will be very useful if near comment will be wrote the name of author of that comment, i mean Moderator comment by (name of moderator)
Title: Re: Moderator and Administrator Comment Tags
Post by: amca on September 05, 2009, 03:05:43 PM
Quote from: Mythcomeback | Burak on September 05, 2009, 04:43:27 AM
Turkish


$txt['tag_comment_mod'] = 'Moderatör Yorumları';
$txt['tag_comment_gmod'] = 'Global Moderator Yorumları';
$txt['tag_comment_admin'] = 'Administrator Yorumları';
$txt['permissiongroup_modtag'] = 'Moderator etiket kontrolleri';
$txt['permissiongroup_simple_modtag'] = 'Moderator etiket konrolleri';
$txt['permissionname_allow_mod_tag'] = 'Kullanmak isteyen bütün kullanıcılara izin ver? [mod] ?';
$txt['permissionhelp_allow_mod_tag'] = 'Bu izin tüm kullanıcıların moderatör yorumlarını kullanmasına olanak verir.(mod)';
$txt['permissionname_allow_gmod_tag'] = 'Tüm kullanıcılara izin ver.[gmod] ?';
$txt['permissionhelp_allow_gmod_tag'] = 'Bu izin tüm kullanıcıların gmod blokunu kullanmasına olanak verir';
$txt['permissionname_allow_admin_tag'] = 'Kullanıcılara izin ver [admin] ?';
$txt['permissionhelp_allow_admin_tag'] = 'Bu izin kullanıcıların admin bloğunu kullanmasına olanak verir.';


Thanks for translation into Burak
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 05, 2009, 03:10:58 PM
edi67: You should be able to use the secondary format to do that, for example:

[mod=Arantor says]This post is inappropriate.[/mod]

This would replace the 'moderator comment' with 'Arantor says'
Title: Re: Moderator and Administrator Comment Tags
Post by: bbmtalk on September 05, 2009, 03:23:37 PM
Quote from: Arantor on September 05, 2009, 03:10:58 PM
edi67: You should be able to use the secondary format to do that, for example:

[mod=Arantor says]This post is inappropriate.[/mod]

This would replace the 'moderator comment' with 'Arantor says'

Great tip! Thanks!
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 05, 2009, 03:55:40 PM
Did I not add in the description that you could do that? Should work fine for all three tags, plus still should get removed if an unauthorised user tries to use it.
Title: Re: Moderator and Administrator Comment Tags
Post by: edi67 on September 05, 2009, 04:35:04 PM
Quote from: Arantor on September 05, 2009, 03:10:58 PM
edi67: You should be able to use the secondary format to do that, for example:

[mod=Arantor says]This post is inappropriate.[/mod]

This would replace the 'moderator comment' with 'Arantor says'

oh yes this i know but for lazy staff could be intersting have it automatically ;) in same line or part of code
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 05, 2009, 04:36:32 PM
It would have to be yet another rewrite of the code to achieve, to be honest, or add an option somewhere in the admin panel (which I don't really want to do for this to be honest)
Title: Re: Moderator and Administrator Comment Tags
Post by: bbmtalk on September 05, 2009, 05:22:18 PM
Quote from: Arantor on September 05, 2009, 03:55:40 PM
Did I not add in the description that you could do that? Should work fine for all three tags, plus still should get removed if an unauthorised user tries to use it.

Well I have followed this mod from 1.0 to 1.3 and it was new to me.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 05, 2009, 06:40:24 PM
It's been in since 1.0. More likely I just never documented it.
Title: Re: Moderator and Administrator Comment Tags
Post by: clashbot on September 06, 2009, 04:43:43 PM
for sum reason I am not getting the permissions to come up under permissions...

I am running smf 1.10 with tp

it said it installed properly, no errors using package manager
no other errors in forums either
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 06, 2009, 04:54:36 PM
What version are you using, clashbot?
Title: Re: Moderator and Administrator Comment Tags
Post by: Abaliini on September 07, 2009, 11:39:05 AM
Cool thanks!

Finnish Translation:

$txt['tag_comment_mod'] = 'Moderaattorin kommentti';
$txt['tag_comment_admin'] = 'Ylläpitäjän kommentti';
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 07, 2009, 01:45:09 PM
Thanks Abaliini - unfortunately I've added a lot more language strings since 1.0, for all the extra permissions which would also need to be translated. If you could find the time to translate them as well, I'll add it into the next version.
Title: Re: Moderator and Administrator Comment Tags
Post by: Paracelsus on September 07, 2009, 02:35:06 PM
Works fine here, thanks for such a nice mod.

Here's a screenshot on how it looks on my forum for Global Moderators (after a little customization :)):
(http://i32.tinypic.com/jzba5e.png)
Title: Re: Moderator and Administrator Comment Tags
Post by: Eclipse16V on September 08, 2009, 04:25:21 AM
Nice Mod.

Here is the German:

// Mod Tag MOD
$txt['tag_comment_mod'] = 'Moderator Kommentar';
$txt['tag_comment_gmod'] = 'Globaler Moderator Kommentar';
$txt['tag_comment_admin'] = 'Administrator Kommentar';
$txt['permissiongroup_modtag'] = 'Moderator Tags';
$txt['permissiongroup_simple_modtag'] = 'Moderator Tags';
$txt['permissionname_allow_mod_tag'] = 'Erlaube das nutzen von [mod] ?';
$txt['permissionhelp_allow_mod_tag'] = 'Diese Berechtigung erlaubt es dem User die Funktion [mod] zu nutzen und somit ein "Moderator Kommentar" abzugeben. Diese Kommentare werden NICHT gelöscht wenn der User die Gruppe verlässt.';
$txt['permissionname_allow_gmod_tag'] = 'Erlaube das nutzen von [gmod] ?';
$txt['permissionhelp_allow_gmod_tag'] = 'Diese Berechtigung erlaubt es dem User die Funktion [gmod] zu nutzen und somit ein "Globaler Moderator Kommentar" abzugeben. Diese Kommentare werden NICHT gelöscht wenn der User die Gruppe verlässt.';
$txt['permissionname_allow_admin_tag'] = 'Erlaube das nutzen von [admin] ?';
$txt['permissionhelp_allow_admin_tag'] = 'Diese Berechtigung erlaubt es dem User die Funktion [admin] zu nutzen und somit ein "Adminstrator Kommentar" abzugeben. Diese Kommentare werden NICHT gelöscht wenn der User die Gruppe verlässt.';

Title: Re: Moderator and Administrator Comment Tags
Post by: KensonPlays on September 08, 2009, 10:29:30 PM
NICE ARANTOR! Edited group permissions so admins can see only admin comment, and gmod, only gmod comment...!!!!!

keep up your great work with mods!!!
Title: Re: Moderator and Administrator Comment Tags
Post by: Kimmie on September 09, 2009, 01:27:36 AM
Excellent mod, works flawlessly! Great job!!  :)
Title: Re: Moderator and Administrator Comment Tags
Post by: clashbot on September 10, 2009, 10:37:22 AM
sorry for not answering sooner, I am using 1.3 of the admin mod on smf 1.1.10 and tp 1.0b4
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 10, 2009, 10:40:59 AM
clashbot: Can I see a screenshot of your Permissions area?
Title: Re: Moderator and Administrator Comment Tags
Post by: clashbot on September 10, 2009, 11:02:30 AM
got it fixed, some of my other modules had created multiple 'board' => array( entries, so dug through managepermissions.php and manually cleaned up the dups, the extranious ")" and adding in the missing ","

very messy in there thanks to mod installs...lol...just took your mod to point it out to me. Works great now, thanks.
Title: Re: Moderator and Administrator Comment Tags
Post by: funkenwerner on September 10, 2009, 01:10:11 PM
Nice Mod

Work fine in SMF 1.1.10

Quote from: Eclipse16V on September 08, 2009, 04:25:21 AM
Nice Mod.

Here is the German:

// Mod Tag MOD
$txt['tag_comment_mod'] = 'Moderator Kommentar';
$txt['tag_comment_gmod'] = 'Globaler Moderator Kommentar';
$txt['tag_comment_admin'] = 'Administrator Kommentar';
$txt['permissiongroup_modtag'] = 'Moderator Tags';
$txt['permissiongroup_simple_modtag'] = 'Moderator Tags';
$txt['permissionname_allow_mod_tag'] = 'Erlaube das nutzen von [mod] ?';
$txt['permissionhelp_allow_mod_tag'] = 'Diese Berechtigung erlaubt es dem User die Funktion [mod] zu nutzen und somit ein "Moderator Kommentar" abzugeben. Diese Kommentare werden NICHT gelöscht wenn der User die Gruppe verlässt.';
$txt['permissionname_allow_gmod_tag'] = 'Erlaube das nutzen von [gmod] ?';
$txt['permissionhelp_allow_gmod_tag'] = 'Diese Berechtigung erlaubt es dem User die Funktion [gmod] zu nutzen und somit ein "Globaler Moderator Kommentar" abzugeben. Diese Kommentare werden NICHT gelöscht wenn der User die Gruppe verlässt.';
$txt['permissionname_allow_admin_tag'] = 'Erlaube das nutzen von [admin] ?';
$txt['permissionhelp_allow_admin_tag'] = 'Diese Berechtigung erlaubt es dem User die Funktion [admin] zu nutzen und somit ein "Adminstrator Kommentar" abzugeben. Diese Kommentare werden NICHT gelöscht wenn der User die Gruppe verlässt.';



Thanks

:D
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 10, 2009, 02:10:42 PM
Sorry I didn't get to this, the last few days has been nightmare-busy.

Adding 1.4 in a moment which adds the German translation, and also fixes the stupid issue that means [mod] is now per board, meaning you can properly assign it to moderators (and they only have it in the boards they are moderators for)
Title: Re: Moderator and Administrator Comment Tags
Post by: bbmtalk on September 10, 2009, 04:06:49 PM
Quote from: Arantor on September 10, 2009, 02:10:42 PM
Sorry I didn't get to this, the last few days has been nightmare-busy.

Adding 1.4 in a moment which adds the German translation, and also fixes the stupid issue that means [mod] is now per board, meaning you can properly assign it to moderators (and they only have it in the boards they are moderators for)

Thanks a lot. Hope you get some break in between.
Title: Re: Moderator and Administrator Comment Tags
Post by: Rohan_ on September 10, 2009, 04:27:14 PM
what changes i need to make to update it for mod for board fix
Title: Re: Moderator and Administrator Comment Tags
Post by: meehan09 on September 10, 2009, 04:51:43 PM
I have today installed this code manually, And ive seem to have entered the languages for the mod and replaced old file but iam not getting the text string witch says Admin Comment/Quote

Ive attachted a screen shot below to show you.


Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 10, 2009, 05:07:38 PM
Rohan_: the changes are quite a few in ManagePermissions.php.

meehan09: Check you have a file named Modifications.english.php in your theme's languages directory.
Title: Re: Moderator and Administrator Comment Tags
Post by: meehan09 on September 10, 2009, 05:12:25 PM
Yes arantor theres a Modifications.english.php in Themes/languages

Ive attachted this file below.

Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 10, 2009, 05:16:34 PM
Well, the string is there.

If you go into the permissions area, do the permissions show up normally? And what language are you using? (It shouldn't matter, the mod should support both variants of English and English-British)

Note I've seen a similar problem with other language strings on your forum as I indicated to you elsewhere, and I see the strings are present there for the other mod we talked about.
Title: Re: Moderator and Administrator Comment Tags
Post by: meehan09 on September 10, 2009, 05:21:06 PM
Its showing the permissions but no text.

Ive added to modification.english.php and also added in cache lang index modifications.


And iam also using the normal english language ( modifications.egnlish.php ), Ive added the code in both files but doesnt seem to want to show the text in permissions and posts.


Would you be able take a look for me please arantor?
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 10, 2009, 05:33:48 PM
Go into Admin > Maintenance and clear the file cache.
Title: Re: Moderator and Administrator Comment Tags
Post by: meehan09 on September 10, 2009, 05:49:11 PM
Excellent  ;D, that seem to fix the problem and now showing the text.


Thanks alot arantor :)
Title: Re: Moderator and Administrator Comment Tags
Post by: meehan09 on September 10, 2009, 05:51:30 PM
When i look in error log now iam getting no errors for anything.


Thanks alot and iam error free finally  8)
Title: Re: Moderator and Administrator Comment Tags
Post by: bbmtalk on September 10, 2009, 07:33:44 PM
Quote from: meehan09 on September 10, 2009, 04:51:43 PM
Ive attachted a screen shot below to show you.

meehan09 - I like the round border you have. Can I ask how to do that? Something to modify in the css file?

Arantor, One question - does 1.4 still allow global permission of mod tag for all moderators or is it board permission only?
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 10, 2009, 08:37:43 PM
In 1.4, [mod] is now board-level as it should have always have been, because otherwise they have the ability to use it outside of boards in which they are not moderators. If they are to have the ability to use it outside of those boards, they may as well be global moderators.
Title: Re: Moderator and Administrator Comment Tags
Post by: bbmtalk on September 10, 2009, 08:56:07 PM
Thanks for the explanation. With the board permission, the mod tag is still assigned to membership groups. Perhaps it is for a different set up. In my forum, I have one group called "mod squad" and they are assigned to different boards as moderators. Without separate groups of moderators (e.g. for different boards), how can I assign the mod tag to only a few moderators assigned to a board?
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 11, 2009, 04:02:06 AM
The only way to do that is to have separate groups of moderators and per-board permissions, I'm afraid. Even with the revised per-board permissions, it's still per-board at membergroup level, not sub-membergroup level. Refitting the permissions system to allow only part of a membergroup to have permissions would be an utter nightmare.
Title: Re: Moderator and Administrator Comment Tags
Post by: bbmtalk on September 11, 2009, 11:29:44 AM
That's what I thought. For what the mod is now, it is already very useful. Since I don't have separate groups of moderators, I will stay with 1.3.

The local board permission is driving me nuts and like you said, can be a nightmare.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 11, 2009, 11:34:49 AM
Fair enough - if it works for you, stick with it :)
Title: Re: Moderator and Administrator Comment Tags
Post by: ɔɔɔɔɔɔuɥoɾ on September 11, 2009, 02:40:56 PM
Nice mod, works great thanks :)
Title: Re: Moderator and Administrator Comment Tags
Post by: Shark-Time on September 12, 2009, 02:51:15 PM
very nice mod will gonna try this one too soon..
Title: Re: Moderator and Administrator Comment Tags
Post by: Akyhne on September 14, 2009, 07:56:24 PM
Quote from: funkenwerner on September 01, 2009, 01:50:46 PM
Thanks

Fine Mod



German Language

$txt['tag_comment_mod'] = 'Moderator Kommentar';
$txt['tag_comment_admin'] = 'Administrator Kommentar';



Same for Danish XD
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 14, 2009, 08:01:08 PM
Thanks for the translation except that as of the later versions, there are a lot more strings for the different permissions that are involved.
Title: Re: Moderator and Administrator Comment Tags
Post by: Akyhne on September 14, 2009, 08:17:07 PM
Sorry, realized that.

Here's the complete Danish translation. Fortunately no special characters there, so it works for UTF-8 as well as ISO-8859-1 :)

$txt['tag_comment_mod'] = 'Moderator kommentar';
$txt['tag_comment_gmod'] = 'Global Moderator kommentar';
$txt['tag_comment_admin'] = 'Administrator kommentar';
$txt['permissiongroup_modtag_g'] = 'Moderator tag kontroller';
$txt['permissiongroup_modtag_b'] = 'Moderator tag kontroller';
$txt['permissiongroup_simple_modtag_g'] = 'Moderator tag kontroller';
$txt['permissiongroup_simple_modtag_b'] = 'Moderator tag kontroller';
$txt['permissionname_allow_mod_tag'] = 'Tillad denne bruger at benytte[mod] ?';
$txt['permissionhelp_allow_mod_tag'] = 'Denne tilladelse tillader brugere i denne gruppe at bruge tag\'et [mod] til "Moderator kommentar" blokke. Disse kommentarer bliver IKKE fjernet hvis brugeren forlader denne gruppe.';
$txt['permissionname_allow_gmod_tag'] = 'Tillad denne bruger at benytte [gmod] ?';
$txt['permissionhelp_allow_gmod_tag'] = 'Denne tilladelse tillader brugere i denne gruppe at bruge tag\'et [gmod] til "Global Moderator kommentar" blokke. Disse kommentarer bliver IKKE fjernet hvis brugeren forlader denne gruppe';
$txt['permissionname_allow_admin_tag'] = 'Tillad denne bruger at benytte [admin] ?';
$txt['permissionhelp_allow_admin_tag'] = 'Denne tilladelse tillader brugere i denne gruppe at bruge tag\'et [admin] til "Adminstrator Comment" blokke. Disse kommentarer bliver IKKE fjernet hvis brugeren forlader denne gruppe.';
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 14, 2009, 08:23:22 PM
Thanks for that Akyhne, I'll add this to the next release in the next day or so :)
Title: Re: Moderator and Administrator Comment Tags
Post by: Akyhne on September 14, 2009, 08:34:44 PM
i think you could make the mod a little less complicated, but just keeping the 3 standard images in the Default/images folder, and then just use the direct link to the Default image folder.
To me it seems overkill to have the images in all my themes.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 14, 2009, 08:39:31 PM
It only goes into the default theme's folder, not every theme.
Title: Re: Moderator and Administrator Comment Tags
Post by: Akyhne on September 14, 2009, 08:55:54 PM
Hmm, in my forum, it asks for the images in the specific theme.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 14, 2009, 09:02:20 PM
The installation only puts them in the current theme (depending on how you've set it up); it shouldn't be recreating duplicates since there's only one require-file per file, directed at $themedir, which is the 'default' theme directory, usually Themes/default.
Title: Re: Moderator and Administrator Comment Tags
Post by: fmofmpls on September 15, 2009, 08:34:09 AM
Love this mod. One problem though. My theme (Color default) is not showing the block images. It only shows the hover text with a row of ugly white blocks behind the text. All works well in the core default theme. Any way to get the three images where they need to be with the color default themes? Running 1.1.9. Thanks!
Title: Re: Moderator and Administrator Comment Tags
Post by: Akyhne on September 15, 2009, 08:52:51 AM
I asume you are seing the same as I am seing here:
Title: Re: Moderator and Administrator Comment Tags
Post by: Sabre™ on September 15, 2009, 08:56:55 AM
Copy the images into your "custom themes" images folder
Title: Re: Moderator and Administrator Comment Tags
Post by: Akyhne on September 15, 2009, 08:58:47 AM
Quote from: Sabre™ on September 15, 2009, 08:56:55 AM
Copy the images into your themes images folder
That's my trouble. It shouldn't really be nessescary, with simple images like these.
Title: Re: Moderator and Administrator Comment Tags
Post by: fmofmpls on September 15, 2009, 09:03:43 AM
Quote from: Akyhne on September 15, 2009, 08:52:51 AM
I asume you are seing the same as I am seing here:

That's what I'm seeing alright. Exactly the same.
Title: Re: Moderator and Administrator Comment Tags
Post by: fmofmpls on September 15, 2009, 09:06:08 AM
Quote from: Sabre™ on September 15, 2009, 08:56:55 AM
Copy the images into your "custom themes" images folder

Themes>images folder, or themes>images>BBC folder?

* update -  tried uploading pic in both folders. Still no luck.
Title: Re: Moderator and Administrator Comment Tags
Post by: Akyhne on September 15, 2009, 09:41:14 AM
Themes/default/images/*_tag.gif to Themes/[yourTheme]/images/*_tag.gif
Title: Re: Moderator and Administrator Comment Tags
Post by: fmofmpls on September 15, 2009, 09:42:05 AM
Thanks! I'll give it a try!
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 15, 2009, 09:49:21 AM
There are 6 images in total. And the installer *cannot* guess which folder to put them in; it has to rely on the default theme's folder.

Themes/default/images/mod_tag.gif -> Themes/yourtheme/images/mod_tag.gif
Themes/default/images/gmod_tag.gif -> Themes/yourtheme/images/gmod_tag.gif
Themes/default/images/admin_tag.gif -> Themes/yourtheme/images/admin_tag.gif

Themes/default/images/bbc/mod.gif -> Themes/yourtheme/images/bbc/mod.gif
Themes/default/images/bbc/gmod.gif -> Themes/yourtheme/images/bbc/gmod.gif
Themes/default/images/bbc/admin.gif -> Themes/yourtheme/images/bbc/admin.gif

This is an underlying issue on SMF where you're using a different theme to core.
Title: Re: Moderator and Administrator Comment Tags
Post by: Akyhne on September 15, 2009, 11:49:54 AM
I know, but instead of using the $settings['images_url'], you could just call the Default theme image folder.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 15, 2009, 02:53:17 PM
Apart from the fact that would never be approved, it is possible that users will have reconfigured not to use that.

In any case, the BBcode images *have* to go into the $imagedir directive because they must all be in the same place, and you can't just hotwire it the same way.
Title: Re: Moderator and Administrator Comment Tags
Post by: ɔɔɔɔɔɔuɥoɾ on September 15, 2009, 03:08:48 PM
hmmm, dont mean to interrupt, but, I installed this and the images are in MY theme not the default, and its loading them from there too (properties of image /Themes/MYTHEME/Images/.

Thus in any case, if the mod was installed properly, regardless of theme, it should work, when you installed you could have forgotten to click "Install in other themes"
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 15, 2009, 03:10:21 PM
It installs to whatever the current 'default' theme is defined as. Works better in 2.0.
Title: Re: Moderator and Administrator Comment Tags
Post by: ɔɔɔɔɔɔuɥoɾ on September 15, 2009, 03:27:52 PM
Oh yes, I forgot, SMF 1.x does not have that options, SMF 2.x is more sophisticated than SMF 1.x despite been a BETA, anyways, Nice mod, Im using it :) Thanks
Title: Re: Moderator and Administrator Comment Tags
Post by: Sabre™ on September 15, 2009, 04:52:09 PM
Adding the images to my custom themes bbc folder was the only way I could get the images to display.
Without changing the code that is.
But that is with the first version you released, I dont know whether the code has sinced changed(regarding the images), but Im suspecting not.
Dunno how, why, who, what or where ;)  but thats just how it worked
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 15, 2009, 04:54:56 PM
No, hasn't changed at all since then.

A lot depends on your exact setup as to whether it'll work or not.
Title: Re: Moderator and Administrator Comment Tags
Post by: fmofmpls on September 16, 2009, 08:31:07 AM
All is working great now. Thanks for the support. Just needed to add the six required images to their respective folders.
Title: Re: Moderator and Administrator Comment Tags
Post by: Lady Godiva on September 20, 2009, 02:04:08 PM
We installed this mod and it did not show for directors, admins, or moderators. We also noticed some errors involving permissions, no such file, and more. We made the decision to uninstall the mod, but upon attempting - it is failing all of the tests. It passed the tests while installing - so we are a little concerned. Could we get some assistance please?
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 20, 2009, 02:06:18 PM
Please can I have a few more details, such as the version you're using, the theme you're using, and what errors you got in the error log please?
Title: Re: Moderator and Administrator Comment Tags
Post by: Lady Godiva on September 20, 2009, 02:09:40 PM
2.0 RC1.2
Custom theme

You can PM me for the error details if you would like to. Thank you for responding so quickly!
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 20, 2009, 02:10:49 PM
When you say "didn't work" what exactly do you mean? Can you provide screenshots?
Title: Re: Moderator and Administrator Comment Tags
Post by: Lady Godiva on September 20, 2009, 02:15:44 PM
The icons for the tags are completely missing. Yes, I can give you screenshots if you need them.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 20, 2009, 02:23:01 PM
The icons are missing because they've been added to the default theme, not your custom theme, which you'll need to copy:

Quote from: Arantor on September 15, 2009, 09:49:21 AM
There are 6 images in total. And the installer *cannot* guess which folder to put them in; it has to rely on the default theme's folder.

Themes/default/images/mod_tag.gif -> Themes/yourtheme/images/mod_tag.gif
Themes/default/images/gmod_tag.gif -> Themes/yourtheme/images/gmod_tag.gif
Themes/default/images/admin_tag.gif -> Themes/yourtheme/images/admin_tag.gif

Themes/default/images/bbc/mod.gif -> Themes/yourtheme/images/bbc/mod.gif
Themes/default/images/bbc/gmod.gif -> Themes/yourtheme/images/bbc/gmod.gif
Themes/default/images/bbc/admin.gif -> Themes/yourtheme/images/bbc/admin.gif

This is an underlying issue on SMF where you're using a different theme to core.
Title: Re: Moderator and Administrator Comment Tags
Post by: Lady Godiva on September 20, 2009, 02:36:12 PM
Okay, I see those in the default. I will copy them over, and get back to you within the hour.

Another concern was being able to use them when we have renamed the root admin accounts to be Directors, the global admin account was changed to Admins, and we created the Moderators from scratch. Can you shed some light on whether the mod can be written to reflect the correct membergroup names?

I have to run out quickly, but will check back directly.

Thank you.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 20, 2009, 03:03:25 PM
The permissions are applicable at usergroup level, you can assign the Admin and Global Moderator tags to be visible/usable by any group, and Moderator is based on the board moderators group (only; used when you specify moderators in individual boards from the board configuration, though you could change it if you're using per-board configuration)

If you want to change the strings to suit you, you can either:
1) Do so on a per-use basis with:
[admin=Director comment]comment goes here[/admin]

2) Change the default by editing Themes/default/languages/Modifications.english.php and editing the 'Administrator Comment' string and friends there to suit your defaults.
Title: Re: Moderator and Administrator Comment Tags
Post by: Lady Godiva on September 20, 2009, 03:53:58 PM
I was able to successfully copy the images to the custom theme, but it still does not show up.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 20, 2009, 04:40:40 PM
Have you enabled permissions for the different user groups?
Title: Re: Moderator and Administrator Comment Tags
Post by: Lady Godiva on September 20, 2009, 07:37:30 PM
I have not been able to find those permission settings. Where would they be located? Wouldn't I be able to see them regardless of the settings, since I am the root admin?
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 20, 2009, 08:28:51 PM
You should be able to see all three as you're the admin.

The others are configured in the Permissions area however - see Members > Permissions for each group, there are 3 tick boxes as indicated in the screenshots for the mod.
Title: Re: Moderator and Administrator Comment Tags
Post by: Lady Godiva on September 20, 2009, 08:45:54 PM
Thank you for your response. The permissions are not there hon. Would you be interested in taking a look at the errors?
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 20, 2009, 09:01:38 PM
Sure, please post the errors you're getting.
Title: Re: Moderator and Administrator Comment Tags
Post by: Lady Godiva on September 20, 2009, 09:09:57 PM
Here are a couple of errors that were not related to the images needing to be copied to the correct folders.



http://www.soulsinserenity.org/forum/index.php?action=admin;area=packages;sa=install2;package=mod_tag.zip;pid=0 
512: package_flush_cache(): some files are still not writable
File: /var/www/vhosts/soulsinserenity.org/httpdocs/forum/Sources/Subs-Package.php
Line: 2421 


  http://www.soulsinserenity.org/forum/index.php?action=admin;area=packages;sa=install;package=mod_tag.zip 
2: fclose(): supplied argument is not a valid stream resource
File: /var/www/vhosts/soulsinserenity.org/httpdocs/forum/Sources/Subs-Package.php
Line: 2424 
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 20, 2009, 09:31:57 PM
That suggests that some files could not be edited.

Please can you supply your Sources/ManagePermissions.php file?
Title: Re: Moderator and Administrator Comment Tags
Post by: Lady Godiva on September 20, 2009, 09:34:32 PM
Yes, would it be okay if I were to PM that to you for privacy purposes?
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 20, 2009, 09:49:04 PM
You can't PM attachments.

ManagePermissions.php only contains the list of permissions - not who has what.
Title: Re: Moderator and Administrator Comment Tags
Post by: Lady Godiva on September 20, 2009, 10:29:30 PM
I had difficulty attaching this and thought I would give it another try.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 20, 2009, 10:36:22 PM
Hmmm, that's definitely odd. It's not showing any of the edits for permissions at all.

As per http://custom.simplemachines.org/mods/index.php?action=parse;mod=2104;attach=115100;smf_version=2.0_RC1.2 there should be a couple of edits to ManagePermissions.php which likely are the reason it gives you errors.
Title: Re: Moderator and Administrator Comment Tags
Post by: Lady Godiva on September 20, 2009, 10:41:10 PM
I understand. We believe the mod can be of good use for us, but obviously can not access it at this time. When we tried to uninstall it, all of the tests were failed (despite passing them during the installation). What can we do at this point?
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 20, 2009, 10:42:34 PM
The tests failed because the mod has not been installed, meaning there's a permissions issue somewhere most likely.
Title: Re: Moderator and Administrator Comment Tags
Post by: Lady Godiva on September 20, 2009, 10:44:28 PM
Okay - where do we go from here?

The mod package will not uninstall, and some of the files were written to - but we don't know which.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 20, 2009, 10:49:19 PM
Well, the link above shows the files that have been modified, and what code was added to them. If you care to attach all those files I'll look them over and apply the necessary edits for you, thus installing the mod.
Title: Re: Moderator and Administrator Comment Tags
Post by: Lady Godiva on September 20, 2009, 11:04:42 PM
Thank you for your assistance, it is appreciated. I have attached the files.
Title: Re: Moderator and Administrator Comment Tags
Post by: Rohan_ on September 21, 2009, 12:30:53 AM
Please Try the files below  ;D
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 21, 2009, 03:13:31 AM
Nice job, Rohan_ - many thanks to you for all of that!
Title: Re: Moderator and Administrator Comment Tags
Post by: Rohan_ on September 21, 2009, 03:18:54 AM
ohh Arantor please dont thank me .. u dont need to do this .. so did the files worked ?
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 21, 2009, 03:27:07 AM
They look like they contain all the edits necessary so I don't see why they shouldn't work.
Title: Re: Moderator and Administrator Comment Tags
Post by: Rohan_ on September 21, 2009, 06:13:12 AM
hmmm lets wait for the reply of the attachments poster ;)
Title: Re: Moderator and Administrator Comment Tags
Post by: Lady Godiva on September 21, 2009, 02:09:12 PM
Thank you, Rohan_ and Arantor

We replaced our files with the new ones and it appears to be functioning properly at this time - meaning we can use it in our posts - however, the permissions are missing (or seems to be). Here are some screenshots of what we currently have.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 21, 2009, 02:29:56 PM
What language are you using on your forum?
Title: Re: Moderator and Administrator Comment Tags
Post by: Lady Godiva on September 21, 2009, 04:17:56 PM
Strictly english.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 21, 2009, 04:21:48 PM
Just checking - not English-UTF8?

Hmm, did you add the modified Modifications.english.php file to Themes/default/languages/ or to Themes/yourtheme/languages/ ?
Title: Re: Moderator and Administrator Comment Tags
Post by: Lady Godiva on September 21, 2009, 04:24:40 PM
No, it is not the UTF8. I added the modifed file into the default/languages. I wondered if this was an error on my part, but noticed there showed two boxes to be checked (instead of three) without the text. I thought it was better to ask than to damage something while trying to pinpoint it.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 21, 2009, 04:25:41 PM
No, that's as it should be.

Try adding it to Themes/yourtheme/languages as well and see if that works?
Title: Re: Moderator and Administrator Comment Tags
Post by: Lady Godiva on September 21, 2009, 04:28:45 PM
Sure, will do. I'll look up the edits for the file and do it manually. I have a few other mods installed and I'm leary that I may alter one by mistake. I'll update you in just a few minutes.
Title: Re: Moderator and Administrator Comment Tags
Post by: Lady Godiva on September 21, 2009, 04:36:49 PM
Okay - apparently we do not have that file listed in our theme/languages/
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 21, 2009, 04:38:08 PM
Add the file from here to that directory and see if that fixes it.
Title: Re: Moderator and Administrator Comment Tags
Post by: Lady Godiva on September 21, 2009, 05:31:29 PM
I wasn't able to fix the issue as of yet. I looked at the uninstaller just to see if anything had changed. The only file affected still (failing tests) is the /Sources/Subs-Post.php
I would gather this may be the file with a possible error. I have attached it below.

I'll be out for a few hours, but will check back in. Thank you.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 21, 2009, 06:03:36 PM
Well, I'm not entirely sure what you're asking.

That file contains the edits the mod install made.
Title: Re: Moderator and Administrator Comment Tags
Post by: Lady Godiva on September 21, 2009, 06:43:31 PM
It was the only file that appeared to have a problem should I uninstall the mod, so I thought that may be the file with the error preventing the mod to work properly. I'm not real sure of the resolution, and was looking for possible insight.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on September 21, 2009, 07:08:35 PM
The only edit to that file is made if users attempt to use the [mod], [gmod] and [admin] tags when they are not authorised to.

It would have no effect on the language issues you've seen in the Permissions area.

Though I am confused as to why it fails to uninstall properly.
Title: Re: Moderator and Administrator Comment Tags
Post by: Lady Godiva on September 21, 2009, 07:15:29 PM
Yes, I am as well. I'll keep looking into it and get back to you asap. It will likely be in 1 to 2 hours though, as I am not at home. Thank you for continuing to help.
Title: Missing icons
Post by: rbeuker on October 23, 2009, 03:31:52 PM
I have installed your mod on a 2.0-RC2 Forum. This works great! I have just one issue--see the attached picture. The buttons are not showing when editing a message. Note that after having edited a message the icons are shown in the normal message view.

When I look in the HTML source I see this:


{
sType: 'button',
bEnabled: true,
sImage: 'http://forum.nlcomputerforum.nl/Themes/default/images/bbc/.gif',
sCode: 'mod',
sBefore: '[mod]',
sAfter: '[/mod]',
sDescription: 'Moderator Comment'
},
{
sType: 'button',
bEnabled: true,
sImage: 'http://forum.nlcomputerforum.nl/Themes/default/images/bbc/.gif',
sCode: 'gmod',
sBefore: '[gmod]',
sAfter: '[/gmod]',
sDescription: 'Global Moderator Comment'
},
{
sType: 'button',
bEnabled: true,
sImage: 'http://forum.nlcomputerforum.nl/Themes/default/images/bbc/.gif',
sCode: 'admin',
sBefore: '[admin]',
sAfter: '[/admin]',
sDescription: 'Administrator Comment'
},



The picture files are actually right there:

http://forum.nlcomputerforum.nl/Themes/default/images/bbc/admin.gif
http://forum.nlcomputerforum.nl/Themes/default/images/bbc/mod.gif
http://forum.nlcomputerforum.nl/Themes/default/images/bbc/gmod.gif

For some reason, the URL is not complete. How could I solve this?
Title: Re: Moderator and Administrator Comment Tags
Post by: ɔɔɔɔɔɔuɥoɾ on October 23, 2009, 03:45:54 PM
You need to upload the images from the mod package into your themes images directory :)
Title: Re: Moderator and Administrator Comment Tags
Post by: rbeuker on October 23, 2009, 03:48:21 PM
Quote from: ♪ JohnCcCcCc ♫ on October 23, 2009, 03:45:54 PM
You need to upload the images from the mod package into your themes images directory :)

Hi John! I'm using the default (Curve) Theme, so I think the images are already where they should be? Or am I missing something :D

Thx, Ronald
Title: Re: Moderator and Administrator Comment Tags
Post by: ɔɔɔɔɔɔuɥoɾ on October 23, 2009, 03:49:27 PM
You shuold check anyway, sometimes permission issues happen and the files don't get uploaded.
Title: Re: Moderator and Administrator Comment Tags
Post by: rbeuker on October 23, 2009, 03:52:53 PM
Quote from: ♪ JohnCcCcCc ♫ on October 23, 2009, 03:49:27 PM
You shuold check anyway, sometimes permission issues happen and the files don't get uploaded.

Yeah, they're there, really there, and permissions are ok too. For example, this works: http://forum.nlcomputerforum.nl/Themes/default/images/bbc/admin.gif

The problem is that the actual link to that file is not generated properly:

http://forum.nlcomputerforum.nl/Themes/default/images/bbc/.gif

Note that at the end of this URL it says only '.gif' (not 'admin.gif')
Title: Re: Moderator and Administrator Comment Tags
Post by: ɔɔɔɔɔɔuɥoɾ on October 23, 2009, 04:00:03 PM
hmmm, Thats strange, the image is defiantly not been linked correctly, and when you right click the area and select properties where the image is supposed to be, there the image links you get?
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on October 23, 2009, 04:05:43 PM
It won't work properly because I haven't updated the package for the changes in how RC2 works yet. (For each package I have updated for RC2 I am stating it in the mod's page)

In Subs-Editor.php:
Code (find) Select
if($modtag)
$context['bbc_tags'][$last]['mod'] = array('code' => 'mod', 'before' => '[mod]', 'after' => '[/mod]', 'description' => $txt['tag_comment_mod']);
if($gmodtag)
$context['bbc_tags'][$last]['gmod'] = array('code' => 'gmod', 'before' => '[gmod]', 'after' => '[/gmod]', 'description' => $txt['tag_comment_gmod']);
if($admintag)
$context['bbc_tags'][$last]['admin'] = array('code' => 'admin', 'before' => '[admin]', 'after' => '[/admin]', 'description' => $txt['tag_comment_admin']);



Code (replace) Select
if($modtag)
$context['bbc_tags'][$last][] = array('image' => 'mod', 'code' => 'mod', 'before' => '[mod]', 'after' => '[/mod]', 'description' => $txt['tag_comment_mod']);
if($gmodtag)
$context['bbc_tags'][$last][] = array('image' => 'gmod', 'code' => 'gmod', 'before' => '[gmod]', 'after' => '[/gmod]', 'description' => $txt['tag_comment_gmod']);
if($admintag)
$context['bbc_tags'][$last][] = array('image' => 'admin', 'code' => 'admin', 'before' => '[admin]', 'after' => '[/admin]', 'description' => $txt['tag_comment_admin']);


You'll note the 'image' part was missing from the array; this is why it fails to add the picture in. This is one of the changes made in RC2.
Title: Re: Moderator and Administrator Comment Tags
Post by: ɔɔɔɔɔɔuɥoɾ on October 23, 2009, 04:35:21 PM
Arrhh RC2, Charter Member, I should have known, He added the "(Curve)" part after I replied, Sometimes assumptions pay off, with no access to RC2, I cant help anyway  :-\
Title: Re: Moderator and Administrator Comment Tags
Post by: rbeuker on October 24, 2009, 11:20:16 AM
Quote from: Arantor on October 23, 2009, 04:05:43 PM
You'll note the 'image' part was missing from the array; this is why it fails to add the picture in. This is one of the changes made in RC2.

Thanks a lot! That indeed has solved the problem :)

Thanks for making all these great mods!!
Title: Re: Moderator and Administrator Comment Tags
Post by: The Goblin on October 30, 2009, 03:44:49 PM
Quote from: Arantor on September 20, 2009, 02:23:01 PM
The icons are missing because they've been added to the default theme, not your custom theme, which you'll need to copy:

Quote from: Arantor on September 15, 2009, 09:49:21 AM
There are 6 images in total. And the installer *cannot* guess which folder to put them in; it has to rely on the default theme's folder.

Themes/default/images/mod_tag.gif -> Themes/yourtheme/images/mod_tag.gif
Themes/default/images/gmod_tag.gif -> Themes/yourtheme/images/gmod_tag.gif
Themes/default/images/admin_tag.gif -> Themes/yourtheme/images/admin_tag.gif

Themes/default/images/bbc/mod.gif -> Themes/yourtheme/images/bbc/mod.gif
Themes/default/images/bbc/gmod.gif -> Themes/yourtheme/images/bbc/gmod.gif
Themes/default/images/bbc/admin.gif -> Themes/yourtheme/images/bbc/admin.gif

This is an underlying issue on SMF where you're using a different theme to core.

Thanks for the info... it worked  :D
Title: Re: Moderator and Administrator Comment Tags
Post by: futeball on November 02, 2009, 02:15:14 AM
Hi guys,

I'm using SMF 1.1.10 with Tinyportal v1.0 beta 4. Also using tinyportal custom theme where i downloaded from the tinyportal official website. The theme is called Class Red TP1. Where it stated for tinyportal theme.

I tried to install this mod on my theme. By looking to the manual installation, it has to modify the Post.template.php file. But, in this theme, the file doesn't exists. So, anybody can help how do i install this mod on this Class Red TP1 theme. Thanks.
Title: Re: Moderator and Administrator Comment Tags
Post by: Sabre™ on November 02, 2009, 02:27:14 AM
It will use that file from the default theme. So you have no need to worry about it.
SMF does this for any template that is not within a custom theme.
So if that is the only file you need to modify in that theme, then just install the mod normally, and it should work.
Title: Re: Moderator and Administrator Comment Tags
Post by: futeball on November 02, 2009, 02:57:33 AM
Quote from: Sabre™ on November 02, 2009, 02:27:14 AM
It will use that file from the default theme. So you have no need to worry about it.
SMF does this for any template that is not within a custom theme.
So if that is the only file you need to modify in that theme, then just install the mod normally, and it should work.
I have installed it. It works fine, but the icon did not load on reply page & also in the topic.
I attached some screen capture of it.

---------------------------------------------------
Ok, have resolved the problem. The images doesn't exists in modify theme. After copy the image to theme folder, it's all perfect. Tq Sabre for fast reply.
Title: Re: Moderator and Administrator Comment Tags
Post by: Sabre™ on November 02, 2009, 04:04:35 AM
lol anytime buddy, I should have mentioned you'd need to copy the images into your custom theme aswell.
Glad you got it sorted :)
Title: Re: Moderator and Administrator Comment Tags
Post by: Pentaxian on November 09, 2009, 11:14:51 AM
Attached is the dutch xml translation. I can't get it working (probably because you need the mod to direct to it) but the Dutch text is OK.
Hope to be helpful in this.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on November 09, 2009, 11:19:47 AM
To make the mod action it, it's just a case of having it be called in package-info.xml as well (like all the other language entries)

Thanks for submitting this; I'll get it added shortly :)
Title: Re: Moderator and Administrator Comment Tags
Post by: Pentaxian on November 09, 2009, 11:40:42 AM
OK! Thanks!
Title: Re: Moderator and Administrator Comment Tags
Post by: Cal O'Shaw on November 09, 2009, 03:07:02 PM
Arantor,

Aaron is pulling his MODBREAK MOD in favor of yours.

As we've made a lot of use of MODBREAK, with the changes you've helped to make it work, I was hoping you could help me figure out what changes would need to be made to your package to make use of the tag "modbreak" instead of the moderator tag and the CSS used by MODBREAK.

I know MODBREAK will fail on uninstall and I'll have to manually edit the files with the permissions code, but I'd rather be using a MOD that will also work under 2.0.

Grazie mille!
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on November 09, 2009, 03:20:10 PM
Well... it depends whether it's board or global permission'd as to which you'd modify. [mod] as it stands is board dependent, like the Moderator group is, so you can assign it to them and they only have it in the boards they're in, while [gmod] and [admin] are globally available on relevant permissions.

Whichever one you want to modify, you would need to modify every instance of that throughout the edits, but that should be pretty much all you have to do.

Which version of 2.0 is it? I'll dig through the list of changes you'd have to make.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on November 09, 2009, 04:34:23 PM
Quote from: Pentaxian on November 09, 2009, 11:14:51 AM
Attached is the dutch xml translation. I can't get it working (probably because you need the mod to direct to it) but the Dutch text is OK.
Hope to be helpful in this.


Thanks for this :) Newly updated with version 1.7 which now features the Dutch translation too.
Title: Re: Moderator and Administrator Comment Tags
Post by: Cal O'Shaw on November 10, 2009, 12:03:48 AM
Hi Arantor,

In looking things over, I think I would try to get the MOD tag to use the CSS style that I created for MODBREAK.  And I'll give the co-admins access to the MOD tag and pretty much hide the GMOD tag from them.

So, I guess unless you're open to adding fields in the adminCP panel to define the title and CSS section displayed by default for each tag (doesn't hurt to ask, yes? ;) ) I'd just need to know what CSS section to move all the .modbreak style elements into for use by the MOD tag.  I can locate and manually edit the default titles easily enough.

Oh, I don't have 2.0 up now.  I just want to stay with MODs that will make the transition to 2.0.  We're likely to wait for a few bug fix releases and all the MODs we use either going to 2.0 or being part of 2.0 before we migrate from 1.1.10 (I can't afford to try to switch early and possibly break the site).

Grazie!
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on November 10, 2009, 07:18:51 AM
QuoteFor themers: you can customise the resultant blocks by styling .admin_comment, .gmod_comment and .mod_comment respectively.

Default titles should be in Modifications.{language}.php. No plans to add boxes in the admin CP since I'm not planning to add any more 1.1 features (or indeed, really, planning to mod for 1.1 much longer) and in 2.0 the language editor is built in.

This is the part that I'm having trouble with: is it something you're assigning to a board-specific user (i.e. a user group like Moderator, that applies per board) or to the whole group?

If the former, modify [mod], if the latter, modify [admin]. The icon it adds isn't styled in CSS, you'll have to modify the function for that.

If the other users are true admin users, your best approach would be to actually strip out the tags you don't want since admins implicitly have all permissions so will have all three out of the box.
Title: Re: Moderator and Administrator Comment Tags
Post by: Chronus on November 10, 2009, 11:44:29 AM
Installed on smf 2 RC2 and I can't see it on default topic.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on November 10, 2009, 12:04:45 PM
What do you mean, you can't see it?

Are you an admin at the time of posting?
Title: Re: Moderator and Administrator Comment Tags
Post by: Chronus on November 10, 2009, 12:11:21 PM
sorry I meant default template not topic

I'm admin and I see no tags. I tried reinstalling but all the same
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on November 10, 2009, 12:16:03 PM
So where are you looking? Screenshots would be handy too.
Title: Re: Moderator and Administrator Comment Tags
Post by: Chronus on November 10, 2009, 12:30:16 PM
(http://www.imagesforme.com/thumb/thumb_7646471c.jpg) (http://www.imagesforme.com/show.php/781702_1.jpg)

I tried manually with tags but no result
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on November 10, 2009, 12:42:59 PM
What version of the mod are you using?
Title: Re: Moderator and Administrator Comment Tags
Post by: Chronus on November 10, 2009, 12:50:34 PM
1.7
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on November 10, 2009, 12:53:38 PM
Did you get any errors during installation?

Please attach your Sources/Subs-Editor.php file.
Title: Re: Moderator and Administrator Comment Tags
Post by: Chronus on November 10, 2009, 12:55:53 PM
no the installation went fine, all successfull.



Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on November 10, 2009, 12:59:30 PM
Weird, very weird. The edits are listed and the same work absolutely fine for me, which is a fresh 2.0 RC2 (public) install.


What happens if you try using the tags manually?
Title: Re: Moderator and Administrator Comment Tags
Post by: Chronus on November 10, 2009, 01:00:29 PM
all I get is a normal post like nothing happens
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on November 10, 2009, 01:04:29 PM
Please can you also attach Sources/Subs.php and Sources/ManagePermissions.php please?
Title: Re: Moderator and Administrator Comment Tags
Post by: Chronus on November 10, 2009, 01:09:09 PM
sure
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on November 10, 2009, 01:15:38 PM
Hmmm, very very strange.

Random question: In the permissions area, under General Permissions, it lists the different assigned groups, how many users in them and how many permissions they have. How many are listed for Administrator? (It should say 'all' but I've seen some situations where it doesn't)
Title: Re: Moderator and Administrator Comment Tags
Post by: Chronus on November 10, 2009, 01:20:26 PM
I see where the problem is. Only 1 account belongs to administrator group but 2 other accounts have admin permissions. When I log in with my Admin acc I can see the tags, when I use the other acc which has admin permissions I don't see the tags. The question is how do I make this work for other 2 accounts and for my moderators
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on November 10, 2009, 01:25:29 PM
For their membergroups, go into the permissions and grant them to their groups.
Title: Re: Moderator and Administrator Comment Tags
Post by: Chronus on November 10, 2009, 01:31:29 PM
I'm not sure I understand. I just checked permissions for global mods and mods and I can't find anything about this tags.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on November 10, 2009, 01:34:57 PM
Classic view: top half of the permission list, right column, under the heading of "Moderator tag controls", with "Allow this user to use [gmod]" and "Allow this user to use [admin]", then for board-specific, bottom right corner of the page, under the same heading, "Allow this user to use [mod]".

Simple view: under the 'Moderator tag controls' headings, should be at the bottom of each list.
Title: Re: Moderator and Administrator Comment Tags
Post by: Chronus on November 10, 2009, 01:41:27 PM
got it working, thanks
Title: Re: Moderator and Administrator Comment Tags
Post by: [SAP]Francis on November 15, 2009, 09:26:12 PM
I have a question, if the user edits the post again after the administrator used the [admin] tags, does it get removed because the user doesn't have the right to use it?
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on November 15, 2009, 09:28:08 PM
Yes it does.

Only a suitably privileged user can be the one pressing the edit button at the time; it will be stripped otherwise, regardless of the post's owner.

Works exactly the same as [html]
Title: Re: Moderator and Administrator Comment Tags
Post by: [SAP]Francis on November 15, 2009, 10:27:28 PM
Quote from: Arantor on November 15, 2009, 09:28:08 PM
Yes it does.

Only a suitably privileged user can be the one pressing the edit button at the time; it will be stripped otherwise, regardless of the post's owner.

Works exactly the same as [html]
So the user can remove the mod tags easily then.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on November 15, 2009, 10:29:43 PM
There's no way around that, just like there isn't for the html bbcode.

Admin should use a new post, then users can't get around it.
Title: Re: Moderator and Administrator Comment Tags
Post by: [SAP]Francis on November 15, 2009, 10:41:55 PM
Make the post uneditable by a lower group afterwards?
Title: Re: Moderator and Administrator Comment Tags
Post by: Cal O'Shaw on November 16, 2009, 12:38:12 AM
No, the admin creates a post to hold the moderation.  If it's deemed important to keep the post that caused the moderation to remain unchanged, then quote it in the Admin's post, followed by the moderation.

This way, no one can alter the moderation or the demonstration of why moderation was performed.  After all, the original poster could alter the post and then try to claim the moderation was not justified.

Generally, an Admin altering another member's post to insert a moderation is not a good idea.  Altering it to remove inappropriate material can be, but inserting a moderation is not.

Cal
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on November 16, 2009, 02:50:31 AM
To be honest, I have never seen a forum whereby the admin/moderators edited a given post to add moderation notes, unless the admin/moderation note is held separately to the message itself and otherwise cannot be altered... OR, the user was banned for what they posted, so they are not able to edit the post anyway.
Title: Re: Moderator and Administrator Comment Tags
Post by: simplebeer on November 20, 2009, 04:57:27 PM
I get a very strange error!

in the top of my index page all the html codes apear???

Look for image!

Please help, i want to use the mod....

Using 1.1.10 and babylon theme, language Dutch..

Thanx

gr
Title: Re: Moderator and Administrator Comment Tags
Post by: Eclipse16V on November 20, 2009, 05:06:51 PM
Look at your lang file.
there is a problem.
Title: Re: Moderator and Administrator Comment Tags
Post by: simplebeer on November 20, 2009, 05:12:22 PM
Ok, but what is the problem? Dutch is supported right?

Gr
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on November 20, 2009, 05:41:27 PM
How did you install it with the Dutch language?
Title: Re: Moderator and Administrator Comment Tags
Post by: simplebeer on November 21, 2009, 05:17:54 AM
Yes, i just downloaded the mod_tag zip file, uploaded it and install it, automatically it choose the dutch language....

If i look to the modifications.dutch.ph i see this at the end:
Quote$txt['profile_error_award_no_title'] = 'No title has been given for the award';
?>
$txt['tag_comment_mod'] = 'Commentaar van de moderator';
$txt['tag_comment_gmod'] = 'Commentaar van de groepsmoderator';
$txt['tag_comment_admin'] = 'Commentaar van de forumbeheerder';
$txt['permissiongroup_modtag_g'] = 'Moderatortag parameters';
$txt['permissiongroup_modtag_b'] = 'Moderatortag parameters';
$txt['permissiongroup_simple_modtag_g'] = 'Moderatortag parameters';
$txt['permissiongroup_simple_modtag_b'] = 'Moderatortag parameters';
$txt['permissionname_allow_mod_tag'] = 'Sta deze gebruiker het gebruiken van [mod] toe?';
$txt['permissionhelp_allow_mod_tag'] = 'Deze permissie staat de gebruikers in deze groep toe de moderatortag [mod] te gebruiken en daarmee een 'Commentaar van de moderator' te plaatsen. Deze commentaren worden niet verwijderd als de gebruiker deze groep verlaat.';
$txt['permissionname_allow_gmod_tag'] = 'Sta deze gebruiker het gebruiken van [gmod] toe?';
$txt['permissionhelp_allow_gmod_tag'] = 'Deze permissie staat de gebruikers in deze groep toe de moderatortag [gmod] te gebruiken en daarmee een 'Commentaar van de moderator' te plaatsen. Deze commentaren worden niet verwijderd als de gebruiker deze groep verlaat.';
$txt['permissionname_allow_admin_tag'] = 'Sta deze gebruiker het gebruiken van [admin] toe?';
$txt['permissionhelp_allow_admin_tag'] = 'Deze permissie staat de gebruikers in deze groep toe de moderatortag [admin] te gebruiken en daarmee een 'Commentaar van de moderator' te plaatsen. Deze commentaren worden niet verwijderd als de gebruiker deze groep verlaat.';

You see that the (?>) is not at the end? but it must be right?
If i manually change it and put the (?>) at the end i get a template error when showing my forum index...

Don't get it  ::)

Gr
Title: Re: Moderator and Administrator Comment Tags
Post by: simplebeer on November 21, 2009, 06:48:27 AM
Ok Found it!!! The dutch translation of moderator comment was between '.........' but it must be "........." !

So this one is the right one:

Quote$txt['tag_comment_mod'] = 'Commentaar van de moderator';
$txt['tag_comment_gmod'] = 'Commentaar van de groepsmoderator';
$txt['tag_comment_admin'] = 'Commentaar van de forumbeheerder';
$txt['permissiongroup_modtag_g'] = 'Moderatortag parameters';
$txt['permissiongroup_modtag_b'] = 'Moderatortag parameters';
$txt['permissiongroup_simple_modtag_g'] = 'Moderatortag parameters';
$txt['permissiongroup_simple_modtag_b'] = 'Moderatortag parameters';
$txt['permissionname_allow_mod_tag'] = 'Sta deze gebruiker het gebruiken van [mod] toe?';
$txt['permissionhelp_allow_mod_tag'] = 'Deze permissie staat de gebruikers in deze groep toe de moderatortag [mod] te gebruiken en daarmee een "Commentaar van de moderator" te plaatsen. Deze commentaren worden niet verwijderd als de gebruiker deze groep verlaat.';
$txt['permissionname_allow_gmod_tag'] = 'Sta deze gebruiker het gebruiken van [gmod] toe?';
$txt['permissionhelp_allow_gmod_tag'] = 'Deze permissie staat de gebruikers in deze groep toe de moderatortag [gmod] te gebruiken en daarmee een "Commentaar van de moderator" te plaatsen. Deze commentaren worden niet verwijderd als de gebruiker deze groep verlaat.';
$txt['permissionname_allow_admin_tag'] = 'Sta deze gebruiker het gebruiken van [admin] toe?';
$txt['permissionhelp_allow_admin_tag'] = 'Deze permissie staat de gebruikers in deze groep toe de moderatortag [admin] te gebruiken en daarmee een "Commentaar van de moderator" te plaatsen. Deze commentaren worden niet verwijderd als de gebruiker deze groep verlaat.';

:D

Gr
Title: Re: Moderator and Administrator Comment Tags
Post by: [SAP]Francis on November 21, 2009, 09:48:30 AM
Quote from: Welb on November 21, 2009, 06:48:27 AM
Ok Found it!!! The dutch translation of moderator comment was between '.........' but it must be "........." !

So this one is the right one:

Quote$txt['tag_comment_mod'] = 'Commentaar van de moderator';
$txt['tag_comment_gmod'] = 'Commentaar van de groepsmoderator';
$txt['tag_comment_admin'] = 'Commentaar van de forumbeheerder';
$txt['permissiongroup_modtag_g'] = 'Moderatortag parameters';
$txt['permissiongroup_modtag_b'] = 'Moderatortag parameters';
$txt['permissiongroup_simple_modtag_g'] = 'Moderatortag parameters';
$txt['permissiongroup_simple_modtag_b'] = 'Moderatortag parameters';
$txt['permissionname_allow_mod_tag'] = 'Sta deze gebruiker het gebruiken van [mod] toe?';
$txt['permissionhelp_allow_mod_tag'] = 'Deze permissie staat de gebruikers in deze groep toe de moderatortag [mod] te gebruiken en daarmee een "Commentaar van de moderator" te plaatsen. Deze commentaren worden niet verwijderd als de gebruiker deze groep verlaat.';
$txt['permissionname_allow_gmod_tag'] = 'Sta deze gebruiker het gebruiken van [gmod] toe?';
$txt['permissionhelp_allow_gmod_tag'] = 'Deze permissie staat de gebruikers in deze groep toe de moderatortag [gmod] te gebruiken en daarmee een "Commentaar van de moderator" te plaatsen. Deze commentaren worden niet verwijderd als de gebruiker deze groep verlaat.';
$txt['permissionname_allow_admin_tag'] = 'Sta deze gebruiker het gebruiken van [admin] toe?';
$txt['permissionhelp_allow_admin_tag'] = 'Deze permissie staat de gebruikers in deze groep toe de moderatortag [admin] te gebruiken en daarmee een "Commentaar van de moderator" te plaatsen. Deze commentaren worden niet verwijderd als de gebruiker deze groep verlaat.';

:D

Gr
Or \'Commentaar van de moderator\'
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on November 21, 2009, 12:56:26 PM
I just used the one I was given; didn't occur to me to check it too deeply, but oddly it should still have installed *before* the closing ?> not after it.

I've uploaded a new one to the site; not bumped version numbers though.
Title: Re: Moderator and Administrator Comment Tags
Post by: simplebeer on November 21, 2009, 08:15:47 PM
It did installed after the closing ?> but now i have install it manually , change the text and it works....

Gr
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on November 21, 2009, 08:19:30 PM
The one I have works fine in testing though :-/ I did update the site version earlier on today with the same one I have.
Title: Re: Moderator and Administrator Comment Tags
Post by: simplebeer on November 22, 2009, 04:41:59 PM
Ok, then it should be fine, on my forum it works....thanks, and you, you have another bug away  ;)

Gr
Title: Re: Moderator and Administrator Comment Tags
Post by: kasper on December 05, 2009, 07:32:42 AM
Why Admins see tags but moderators not?

Language is Finnish UTF-8.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on December 05, 2009, 07:33:24 AM
Because you need to enable them in the permissions?
Title: Re: Moderator and Administrator Comment Tags
Post by: qnub on December 07, 2009, 06:43:31 AM
russian translation
Title: Re: Moderator and Administrator Comment Tags
Post by: SEABOY on December 20, 2009, 09:38:46 AM
Hello...

i have a strange problem as everything installed very well and  i have checked the manual instructions and everything there correct nothing wrong...

but the problem no admin mod gmod tag appear just icon no more...i'm using smf 1.1.11 with costume theme

so have a look at this pic
(http://i47.tinypic.com/20a8e8x.jpg)



any help plz?
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on December 20, 2009, 09:57:02 AM
I need to see an actual post with that in so I can see the code being used by the website. It's something in your theme that my mod doesn't seem to like.
Title: Re: Moderator and Administrator Comment Tags
Post by: Costa on December 20, 2009, 10:22:40 AM
Code (portuguese_pt) Select
$txt['tag_comment_mod'] = 'Comentário do Moderador';
$txt['tag_comment_gmod'] = 'Comentário do Moderador Global';
$txt['tag_comment_admin'] = 'Comentário do Administrador';
$txt['permissiongroup_modtag_g'] = 'Controlos da tag Moderador';
$txt['permissiongroup_modtag_b'] = 'Controlos da tag Moderador';
$txt['permissiongroup_simple_modtag_g'] = 'Controlos da tag Moderador';
$txt['permissiongroup_simple_modtag_b'] = 'Controlos da tag Moderador';
$txt['permissionname_allow_mod_tag'] = 'Permitir que o usuário use a tag [mod]?';
$txt['permissionhelp_allow_mod_tag'] = 'Esta permissão permite que os usuários deste grupo usem a tag [mod] para os blocos de "Comentário do Moderador". Os comentários adicionados <strong>não</strong> são removidos se o usuário deixa  este grupo.';
$txt['permissionname_allow_gmod_tag'] = 'Permitir que o usuário use a tag [gmod] ?';
$txt['permissionhelp_allow_gmod_tag'] = 'Esta permissão permite que os usuários deste grupo usem a tag [mod] para os blocos de "Comentário do Moderador Global". Os comentários adicionados <strong>não</strong> são removidos se o usuário deixa  este grupo.';
$txt['permissionname_allow_admin_tag'] = 'Permitir que o usuário use a tag [admin] ?';
$txt['permissionhelp_allow_admin_tag'] = 'Esta permissão permite que os usuários deste grupo usem a tag [mod] para os blocos de "Comentário do Administrador". Os comentários adicionados <strong>não</strong> são removidos se o usuário deixa  este grupo.';


Code (portuguese_brazilian) Select
$txt['tag_comment_mod'] = 'Comentário do Moderador';
$txt['tag_comment_gmod'] = 'Comentário do Moderador Global';
$txt['tag_comment_admin'] = 'Comentário do Administrador';
$txt['permissiongroup_modtag_g'] = 'Controlos da tag Moderador';
$txt['permissiongroup_modtag_b'] = 'Controlos da tag Moderador';
$txt['permissiongroup_simple_modtag_g'] = 'Controlos da tag Moderador';
$txt['permissiongroup_simple_modtag_b'] = 'Controlos da tag Moderador';
$txt['permissionname_allow_mod_tag'] = 'Permitir que o usuário use a tag [mod]?';
$txt['permissionhelp_allow_mod_tag'] = 'Esta permissão permite que os usuários deste grupo usem a tag [mod] para os blocos de "Comentário do Moderador". Os comentários adicionados <strong>não</strong> são removidos se o usuário deixa  este grupo.';
$txt['permissionname_allow_gmod_tag'] = 'Permitir que o usuário use a tag [gmod] ?';
$txt['permissionhelp_allow_gmod_tag'] = 'Esta permissão permite que os usuários deste grupo usem a tag [mod] para os blocos de "Comentário do Moderador Global". Os comentários adicionados <strong>não</strong> são removidos se o usuário deixa  este grupo.';
$txt['permissionname_allow_admin_tag'] = 'Permitir que o usuário use a tag [admin] ?';
$txt['permissionhelp_allow_admin_tag'] = 'Esta permissão permite que os usuários deste grupo usem a tag [mod] para os blocos de "Comentário do Administrador". Os comentários adicionados <strong>não</strong> são removidos se o usuário deixa  este grupo.';


Code (portuguese_pt-utf8) Select
$txt['tag_comment_mod'] = 'Coment&#225;rio do Moderador';
$txt['tag_comment_gmod'] = 'Coment&#225;rio do Moderador Global';
$txt['tag_comment_admin'] = 'Coment&#225;rio do Administrador';
$txt['permissiongroup_modtag_g'] = 'Controlos da tag Moderador';
$txt['permissiongroup_modtag_b'] = 'Controlos da tag Moderador';
$txt['permissiongroup_simple_modtag_g'] = 'Controlos da tag Moderador';
$txt['permissiongroup_simple_modtag_b'] = 'Controlos da tag Moderador';
$txt['permissionname_allow_mod_tag'] = 'Permitir que o usu&#225;rio use a tag [mod]?';
$txt['permissionhelp_allow_mod_tag'] = 'Esta permiss&#227;o permite que os usu&#225;rios deste grupo usem a tag [mod] para os blocos de "Coment&#225;rio do Moderador". Os coment&#225;rios adicionados <strong>n&#227;o</strong> s&#227;o removidos se o usu&#225;rio deixa  este grupo.';
$txt['permissionname_allow_gmod_tag'] = 'Permitir que o usu&#225;rio use a tag [gmod] ?';
$txt['permissionhelp_allow_gmod_tag'] = 'Esta permiss&#227;o permite que os usu&#225;rios deste grupo usem a tag [mod] para os blocos de "Coment&#225;rio do Moderador Global". Os coment&#225;rios adicionados <strong>n&#227;o</strong> s&#227;o removidos se o usu&#225;rio deixa  este grupo.';
$txt['permissionname_allow_admin_tag'] = 'Permitir que o usu&#225;rio use a tag [admin] ?';
$txt['permissionhelp_allow_admin_tag'] = 'Esta permiss&#227;o permite que os usu&#225;rios deste grupo usem a tag [mod] para os blocos de "Coment&#225;rio do Administrador". Os coment&#225;rios adicionados <strong>n&#227;o</strong> s&#227;o removidos se o usu&#225;rio deixa  este grupo.';


Code (portuguese_brazilian-utf8) Select
$txt['tag_comment_mod'] = 'Coment&#225;rio do Moderador';
$txt['tag_comment_gmod'] = 'Coment&#225;rio do Moderador Global';
$txt['tag_comment_admin'] = 'Coment&#225;rio do Administrador';
$txt['permissiongroup_modtag_g'] = 'Controlos da tag Moderador';
$txt['permissiongroup_modtag_b'] = 'Controlos da tag Moderador';
$txt['permissiongroup_simple_modtag_g'] = 'Controlos da tag Moderador';
$txt['permissiongroup_simple_modtag_b'] = 'Controlos da tag Moderador';
$txt['permissionname_allow_mod_tag'] = 'Permitir que o usu&#225;rio use a tag [mod]?';
$txt['permissionhelp_allow_mod_tag'] = 'Esta permiss&#227;o permite que os usu&#225;rios deste grupo usem a tag [mod] para os blocos de "Coment&#225;rio do Moderador". Os coment&#225;rios adicionados <strong>n&#227;o</strong> s&#227;o removidos se o usu&#225;rio deixa  este grupo.';
$txt['permissionname_allow_gmod_tag'] = 'Permitir que o usu&#225;rio use a tag [gmod] ?';
$txt['permissionhelp_allow_gmod_tag'] = 'Esta permiss&#227;o permite que os usu&#225;rios deste grupo usem a tag [mod] para os blocos de "Coment&#225;rio do Moderador Global". Os coment&#225;rios adicionados <strong>n&#227;o</strong> s&#227;o removidos se o usu&#225;rio deixa  este grupo.';
$txt['permissionname_allow_admin_tag'] = 'Permitir que o usu&#225;rio use a tag [admin] ?';
$txt['permissionhelp_allow_admin_tag'] = 'Esta permiss&#227;o permite que os usu&#225;rios deste grupo usem a tag [mod] para os blocos de "Coment&#225;rio do Administrador". Os coment&#225;rios adicionados <strong>n&#227;o</strong> s&#227;o removidos se o usu&#225;rio deixa  este grupo.';
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on December 20, 2009, 10:23:06 AM
Thanks, Costa :) I'll add that to the next version along with another translation I have.
Title: Re: Moderator and Administrator Comment Tags
Post by: Costa on December 20, 2009, 10:24:22 AM
You're welcome :)
Title: Re: Moderator and Administrator Comment Tags
Post by: SEABOY on December 20, 2009, 11:37:42 AM
Quote from: The Grinch on December 20, 2009, 09:57:02 AM
I need to see an actual post with that in so I can see the code being used by the website. It's something in your theme that my mod doesn't seem to like.

Okay thanks for answer....

here's the actual pic i have changed the theme also and tried in clean install for smf 1.1.11 and the same problem



(http://i47.tinypic.com/1nzssn.jpg)
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on December 20, 2009, 11:41:36 AM
I still need to see a link to that page. I CANNOT help you without a link.
Title: Re: Moderator and Administrator Comment Tags
Post by: SEABOY on December 20, 2009, 12:15:08 PM
Quote from: The Grinch on December 20, 2009, 11:41:36 AM
I still need to see a link to that page. I CANNOT help you without a link.

okay here's a test page
http://www.egyptoboy.com/test2/index.php?topic=2.0
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on December 20, 2009, 12:16:41 PM
And I need to see it with the theme you have. For me on that link, it's using the default theme, which it works fine on.
Title: Re: Moderator and Administrator Comment Tags
Post by: SEABOY on December 20, 2009, 01:48:07 PM
All give me the same result i have tried with the default theme and tried in a just installed smf 1.1.11 and tried in my current theme but so all show me the same thing the icon appear but with no tag word beside....

can u help?
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on December 20, 2009, 01:50:10 PM
From the link you gave me, it works entirely as it is designed to. Please see the attached.
Title: Re: Moderator and Administrator Comment Tags
Post by: SEABOY on December 20, 2009, 02:12:37 PM
that's strange really....for my self i cant see that from my side but from your side u can that's funny m8 :D

btw thanks alot i just need that other can see so np about my self  ;D
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on December 20, 2009, 03:15:37 PM
Change the default theme for the forum to be the same one you have, so even guests can see it, and then reply here and I'll take another look.
Title: Re: Moderator and Administrator Comment Tags
Post by: SEABOY on December 20, 2009, 04:34:44 PM
Look here bro at my actual forums
http://www.yovilleonline.com/index.php/topic,6249.msg38346.html#msg38346


the other pic i show u were for testing and the same problem without using any theme
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on December 20, 2009, 04:38:19 PM
That one also works properly for me.
Title: Re: Moderator and Administrator Comment Tags
Post by: SEABOY on December 20, 2009, 06:08:20 PM
Thanks bro.....i cant see it to work from the admin group but works for the whole members group....thanks for the help man
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on December 20, 2009, 06:10:19 PM
So does the admin have a different theme or something?
Title: Re: Moderator and Administrator Comment Tags
Post by: SEABOY on December 20, 2009, 06:19:01 PM
no bro the same theme and also i have tried for a clean install in a diff domain with the same problem only admin group can't see it works as i show you in the pic but u saw it with no problem...idk what's wrong that's strange
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on December 20, 2009, 06:23:31 PM
That is pretty weird, it's nothing I've encountered before. Suggests you've got another mod that adds something only to admin logins.
Title: Re: Moderator and Administrator Comment Tags
Post by: scimmiotto on December 22, 2009, 11:57:24 AM
Hi arantor, in my admin panel, i only see the controls related to the "mod" tag and not the Global Mob and Admin...why? see this
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on December 22, 2009, 11:58:02 AM
Because that's the board specific permission. The others are assigned in the general permissions area.
Title: Re: Moderator and Administrator Comment Tags
Post by: scimmiotto on December 22, 2009, 12:05:19 PM
ok i just saw them. ...tnx a lot for this great package arantor, it's simply awesome ;)
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on December 22, 2009, 12:05:41 PM
Glad you like it :)
Title: Re: Moderator and Administrator Comment Tags
Post by: nuva on January 04, 2010, 08:42:03 AM
Nice mod!

but i got an issue.
I am using 2.0 RC2 and when i type 2 lines between [admin] tags, in the post there is no \n between the lines. (don't know how to say \n in english :P )
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on January 04, 2010, 09:06:53 AM
Using WYSIWYG or not?
Title: Re: Moderator and Administrator Comment Tags
Post by: nuva on January 04, 2010, 09:25:45 AM
not using WYSIWYG

example in attachement
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on January 04, 2010, 09:31:02 AM
That's very very weird. I need to sit and thoroughly investigate this one, but it's not something I came across  :-\
Title: Re: Moderator and Administrator Comment Tags
Post by: CoolChef on January 29, 2010, 06:43:20 PM
I installed this on my forum running 1.1.11 and right after it was installed all i get when i try and go the the forum is Fatal error: Cannot redeclare get_mod_comment() (previously declared in /home/foodies4/public_html/foodieforum/Sources/Subs.php:3761) in /home/foodies4/public_html/foodieforum/Sources/Subs.php on line 3781 i am unable to get into the admin page to remove it or anything please help
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on January 30, 2010, 12:38:00 AM
Quote from: CoolChef on January 29, 2010, 06:43:20 PM
I installed this on my forum running 1.1.11 and right after it was installed all i get when i try and go the the forum is Fatal error: Cannot redeclare get_mod_comment() (previously declared in /home/foodies4/public_html/foodieforum/Sources/Subs.php:3761) in /home/foodies4/public_html/foodieforum/Sources/Subs.php on line 3781 i am unable to get into the admin page to remove it or anything please help

You clicked the install button twice. You'll need to manually edit Subs.php to remove some code.
Title: Re: Moderator and Administrator Comment Tags
Post by: CoolChef on January 30, 2010, 04:01:51 PM
Quote from: Arantor on January 30, 2010, 12:38:00 AM
Quote from: CoolChef on January 29, 2010, 06:43:20 PM
I installed this on my forum running 1.1.11 and right after it was installed all i get when i try and go the the forum is Fatal error: Cannot redeclare get_mod_comment() (previously declared in /home/foodies4/public_html/foodieforum/Sources/Subs.php:3761) in /home/foodies4/public_html/foodieforum/Sources/Subs.php on line 3781 i am unable to get into the admin page to remove it or anything please help

You clicked the install button twice. You'll need to manually edit Subs.php to remove some code.

What code do i need to remove?
Title: Re: Moderator and Administrator Comment Tags
Post by: Vyache on January 30, 2010, 04:27:50 PM
Hello,

I had this mod for a bit now. It was working fine, but for some reason as a Admin having all the permissions, I cannot see the BBC tag buttons for some reason.

I created a dummy user as a Global mod, even with the setting of allowance of using this mod, I was unsuccessful in seeing the BBC buttons...

However the tags work with the post and show up if I use them.

The Mod was installed on the default "theme".  EDIT

Not sure why its not working, please let me know why.
Thank you.
Title: Re: Moderator and Administrator Comment Tags
Post by: live627 on January 30, 2010, 05:06:10 PM
Any errors in the log?
Title: Re: Moderator and Administrator Comment Tags
Post by: live627 on January 30, 2010, 05:07:55 PM
Quote from: CoolChef on January 30, 2010, 04:01:51 PM
Quote from: Arantor on January 30, 2010, 12:38:00 AM
Quote from: CoolChef on January 29, 2010, 06:43:20 PM
I installed this on my forum running 1.1.11 and right after it was installed all i get when i try and go the the forum is Fatal error: Cannot redeclare get_mod_comment() (previously declared in /home/foodies4/public_html/foodieforum/Sources/Subs.php:3761) in /home/foodies4/public_html/foodieforum/Sources/Subs.php on line 3781 i am unable to get into the admin page to remove it or anything please help

You clicked the install button twice. You'll need to manually edit Subs.php to remove some code.

What code do i need to remove?

If you attach it I may look
Title: Re: Moderator and Administrator Comment Tags
Post by: live627 on January 30, 2010, 05:08:32 PM
Quote from: Vyache on January 30, 2010, 05:07:26 PM
none...

SMF version?
Title: Re: Moderator and Administrator Comment Tags
Post by: Vyache on January 30, 2010, 05:10:09 PM
SMF 2.0 RC 2
Title: Re: Moderator and Administrator Comment Tags
Post by: live627 on January 30, 2010, 05:20:21 PM
I just reread your post and noticed "The Mod was installed on the default mod"

Default theme? Do you use the default theme?

Did you install manually or via the package manager?
Title: Re: Moderator and Administrator Comment Tags
Post by: Vyache on January 30, 2010, 05:22:00 PM
Sorry I meant theme.
Title: Re: Moderator and Administrator Comment Tags
Post by: live627 on January 30, 2010, 05:40:24 PM
Quote from: live627 on January 30, 2010, 05:20:21 PM
Did you install manually or via the package manager?
Title: Re: Moderator and Administrator Comment Tags
Post by: Vyache on January 30, 2010, 05:42:07 PM
Package manager...
Title: Re: Moderator and Administrator Comment Tags
Post by: CoolChef on January 30, 2010, 05:45:22 PM
Quote from: live627 on January 30, 2010, 05:07:55 PM
Quote from: CoolChef on January 30, 2010, 04:01:51 PM
Quote from: Arantor on January 30, 2010, 12:38:00 AM
Quote from: CoolChef on January 29, 2010, 06:43:20 PM
I installed this on my forum running 1.1.11 and right after it was installed all i get when i try and go the the forum is Fatal error: Cannot redeclare get_mod_comment() (previously declared in /home/foodies4/public_html/foodieforum/Sources/Subs.php:3761) in /home/foodies4/public_html/foodieforum/Sources/Subs.php on line 3781 i am unable to get into the admin page to remove it or anything please help

You clicked the install button twice. You'll need to manually edit Subs.php to remove some code.

What code do i need to remove?

If you attach it I may look


Title: Re: Moderator and Administrator Comment Tags
Post by: live627 on January 30, 2010, 05:48:38 PM
    27.     Extract File     ./Themes/default/images/bbc/mod.gif     
   28.    Extract File    ./Themes/default/images/bbc/admin.gif    
   29.    Extract File    ./Themes/default/images/bbc/gmod.gif    
   30.    Extract File    ./Themes/default/images/mod_tag.gif    
   31.    Extract File    ./Themes/default/images/admin_tag.gif    
   32.    Extract File    ./Themes/default/images/gmod_tag.gif

@Vyache: Are those image files in place?
Title: Re: Moderator and Administrator Comment Tags
Post by: live627 on January 30, 2010, 05:51:56 PM
Quote from: CoolChef on January 30, 2010, 05:45:22 PM
Quote from: live627 on January 30, 2010, 05:07:55 PM
Quote from: CoolChef on January 30, 2010, 04:01:51 PM
Quote from: Arantor on January 30, 2010, 12:38:00 AM
Quote from: CoolChef on January 29, 2010, 06:43:20 PM
I installed this on my forum running 1.1.11 and right after it was installed all i get when i try and go the the forum is Fatal error: Cannot redeclare get_mod_comment() (previously declared in /home/foodies4/public_html/foodieforum/Sources/Subs.php:3761) in /home/foodies4/public_html/foodieforum/Sources/Subs.php on line 3781 i am unable to get into the admin page to remove it or anything please help

You clicked the install button twice. You'll need to manually edit Subs.php to remove some code.

What code do i need to remove?

If you attach it I may look




I removed the extra function...
Title: Re: Moderator and Administrator Comment Tags
Post by: Vyache on January 30, 2010, 05:53:59 PM
Quote from: live627 on January 30, 2010, 05:48:38 PM
   27.     Extract File     ./Themes/default/images/bbc/mod.gif     
   28.    Extract File    ./Themes/default/images/bbc/admin.gif    
   29.    Extract File    ./Themes/default/images/bbc/gmod.gif    
   30.    Extract File    ./Themes/default/images/mod_tag.gif    
   31.    Extract File    ./Themes/default/images/admin_tag.gif    
   32.    Extract File    ./Themes/default/images/gmod_tag.gif

@Vyache: Are those image files in place?

Yes these are in place...
Title: Re: Moderator and Administrator Comment Tags
Post by: KensonPlays on January 30, 2010, 05:55:27 PM
Quote from: live627 on January 30, 2010, 05:48:38 PM
    27.     Extract File     ./Themes/default/images/bbc/mod.gif     
   28.    Extract File    ./Themes/default/images/bbc/admin.gif   
   29.    Extract File    ./Themes/default/images/bbc/gmod.gif   
   30.    Extract File    ./Themes/default/images/mod_tag.gif   
   31.    Extract File    ./Themes/default/images/admin_tag.gif   
   32.    Extract File    ./Themes/default/images/gmod_tag.gif

@Vyache: Are those image files in place?
Yes, you just have to FTP into your site and copy all six to your local computer, and upload each of those files to all your themes, in the same folder in each folder...
Title: Re: Moderator and Administrator Comment Tags
Post by: live627 on January 30, 2010, 06:04:41 PM
Is the folllowing code in ./Sources/Subs-Editor.php?

$modtag = allowedTo('allow_mod_tag');
$gmodtag = allowedTo('allow_gmod_tag');
$admintag = allowedTo('allow_admin_tag');
if($modtag || $gmodtag || $admintag) {
$last = count($context['bbc_tags']) - 1;
$context['bbc_tags'][$last][] = array();
if($modtag)
$context['bbc_tags'][$last][] = array('image' => 'mod', 'code' => 'mod', 'before' => '[mod]', 'after' => '[/mod]', 'description' => $txt['tag_comment_mod']);
if($gmodtag)
$context['bbc_tags'][$last][] = array('image' => 'gmod', 'code' => 'gmod', 'before' => '[gmod]', 'after' => '[/gmod]', 'description' => $txt['tag_comment_gmod']);
if($admintag)
$context['bbc_tags'][$last][] = array('image' => 'admin', 'code' => 'admin', 'before' => '[admin]', 'after' => '[/admin]', 'description' => $txt['tag_comment_admin']);
}
Title: Re: Moderator and Administrator Comment Tags
Post by: Vyache on January 30, 2010, 06:16:49 PM
My code:
// Add the moderator/admin comment buttons
$modtag = allowedTo('allow_mod_tag');
$gmodtag = allowedTo('allow_gmod_tag');
$admintag = allowedTo('allow_admin_tag');
if($modtag || $gmodtag || $admintag) {
$last = count($context['bbc_tags']) - 1;
$context['bbc_tags'][$last][] = array();
if($modtag)
$context['bbc_tags'][$last][] = array('image' => 'mod', 'code' => 'mod', 'before' => '[mod]', 'after' => '[/mod]', 'description' => $txt['tag_comment_mod']);
if($gmodtag)
$context['bbc_tags'][$last][] = array('image' => 'gmod', 'code' => 'gmod', 'before' => '[gmod]', 'after' => '[/gmod]', 'description' => $txt['tag_comment_gmod']);
if($admintag)
$context['bbc_tags'][$last][] = array('image' => 'admin', 'code' => 'admin', 'before' => '[admin]', 'after' => '[/admin]', 'description' => $txt['tag_comment_admin']);
}
Title: Re: Moderator and Administrator Comment Tags
Post by: live627 on January 30, 2010, 06:21:24 PM
The only think I can think of is allowedTo() returns false :P

But you said even admin couldn't see the button.  I hope the original mod author can help out here :S
Title: Re: Moderator and Administrator Comment Tags
Post by: Vyache on January 30, 2010, 06:23:54 PM
Its a mod conflict, I tested this thing on my test forum, I trying to locate it.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on January 30, 2010, 07:37:50 PM
So what other mods do you have?
Title: Re: Moderator and Administrator Comment Tags
Post by: Vyache on January 30, 2010, 11:50:37 PM
I have the following mods... Not sure what caused the problem...
1.   Aeva Media
2.   Moderator and Administrator Comment Tags
3.   Ajax-Chat Integration
4.   Sort-able Packages
5.   Simple Portal
6.   Custom Portal
7.   Ad Management
8.   Footnotes
9.   Nice-Tooltips
10.   reCAPTCHA for SMF
11.   Registration Password
12.   PMXBlog
13.   Yet Another Global Announcements Mod
14.   SA Affiliates
15.   SMF Articles
16.   Team Page
17.   Treasury
18.   Simple Award System
19.   Topic Note
20.   Word Description
21.   eNinja - Admin Notes
22.   BackGround Tag
23.   InfoBox
24.   Signature Dropdown Choices
25.   Search Focus Dropdown
26.   Proxy Blocker
27.   Member Color Link
28.   Images on Print Page
29.   Add Honey Pot to Track IP
30.   Favicon
31.   Dynamic_Memberlist
32.   Custom Field On Posting
33.   Buddy Page
34.   Curve mobile mod
35.   Apache Error Handler
36.   Active Members In Topic
37.   Admin member list registration date
38.   Site Menu
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on January 31, 2010, 05:49:03 AM
Hmm. Can you attach your Subs-Editor.php file please? Something is breaking it - if you're an admin, allowedTo returns immediately with true without performing any other checks.
Title: Re: Moderator and Administrator Comment Tags
Post by: MaXiForum.cz on January 31, 2010, 10:22:07 AM
Nice modification Arantor!
Czech language
http://www.simplemachines.org/community/index.php?topic=301494.msg2481715#msg2481715
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on January 31, 2010, 11:40:10 AM
Thanks - I'll add that in to the next version.
Title: Re: Moderator and Administrator Comment Tags
Post by: Vyache on January 31, 2010, 01:31:28 PM
@Arantor

Here is the Sub-Editor.php file...
Title: Re: Moderator and Administrator Comment Tags
Post by: MaXiForum.cz on February 01, 2010, 05:10:33 AM
Quote from: Vyache on January 31, 2010, 01:31:28 PM
@Arantor

Here is the Sub-Editor.php file...

The modification is in the file yet installed!
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on February 01, 2010, 06:18:38 AM
Yeah, I can't see anything wrong with the code here.

Please can I have a screenshot of you as an admin on the full posting screen?
Title: Re: Moderator and Administrator Comment Tags
Post by: CoolChef on February 01, 2010, 01:56:49 PM
Quote from: live627 on January 30, 2010, 05:51:56 PM
Quote from: CoolChef on January 30, 2010, 05:45:22 PM
Quote from: live627 on January 30, 2010, 05:07:55 PM
Quote from: CoolChef on January 30, 2010, 04:01:51 PM
Quote from: Arantor on January 30, 2010, 12:38:00 AM
Quote from: CoolChef on January 29, 2010, 06:43:20 PM
I installed this on my forum running 1.1.11 and right after it was installed all i get when i try and go the the forum is Fatal error: Cannot redeclare get_mod_comment() (previously declared in /home/foodies4/public_html/foodieforum/Sources/Subs.php:3761) in /home/foodies4/public_html/foodieforum/Sources/Subs.php on line 3781 i am unable to get into the admin page to remove it or anything please help

You clicked the install button twice. You'll need to manually edit Subs.php to remove some code.

What code do i need to remove?

If you attach it I may look




I removed the extra function...

Thank You SO Much Live627 that fixed it perfectly.
Title: Re: Moderator and Administrator Comment Tags
Post by: Vyache on February 02, 2010, 11:32:25 AM
@Arantor,

Yea, it isn't. I accidentally gave you the wrong file. I reinstalled my forum and it seems to be working fine now, I guess it might of been something left over in the SQL or Permissions...

SOLVED
Title: Re: Moderator and Administrator Comment Tags
Post by: Bugo on February 21, 2010, 11:41:30 AM
Updated russian translation
Title: Re: Moderator and Administrator Comment Tags
Post by: Nick Whetstone on February 21, 2010, 12:00:16 PM
Hey everyone.

Arantor has (generously :D) given me this Modification. I will be trying my best to address any support questions, issues, and feature requests.

Thanks again, Arantor!
Title: Re: Moderator and Administrator Comment Tags
Post by: live627 on February 22, 2010, 04:11:00 PM
That's great, Ha2! Now I can stop helping people with this mod, heh :P
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on February 22, 2010, 04:55:37 PM
Thanks to both of you for taking care of it; this has been an awesome mod to be involved with during its life but it was time to let it go, I think.
Title: Re: Moderator and Administrator Comment Tags
Post by: linette97 on February 23, 2010, 08:09:12 PM
I read through all the posts, But I'm stuck on how to change the Border.. It says your "CSS file for your forum - style.css in your theme."
But where do I edit this??? I'm looking through my theme & cannot find "style.css" Using Curve Default, Please tell me step by step where do I need to go to edit this for change of border color.
Thanks all!
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on February 23, 2010, 08:11:58 PM
Use your theme's index.css instead.
Title: Re: Moderator and Administrator Comment Tags
Post by: linette97 on February 23, 2010, 08:35:18 PM
Quote from: Arantor on February 23, 2010, 08:11:58 PM
Use your theme's index.css instead.
Ok, Looking REALLY hard I see /httpdocs/Themes/default/style.css.. Is that where I edit? If so How? Because I can not find the codes mentioned in the earlier post? Or do I have to just add them? Sorry, I'm usually pretty decent in all this code stuff but this one has got me stuck. Thanks for the quick response! Please if you can just tell me exactly what I need to do again.. I would really appreciate it
Title: Re: Moderator and Administrator Comment Tags
Post by: Nick Whetstone on February 23, 2010, 08:53:06 PM
Hey,

A link to your forum would really help so I could see for myself exactly what file you need to make the edits in. Also, exact desired definitions on the new border (color, width, and whether it will be dashed or dotted) you are seeking could allow me to write the CSS for you.
Title: Re: Moderator and Administrator Comment Tags
Post by: linette97 on February 23, 2010, 09:19:26 PM
Quote from: Ha² on February 23, 2010, 08:53:06 PM
Hey,

A link to your forum would really help so I could see for myself exactly what file you need to make the edits in. Also, exact desired definitions on the new border (color, width, and whether it will be dashed or dotted) you are seeking could allow me to write the CSS for you.

Ok here is my site

I made you a member since guest do not have full access

Oh & I just want to make the border red
Title: Re: Moderator and Administrator Comment Tags
Post by: Nick Whetstone on February 23, 2010, 09:26:34 PM
Try opening /Themes/default/css/index.css and adding this to the end of it:
.mod_comment, .gmod_comment, .admin_comment
{
border-color: red;
}


You may have to clear your browser's cache.
Title: Re: Moderator and Administrator Comment Tags
Post by: linette97 on February 23, 2010, 10:00:19 PM
It worked!! Thank you so much!!
(http://i48.tinypic.com/s4117r.png)

But what if in the future, I wanted to make a background color inside the box, can that be done?
Title: Re: Moderator and Administrator Comment Tags
Post by: Nick Whetstone on February 23, 2010, 10:07:12 PM
Sure can... Try replacing the code I posted above with:
.mod_comment, .gmod_comment, .admin_comment
{
   border-color: red;
   background: yourcolorhere; /* Replace "yourcolorhere" with your desired background color ;) */
}
Title: Re: Moderator and Administrator Comment Tags
Post by: linette97 on February 23, 2010, 10:58:15 PM
Thank you so much for your help! (http://bxmedialinks.com/Smileys/BxSmileys/yourock.gif)
Title: Re: Moderator and Administrator Comment Tags
Post by: Nick Whetstone on February 23, 2010, 11:05:27 PM
No problem at all. :) If you've got more questions, feel free to ask.
Title: Re: Moderator and Administrator Comment Tags
Post by: Wiejeben on March 12, 2010, 11:20:55 AM
Can someone tell my if this is SMF 2.0 RC3 compatible ?
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on March 12, 2010, 11:27:17 AM
I don't see any reason why it shouldn't be barring a change of version tag.

Suggestion: backup forum then use the version emulate tool (Admin > Packages > Browse Packages > Advanced > enter SMF 2.0 RC2)

As far as I know it should work without any changes.
Title: Re: Moderator and Administrator Comment Tags
Post by: Nick Whetstone on March 12, 2010, 12:11:05 PM
/me updates the Mod for RC3.

Updated for RC3.
Title: Re: Moderator and Administrator Comment Tags
Post by: KensonPlays on March 12, 2010, 02:33:14 PM
Thanks Ha! When I upgrade, I will do this!
Title: Re: Moderator and Administrator Comment Tags
Post by: Pegasys on March 12, 2010, 04:04:21 PM
I installed this today on  RC3 (default curve theme)... and the permissions seem to be ignored. Even guests can see all 3 comment boxes.

* Set the permissions for globalmods and mods... and made sure the permission where not set for guests or regular members.

Anyone else having this issue or am I missing something?   

Thanks.


Title: Re: Moderator and Administrator Comment Tags
Post by: Nick Whetstone on March 12, 2010, 04:14:15 PM
Quote from: Pegasys on March 12, 2010, 04:04:21 PM
I installed this today on  RC3 (default curve theme)... and the permissions seem to be ignored. Even guests can see all 3 comment boxes.

* Set the permissions for globalmods and mods... and made sure the permission where not set for guests or regular members.

Anyone else having this issue or am I missing something?   

Thanks.




Are you saying that the guest can see the box, or that the guest can post the box? The permissions only prevent people from posting the box (using the [mod]/[gmod]/[admin] BBC), not from viewing it. :)
Title: Re: Moderator and Administrator Comment Tags
Post by: Pegasys on March 12, 2010, 06:44:29 PM
Quote from: Ha² on March 12, 2010, 04:14:15 PM
Are you saying that the guest can see the box, or that the guest can post the box? The permissions only prevent people from posting the box (using the [mod]/[gmod]/[admin] BBC), not from viewing it. :)


Hehehe... my misconception.  I misunderstood what the purpose of the comment blocks was for. The buttons are indeed hidden from those not authorized to use them.

Thanks. 



Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on March 12, 2010, 06:45:53 PM
Yeah, the idea is a big warning that makes the comments from admin/gmod/mod stand out more and makes it more 'official'.
Title: Re: Moderator and Administrator Comment Tags
Post by: Autumn13 on March 14, 2010, 11:30:10 PM
Hi there, I love this mod! I was wondering if someone could help me on putting the buttons on Quick Reply as well? I have custom themes, so if you could just tell me where in the code I should look, that would be a big help:)
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on March 14, 2010, 11:35:29 PM
Autumn13: What version of SMF?

Do you already have a mod that puts buttons in the Quick Reply area, if so which one?
Title: Re: Moderator and Administrator Comment Tags
Post by: Autumn13 on March 14, 2010, 11:41:58 PM
Aranator: 1.1.11. As for the mod to enable buttons on quick reply, it seems to be something the previous Admin before me did (in short, we are not in contact so I cannot ask). I do not see any mod installed that matches it, so I wonder if she manually created the code.

Would you like to see a list of my mods?

I really appreciate the help.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on March 15, 2010, 04:10:34 AM
A copy of Display.php and Display.template.php would be more useful than a list of mods, to be honest.
Title: Re: Moderator and Administrator Comment Tags
Post by: Autumn13 on March 16, 2010, 07:26:52 PM
I appreciate the help. I only have a Display.template.php file. I have a post.template.php, index.php and an index.template.php, would one of those be the other you may need?

I also have one more request - the [mod] tag is only availably in the Global permissions, not Local. How can I fix this so that the [mod] tag is for Local permissions? Only my Staff forums are Global, and the rest are Local, meaning my Moderators can't use it where it needs to be used the most.

Thank you so much for the help :)
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on March 16, 2010, 07:29:33 PM
Display.php is in Sources/.

As for permissions... I don't remember how I wrote that originally in 1.1 :(
Title: Re: Moderator and Administrator Comment Tags
Post by: Autumn13 on March 16, 2010, 07:50:51 PM
I did not realize about the permissions until today. Unfortunately, this is more important than having the icons in the quick reply. I have too many things set up in a particular way for me to manually change each board to Global just for this.

If I go through the manual install of this mod, I hopefully should be able to find where it sets the permissions so that I can tweak it some. Right?

I'm not sure if having the icons in quick reply will matter if my Mods can't use their mod comment outside of the Staff forums where they are doing editing, but in the hopes that I can fix it either way, here is the other file you requested.


Again, I appreciate your help immensely:)
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on March 16, 2010, 08:01:47 PM
The permission is physically added to the setup in ManagePermissions.php, so it just does whatever SMF expects it to.

From the mod's page, select 1.1.11 and Parse, that'll show you all the edits the mod makes. IIRC it's only the definition in ManagePermissions.php that would change.


/me is confused by the code you've posted with respect to quick reply, will try and take another look tomorrow morning when it's not midnight...
Title: Re: Moderator and Administrator Comment Tags
Post by: Autumn13 on March 16, 2010, 08:05:38 PM
/me thanks Aranator for being a hardworking helper, even at midnight ;)

Thank you for trying. I don't know PHP in and out, but I'm pretty good at figuring things out/troubleshooting. I did not take a look in those files you requested, so I will do so sometime this weekend, as well as check all the edits the mod makes to see if I can figure it out.

Title: Re: Moderator and Administrator Comment Tags
Post by: Autumn13 on March 21, 2010, 04:34:26 PM
Hi everyone,

I didn't work on the fast reply, but I DID fix the permissions:

./Sources/ManagePermissions.php

It says find
)
),
'board' => array(


Replace with:
),
'modtag_g' => array(
'allow_gmod_tag' => false,
'allow_admin_tag' => false,
)
),
'board' => array(


Then it has a separate one for the regular mod tag. Skip the other part and just add the mod part to the above so it looks like the following:
'modtag_g' => array(
'allow_gmod_tag' => false,
'allow_admin_tag' => false,
'allow_mod_tag' => false,
)
),



Hope that helps someone:)
Title: Re: Moderator and Administrator Comment Tags
Post by: Dallape on April 06, 2010, 09:47:17 PM
How to bold this text and change color?
(http://ultraphoto.org/images/xnd9ewzhy5t3h31ddai.png)
Title: Re: Moderator and Administrator Comment Tags
Post by: Tucayo on April 20, 2010, 09:52:41 PM
Hello, I have a problem with the tags. It appears that all users, even guests, can see them. I checked permissions, and apparently it has nothing to do with that, what may be wrong?
Title: Re: Moderator and Administrator Comment Tags
Post by: Autumn13 on April 20, 2010, 10:48:52 PM
If you have different member groups, remember to check the regular permissions for Regular Members (or it's called something like that. It is in Italics). I have found out from personal experience that that particular group may have been overlooked if all my custom member groups (Jr. Member, Sr. Member, etc) have the permissions correct.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on April 21, 2010, 06:23:02 AM
Tucayo: All users are SUPPOSED to be able to see the tag and its contents.

They're just not supposed to be able to post it in their own posts.
Title: Re: Moderator and Administrator Comment Tags
Post by: Autumn13 on April 21, 2010, 08:12:50 AM
Oh I see. I thought Tucayo meant the icons above the reply toolbox.
Title: Re: Moderator and Administrator Comment Tags
Post by: Tucayo on April 21, 2010, 03:44:22 PM
Oh, I see. I thought the tags were meant so regular users would not see them.


Thanks
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on April 21, 2010, 04:43:02 PM
No, as originally intended they're tags to make it clear that it is an 'official' response.
Title: Re: Moderator and Administrator Comment Tags
Post by: crankster on May 16, 2010, 06:10:55 PM
How can I change the colour of the " Administrator Comment " text actually all three my background is black and we cant see the text lol
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on May 16, 2010, 06:12:36 PM
QuoteFor themers: you can customise the resultant blocks by styling .admin_comment, .gmod_comment and .mod_comment respectively.

Add this to your CSS file (since I have no idea what version of SMF, I have no idea what file you should add this to)


.admin_comment, .gmod_comment, .mod_comment
{
   color:white;
}


Oh and if it's the wrong colour, sorry but you didn't tell me what colour it should be.
Title: Re: Moderator and Administrator Comment Tags
Post by: crankster on May 16, 2010, 06:17:36 PM
im using 2.0 RC3 but its on a different theme than the default..

ahh the theme is BlackBox by Crip

white is fine

thank you for the quick reply
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on May 16, 2010, 06:18:25 PM
*shrug* I have no idea what file it should be then. style.css or index.css if it exists.
Title: Re: Moderator and Administrator Comment Tags
Post by: crankster on May 16, 2010, 06:19:51 PM
index exists lol sorry
Title: Re: Moderator and Administrator Comment Tags
Post by: crankster on May 16, 2010, 06:25:54 PM
ok that changed the text colour which is fine but the acutal words " Administrator Comment " is black.... can I change that to white ?
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on May 16, 2010, 06:28:39 PM
.admin_comment, .gmod_comment, .mod_comment, .admin_comment legend, .gmod_comment legend, .mod_comment legend
{
   color:white;
}

should do it.
Title: Re: Moderator and Administrator Comment Tags
Post by: crankster on May 16, 2010, 06:32:51 PM
still black
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on May 16, 2010, 06:38:21 PM
Did you refresh it after saving the changes?
Title: Re: Moderator and Administrator Comment Tags
Post by: crankster on May 16, 2010, 06:40:04 PM
ok got it thank you so much
Title: Re: Moderator and Administrator Comment Tags
Post by: Hally_89 on May 17, 2010, 08:05:12 PM
Hi i installed this on my site but having a few small problems. Seemed to install correctly but doesnt work properly.
Pictures attached show the problems. The buttons when making a comment are a bit messed up and when you look at the topic after its missing the warning triangles. Help appreciated asap. thanks
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on May 17, 2010, 08:06:24 PM
So, 2.0 RC3 on a... custom theme?

Did you select to install on custom themes when installing? If not, you're missing some images from the mod's package that will be in the default theme's images and bbc folders.
Title: Re: Moderator and Administrator Comment Tags
Post by: Hally_89 on May 17, 2010, 08:15:00 PM
Sorry ya meant to include that. Running on RC3 and using the inferno theme. I installed the mod on the inferno theme so they should be in the right directory but just not showing up.
Title: Re: Moderator and Administrator Comment Tags
Post by: Hally_89 on May 18, 2010, 09:36:37 AM
Its ok i fixed it. I reinstalled it and that didnt work. For some reason it installs the images into the default theme so i copyed them and put them into the same folders on the inferno theme and it works now. Thanks anyway and it may be worth looking at that when you get a chance.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on May 18, 2010, 09:38:20 AM
Well, I don't even maintain this mod any longer.

But it will install to other themes if you use 2.0's Install On Other Themes option in the package manager. It cannot under any other circumstances.
Title: Re: Moderator and Administrator Comment Tags
Post by: Hally_89 on May 18, 2010, 11:45:20 AM
Ok no problem thanks
Title: Re: Moderator and Administrator Comment Tags
Post by: danng4280 on May 18, 2010, 12:17:57 PM
So if a regular user tries to use the [admin]admin[/admin] tags, it wont work, but if they use [ADMIN]ADMIN[/ADMIN] tags it will, whats up with that? This also pertains to gmod, GMOD and mod, MOD tags as well...
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on May 18, 2010, 01:01:18 PM
I see the problem, I'll even throw in a solution since it's my bug (though since I copied the SMF code for the HTML tag I figured it'd work.)

If you look at the mod's code, you'll see changes for strpos for the mod, gmod and admin tags. Change those to stripos not strpos. (This is PHP 5 only, if you need a PHP 4 version, I'd encourage you to get your host to upgrade. I can find you a PHP 4 version if needed though)
Title: Re: Moderator and Administrator Comment Tags
Post by: danng4280 on May 18, 2010, 01:18:15 PM
Thanks for the fast reply, although I am not an administrator of the forum that has the issue, I will pass on your info and solution to the admins. I will also send them here if they have any further questions.
Title: Re: Moderator and Administrator Comment Tags
Post by: danng4280 on May 18, 2010, 08:05:50 PM
Is this a correct fix?

The problem is that when the posts are scanned for the comment tags, they use the strpos() function which is case-sensitive. This needs to be replaced with the stripos() function which is case-insensitive, so the bug can no longer be exploited. Here is the code:
This is in the Subs-Post.php
// if users aren't moderators or admins, strip the [ mod ] and [ admin ] (but not the [ MOD ] or [ ADMIN ] tags!!)
if (!$previewing && stripos($parts[$i], '[mod') !== false) //HERE
{
...
}

if (!$previewing && stripos($parts[$i], '[gmod') !== false) //HERE
{
...
}

if (!$previewing && stripos($parts[$i], '[admin') !== false) //AND HERE
{
...
}


Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on May 18, 2010, 08:08:58 PM
Yup, those are the places to change.

If you get undefined function 'stripos' errors, that's because you're using PHP 4. Most hosts, thankfully, aren't now.
Title: Re: Moderator and Administrator Comment Tags
Post by: Siirist on July 18, 2010, 01:46:52 PM
Hello,  :)

Cool mod :D

We are running SMF ver2.0 RC3 AND using SMF Default Curve (which happens to be the forum's Default or we think it is (screen shot Forum-Default.jpg)

Installed with package manager and used "Install in other themes" still installed with all being "Successful"

Tested and appears to be functioning.
For your information, in our case, Guests AND others that do NOT have permission, do NOT even see the icons.

First problem = We set our testing user "Demo" to our Demo level user and assigned that user as Moderator of "Your Questions Notepad" which is located on "The Front Porch" category. As assigned moderator, Demo SHOULD see, BUT does NOT see the Moderator icon. (see screen shot Demo-is-a-Moderator.jpg and No-Mod-icon.jpg).

Second problem = Demo can see G/Mod icon because we went to permissions and were FORCED to set it up that way, (see screen shot Permissions.jpg), because the regular mod icon was not available (screen Shot No-Mod-icon.jpg).

Quote from: Arantor on September 01, 2009, 04:22:51 PM
For the border: add it to your CSS. I even left notes in the mod's description what to change.

For the ', make it \'

E.g.
$txt['tag_comment_admin'] = 'Administrator\'s Comment';

Quote from: Rohan_ on September 01, 2009, 04:36:04 PM
okay everything done .. now i didn't understand how to change the color of border

Quote from: Arantor on September 01, 2009, 04:47:21 PM
Go into your CSS file for your forum - style.css in your theme.

Try:

.admin_comment, .mod_comment {
  border-color: red;
}


Styling isn't my forte, however (which is why my dev forum is still using the default!) so maybe that needs tweaking.

Third problem = We would like to make these changes, yet there is no "style.css"
(see screen shot No-style-css.jpg)

Wanting to use the AWESOME mod!!

EDIT
To see this live, Demo's login is:
username=Demo
password=letmesee
Here is a link to Your Sanctuary (http://www.asanctuary.net/yoursanctuary/index.php)


Thank you in advance.

Will check back in an hour or two.

Be Well,
Cloud 8)
Title: Re: Moderator and Administrator Comment Tags
Post by: punjablovers on July 31, 2010, 07:37:24 AM
Images are not showing on custom theme
Title: Re: Moderator and Administrator Comment Tags
Post by: ɔɔɔɔɔɔuɥoɾ on July 31, 2010, 10:39:00 AM
Quote from: punjablovers on July 31, 2010, 07:37:24 AM
Images are not showing on custom theme
Have you copied the images into your custom themes images directory?
Title: Re: Moderator and Administrator Comment Tags
Post by: punjablovers on July 31, 2010, 03:36:31 PM
Quote from: √®╠╣∩©Ç瀫 on July 31, 2010, 10:39:00 AM
Quote from: punjablovers on July 31, 2010, 07:37:24 AM
Images are not showing on custom theme
Have you copied the images into your custom themes images directory?
How can i copy the images?
Title: Re: Moderator and Administrator Comment Tags
Post by: ɔɔɔɔɔɔuɥoɾ on July 31, 2010, 03:42:46 PM
How do I use FTP? / What is FTP? (http://docs.simplemachines.org/index.php?topic=480.0)

Copy them to your local PC, (from default theme), then copy them from your local PC to the custom theme...
Title: Re: Moderator and Administrator Comment Tags
Post by: punjablovers on August 04, 2010, 11:14:40 AM
copied the images form package images  to custom theme images folder, but still not showing,
Title: Re: Moderator and Administrator Comment Tags
Post by: xpubstargamingx on October 19, 2010, 03:46:09 PM
I installed this Mod, but the Radio buttons don't show up. They are broken images. What needs to be done to repair the images?

Thanks in advance for any support.
Title: Re: Moderator and Administrator Comment Tags
Post by: Oya on October 19, 2010, 06:51:41 PM
means you need to copy the images from themes/default/images/bbc into the images/bbc folder of your theme
Title: Re: Moderator and Administrator Comment Tags
Post by: xpubstargamingx on October 20, 2010, 09:38:14 AM
Quote from: Oya on October 19, 2010, 06:51:41 PM
means you need to copy the images from themes/default/images/bbc into the images/bbc folder of your theme

Awesome, this worked thanks. Now the only issue I am having is inside the specific post it shows as broken image. What would I need to change for this to work?

(http://img19.imageshack.us/img19/8789/captureqvd.jpg)
Title: Re: Moderator and Administrator Comment Tags
Post by: Oya on October 20, 2010, 09:51:25 AM
the mod instructions say
[quote]Move the included file "mod_tag.gif" to "./Themes/default/images".
Move the included file "admin_tag.gif" to "./Themes/default/images".
Move the included file "gmod_tag.gif" to "./Themes/default/images".


copy those three from themes/default/images to your theme's images folder
Title: Re: Moderator and Administrator Comment Tags
Post by: xpubstargamingx on October 20, 2010, 10:34:14 AM
Quote from: Oya on October 20, 2010, 09:51:25 AM
the mod instructions say
[quote]Move the included file "mod_tag.gif" to "./Themes/default/images".
Move the included file "admin_tag.gif" to "./Themes/default/images".
Move the included file "gmod_tag.gif" to "./Themes/default/images".


copy those three from themes/default/images to your theme's images folder

Thanks for the help. I love that the SMF community always helps.
Title: Re: Moderator and Administrator Comment Tags
Post by: akbora on October 20, 2010, 10:40:40 AM
There is no picture for general moderator but it is ok for only moderators and admin. Why
Title: Re: Moderator and Administrator Comment Tags
Post by: punchy on November 14, 2010, 10:45:53 AM
How can i get this to work with 2.0 RC4, just upgraded my forum only to find out this great mod don't work anymore  :-[

any ideas or will there be an upgrade soon  ;)

gerry
Title: Re: Moderator and Administrator Comment Tags
Post by: Laza on December 04, 2010, 06:57:55 AM
Moderator and Administrator Comment Tags for RC4  :)
Title: Re: Moderator and Administrator Comment Tags
Post by: Nick Whetstone on December 04, 2010, 09:21:26 PM
Quote from: Laza on December 04, 2010, 06:57:55 AM
Moderator and Administrator Comment Tags for RC4  :)
Done. :)

Version 1.8.1 Released has been released!

Changelog:
Title: Re: Moderator and Administrator Comment Tags
Post by: Laza on December 05, 2010, 06:40:55 AM
Thank you Ha²  ;)
Title: Re: Moderator and Administrator Comment Tags
Post by: RaveN7 on December 07, 2010, 10:47:26 AM
Registered users can simply edit their messages and delete the text between the tags or both - text and the tags.
Is there any way to avoid this?
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on December 21, 2010, 11:25:40 AM
ooh,  I like this.

However, the point brought up by RaveN7 is valid...   the original user can edit out the notes.
maybe set a lock which prevents a user from editing a post that has been "noted"




edit-
meh.... problem....    the moderator comment removes all carriage returns from the comment.
test
1
2
3
4
comes out as
test1234
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on December 25, 2010, 12:04:40 AM
Some of my users were commenting that they missed the old, manual mod comments because we used a different color to notate a mod comment and, despite the icon and bug around it, they were missing the mod comments......    SO...........

If you have a similar problem:

Add the following to the end of install.xml (just BEFORE the </modification> closing tag)


<file name="$themedir/css/index.css">
<operation>
<search position="before"><![CDATA[/* Fieldsets are used to group elements. */
]]></search>
<add><![CDATA[
fieldset.mod_comment
{
color: green;
font-style:italic;
}

fieldset.gmod_comment
{
color: #6363ff;
font-style:italic;
}

fieldset.admin_comment
{
color: #e74242;
font-style:italic;
}
]]></add>
</operation>
</file>


the green is the standard staff color on our boards... the gmod and admin colors match the color of the triangle warning icon.
Title: Re: Moderator and Administrator Comment Tags
Post by: KensonPlays on December 25, 2010, 04:28:00 PM
Quote from: RaveN7 on December 07, 2010, 10:47:26 AM
Registered users can simply edit their messages and delete the text between the tags or both - text and the tags.
Is there any way to avoid this?
This would be a nice feature! Please Ha2?? Thanks.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on December 25, 2010, 06:48:50 PM
Well, when I originally wrote this mod, that didn't occur to me, and implementing it is beyond complicated. Better solution, the one that I suggested, the one that Aaron's earlier modbreak mod followed... DON'T EDIT THEIR POSTS. There's no reason to edit their posts, just put it in a new post. They can't edit that!
Title: Re: Moderator and Administrator Comment Tags
Post by: KensonPlays on December 25, 2010, 10:09:53 PM
Ah, ok. I will make new posts with "@username" for notes for them. Thanks.
Title: Re: Moderator and Administrator Comment Tags
Post by: shoppy on December 31, 2010, 07:08:44 AM
Thanks very much for this great MOD.

Realy loving it.
Title: Re: Moderator and Administrator Comment Tags
Post by: stidball on January 06, 2011, 01:02:12 AM
Quote from: Kindred on December 21, 2010, 11:25:40 AM
edit-
meh.... problem....    the moderator comment removes all carriage returns from the comment.
test
1
2
3
4
comes out as
test1234

I had this problem also using SMF2 RC4. The way I fixed it was to replace the '/n' portion in Subs-Post.php


Replace this:

if (allowedTo('allow_mod_tag'))
$parts[$i] = preg_replace('~\[mod(.+?)\[/mod\]~ise', '\'[mod\' . strtr(un_htmlspecialchars(\'$1\'), array("\n" => \'&#13;\', \'  \' => \' &#32;\')) . \'[/mod]\'', $parts[$i]);


With this:

if (allowedTo('allow_mod_tag'))
$parts[$i] = preg_replace('~\[mod(.+?)\[/mod\]~ise', '\'[mod\' . strtr(un_htmlspecialchars(\'$1\'), array("<br/>" => \'&#13;\', \'  \' => \' &#32;\')) . \'[/mod]\'', $parts[$i]);





Replace this:

if (allowedTo('allow_gmod_tag'))
$parts[$i] = preg_replace('~\[gmod(.+?)\[/gmod\]~ise', '\'[gmod\' . strtr(un_htmlspecialchars(\'$1\'), array("\n" => \'&#13;\', \'  \' => \' &#32;\')) . \'[/gmod]\'', $parts[$i]);


With this:

if (allowedTo('allow_gmod_tag'))
$parts[$i] = preg_replace('~\[gmod(.+?)\[/gmod\]~ise', '\'[gmod\' . strtr(un_htmlspecialchars(\'$1\'), array("<br/>" => \'&#13;\', \'  \' => \' &#32;\')) . \'[/gmod]\'', $parts[$i]);





Replace this:
if (allowedTo('allow_admin_tag'))
$parts[$i] = preg_replace('~\[admin(.+?)\[/admin\]~ise', '\'[admin\' . strtr(un_htmlspecialchars(\'$1\'), array("\n" => \'&#13;\', \'  \' => \' &#32;\')) . \'[/admin]\'', $parts[$i]);


With this:

if (allowedTo('allow_admin_tag'))
$parts[$i] = preg_replace('~\[admin(.+?)\[/admin\]~ise', '\'[admin\' . strtr(un_htmlspecialchars(\'$1\'), array("<br/>" => \'&#13;\', \'  \' => \' &#32;\')) . \'[/admin]\'', $parts[$i]);



As you will notice all that is changed is the /n to <br/>.

After this anything you post there onwards should have spaces between lines, hope this helps.
Title: Re: Moderator and Administrator Comment Tags
Post by: kassit on January 11, 2011, 07:28:27 AM
Thanks all
everything is ok

But there are some problem :

1 : when administrator adds a tag, normal user can edit that post and remove the tag.
even the tag will be remove just when normal user edit the post.

2 : you can't understand which moderator has added this tag. simply i can write a wrong name in tag as description

3 : a moderator can delete a tag that has been inserted by administrator.

4 : it was better to add new tags by administrator and you were not forced to use just 3 tags

are you going to solve this problems ?
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on January 11, 2011, 07:42:42 AM
yes yes and yes...   so what?   The mod never claims to be anything other than it is.

"fixing" item 1 would be difficult at best.
item 2 could be updated, but if you can't trust your mods and admins, why are they mods and admins?
item 3, see item 1 and 2.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on January 13, 2011, 01:48:12 PM
Speaking as the original author of this mod:

These aren't problems, not really, and you don't need a technical solution to solve a user stupidity problem.

1. Don't edit their post, then. Make a new one where the user can't edit it. This has been said before, more than once, even in the last page or so.

2 & 3. As Kindred said. If they can't be trusted, demote them. The more complex you make something to make it more idiot proof, a better idiot comes along.
Title: Re: Moderator and Administrator Comment Tags
Post by: kassit on January 15, 2011, 08:25:03 AM
Dear Arantor

tagging is always used to preventing of making new post. by posting new one, you don't need a tagging system.
It's not so logical to say : Just don't do that

It's not the matter that moderators are trusted or not. A big website may have a lot of experts and moderators.
All moderators are tagging posts and Administrator couldn't ask all of them to know which one has tagged this post.
Also i couldn't say them to always write their name. It's like saying members to write their name where posting.

Dear Kindred

Item 1 is not so hard as you said. ;)
You can just trying to parse the content of a post before showing it. if there is a tag that the current user has not permission to access it, temporarily remove it from edit area and store it in the hidden field. then it will be post to server when saving and you can add it again.

That simple
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on January 15, 2011, 08:46:01 AM
Lol...  That simple??

You are funny...  So, rewrite the entire post display function because you can not trust you mod staff?no offense, but if it is so simple, then go ahead and do it yourself?  The mod author has already indicated no....
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on January 15, 2011, 12:25:05 PM
Quotetagging is always used to preventing of making new post. by posting new one, you don't need a tagging system.
It's not so logical to say : Just don't do that

How is it not logical to say "Just don't do that." Again, if you don't trust your moderators, don't make them moderators!

QuoteAlso i couldn't say them to always write their name. It's like saying members to write their name where posting.

That's why you make them write a new post which will have their name against it. Like every member's post does! It's automatic.

QuoteYou can just trying to parse the content of a post before showing it. if there is a tag that the current user has not permission to access it, temporarily remove it from edit area and store it in the hidden field. then it will be post to server when saving and you can add it again.

Really, uh huh. So let me get this straight, you want to rewrite the single largest, single slowest, single most complex part of SMF, just because you can't manage your moderators effectively.
Title: Re: Moderator and Administrator Comment Tags
Post by: kassit on January 16, 2011, 02:34:11 AM
Dear Arantor and Kindred

I don't understand why you are challenging me just for suggesting a solution.
Ok, i forbear, do what you like.

i had changed that myself in my local system so easily and will be upload so soon in our online forum.
i just thought you may want to develop your mod but seems i was wrong.

Good Luck
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on January 16, 2011, 04:35:06 AM
I'm challenging you because I wrote this mod originally and am only too aware of how complex the suggestion you're proposing is, not to mention how much slower it will make the forum, assuming it's done properly (since there are so many ways to affect what you're talking about, that you probably aren't even aware of)
Title: Re: Moderator and Administrator Comment Tags
Post by: kassit on January 16, 2011, 07:26:43 AM
I had changed it myself and will publish it after some necessary changes.

I don't know how did you understand that i'm not aware of things that you mentioned but it's not so important.
I will send you changes although you behave so bad.
then you can see that things are so easier than what you think sometimes.

Don't attack others just because you think they don't know. Maybe you don't know.

End of my participation
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on January 16, 2011, 10:47:30 AM
I didn't mean to come out so aggressively, and for that I'm sorry.

But parse_bbc is the single most complex function in SMF, making changes to it is not a trivial process because of all the different times, different ways, different routes to which it can be called, and any change to it will invariably have consequences that you won't be aware of. I'm not saying that I would necessarily be aware of all of them, but having worked with the SMF code virtually full time for the last 18 months or so, I'm well aware of how fragile it can be at times. This is one of those times.

It's not just called with posts, it's called for signatures, it's called for entries in the moderation centre, it's called for newsletters, the news function, and myriad other places, so for which there won't necessarily be an 'owner' of the content to check against, and checking against the current user's id (as many people seem to think will solve the problem) won't do it either, unless you check it at creation time, though that's not always possible either.
Title: Re: Moderator and Administrator Comment Tags
Post by: geoffers on March 23, 2011, 04:15:38 PM

I love this mod, have always found it really useful and like it just the way it is, so many thanks :)

Will it be updated for RC 5 ?
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on March 23, 2011, 04:29:18 PM
works fine for me on RC5 already....   just use the emulate function down at the bottom of the package manager screen
Title: Re: Moderator and Administrator Comment Tags
Post by: geoffers on March 23, 2011, 07:04:26 PM
 
Quote from: Kindred on March 23, 2011, 04:29:18 PM
works fine for me on RC5 already....   just use the emulate function down at the bottom of the package manager screen

D'oh! - missed that - many thanks :)
Title: Re: Moderator and Administrator Comment Tags
Post by: Cal O'Shaw on June 24, 2011, 02:16:27 AM
Will this excellent MOD be updated formally to 2.0?

Grazie,

Cal
Title: Re: Moderator and Administrator Comment Tags
Post by: Cal O'Shaw on June 24, 2011, 06:18:22 PM
Hello,

I tried to use Kindred's suggestions to edit the (theme)/css/index.css to make the comments stand out a bit more.

Unfortunately, I've tried to edit the file manually and had no success.

Any suggestions would be most welcome!

Grazie,

Cal
Title: Re: Moderator and Administrator Comment Tags
Post by: Siirist on June 29, 2011, 12:43:34 PM
Quote from: Cal O'Shaw on June 24, 2011, 02:16:27 AM
Will this excellent MOD be updated formally to 2.0?

Grazie,

Cal

Hi,  :)

Same question.
Tried to parse, but not compatible.  :(
Update for ver 2.0 Final "soon"?  :P

Thanks,
Cloud  8)
Title: Re: Moderator and Administrator Comment Tags
Post by: Jessica. on June 29, 2011, 01:22:18 PM
this works perfectly in 2.0! thanks ^_^
Title: Re: Moderator and Administrator Comment Tags
Post by: Siirist on June 29, 2011, 01:48:48 PM
Quote from: Jessica. on June 29, 2011, 01:22:18 PM
this works perfectly in 2.0! thanks ^_^

Wait What???!!! :o

It won't parse for SMF ver 2.0 Final,
I downloaded any way and tried install and got the attached screen shot.

Cloud 8)
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on June 29, 2011, 02:03:40 PM
Use the "advanced" link at the bottom of the packages list....    set it to a version which this does work for (e.g. 2.0 RC3)
Title: Re: Moderator and Administrator Comment Tags
Post by: Siirist on June 29, 2011, 02:29:37 PM
Quote from: Kindred on June 29, 2011, 02:03:40 PM
Use the "advanced" link at the bottom of the packages list....    set it to a version which this does work for (e.g. 2.0 RC3)

Hi Kindred,  :)

I went to the package manager,
went to bottom right of page,
clicked on advanced, 2.0 was default,
clicked on apply.
No "Install Mod" present.
Tried to Upload again.
Got message "File exists, Delete before uploading",
deleted file.
Uploaded file,
got
"The file is either corrupted or is incompatible with this version of SMF"
???
I attached screen shots

Thanks, ;)
Cloud


UPDATE: Forgot the screen shots here they are
Title: Re: Moderator and Administrator Comment Tags
Post by: Spoogs on June 29, 2011, 02:35:50 PM
Quote from: A_Survivor on June 29, 2011, 02:29:37 PM
Quote from: Kindred on June 29, 2011, 02:03:40 PM
Use the "advanced" link at the bottom of the packages list....    set it to a version which this does work for (e.g. 2.0 RC3)

Hi Kindred,  :)

I went to the package manager,
went to bottom right of page,
clicked on advanced, 2.0 was default,
clicked on apply.
No "Install Mod" present.
Tried to Upload again.
Got message "File exists, Delete before uploading",
deleted file.
Uploaded file,
got
"The file is either corrupted or is incompatible with this version of SMF"
???
I attached screen shots

Thanks, ;)
Cloud


Quote from: Kindred on June 29, 2011, 02:03:40 PM
...set it to a version which this does work for (e.g. 2.0 RC3)

Title: Re: Moderator and Administrator Comment Tags
Post by: Jessica. on June 29, 2011, 03:24:48 PM
Quote from: A_Survivor on June 29, 2011, 01:48:48 PM
Quote from: Jessica. on June 29, 2011, 01:22:18 PM
this works perfectly in 2.0! thanks ^_^

Wait What???!!! :o

It won't parse for SMF ver 2.0 Final,
I downloaded any way and tried install and got the attached screen shot.

Cloud 8)


as two other people said, emulate it using "Advanced". emulate it to RC4 (Put in SMF 2.0 RC4), I did that and was able to install it
Title: Re: Moderator and Administrator Comment Tags
Post by: snooks on June 29, 2011, 06:04:16 PM
Question, is it possible to edit lets say [mod] to [custom name] for example i don't use mod on my site just a globe mod but got other uses
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on June 29, 2011, 06:31:45 PM
modify modifications.english.php
Title: Re: Moderator and Administrator Comment Tags
Post by: Siirist on June 29, 2011, 07:04:22 PM
Quote from: Kindred on June 29, 2011, 02:03:40 PM
Use the "advanced" link at the bottom of the packages list....    set it to a version which this does work for (e.g. 2.0 RC3)


UPDATE: Functions normally in SMF ver 2.0 Final ~ All I had to do was follow instructions.

Thanks Kindred!

Be Well,
Cloud  8)
Title: Re: Moderator and Administrator Comment Tags
Post by: sdkid on August 07, 2011, 03:31:20 PM
Very Simple Question:

What CSS edits do I need to make to change the color of the text in the Title box that is generated?
(like "Administrator Comment" or "Global Moderator Comment" )

I can not find where it is pulling style info....

(PS:  also running 2.0Gold just fine.  Emulation worked like a charm! 8) )
Title: Re: Moderator and Administrator Comment Tags
Post by: Siirist on August 08, 2011, 01:01:38 AM
Quote from: sdkid on August 07, 2011, 03:31:20 PM
Very Simple Question:

What CSS edits do I need to make to change the color of the text in the Title box that is generated?
(like "Administrator Comment" or "Global Moderator Comment" )

I can not find where it is pulling style info....

(PS:  also running 2.0Gold just fine.  Emulation worked like a charm! 8) )

sdkid,

Simple answer.

Use [color=color name goes here (yellow, blue, or red] Text (will be the correct color)[/color]

I agree that you have to do this each time, HOWEVER, the thought is that you should only use the Mod Comment Mod to correct your members as little as possible.  O:)

Cloud  8)


Here's a link to see an example on the test forum (http://www.asanctuary.net/TEST_FORUM/index.php?topic=2.0)
Title: Re: Moderator and Administrator Comment Tags
Post by: Cal O'Shaw on August 08, 2011, 07:52:06 PM
Under 1.1 this MOD uses a CSS to set font, color, size, etc.  That is missing in the 2.0 version.

Sure, one could go back into stuffing a bunch of BB codes each and every time mod, gmod, or admin are used.  But losing the formatting that makes these comments stand out and requiring my moderators to have to add a bunch of codes (which they will not remember to do) does not seem ideal.

If it's not possible to use CSS, would it at least be possible to add an AdminCP panel to feed formatting attributes to each of the tags?

Thanks,

Cal
Title: Re: Moderator and Administrator Comment Tags
Post by: Yukino on August 10, 2011, 02:25:08 AM
Hi,

First of all, I love this mod. It is really helpful :)

Now for the question. I would just like to make sure if the mod really strips the formatting inside the the tags? Like the line breaks, or even listing. Because when I recently updated to SMF 2.0 final and updated the mod as well, it now strips those.

If it shouldn't be doing that, what could've made it work that way? Is installing it as emulating SMF 2.0 RC5 be the culprit?

Thanks!
Title: Re: Moderator and Administrator Comment Tags
Post by: sdkid on August 10, 2011, 07:03:49 PM
I am not talking about the color of the COMMENT itself--- I am talking about the LABEL of the box (Administrator Comment, or Global Moderator Comment)  that surrounds the individual comments.  The formatting of that LABEL is coming from somewhere in css....but where?  I have a dark forum-- and the text LABEL is very dark.  The text INSIDE the tags appears just fine
Title: Re: Moderator and Administrator Comment Tags
Post by: live627 on August 10, 2011, 08:38:37 PM
If you look  through the code when parsed through the mod site, does it tell you anything, like where to look?
Title: Re: Moderator and Administrator Comment Tags
Post by: Yukino on August 12, 2011, 06:40:19 AM
I would like to follow up on my question. I realized the tag works like a noBBC tag.

I need the tag to parse the formatting of the text in it, as we are using it as official notices and what not to make it easier to read. Is there a way to do that?
Title: Re: Moderator and Administrator Comment Tags
Post by: sdkid on August 14, 2011, 02:47:03 PM
Quote from: live627 on August 10, 2011, 08:38:37 PM
If you look  through the code when parsed through the mod site, does it tell you anything, like where to look?

No clue--  it is using some css code that is already there-- I just don't know what it is.  If I knew it was using the .catbg3 title css, for example, I could make the change I want.  I just can't figure out what setting in CSS it is actually using.
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on August 14, 2011, 07:19:22 PM
Firebug is your friend to help you figure out css
Title: Re: Moderator and Administrator Comment Tags
Post by: sdkid on September 05, 2011, 05:22:46 PM
Quote from: sdkid on August 14, 2011, 02:47:03 PM
Quote from: live627 on August 10, 2011, 08:38:37 PM
If you look  through the code when parsed through the mod site, does it tell you anything, like where to look?

No clue--  it is using some css code that is already there-- I just don't know what it is.  If I knew it was using the .catbg3 title css, for example, I could make the change I want.  I just can't figure out what setting in CSS it is actually using.
Found it in CSS around line 170:

fieldset legend
{
font-weight: bold;
color: #whateveryouwant;
}
Title: Re: Moderator and Administrator Comment Tags
Post by: Geor'G on October 22, 2011, 03:48:24 PM
Arouse to start

Quote[mod=<script>alert(hi admin)</script>]<script>alert()</script>[/mod]
[gmod=<script>alert(hi admin)</script>]<script>alert()</script>[/gmod]
[admin=<script>alert(hi admin)</script>]<script>alert()</script>[/admin]


Realy so must be?

Run - Opera, Chrome
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on October 22, 2011, 10:20:18 PM
Huh?  ...???
Title: Re: Moderator and Administrator Comment Tags
Post by: Hackathon on October 25, 2011, 11:51:26 AM
Is it possible to add a tag for additional member groups? e.g. Guru I wanna add [guru] tag for them to use.
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on October 25, 2011, 11:56:25 AM
anything is possible, you just have to re-code it....

in other words - yes, but you would have to code in the additional group
Title: Re: Moderator and Administrator Comment Tags
Post by: Hackathon on October 26, 2011, 08:43:51 AM
that's the thing, I'm not a good coder..  :(
Title: Re: Moderator and Administrator Comment Tags
Post by: chinaren on November 30, 2011, 10:45:33 PM
Quote from: Hackathon on October 26, 2011, 08:43:51 AM
that's the thing, I'm not a good coder..  :(


Ironic considering your username.   Sorry Off topic.  :-X
Title: Re: Moderator and Administrator Comment Tags
Post by: luuuciano on December 02, 2011, 07:32:29 AM
spanish utf8 language strings are not real utf8
Title: Re: Moderator and Administrator Comment Tags
Post by: bakabandit on February 04, 2012, 08:03:44 AM
Hi

I installed this mod on smf 2.0.2 and it's great, work perfectly. But! In membergroups I added new group called ModeratoR, because i want to add som new premissions fore moderators...

In standard membergroup Moderator i see premission Moderate tag controls/Allow this user to use [mod] ?, but in mine new created  ModeratoR gorup i don't see this premmision.

Please help me to add this premission to my newlly created group. Thanks in forward...  ;)
Title: Re: Moderator and Administrator Comment Tags
Post by: tommygurns on June 26, 2012, 06:16:27 PM
Quick question,

How would I go about changing Global Moderator Comment to Super Moderator comment? And how would I go about changing the box outline to red?

Thanks.
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on June 26, 2012, 07:13:15 PM
the outline is handled in the CSS file (I suggest that you use firefox+firebug - it's a very useful tool to find the correct CSS items)

The text is either handled in modifications.english.php or directly in subs.php
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on June 26, 2012, 07:37:44 PM
As mentioned in the very first post (and the mod's page)

QuoteFor themers: you can customise the resultant blocks by styling .admin_comment, .gmod_comment and .mod_comment respectively.

That's the CSS that would have to be changed, specifically the .gmod_comment code.
Title: Re: Moderator and Administrator Comment Tags
Post by: JeneeB53 on August 22, 2012, 07:26:30 PM
Quote from: bakabandit on February 04, 2012, 08:03:44 AM
I installed this mod on smf 2.0.2 and it's great, work perfectly. But! In membergroups I added new group called ModeratoR, because i want to add som new premissions fore moderators...

I attempted to install on 2.0.2 and got an error that it was not compatible.  Did you manually install it?
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on August 22, 2012, 09:27:46 PM
use emulation....
Title: Re: Moderator and Administrator Comment Tags
Post by: JeneeB53 on September 05, 2012, 07:50:00 PM
Thanks Kindred -I have been trying to avoid doing that because (1) I don't know what emulation actually does, and (2) I didn't know how to do it. Past tense. I figured it out and it didn't break my test forum so I went ahead and installed it on my live site. It's a good mod and will hopefully help to make things clearer to members. Many thanks to those who have worked on it over the years!!
Title: Re: Moderator and Administrator Comment Tags
Post by: 6Dasher on November 02, 2012, 04:19:31 PM
Any chance of an update to 2.0.2 ?
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on November 02, 2012, 05:07:58 PM
it works just fine on 2.0.2.  Just use emulation
Title: Re: Moderator and Administrator Comment Tags
Post by: xbc971 on November 11, 2012, 10:40:05 AM
Quote from: Kindred on November 02, 2012, 05:07:58 PM
it works just fine on 2.0.2.  Just use emulation

What kind of an emulation I'm with 2.0.2 and I really want to use this mod and I don't have any clue how to "emulate" it.
Title: Re: Moderator and Administrator Comment Tags
Post by: 6Dasher on April 22, 2013, 10:49:44 AM
Dooooh!!!

It works.
Title: Re: Moderator and Administrator Comment Tags
Post by: LittleKatarina. on May 11, 2013, 02:05:35 PM
I tried to install this mod,but nothing..
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.
Forum Version is 2.0.4
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on May 11, 2013, 02:16:38 PM
How can I install a mod that doesn't work in my SMF version? (http://wiki.simplemachines.org/smf/How_can_install_a_mod_that_doesn%27t_work_in_my_SMF_version)
Title: Re: Moderator and Administrator Comment Tags
Post by: LittleKatarina. on May 12, 2013, 12:39:09 PM
Quote from: Arantor on May 11, 2013, 02:16:38 PM
How can I install a mod that doesn't work in my SMF version? (http://wiki.simplemachines.org/smf/How_can_install_a_mod_that_doesn%27t_work_in_my_SMF_version)


Yes.I know,thank you! 8)
Look now (http://www.dodaj.rs/f/1p/VA/2brOXwKs/slika.png)
What is problem?How can I fix that?  :)
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on May 12, 2013, 01:05:47 PM
As per the mod's page, three files get added to the Themes/default/images/bbc folder, you need to put these in Themes/yourtheme/images/bbc as well.
Title: Re: Moderator and Administrator Comment Tags
Post by: LittleKatarina. on May 15, 2013, 04:31:10 PM
Quote from: Arantor on May 12, 2013, 01:05:47 PM
As per the mod's page, three files get added to the Themes/default/images/bbc folder, you need to put these in Themes/yourtheme/images/bbc as well.

Thanks a lot! 8)
Title: Re: Moderator and Administrator Comment Tags
Post by: lpfacun on June 19, 2013, 05:39:09 AM
Please update I can't install on version 2.0.4
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on June 19, 2013, 07:04:27 AM
it works fine on 2.0.4

http://wiki.simplemachines.org/smf/How_can_I_install_a_mod_that_doesn%27t_work_in_my_SMF_version
Title: Re: Moderator and Administrator Comment Tags
Post by: Shambles on June 19, 2013, 07:56:25 AM
Could someone "with the power" remove the "solved" (http://media.simplemachinesweb.com/smf/default/images/post/solved.gif) from this support thread? I tend to skim over threads marked as such :)

Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on June 19, 2013, 09:03:43 AM
huh?   this is a mod thread... there is no "solved"

-edit - it looks liek the original author used the standard icon selection....
Title: Re: Moderator and Administrator Comment Tags
Post by: Westwegoman on July 18, 2013, 01:02:23 AM
I can also confirm that this works fine on 2.0.4. Just use emulate. :)

Title: Re: Moderator and Administrator Comment Tags
Post by: simplebeer on December 15, 2013, 05:33:08 AM
Hello All,

I wonder if it is possible to have more green modtags in the post template.

I think it's difficult to discribe, but please look at my image.

What i want is that normal moderators have 5 green buttons, each button for a different standard moderator comment.

Can anybody tell me what i must add to the html? Try different things like add more

'if($modtag)
$context['bbc_tags'][$last]['mod'] = array('code' => 'mod', 'before' => '[mod]', 'after' => '[/mod]', 'description' => $txt['tag_comment_mod']);


in the post.template , but works not as good as i hope  :-X

Thanks!
Title: Re: Moderator and Administrator Comment Tags
Post by: simplebeer on December 15, 2013, 06:11:15 AM
Just found out if i add a extra line with ['mod2']

Quote$context['bbc_tags'][$last]['mod2'] = array('code' => 'mod', 'before' => '[mod]', 'after' => '[/mod]', 'description' => $txt['tag_comment_mod']);
         if($gmodtag)

and also add a mod2.gif it is working.

now i have to find out how to change the text  ;D
Title: Re: Moderator and Administrator Comment Tags
Post by: simplebeer on December 15, 2013, 06:45:04 AM
Ok done, for anyone who is interested.

Add as many of these line's you want and change the ['mod'] in for example ['mod2'] ['mod2'].....etc

Quote$context['bbc_tags'][$last]['mod2'] = array('code' => 'mod', 'before' => '[mod]', 'after' => '[/mod]', 'description' => $txt['tag_comment_mod']);
         if($gmodtag)

$context['bbc_tags'][$last]['mod3'] = array('code' => 'mod', 'before' => '[mod]', 'after' => '[/mod]', 'description' => $txt['tag_comment_mod']);
         if($gmodtag)
And don't forget to add as many mod2.gif, mod3.gif....etc as you add lines!

You can type standard tekst here:

Quote$context['bbc_tags'][$last]['mod2'] = array('code' => 'mod', 'before' => '[mod]you can add here', 'after' => '[/mod]', 'description' => $txt['tag_comment_mod']);
         if($gmodtag)

$context['bbc_tags'][$last]['mod3'] = array('code' => 'mod', 'before' => '[mod]you can add here something else ', 'after' => '[/mod]', 'description' => $txt['tag_comment_mod']);
         if($gmodtag)

Now it wil work, but of course i want to help the moderators, it should be easy if they can see which buttons do what if they touch it with the cursor.

So i also change the ['tag_comment_mod'] to ['tag_comment_mod2'] , ['tag_comment_mod3']....etc

Quote$context['bbc_tags'][$last]['mod2'] = array('code' => 'mod', 'before' => '[mod]you can add here', 'after' => '[/mod]', 'description' => $txt['tag_comment_mod2']);
         if($gmodtag)

$context['bbc_tags'][$last]['mod3'] = array('code' => 'mod', 'before' => '[mod]you can add here something else', 'after' => '[/mod]', 'description' => $txt['tag_comment_mod3']);
         if($gmodtag)

After that go to the ./Themes/default/languages/Modifications.english.php

and add extra $txt['tag_comment_mod'] = ' lines

Quote$txt['tag_comment_mod'] = 'youre moderator comment for helping mod 1 ';
$txt['tag_comment_mod2'] = 'youre moderator comment for helping mod 2';
$txt['tag_comment_mod3'] = 'youre moderator comment for helping mod 3';


Ok that's it i think!

Or do i forget anything? permissions appear to be good  ::)
Title: Re: Moderator and Administrator Comment Tags
Post by: Ninja ZX-10RR on October 22, 2014, 09:37:43 AM
Aaaaand I managed to break it XD
If somebody that is NOT an admin or a global mod etc has his post edited by someone with permission to add those commands and then he tries to quickly-edit his reply without removing the tag he just can't edit the command but if he goes into the actual post screen and tries to post you get a database error in the error log.

Quote
Type of error: Database
URLhttp://vige.altervista.org/forum/index.php?action=jsmodify;topic=84;c6275ebdef=4600ccf29079e457e6c75ef44e91e72a;xml
Database Error: Unknown column 'mem.posts' in 'field list'
File: /Sources/Post.php
Line: 2856

Also no clues of the reason why it is not really "Database Error" but that piece of report is in Italian while everything else is set to English..... Wtf....

Anyway I hope you will still follow this up even if it was a long time ago... You could either kill the error or call a new function pointing to an error popping out when somebody tries to edit a comment edited by an admin or global mod etc.

Thanks in advance, eventually :)
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on October 22, 2014, 10:25:15 AM
Please attach your Post.php.

I don't remember the query involved... but I have a feeling this mod isn't it because I don't recall it using queries to get post count. At least... I don't remember writing it to use that.
Title: Re: Moderator and Administrator Comment Tags
Post by: Ninja ZX-10RR on October 22, 2014, 10:31:25 AM
Idk how I could forget about attaching the file... That's probably what doing multiple things at the same time does... Anyway there it is :)
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on October 22, 2014, 03:07:48 PM
As suspected this is nothing whatsoever to do with this mod.

Something else has broken that post query; gut instinct says it's the Anti Spam Links mod if that's installed since the query on line 2856 is not touched by the mod (as verifiable from this mod's parse page)
Title: Re: Moderator and Administrator Comment Tags
Post by: Ninja ZX-10RR on October 22, 2014, 03:11:45 PM
Then why does this happen ONLY while editing posts including these tags?
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on October 22, 2014, 03:13:44 PM
Considering the query would be run on *any* quick modify call and doesn't do a proper join to the members table (thus mem.posts is never defined)...?

*shrug* Whatever. It is not the problem of this mod, seeing how the mod does not modify Post.php.

$request = $smcFunc['db_query']('', '
SELECT
t.locked, t.num_replies, t.id_member_started, t.id_first_msg, t.add_authors, t.is_sticky,
m.id_msg, m.id_member, m.poster_time, m.subject, m.smileys_enabled, m.body, m.icon,
m.modified_time, m.modified_name, m.approved, IFNULL(mem.posts, 0) AS postcount, IFNULL(m.id_member, 0) AS poster_id
FROM {db_prefix}messages AS m
INNER JOIN {db_prefix}topics AS t ON (t.id_topic = {int:current_topic})
WHERE m.id_msg = {raw:id_msg}
AND m.id_topic = {int:current_topic}' . (allowedTo('approve_posts') ? '' : (!$modSettings['postmod_active'] ? '
AND (m.id_member != {int:guest_id} AND m.id_member = {int:current_member})' : '
AND (m.approved = {int:is_approved} OR (m.id_member != {int:guest_id} AND m.id_member = {int:current_member}))')),
array(
'current_member' => $user_info['id'],
'current_topic' => $topic,
'id_msg' => empty($_REQUEST['msg']) ? 't.id_first_msg' : (int) $_REQUEST['msg'],
'is_approved' => 1,
'guest_id' => 0,
)
);


This is not standard - and is not changed by the installer as can be verified by anyone here.
Title: Re: Moderator and Administrator Comment Tags
Post by: Ninja ZX-10RR on October 22, 2014, 03:24:23 PM
And that's ok to me but still the question remains - why does it happen only with messages containing these tags? It's ok that the error is not from this mod but then what should I do to fix it or who should I ask about? The anti spam links mod author perhaps? I don't quite get it, sorry :/
EDIT: oh lol the author is smf cust team... And the mod is actually installed here too IIRC...
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on October 22, 2014, 03:48:57 PM
It's not the same mod as installed here. I would double check the installation instructions. Odds are one of your other mods clashes somewhere.
Title: Re: Moderator and Administrator Comment Tags
Post by: Ninja ZX-10RR on October 22, 2014, 04:34:30 PM
Indeed. I tried it in a clean install and it works without the error but... You know what? I will keep it like this and the reason is quite simple: if someone tries to edit the admin comment I get notified for free XD *evilface*
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on October 22, 2014, 04:35:51 PM
And if they try to edit the admin comment, it's going to fail on them afterwards which is why if you read the thread the advice has always been: put your admin comments in their own post where they can't be edited by unauthorised users anyway.
Title: Re: Moderator and Administrator Comment Tags
Post by: Ninja ZX-10RR on October 22, 2014, 04:40:44 PM
*like button pressed*
Thanks :)
Title: Re: Moderator and Administrator Comment Tags
Post by: Humphr3y on November 29, 2014, 03:19:32 AM
I'm testing this mod at the moment and it looks great :)

Just one thing. I just find out that any user can use the mod tags while writing their PMs. Is there a way to avoid it?
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on November 29, 2014, 08:54:30 AM
Tell your users not to do it, and issue warnings if they don't behave?
Title: Re: Moderator and Administrator Comment Tags
Post by: Ninja ZX-10RR on November 29, 2014, 10:34:27 AM
Fixing the mod code instead?
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on November 29, 2014, 10:44:22 AM
Not all end cases require technical solutions. I don't understand why this 'every possible edge case must be fixed with a code solution' mentality is so prevalent. You cannot fix user idiocy or users being deliberately irritating to each other by way of code.

The permissions should still work regardless, though. They certainly did when I originally wrote this mod like 5 years ago. And on an otherwise unmodified 2.0.9 + this mod it seems to work properly for me...

The PM code flow is strange, but preparsecode still gets called and the permissions checks should still be run even in that situation. It just gets called later.
Title: Re: Moderator and Administrator Comment Tags
Post by: Ninja ZX-10RR on November 29, 2014, 11:35:53 AM
Lol you talk about fixing edge cases and you are always concerned about them when you write code... I don't quite get it. Whatever.
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on November 29, 2014, 11:37:04 AM
Like you even know what I mean by 'edge cases'.
Title: Re: Moderator and Administrator Comment Tags
Post by: Ninja ZX-10RR on November 29, 2014, 11:58:18 AM
That's your thought. Arguing is quite useless, you can either fix the code or leave it there but I have better things to do than arguing about this.
Title: Re: Moderator and Administrator Comment Tags
Post by: Paracelsus on February 10, 2015, 06:42:07 PM
Guys, emulating this one isn't working for me, I don't get the install mod option, just list files and delete.
Title: Re: Moderator and Administrator Comment Tags
Post by: luuuciano on February 11, 2015, 08:50:30 AM
Quote from: Paracelsus on February 10, 2015, 06:42:07 PM
Guys, emulating this one isn't working for me, I don't get the install mod option, just list files and delete.

How you emulate it? maybe you are writing it wrong
Title: Re: Moderator and Administrator Comment Tags
Post by: Paracelsus on February 11, 2015, 09:38:00 AM
Quote from: luuuciano on February 11, 2015, 08:50:30 AM
Quote from: Paracelsus on February 10, 2015, 06:42:07 PM
Guys, emulating this one isn't working for me, I don't get the install mod option, just list files and delete.

How you emulate it? maybe you are writing it wrong

Forget it luuuciano, I was emulating it wrong. Installation went fine after that.
Title: Re: Moderator and Administrator Comment Tags
Post by: Paracelsus on March 14, 2015, 03:33:24 AM
Quote from: Yukino on August 10, 2011, 02:25:08 AM
Hi,

First of all, I love this mod. It is really helpful :)

Now for the question. I would just like to make sure if the mod really strips the formatting inside the the tags? Like the line breaks, or even listing. Because when I recently updated to SMF 2.0 final and updated the mod as well, it now strips those.

If it shouldn't be doing that, what could've made it work that way? Is installing it as emulating SMF 2.0 RC5 be the culprit?

Thanks!

Having recently installed the mod on SMF 2 I notice the same thing with line breaks... They don't exist inside the comment tag. There's a workaround though, to use the [ br ] bbcode tag, it creates the desired line break.
Title: Re: Moderator and Administrator Comment Tags
Post by: simplebeer on April 30, 2015, 03:54:41 AM
I see this isn't compatible with 2.0.10 right? Will it be soI use this on 1.1.21 and want to update tot 2.0.10....

Thanks...
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on April 30, 2015, 06:44:09 AM
this is compatible  with 2.0.10
Almost any mod for 2.0.x will work with any other 2.0.x
Title: Re: Moderator and Administrator Comment Tags
Post by: Empire KickAss on June 05, 2015, 10:38:11 PM
Quote from: simplebeer on December 15, 2013, 06:45:04 AM
Ok done, for anyone who is interested.

Add as many of these line's you want and change the ['mod'] in for example ['mod2'] ['mod2'].....etc

Quote$context['bbc_tags'][$last]['mod2'] = array('code' => 'mod', 'before' => '[mod]', 'after' => '[/mod]', 'description' => $txt['tag_comment_mod']);
         if($gmodtag)

$context['bbc_tags'][$last]['mod3'] = array('code' => 'mod', 'before' => '[mod]', 'after' => '[/mod]', 'description' => $txt['tag_comment_mod']);
         if($gmodtag)
And don't forget to add as many mod2.gif, mod3.gif....etc as you add lines!

You can type standard tekst here:

Quote$context['bbc_tags'][$last]['mod2'] = array('code' => 'mod', 'before' => '[mod]you can add here', 'after' => '[/mod]', 'description' => $txt['tag_comment_mod']);
         if($gmodtag)

$context['bbc_tags'][$last]['mod3'] = array('code' => 'mod', 'before' => '[mod]you can add here something else ', 'after' => '[/mod]', 'description' => $txt['tag_comment_mod']);
         if($gmodtag)

Now it wil work, but of course i want to help the moderators, it should be easy if they can see which buttons do what if they touch it with the cursor.

So i also change the ['tag_comment_mod'] to ['tag_comment_mod2'] , ['tag_comment_mod3']....etc

Quote$context['bbc_tags'][$last]['mod2'] = array('code' => 'mod', 'before' => '[mod]you can add here', 'after' => '[/mod]', 'description' => $txt['tag_comment_mod2']);
         if($gmodtag)

$context['bbc_tags'][$last]['mod3'] = array('code' => 'mod', 'before' => '[mod]you can add here something else', 'after' => '[/mod]', 'description' => $txt['tag_comment_mod3']);
         if($gmodtag)

After that go to the ./Themes/default/languages/Modifications.english.php

and add extra $txt['tag_comment_mod'] = ' lines

Quote$txt['tag_comment_mod'] = 'youre moderator comment for helping mod 1 ';
$txt['tag_comment_mod2'] = 'youre moderator comment for helping mod 2';
$txt['tag_comment_mod3'] = 'youre moderator comment for helping mod 3';


Ok that's it i think!

Or do i forget anything? permissions appear to be good  ::)

This option does not help.. so Can you help me to get it to work, I add the code and the tag shows but [lock][/lock] that what I get so fair
Title: Re: Moderator and Administrator Comment Tags
Post by: Empire KickAss on June 06, 2015, 12:56:23 AM
Alright, I have it working 100% and I have customise it to my liking, Apart from the post above where I added an 4th option and it's not working. Anyway I can't work out the permissions for it? Only the admin has the option to do this and I need other staff group to see there options to..

So from the ManagePermissions.php where do I go from there?
Title: Re: Moderator and Administrator Comment Tags
Post by: mikk on June 06, 2015, 04:35:08 AM
Hi,

it's a good mod, but slightly unusable, because if I modify post with admin tags, then if any moderator modify this post again, admin tags are disappear...
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on June 06, 2015, 07:27:12 AM
yes...  because otherwise, a moderator (or the user) could modify the text between the admin tags and make it seem to say whatever they wanted
Title: Re: Moderator and Administrator Comment Tags
Post by: Americano on June 06, 2015, 11:56:27 AM
Does mod works on the latest version smf?
Title: Re: Moderator and Administrator Comment Tags
Post by: Empire KickAss on June 06, 2015, 09:16:07 PM
Quote from: Americano on June 06, 2015, 11:56:27 AM
Does mod works on the latest version smf?
Yes
Title: Re: Moderator and Administrator Comment Tags
Post by: Paracelsus on June 11, 2015, 01:45:44 PM
Does anybody has a fix for that strange phenomenon that "strips" things like line breaks or lists when writing inside these tags (you have to type [ br ] without the spaces to get a line break). The 1.x version was ok, it happens in the 2.x version.
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on June 11, 2015, 02:12:42 PM
hmmm... doesn't happen for me...

are you using the wysiwyg editor?
Title: Re: Moderator and Administrator Comment Tags
Post by: strano on July 10, 2015, 09:08:02 AM
Does works on SMF 2.0.10? I've to change the smf version under the options?
Title: Re: Moderator and Administrator Comment Tags
Post by: Paracelsus on July 10, 2015, 06:24:23 PM
Quote from: Kindred on June 11, 2015, 02:12:42 PM
hmmm... doesn't happen for me...

are you using the wysiwyg editor?

It happens no matter if wysiwyg is activated or not.
Title: Re: Moderator and Administrator Comment Tags
Post by: simplebeer on July 20, 2015, 07:34:08 AM
trying to install this at 2.0.10 as version 1.1.21 and it failed.

Anyone know why?

At./Themes/default/Post.template.php i can't find the code
Quote$found_button = false;

at and at ./Sources/ManagePermissions.php i cant'find the code 'board' => array(

Whats wrong?
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on July 20, 2015, 07:37:40 AM
even with emulation - mods for 1.1.x will almost certainly NOT work with 2.0.x...
Title: Re: Moderator and Administrator Comment Tags
Post by: simplebeer on July 20, 2015, 07:39:37 AM
but in the page for this page you say:

Quote from: Kindred on April 30, 2015, 06:44:09 AM
this is compatible  with 2.0.10
Almost any mod for 2.0.x will work with any other 2.0.x

and if i have a look at the mod it say compatible  :-[

is it possible to put the code somewhere else manually?
Title: Re: Moderator and Administrator Comment Tags
Post by: margarett on July 20, 2015, 07:55:51 AM
2.0 RC4 is not yet 2.0.x ;) Yet some previous posts claim it works fine in 2.0.2/4 so it should work in 2.0.10.
You need to manually find the affected code and fix it as most likely other MOD conflicts with this one.
Manual Installation of Mods (http://wiki.simplemachines.org/smf/Manual_installation_of_mods)

Title: Re: Moderator and Administrator Comment Tags
Post by: simplebeer on July 20, 2015, 08:03:03 AM
I know how to do it manually but i can't find the codes which i have to replace, so i don't know the position of the new text.

i have try to put it at the end before <?> but it isn't working... :-\
Title: Re: Moderator and Administrator Comment Tags
Post by: margarett on July 20, 2015, 08:07:48 AM
Wait... The MOD doesn't touch Post.template.php
custom.simplemachines.org/mods/index.php?action=parse;attach=163476;smf_version=2.0_RC4;mod=2104
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on July 20, 2015, 08:08:16 AM
You said...

Quote from: simplebeer on July 20, 2015, 07:34:08 AM
trying to install this at 2.0.10 as version 1.1.21 and it failed.


and this will not work.

if you emulate 2.0 RC4, it is likely to work.
Title: Re: Moderator and Administrator Comment Tags
Post by: simplebeer on July 20, 2015, 08:12:07 AM
Yes it is, thanks!
Title: Re: Moderator and Administrator Comment Tags
Post by: Westwegoman on November 15, 2015, 11:40:30 AM
Getting the following error in the error log.

8192: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead

Sources/Subs-Post.php  line=271


Mod still works.

SMF 2.0.11
Title: Re: Moderator and Administrator Comment Tags
Post by: margarett on November 15, 2015, 05:06:15 PM
Yeah, that's the deprecated modifier at PHP 5.5, it will continue to work until the deprecated modifier is completely removed. Both the original author and the current maintainer are absent so it's unlikely that the MOD is updated further :(
Title: Re: Moderator and Administrator Comment Tags
Post by: ToxicHUN on March 15, 2016, 05:49:33 PM
How can I add other tags?

Like this
(http://i.imgur.com/0jzyLfp.png)
[szuperadmin][/szuperadmin]
[foadmin][/foadmin]

Sry for bad english
Title: Re: Moderator and Administrator Comment Tags
Post by: Shambles on May 30, 2017, 05:23:42 AM
Quote from: Westwegoman on November 15, 2015, 11:40:30 AM
Getting the following error in the error log.

8192: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead

Sources/Subs-Post.php  line=271



Quote from: margarett on November 15, 2015, 05:06:15 PM
Yeah, that's the deprecated modifier at PHP 5.5, it will continue to work until the deprecated modifier is completely removed


At PHP7+ (I'm using 7.1.5) this mod causes all kinds of trouble due to the deprecated modifier /e being removed entirely, as forewarned above.

The fix is as follows:

Sources/Subs-Post.php

Code (Find) Select

$parts[$i] = preg_replace('~\[mod(.+?)\[/mod\]~ise', '\'[mod\' . strtr(un_htmlspecialchars(\'$1\'), array("\n" => \'\', \'  \' => \'  \')) . \'[/mod]\'', $parts[$i]);


Code (Replace With) Select

$parts[$i] = preg_replace_callback (
'~\[mod(.+?)\[/mod\]~is',
function ($p) {
$res = strtr(un_htmlspecialchars($p[1]), array("\n" => "", "  " => "  "));
return '[mod' . $res . '[/mod]';
},
$parts[$i]);




Code (Find) Select

$parts[$i] = preg_replace('~\[gmod(.+?)\[/gmod\]~ise', '\'[gmod\' . strtr(un_htmlspecialchars(\'$1\'), array("\n" => \'\', \'  \' => \'  \')) . \'[/gmod]\'', $parts[$i]);


Code (Replace With) Select

$parts[$i] = preg_replace_callback (
'~\[gmod(.+?)\[/gmod\]~is',
function ($p) {
$res = strtr(un_htmlspecialchars($p[1]), array("\n" => "", "  " => "  "));
return '[gmod' . $res . '[/gmod]';
},
$parts[$i]);




Code (Find) Select

$parts[$i] = preg_replace('~\[admin(.+?)\[/admin\]~ise', '\'[admin\' . strtr(un_htmlspecialchars(\'$1\'), array("\n" => \'\', \'  \' => \'  \')) . \'[/admin]\'', $parts[$i]);


Code (Replace With) Select

$parts[$i] = preg_replace_callback (
'~\[admin(.+?)\[/admin\]~is',
function ($p) {
$res = strtr(un_htmlspecialchars($p[1]), array("\n" => "", "  " => "  "));
return '[admin' . $res . '[/admin]';
},
$parts[$i]);
Title: Re: Moderator and Administrator Comment Tags
Post by: simplebeer on May 30, 2017, 08:22:47 AM
I had the same issue when upgrade to php 7.1 and smf 2.0.14 and this has fix it, thanks!
Title: Re: Moderator and Administrator Comment Tags
Post by: ItsBlockFighter on June 14, 2017, 01:15:55 PM
Please update to 2.0.14 SMF version
Title: Re: Moderator and Administrator Comment Tags
Post by: Shambles on June 14, 2017, 03:01:11 PM
Quote from: ItsBlockFighter
Please update to 2.0.14 SMF version

It already works on 2.0.14
Title: Re: Moderator and Administrator Comment Tags
Post by: ItsBlockFighter on August 10, 2017, 01:04:23 PM
It's not good for me
Title: Re: Moderator and Administrator Comment Tags
Post by: Shambles on August 10, 2017, 01:51:04 PM
Quote from: Shambles on June 14, 2017, 03:01:11 PM
It already works on 2.0.14
Title: Re: Moderator and Administrator Comment Tags
Post by: ItsBlockFighter on August 14, 2017, 11:04:40 AM
But I can not install it
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on August 14, 2017, 02:50:23 PM
Why can you not install it?
Title: Re: Moderator and Administrator Comment Tags
Post by: ItsBlockFighter on August 16, 2017, 04:17:38 PM
He writes:
The package that you are trying to download or install is either corrupted or incompatible with this version of SMF.
Title: Re: Moderator and Administrator Comment Tags
Post by: Shambles on August 16, 2017, 04:52:58 PM
Quote from: ItsBlockFighter
The package that you are trying to download or install is either corrupted or incompatible with this version of SMF.


How can I install a mod that doesn't work in my SMF version? (https://wiki.simplemachines.org/smf/How_can_I_install_a_mod_that_doesn%27t_work_in_my_SMF_version)

Read the above, then you'll want to set your forum version to "2.0 RC4"
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on August 16, 2017, 08:11:41 PM
https://wiki.simplemachines.org/smf/How_can_I_install_a_mod_that_doesn%27t_work_in_my_SMF_version
Title: Re: Moderator and Administrator Comment Tags
Post by: Arantor on December 28, 2017, 03:48:36 PM
So I updated the package. It now shouldn't need to emulate 2.0 RC4. It also should work correctly on PHP 7 and 7.1.
Title: Re: Moderator and Administrator Comment Tags
Post by: belfa on January 30, 2018, 08:54:52 AM
Thanks Arantor, nice mod, installed in my Forum version 2.0.15 works well.
Translated into Italian "see Attachment", tested and working.
Belfa
Title: Re: Moderator and Administrator Comment Tags
Post by: BrianChannel on April 02, 2018, 01:15:29 PM
How to install the mod? and where
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on April 02, 2018, 02:00:00 PM
use the package manager.

see the wiki/manual on how to do that
Title: Re: Moderator and Administrator Comment Tags
Post by: patrikx on April 11, 2018, 04:17:55 PM
how can i add new tags like: [sadmin]Example[/sadmin]

Example:
(https://www.kephost.com/images/2018/04/11/sa.png)
Title: Re: Moderator and Administrator Comment Tags
Post by: Shambles on April 11, 2018, 04:49:18 PM
Quote from: patrikx
how can i add new tags like: [sadmin]Example[/sadmin]

Look at how the mod does it. Add your extra tag in the same way.
Title: Re: Moderator and Administrator Comment Tags
Post by: Kindred on February 04, 2021, 11:00:44 AM
This mod was discontinued by the author some time ago -- however, if anyone still has it installed, be aware that the mod uses create_function which is deprecated in php 7.4 and removed in php 8.0.   Therefore, this mod will start throwing errors if your system is updated.



array(
'tag' => 'mod',
'type' => 'unparsed_content',
'content' => '$1',
'block_level' => true,
'validate' => create_function('&$tag, &$data, $disabled', '$data = get_mod_comment($data, "mod", null, ' . ($smileys ? 'true' : 'false') . ', \'' . $cache_id . '\');'),
),
array(
'tag' => 'mod',
'type' => 'unparsed_equals_content',
'content' => '$1',
'block_level' => true,
'validate' => create_function('&$tag, &$data, $disabled', '$data[0] = get_mod_comment($data[0], "mod", $data[1], ' . ($smileys ? 'true' : 'false') . ', \'' . $cache_id . '\');'),
),




array(
'tag' => 'gmod',
'type' => 'unparsed_content',
'content' => '$1',
'block_level' => true,
'validate' => create_function('&$tag, &$data, $disabled', '$data = get_mod_comment($data, "gmod", null, ' . ($smileys ? 'true' : 'false') . ', \'' . $cache_id . '\');'),
),
array(
'tag' => 'gmod',
'type' => 'unparsed_equals_content',
'content' => '$1',
'block_level' => true,
'validate' => create_function('&$tag, &$data, $disabled', '$data[0] = get_mod_comment($data[0], "gmod", $data[1], ' . ($smileys ? 'true' : 'false') . ', \'' . $cache_id . '\');'),
),



array(
'tag' => 'admin',
'type' => 'unparsed_content',
'content' => '$1',
'block_level' => true,
'validate' => create_function('&$tag, &$data, $disabled', '$data = get_mod_comment($data, "admin", null, ' . ($smileys ? 'true' : 'false') . ', \'' . $cache_id . '\');'),
),
array(
'tag' => 'admin',
'type' => 'unparsed_equals_content',
'content' => '$1',
'block_level' => true,
'validate' => create_function('&$tag, &$data, $disabled', '$data[0] = get_mod_comment($data[0], "admin", $data[1], ' . ($smileys ? 'true' : 'false') . ', \'' . $cache_id . '\');'),
),