Title: toplist plugin
Last modified: August 22, 2016

---

# toplist plugin

 *  [sunflyer](https://wordpress.org/support/users/sunflyer/)
 * (@sunflyer)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/toplist-plugin-1/)
 * 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](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/toplist-plugin-1/#post-5846482)
 * 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.

## Tags

 * [code php](https://wordpress.org/support/topic-tag/code-php/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/toplist-plugin-1/#post-5846482)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
