« [Plugin] CountLikes
[Plugin] HideMod v1 (old)

CerealGuy

  • Posts: 336
[Plugin] HideMod v1 (old)
« on February 8th, 2014, 02:36 PM »Last edited

This is the old version, there is now v2.0. To get the old version, check out the v1 branch in the repository.
https://github.com/C3realGuy/Wedge-Hide/tree/v1




Here we go, first Plugin from me <_<.
First i'm not that good and experienced coder but i like wedge and its quite fun to play with it. Therefore i thought to create a small plugin. It's still alpha and not recommend for public usage because there are still some bad bugs ^^ But perhaps someone is interested in it. It's really not finished because im struggling with some problems with which some of you perhaps can help me :blush:.
But first github url :D
https://github.com/C3realGuy/we_HideMod

Im using the display_post_done hook to replace the hide(-reply) stuff and check if user is allowed to do so. But perhaps the bbcode stuff in plugin-info.xml is bether? I understood some basic things of that xml block but just discovered that before/after stuff which is not what i need. I need to decide whether the user is allowed to see it or not ^^ Therefore a param in the bbcodeblock which links to a function or something like that would be very nice and surely cool for other plugins

The next problem is that there's no hook in the quickquode stuff which allows to look into the hidden code ^^

If i could fix one of those two problems it would be perhaps ready for "real" use.

Of course any feedback is welcome except for "hide mods are stupid and a foolish thing because of...". I know that there are people who don't like it because of the useless spam posts and stuff but also a lot people like it :eheheh:

Posted: February 4th, 2014, 09:01 PM

A small update: looked again into hooks and stuff and found post_bbc_parse. Sounds right but for some reasons it doesnt works like i supposed it would. And we would need a sqlquery to discover which postid this post has and bbcode would also work in Shoutbox/PM?! Where it's kinda useless :D And for some reasons first posts seems to be cached or the hook doesnt get called whats not good for this type of plugin ^^ ManagePlugins --> knownHooks is quiet interesting ;)
Posted: February 5th, 2014, 05:47 PM

Nobody any ideas? :sob:

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,666
[Plugin] Re: HideMod
« Reply #1, on February 9th, 2014, 02:15 AM »
Ideas about what? Which hook to use? The one in parse_bbc. Hook or XML? Probably hook.

Will explain later, gotta run right now.
A confident man keeps quiet.whereas a frightened man keeps talking, hiding his fear.

CerealGuy

  • Posts: 336
[Plugin] Re: HideMod
« Reply #2, on February 15th, 2014, 05:56 PM »Last edited on February 15th, 2014, 06:54 PM
Added a custom hook in the corefiles whick makes it working properly.
Interesed? Have a look at it :D
https://github.com/C3realGuy/we_HideMod
[Plugin] Re: HideMod
« Reply #3, on March 6th, 2014, 12:37 PM »
UPDATE:
I changed from display_post_done to post_bbc_parse.
The upside is now, that the bbc is parsed properly everywhere, not only if someone views posts in forum. Also posts are correctly processed via showposts in profile or if you use the search. Im pretty happy with this solution, thanks to @Nao :)

PS: Is it possible to change this topic or create a new one? Cant edit my posts and im not happy with the informations about that plugin. They are too old ^^
[Plugin] Re: HideMod
« Reply #4, on March 14th, 2014, 07:54 PM »
UPDATE:
Now reloads page on like if post contains hide and disables unlike on posts with [hide]. Plugin should be ready for "real" use. Therefore i would like to edit the Thread :)

Nao

  • Dadman with a boy
  • Posts: 15,997
[Plugin] Re: HideMod
« Reply #5, on March 15th, 2014, 12:17 AM »
Hmm, that would imply giving you moderator permissions for this board... :^^;:

Too bad there aren't per-topic permissions available, ah ah...

Farjo

  • "a valuable asset to the community"
  • Posts: 492
[Plugin] Re: HideMod
« Reply #6, on March 15th, 2014, 01:21 PM »
Why not switch on the modify own post permission?

Nao

  • Dadman with a boy
  • Posts: 15,997
[Plugin] Re: HideMod
« Reply #7, on March 15th, 2014, 01:58 PM »
No, the grace period applies to that. Only the modify all posts permission is exempted.

That would require adding a 'bypass grace period' permission, I guess.

Farjo

  • "a valuable asset to the community"
  • Posts: 492
[Plugin] Re: HideMod
« Reply #8, on March 15th, 2014, 04:45 PM »
So perhaps, in the short term, it's easier for CerealGuy to open a new topic? Then permissions etc can be discussed later.

Nao

  • Dadman with a boy
  • Posts: 15,997
[Plugin] Re: HideMod
« Reply #9, on March 27th, 2014, 10:51 PM »
Quote from Nao on March 15th, 2014, 01:58 PM
That would require adding a 'bypass grace period' permission, I guess.
Done!

I need to test it, though...
Anyone wants to have permission to edit their own posts forever? :P

Gave permission to CerealGuy, in case he wants to confirm it works!

CerealGuy

  • Posts: 336
[Plugin] Re: HideMod
« Reply #10, on March 28th, 2014, 11:13 PM »
Quote from Nao on March 27th, 2014, 10:51 PM
Quote from Nao on March 15th, 2014, 01:58 PM
That would require adding a 'bypass grace period' permission, I guess.
Done!

I need to test it, though...
Anyone wants to have permission to edit their own posts forever? :P

Gave permission to CerealGuy, in case he wants to confirm it works!
Aaand im not able to edit it or i dont see the option...

Nao

  • Dadman with a boy
  • Posts: 15,997
[Plugin] Re: HideMod
« Reply #11, on March 29th, 2014, 03:28 PM »
Oh... Bugger.
[Plugin] Re: HideMod
« Reply #12, on March 31st, 2014, 04:10 PM »
This one's fixed... I broke the rest of Wedge by fixing it, though... :lol:
Well, technically I was trying to fix topic privacy, and it backfired because of a logic loop. I'm trying to find a solution for that. I'll get back to you guys when I find it... If I do!
[Plugin] Re: HideMod
« Reply #13, on April 1st, 2014, 08:05 PM »
Fixed... I think, eh! ;)

[Plugin] Re: HideMod
« Reply #14, on April 1st, 2014, 08:08 PM »
Scary stuff... I break stuff all the time..I hope it's me anyway.. Where did they get the saying I was beside myself? :)

regards,
Maxx

« [Plugin] CountLikes