• sunflyer

    (@sunflyer)


    I’m making a toplist plugin for wordpress. Starting out easy with just basic stuff like a votelink with ID the users place on their websites to gather votes when visitors clicks it. I’m new to writing plugins for wordpress and I have limited experience with php too, but I will figure it out with some help ??

    I just wanted to know how I should collect votes, like other toplists I’ve tried there is like a counter script in a file that would be something like counter.php?siteid=X

    How would that work for a plugin since all files for the plugin is stored in the plugin folder and the link would look weird. Any ideas or suggestions would be greatly appreciated ??

    Thanks for readin!

    Roger

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    I don’t know if weird looking URLs is a bad thing, it could discourage attempts at URL hacking to game the voting system. In any case, if your directly requested code page should need to use WP resources, you cannot actually request it directly. Your code would need to use one of the following to invoke the WP environment: custom page template, AJAX, or request through admin-post.php. IMO AJAX would be the most likely candidate for a voting system. It is also the trickiest to code for WP.

    One common mistake people make in AJAX for WP is failing to send the request through admin-ajax.php. This is not optional, it must be done to be successful.

Viewing 1 replies (of 1 total)
  • The topic ‘toplist plugin’ is closed to new replies.