News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Creating a custom script

Started by KidGuko, May 10, 2006, 04:29:53 PM

Previous topic - Next topic

KidGuko

Hello,

Yes I tried to use the the search functionality first but got this:

QuoteAn Error Has Occurred!
Due to high stress on the server, the search function has been automatically and temporarily disabled. Please try again in a short while. 

Ok. Well, what I am trying to do is add one of my custom scripts into SMF. I want the content of the script to be visible and accessible through the admin section. So, Admin goes to admin section and clicks on a link. This link brings up the script user interface within the admin area. The Admin can configure the script and run it and it can not be visible or run by any other user...including Global Mods. How can I integrate my script into the admin portion of SMF?

Thanks
KidGuko

KidGuko

I do belive that I put this thread in the wrong place. Can a mod move this to the SMF Coding Discussion fourm?

Thanks

KidGuko

Found this once the search was back up:

http://www.simplemachines.org/community/index.php?topic=23864.0

The above link helps me do mostly what I want except for adding the script into the Admin section. I want to put a link under Member Controls and have my content and forms to be displayed the same way every thing else does in the Admin section...that is right of the Admin Control Menu. Where can I add a link to the Admin Section and what do I need to do to make it show in the Admin section.

Thanks

Oldiesmann

Quote from: KidGuko on May 10, 2006, 05:10:35 PM
I do belive that I put this thread in the wrong place. Can a mod move this to the SMF Coding Discussion fourm?

Thanks

Moved.
Michael Eshom
Christian Metal Fans

Rudolf

#4
Quote from: KidGuko on May 10, 2006, 09:08:29 PM
The above link helps me do mostly what I want except for adding the script into the Admin section. I want to put a link under Member Controls and have my content and forms to be displayed the same way every thing else does in the Admin section...that is right of the Admin Control Menu. Where can I add a link to the Admin Section and what do I need to do to make it show in the Admin section.

Thanks

In the Subs.php file you'll find the adminIndex() function. There you'll have to add your link.

Also you will have to create a custom action for your script.
You'll want to do something like in that post, but in your custom file and function you write

adminIndex('yourarea');

loadTemplate('Yourthing');
loadTemplate('Yourthing');



It gets rather messy if you want something advanced, but the key is the adminIndex(); function.

Rudolf
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

KidGuko

Thank you. It is a little messy but at least it is running. I will fine tune it later.

Thanks again.
Joshua C.

Advertisement: