• clarke1866

    (@clarke1866)


    Plugin help for newbie is boring, but add ‘think of the children!’ — marketing genius!

    I need help. I have created a script that creates lists of fake email addresses from a dictionary of known spammers. In other words, my script serves up a limitless supply of email’s to harvester bots, with all the emails either being fake, or real but belonging to spammers. It also attempts to trap the bot by offering up random links to itself. The idea is to get the spammers fighting the spammers by corrupting their list of valid emails. The script is highly customizable through a menu system and is completely flat file based (parsing ini) allowing you to add your own personal spammers.

    But now I need help. I need help on inserting this code into the wordpress admin backend where the user can edit the various options. I have read extensively on the subject, but since I am a learning php from scratch (with very limited programming background) I am just going in circles. It seems the wordpress codex is written by developers for developers, which is fine, except that I am missing some key chunks of knowledge I am sure. For starters:

    How can I insert my options form into wordpress? — My present form is self submitting, and writes the configuration to an ini file in the plugins’ own directory.

    From my research I have figured out that I need something like the following code in a file in the /wp-content/plugins/ directory:

    /*
    Plugin Name: WP-My Name
    Plugin URI: someurl
    Description: Blah.
    Version: 0.001
    Author: Me
    Author URI: someurl
    */

    add_options_page(__("Plugin Test Page"), __('PlugTest'), 5, plugdir(__FILE__) .'form.php');

    At which point the form.php would take over by including and reading the ini file, and various other files in the plugdir.

    The problem is that this doesna€?t work. What am I doing wrong?

    2nd problem:

    Includes and path issues. Is there some secret to getting this all sorted out? Everything works fine when self contained in its own directory but try to call it from somewhere else and there is a breakdown unless paths are specified. Is there a way to get around this? Ideally, I would like my plugin to get activated by simply calling it: include a€?path to file/file.phpa€? . This would allow users to add it to any part of their website. Is there a better way?

    Thanks for any help!

    Clarke

  • The topic ‘Plugin Development help needed – think of the children!’ is closed to new replies.