Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 2006-12-18 17:16:03

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

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

Anyone have this working with hak_tinyMCE running as well?

I have it working on several sites without it, but can’t seem to get it working on 2 seperate installs…both running hak_tinyMCE (I’ve tried turning it off…but doesn’t seem to help.)

The strange part is that the plug-in works for all elements except for things under “advanced options”.

Any suggestions would be greatly appreciated.

Offline

#50 2006-12-18 19:24:24

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

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

(sorry I missed this thread)

I’m having zero issues using the two of them together. No combination of setings in hak_tinymce seems to cause problems.

The only thing I can think of is that I installed hide in admin after I had hak_tinymce installed. Don’t know if that makes any difference but they are happilly cohabitating on my systems.


Shoving is the answer – pusher robot

Offline

#51 2006-12-18 19:40:48

LeeUmm
Member
From: Hamilton, Ontario
Registered: 2005-04-22
Posts: 91
Website

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

I don’t think it makes any difference as I installed hide_in_admin after as well.

Plus it seems some people can get both working so I’m not sure what the problem is.

I can however say that I still couldn’t get this plugin to work with 4.0.4. As with above, the advanced options field won’t hide. I believe everything else would work properly.

Offline

#52 2006-12-18 20:31:30

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

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

Alright I think I figured out what is causing the problem. The issue is not with hak_tinymce but with not using “Use Textile” as the text processing setting. At least this is what it’s doing for me

Hide in Admin looks for advanced options as a fixed position in the array of h3’s in the write tab’s left column. It expects it to be the second h3 h3[1] however when you don’t use textile the textile help link does not render. This makes advanced options the first h3 element h3[0] it makes Recent Articles be the second h3. For me when I set Adavnced Options to hide what actually gets hidden is Recent Articles.

If I switch “use textile” back to use textile everything works as expected. Is anyone else seeing this behavior? If this is the case it might not be a too hard to fix.


Shoving is the answer – pusher robot

Offline

#53 2006-12-18 20:52:08

LeeUmm
Member
From: Hamilton, Ontario
Registered: 2005-04-22
Posts: 91
Website

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

I am getting similar results so it is a problem with the h3s.

Mine isn’t working exactly like yours but that could be our different settings for hide_in_admin. When I changed use textile back to on, the title for textile help would dissapear but then the content for it would display. The advanced settings also were hidden. update I just changed the setting for hide_in_admin to “Toggle off Textile Help” and it hides the content for it now.

Last edited by LeeUmm (2006-12-18 20:53:07)

Offline

#54 2006-12-18 21:12:54

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

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

These changes seem to work for me. The lines aren’t the easiest to find.

Change

ied_hide_in_admin_do ('write-advanced', $userlevel, 'document.getElementById("edit").getElementsByTagName("p")[5].style.display="none";','document.getElementById("article-col-1").getElementsByTagName("h3")[1].style.display="none";');
ied_hide_in_admin_do ('write-recent', $userlevel, 'document.getElementById("edit").getElementsByTagName("p")['.(11+$howmany).'].style.display="none";','document.getElementById("article-col-1").getElementsByTagName("h3")[2].style.display="none";');

to

ied_hide_in_admin_do ('write-advanced', $userlevel, 'document.getElementById("edit").getElementsByTagName("p")[5].style.display="none";','document.getElementById("advanced").previousSibling.style.display="none";');
ied_hide_in_admin_do ('write-recent', $userlevel, 'document.getElementById("edit").getElementsByTagName("p")['.(11+$howmany).'].style.display="none";','document.getElementById("recent").previousSibling.style.display="none";');

They are some pretty long lines. I’d be willing to put up a patched version if there is enough interest and Yura doesn’t get to it first.


Shoving is the answer – pusher robot

Offline

#55 2006-12-19 00:58:08

LeeUmm
Member
From: Hamilton, Ontario
Registered: 2005-04-22
Posts: 91
Website

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

I’ve tried your update but it didn’t work for me. I believe I put it in the correct place as there are no errors and the plugin still works elsewhere.

Can you upload a patched version so I can see if that works?

Offline

#56 2006-12-19 02:32:01

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

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

This is not as robust as I would like it to be but it seems to work. The DOM traversing is still a little too fragile for my tastes, so another plugin that alters the tabs using object buffering might cause this to fail.

ied_hide_in_admin_v0.1.6-patch1.txt


Shoving is the answer – pusher robot

Offline

#57 2006-12-19 14:46:53

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

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

Patrick and Liam,

Thanks for all the hard work on this…I’m going to check out the patch now.
Fingers are crossed!

Report to follow.

Offline

#58 2006-12-19 15:08:24

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

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

OK. I installed the patch.
Some things started working, but very strangely.
I could turn on/off the things under “advanced options”, but they don’t correspond to the list in the “hide in admin” tab.

I also realized that upm_file_packets was turned on, and maybe that was causing an issue.
I turned it off, and still no luck. I reinstalled the original version ied_hide_in_admin, and the original problem occured…nothing under “advanced” would hide.

Here’s a list of the plug-ins that are running on this install:

chh_article_custom
chh_article_lib
hak_tinymce – 0.6.1
ied_hide_in_admin 0.1.6
jmc_event_manager
upm_file_packets 0.3.1
wan_pdf 0.30
zem_contact_lang
zem_contact_reborn
zem_link

Any ideas? I tried turning every other plug-in off except (tinyMCE) and just running “hide_in_admin”. That didn’t seem to make any difference. Not sure why?

Offline

#59 2006-12-19 15:48:51

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

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

I think you are having a different problem then the patch was intended to fix. The patch was to address the issue that the advanced options area as a whole would not hide. If I am understanding properly you trying unsuccesfully to hide items inside advanced options?

Are you using 4.0.4? This is so odd I am having zero issues getting this to work. Are you seeing this across all browsers?


Shoving is the answer – pusher robot

Offline

#60 2006-12-19 15:56:36

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

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

ahh!

OK. I misunderstood. You are right…I can’t get individual elements under “advanced options” to hide.

Just noticed this install was still 4.0.3. I’ll upgrade it now, and see if that fixes things.

Thanks so much for the help.

Offline

Board footer

Powered by FluxBB