Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#121 2010-05-26 19:00:33

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: [plugin] [ORPHAN] ied_hide_in_admin version 0.1.: Hide Fields in Admin

Timid&friendly wrote:

Ok thx. Did everything but plugin is not executed?
(edit) I mean the plugin created by plugin creator, and yes it is on ;-)

I tested the Jquery script and noticed the missing $ before each statement; got that running in firebug console np.

But the plugin side doesn’t seem to do anything. I even simplified it to to make sure that it isn’t a typo:-

Works for me with your exact code. The “hello” is at the end of the page. Did you select Plugin type = Admin?

To clarify you can use jmd_admin_js as I mentioned above to create sort of “javascript plugins” for the admin side with out writing any PHP.

Last edited by MattD (2010-05-26 19:00:44)


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#122 2010-05-26 19:26:42

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: [plugin] [ORPHAN] ied_hide_in_admin version 0.1.: Hide Fields in Admin

redbot wrote:

… Probably I’m overlooking something stupid…

This was the case, of course, I forgot to hide the table headers (th) also.
This works ok for me:

if(@txpinterface === 'admin') {
    register_callback('xxx_hide', 'list');
}
function xxx_hide()
{
    echo '<script type="text/javascript">'.
        '$(document).ready(function() {'.n.
             '$("#list td:nth-child(2)").hide();'.n.
             '$("#list th:nth-child(2)").hide();'.n.
             '$("#list td:nth-child(3)").hide();'.n.
             '$("#list th:nth-child(3)").hide();'.n.
        '});'.n.
    '</script>;';
};

Besides, I agree with Matt that your second script does work.

And one more thing… if you follow Matt’s suggestion to use jmd_admin_js, remember you are still inserting jquery code, so read the forums thread first to make it work

Last edited by redbot (2010-05-26 19:30:51)

Offline

#123 2010-05-27 05:32:11

Timid&friendly
Member
From: The Netherlands
Registered: 2006-05-28
Posts: 252
Website

Re: [plugin] [ORPHAN] ied_hide_in_admin version 0.1.: Hide Fields in Admin

It works!

You guys are great Thx so much.

It was simply the plugin type radio button that i forgot to set to admin.


I think, therefore I AM, … … er … I think :-?

Offline

#124 2011-04-02 12:29:24

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: [plugin] [ORPHAN] ied_hide_in_admin version 0.1.: Hide Fields in Admin

Has anyone got this plugin to work under 4.4.0?

It doesn’t seem to be doing anything here anymore, not even saving its own preferences. Are there any new alternatives I might have missed?

PS: it opens the Write tab when saving its prefs.

Last edited by masa (2011-04-02 12:31:12)

Offline

#125 2011-04-02 13:22:21

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: [plugin] [ORPHAN] ied_hide_in_admin version 0.1.: Hide Fields in Admin

masa wrote:

… Are there any new alternatives I might have missed?

Hi masa,
I think this plugin it’s definitely gone, given the modifications occurred on the “write” tab markup.

As an alternative I suggest my bot_admin_body_class which is less ‘pretty’ but more powerful singe it let’s you hide items in every admin tabs either on a per-user-level and a per-single-user basis

Offline

#126 2011-04-02 14:34:41

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: [plugin] [ORPHAN] ied_hide_in_admin version 0.1.: Hide Fields in Admin

Thanks redbot for filing the gap with another versatile plugin.
I had already installed bot_wtc & bot_show_image :)

Offline

Board footer

Powered by FluxBB