Advertisement:
GCWebhosting

Author Topic: Moderator and Administrator Comment Tags  (Read 128204 times)

Offline simplebeer

  • Jr. Member
  • **
  • Posts: 311
  • Gender: Male
Re: Moderator and Administrator Comment Tags
« Reply #480 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
Code: [Select]
'board' => array(
Whats wrong?
Sorry for my poor English, but i think it's probably better then your Dutch :)

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,317
  • Gender: Male
    • Kindred-999 on GitHub
Re: Moderator and Administrator Comment Tags
« Reply #481 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...
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline simplebeer

  • Jr. Member
  • **
  • Posts: 311
  • Gender: Male
Re: Moderator and Administrator Comment Tags
« Reply #482 on: July 20, 2015, 07:39:37 AM »
but in the page for this page you say:

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?
Sorry for my poor English, but i think it's probably better then your Dutch :)

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: Moderator and Administrator Comment Tags
« Reply #483 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

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline simplebeer

  • Jr. Member
  • **
  • Posts: 311
  • Gender: Male
Re: Moderator and Administrator Comment Tags
« Reply #484 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... :-\
Sorry for my poor English, but i think it's probably better then your Dutch :)

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: Moderator and Administrator Comment Tags
« Reply #485 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
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,317
  • Gender: Male
    • Kindred-999 on GitHub
Re: Moderator and Administrator Comment Tags
« Reply #486 on: July 20, 2015, 08:08:16 AM »
You said...

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.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline simplebeer

  • Jr. Member
  • **
  • Posts: 311
  • Gender: Male
Re: Moderator and Administrator Comment Tags
« Reply #487 on: July 20, 2015, 08:12:07 AM »
Yes it is, thanks!
Sorry for my poor English, but i think it's probably better then your Dutch :)

Offline Westwegoman

  • Jr. Member
  • **
  • Posts: 199
  • Gender: Male
    • westwegoman on Facebook
    • Westwegoman on LinkedIn
    • Bayou State Fishing
Re: Moderator and Administrator Comment Tags
« Reply #488 on: November 15, 2015, 11:40:30 AM »
Getting the following error in the error log.

Code: [Select]
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

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: Moderator and Administrator Comment Tags
« Reply #489 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 :(
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline ToxicHUN

  • Newbie
  • *
  • Posts: 1
Re: Moderator and Administrator Comment Tags
« Reply #490 on: March 15, 2016, 05:49:33 PM »
How can I add other tags?

Like this

[szuperadmin][/szuperadmin]
[foadmin][/foadmin]

Sry for bad english

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,143
  • Gender: Male
    • i30 Owners Club
Re: Moderator and Administrator Comment Tags
« Reply #491 on: May 30, 2017, 05:23:42 AM »
Getting the following error in the error log.

Code: [Select]
8192: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead

Sources/Subs-Post.php  line=271


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]);

Offline simplebeer

  • Jr. Member
  • **
  • Posts: 311
  • Gender: Male
Re: Moderator and Administrator Comment Tags
« Reply #492 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!
Sorry for my poor English, but i think it's probably better then your Dutch :)

Offline ItsBlockFighter

  • Semi-Newbie
  • *
  • Posts: 12
Re: Moderator and Administrator Comment Tags
« Reply #493 on: June 14, 2017, 01:15:55 PM »
Please update to 2.0.14 SMF version

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,143
  • Gender: Male
    • i30 Owners Club
Re: Moderator and Administrator Comment Tags
« Reply #494 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

Offline ItsBlockFighter

  • Semi-Newbie
  • *
  • Posts: 12
Re: Moderator and Administrator Comment Tags
« Reply #495 on: August 10, 2017, 01:04:23 PM »
It's not good for me

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,143
  • Gender: Male
    • i30 Owners Club
Re: Moderator and Administrator Comment Tags
« Reply #496 on: August 10, 2017, 01:51:04 PM »

Offline ItsBlockFighter

  • Semi-Newbie
  • *
  • Posts: 12
Re: Moderator and Administrator Comment Tags
« Reply #497 on: August 14, 2017, 11:04:40 AM »
But I can not install it

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,317
  • Gender: Male
    • Kindred-999 on GitHub
Re: Moderator and Administrator Comment Tags
« Reply #498 on: August 14, 2017, 02:50:23 PM »
Why can you not install it?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline ItsBlockFighter

  • Semi-Newbie
  • *
  • Posts: 12
Re: Moderator and Administrator Comment Tags
« Reply #499 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.