![]() |
Plugin Backend
Hey everyone. So lately I've been searching for someone to do this for me but I figure if I learned it myself it'd be much more helpful to me in the future. I run a gaming clan, and we have a roster. You can view it here: http://www.zealotgaming.com/forum/pages.php?pageid=15
Obviously, you can see a few things. The default page lists all our staff. That is very easy, and not really the part I need help with. The help begins with the games list you see at the side. When you click a game, it lists all users who have that Game listed as their Main Game in a profile field, and lists other info, such as their rank, In-Game contact (which is another profile field) and join date/last active. The games are also themselves divided into categories. Our code is relatively simple. We keep a manual array of info that keeps these together you can see below: PHP Code:
The listing of users is very easy, and I do not need any help with that. What I would like to add is a manager in the admin panel where you could save the information listed above to a table such as PREFIX.games. I imagine having several drop down boxes. A mockup is below: https://vborg.vbsupport.ru/external/2014/06/18.png I'd then Like a list of games that includes these rows in the table with a [ ] Remove checkbox. I do not know how to add this to the admin panel and would love guidance on how to begin doing this. The sorting would go by Game Status (the second array in my php code) then Alphabetical. This would go a long way in helping my staff edit this list themselves. Any help would be appreciated. Skype: j.c.will my be better to work personally with me. |
Please post this to the correct forum/section
|
Quote:
|
This seemed like the correct section? For general help. Isn't this help? o.O
Forum description: "How do I do this in vBulletin?" I am asking how do I add a backed plugin in vBulletin. So I am in the correct forum. But thank you anyhow. Your comment was clearly insightful and helpful. |
Quote:
--------------- Added 25 Jun 2014 at 00:28 --------------- Quote:
|
I am not looking for someone to create this forum me. It is not an existing plugin. I am asking on how to create part of a plguin, which qualifies as "how do you do this" in vbulletin. Please read my posts and understand what I am asking before you make claims about my goals or purposes.
I would respectfully appreciate it if you would leave the thread alone unless you are here to offer help with the question I have asked. |
Asking how to create part of a plugin is still asking for help with someone doing coding for you either free or paid and really no need to be rude I am trying to help
|
Quote:
|
Yes sometimes I do its just the way I am but I do like and try to help even if it takes a while to get to the point
|
I am not asking anyone to code for me, I am asking for the first step of how to go about doing the back end. Anyone in this forum who asks questions about code could be said the same thing "you are asking about code, go pay someone". I am hoping someone can point me in the right direction to design a backend myself.
--------------- Added [DATE]1403673493[/DATE] at [TIME]1403673493[/TIME] --------------- So far, I've gotten this far: PHP Code:
So now that these are populated how I'd like I can created an "add" post and run the query to add it to a new table yea? Now can anyone tell me how to add it to the menu on the left side and create an administrator "canadmin" property? Also, for some reason my "add" code is not working properly. I think the DB writing isn't happening. |
There are a few things wrong:
- You are using $_REQUEST, please stick to $_POST or $_GET. Depending on which one you use. - You don't wrap your variables in single quotes, will not work without that. - You don't escape your variables, SQL injection will be possible. - Your INSERT query contained "INSERT INTO TABLE", that's not valid. In case you use $_POST, you can do something like: PHP Code:
PHP Code:
|
Hey Dave! I made your changes and the SQL write still isn't working. I get a blank screen when I click submit and nothing changes in the table. No error is sent to my email inbox either.
|
Add the following above the query_write execution:
PHP Code:
|
It isn't even showing an SQL query.
|
If it isn't even showing the query, then try adding something like this above the second if statement:
echo $_GET['game']; (actually, try echoing all three of your $_GET variables) |
I actually had both parts working (adding and removing). The adding part worked after I manually added the first row to the database. I tried the remove function and removed the first row, and now it won't add it again. Does the first key always have to be 1? Do I have to update keys?
Edit: Seemed to be an error with the insert query. All fixed! Now could someone tell me how to add it to the menu in the ACP and create an admin permission for it? Edit: Figured that out too. Now I will link it to the main result. Thank you to the few people who helped me in this thread with genuine advice! PHP Code:
Correction, it is letting me add SOME games, but not others. I do not know why. --------------- Added [DATE]1403743899[/DATE] at [TIME]1403743899[/TIME] --------------- The error occurs whenever I do not change one of the drop down menus. It seems like it isn't being sent as if its selected, so it is causing an error. EDIT: To fix I simply added a blank option at the start of each menu. Worked like a charm. Edit: Added an image to see it working. ^^ https://vborg.vbsupport.ru/external/2014/06/17.png |
Awesome KGodel!!!! I received your pm and came to check - glad to see you kept on tinkering until you figured it out with the help of a few others of course so props to them as well but I'm thrilled for you :D.
Now what's next? Remember that sometimes banging your head against a brick walls helps you remember the issue and resolution afterwards and also prepares you for the next step on your forum (typically) so find something else you want done and have at it! :cool: |
Well, instead of using a page-plugin, I like to move the roster to is own page and maybe even release this as a mod to the community (eventually). This was the biggest thing we wanted to do so I don't know what else I'll do now, I'm just enjoy this (I have it open in a tab just to look at it, lol).
|
All times are GMT. The time now is 02:48 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|