Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add custom page in backend not by plugin
#1
Hi All,

I'm wondering is it possible to add custom page in GS backend but not using plugin functionality like bellow?
Code:
# add a link in the admin tab 'theme'
add_action('theme-sidebar','createSideMenu',array($thisfile,'Hello World description'));

I created template where some information are saved in XML file and will be nice have possibility to edit this data XML file through admin backend page (it will be easy for and user). Is it possible or need I covert this functionality to GS plugin?

Best wishes
ArekS
Reply
#2
You could probably hack it to work, but sidemenu links are going to load load.php for plugins and then call that function. you might have unintended results or even if you get it working, it can break anytime in the future.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
OK, thank you for clarification. So please back for a moment to plugins.
Because my plugin should alter all content (put special form and other elements in page content) I should use core filter:
Code:
add_filter('content','my_function');
If it is correct go to next problem, how I can restrict this plugin to alter content only one particular page?
By checking slug name or something different?

Best wishes
ArekS
Reply
#4
You are only putting a form on 1 page. Then do not use a filter use a hook check if the slug is the one your form is on , and modify content to output your form.

on hook index-pretemplate, check if slug == myformslug
global content
$content = form html

if_post etc.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#5
Thank you! I have got it working :-)

Every day like GS even more :-)

Best wishes
ArekS
Reply
#6
Sorry I didn't have time to post any psuedo code or be more helpful.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#7
(2013-05-21, 02:40:35)shawn_a Wrote: Sorry I didn't have time to post any psuedo code or be more helpful.
No no, it is completely enough for me. Really appreciate your engagement.

ArekS
Reply




Users browsing this thread: 1 Guest(s)