More Plugin Questions / My Second Plugin

Chrisspitz

Member
Alright, so i'm working on creating my "Second" plugin now, yet I never really finished editing my first (I will when I get a chance).

The plugin i'm creating now has the goal of adding fields to the "Registration form join_form.html under the skin /parabola/ ... Adding those fields to the edit.html (don't know the exact document, but i'll figure it out later first I need to figure out how to do what i'm about to explain)... And also the admin edit .html files. I will also be making this display under the statistics for the "site/server" like I have on MineTop100.com (hopefully you get what i'm saying).

Anywayssssss I have successfully created my install.php to insert 2 columns perfectly in the right spot as well. Now I need to figure out what to do in order to insert text into these html files.

As @Mike and @Basti know i'm familiar with using the same name file to insert new text into a file such as english.php .... but I was wondering if it works the same way with what i'm doing with these html files.. Meaning all I have to do is copy some of the code so it is recognized and make my changes in it?

Or am I going to have to use some sort of if statement to look for text and insert after that text (because i'm inserting into html forms and it needs to be in the right location).

Hope someone understands what i'm saying :) - i'm sort of excited that I managed to get my install.php right the first time, and once I figure out how to add text in select files in set locations I feel like i'll be able to complete the plugin on my own.

Thanks for your help, anyone.
 

Basti

Administrator
Staff member
That is a little more complicated than you might imagine. You make use of existing plugin hooks in the php files

for example there is "join_insert_data" hook in join.php, so you need to create a file join_insert_data.php where you put your query in.
It works in a similar way on the html. But there are quite some steps you need to complete for this kind of plugin. join, user_cp, admin, html parts, all with several edits and all best handled with plugin hooks and plugin templates to ensure easy edits and no overwrites when updating VL. Also securing the input fields / mysql against attacks is very very important. All this might be over your head when you just start experimenting.

If you want send me what you have so far and where you want to have the info appear (on stats page and / or ranking files? ). Ill make it quick for you when i wake up.
You can then use it ready made or use it to compare to your own edits to make sure all is valid and secure.

Learning is nice, for which i complimentyou :), but if you dont have something to strictly compare it against when dealing with security / big tasks you might regret it at some point.

That reminds me, would be a nice plugin tutorial, but would need some time writing :)
 

Chrisspitz

Member
Alright hm.
Well all I really have right now is my MySQL install.
I want all the info to appear like I have it on MineTop100.com
add a site, the user_edit cpl, admin edit panel, and under the server details/site description
^^ I believe that's all the locations.
After "Server Title" which was changed from "Title" in the other plugin.
Thanks for your help :)
 

Chrisspitz

Member
Ah. Sorry just realized I never uploaded what I have. Attachment in this post - it's just the mysql install pretty much and a language folder.
 

Attachments

Basti

Administrator
Staff member
Chris, here would be something with all features supported, that is if i havent forgot something :)

new fields in:
- admin and user_cp edit forms ( including html and php part )
- normal and user cp join ( including html and php part )
- integration into user_cp profile points = 20 points if serverip is filled out
- info displayed in table_top html files and stats.html via plugin templates
- corrected install ( installs itself once uploaded )
- corrected info file to include $install = 1;
- delete file, which handle the delete of database entries when you delete the plugin
- error messages:
--- if serverip is not an ip = error
--- if serverip is not an valid url = error
Would suggest to just allow ips here (since server ip is an ip), every server should know its ip, but if you need strictly both variations its included
--- if server port is not an number = error

Please do not use it yet on a live site, as VL 0.5 misses a few plugins hooks and skin variables so some things may not function the way it should do. Once 0.6 is out ( 2-3 days maybe ) it will be fully functional
 

Attachments

Top