• I want to write a plug in.

    I have read some of the documentation about how ‘hooks” work but I do not know which hooks to take advantage of.

    I want to write a plugin that launches a separate page when a new user wants to add a new comment.

    In other words, I want the ability to insist that the user add more than just a username and email. I want to require that more information be inputted.

    Maybe such a plug-in already exists or perhaps something simular. Does this sound familiar?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m not terribly familiar with most of the popular WP plugins out there, but I have the general sense that what you want is out there somewhere. For example, will WP even let someone post an empty comment? Maybe there’s an option in the settings to prohibit such a thing.

    Also, are you using the anti-spam plugin that comes built-in to WP, called Akismet? I would imagine it’s likely to flag/block empty comments.

    While you are searching for such a plugin in the WP Plugin Directory, you may need to think creatively. For example, to require “substantial” comments, maybe you’d need to enable comment moderation and then find a plugin that adds features/criteria to accepting or auto-accepting blog comments for publishing.

    Launching a separate page – you could probably do that with a mere tweak to WP, if you don’t find a plugin.

    Writing a plugin: Where are you starting from? Do you have any experience with PHP? Have a look at the “Hello Dolly” plugin that comes with WP. It’s a good first step to learning the ropes in plugin development (hey, it got me started!).

    -WCC

    Thread Starter xarzu

    (@xarzu)

    I found an existing plug in that I can use as a starting point for what I want to do.

    I can play with the code until I figure out what I want to do, can’t I? This is not breaking the rules, is it?

    Yeah, you should be fine. This is all on your own blog/server, right? I think for the most part, “anything goes” in such a case. You wouldn’t be breaking any plugin/WP rules. In fact, this sort of hacking/tweaking a currently working plugin is generally encouraged by the WP community. That sort of behavior is in WP’s own roots. (Notice how a WP blog provides an embedded plugin editor!)

    Moreover, the plugin may actually be GPL licensed (especially if you found it in WP’s own Plugin Directory), which means you’ve been given rights to modify it (properly crediting the original author) if you want to distribute the derivative work to others.

    HTH.

    -WCC

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘My First Plugin’ is closed to new replies.