Including HTML for every admin page?

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
jurrie
New Member
New Member
Posts: 9
Joined: Fri Feb 10, 2012 6:35 pm

Including HTML for every admin page?

Post by jurrie »

Hello everyone,

I want to inlude some JavaScript in every admin page, and I'm wondering if it is possible to create a module that does that? So not just for admin pages of my own module, but for every page in the admin section.

I found http://forum.cmsmadesimple.org/viewtopi ... ilit=admin, but that only outputs the content for my own admin pages.

I know I can make an admin theme, but then I will lose the possibility of enabling/disabling my module, as well as upgrade-support.

With kind regards,

Jurrie
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: Including HTML for every admin page?

Post by Wishbone »

At one point, I was looking to do the same thing, but looking at the code, it doesn't seem possible from a module point-of-view.. The only way that I can see to do this is to modify the admin theme.

What were you trying to accomplish? I was trying to use JQuery to change a text extra field definition to be a GBFilePicker input, so I could use it in News, or any other module .. I found another way to do this, but it was very News-specific (module_custom/UDT), as opposed to being a generic JQuery replacement.
jurrie
New Member
New Member
Posts: 9
Joined: Fri Feb 10, 2012 6:35 pm

Re: Including HTML for every admin page?

Post by jurrie »

Wishbone wrote:At one point, I was looking to do the same thing, but looking at the code, it doesn't seem possible from a module point-of-view.. The only way that I can see to do this is to modify the admin theme.
Hi Wishbone,

Thanks for your reply. Too bad it's not quite possible, but I already kinda thought it wasn't. :)
Wishbone wrote:What were you trying to accomplish?
I'm trying to modify the 'preview' functionallity. Instead of opening the link directly, I want it in a popup I can control.

If you know of a way to do this (other than modifying the theme of course :)), please let me know.

With kind regards,

Jurrie
nockenfell
Power Poster
Power Poster
Posts: 751
Joined: Fri Sep 12, 2008 2:34 pm
Location: Schweiz / Switzerland

Re: Including HTML for every admin page?

Post by nockenfell »

Maybe with eventmanager (modify html)?
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: Including HTML for every admin page?

Post by Wishbone »

As far as I know, the event manager only works on the front end... I tried. :)
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Including HTML for every admin page?

Post by calguy1000 »

Correct... there is no way to inject javascript/html into each admin page.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “Developers Discussion”