Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2009-05-21 00:39:19
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: Write Tab: Reorganizing Information
redbot:
Thanks in about a half an hour I am going to get cracken.
Question: I also looked and am using your Bot Privileges Plug In. The one tab you do not identify is the View Site. Which in most cases everyone would want to leave, but for this project I actually want to hide. Can I modify the plug in to remove that Tab. I am assuming the syntax would be tab.view ….
Finally, have you ever done anything where you need the users to print from the admin side. I am going to scour the board and take a look, but figured it would not hurt to ask you ….
Thanks again, and I will definitely keep you posted on the progress.
progre55
Offline
#14 2009-05-21 04:12:20
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: Write Tab: Reorganizing Information
redbot:
I am pluggin away, and thanks for all the guidance. I even see that you tried to throw me a curve ball to see if I was paying attention :)
The selectors you listed did not do the trick, but using good old fashion trial and error I figured it out. :)
So for example, if I added this line:
' $("#keywords").parent().insertAfter($("#write-sort"));'.n.
It moved the “Keywords title and field” after the Write Sort” section.
My next hurdle was getting the custom fields to move since I am using Gerhard’s Plug In. When I attempted to add code to your plug in nothing happened, then I realized that his activates after yours so I added this code into his:
$(document).ready(function() {
// removes all existing custom fields
$("p:has(label[for*=custom-])").remove();
$("p:has(label[@for=override-form])").after(\''.$out.'\');
// Moves Custom field 1 as a test after Category 1 input field using jquery
$("#custom-1").parent().insertAfter($("#category-1"));
So now I can move all the fields around.
Now I am going to see if I can crack adding a Date Picker to the Custom Fields.
progre55
Offline
#15 2009-05-21 10:01:35
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: Write Tab: Reorganizing Information
progre55 wrote:
…The selectors you listed did not do the trick, but using good old fashion trial and error I figured it out. :)
Oops sorry, you are right. I should stop writing posts too late in the night
… then I realized that his activates after yours so I added this code into his:
probably you can achieve the same result changing the “bot_show_image” plugin load order in the “plugins” tab to 6
Edit: Ah, and for your other question here add this lines:
' $( function() {
$("#lam-pictures").load( function(){
$(this).contents().find("input[name*=alt]").hide();
$(this).contents().find("label[for=alt]").hide();
});
});'.n.
As you can see this is a little more complicated because we must target an element that is contained in an iFrame and not in the actual html page
Last edited by redbot (2009-05-21 10:11:32)
Offline
#16 2009-05-29 12:52:40
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: Write Tab: Reorganizing Information
redbot:
Sory for the delay in getting back to you.
Regarding the hiding of the ALT field, I tried the above code tucked into your plug in and although it returned no errors, it also did not do the desired effect. I then thought maybe the above code needs to be inserted into the original plug in, but I am uncertain where that may need to be. Any additional guidance would be appreciated.
After seeing your comment about the load order, I took a look at this page unfortunately I have been unsuccesful in getting any of the plug ins to “change” their order when adding that line of code. They all still show as 5. I am sure I am missing something easy ….
progre55
Offline
Re: Write Tab: Reorganizing Information
progre55 wrote:
I have been unsuccesful in getting any of the plug ins to “change” their order when adding that line of code
Have you tried going to the Admin->Plugins tab, putting a check mark next to bot_show_image and then using the ‘With Selected’ tool at the bottom to change the order to 6?
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#18 2009-05-29 13:02:59
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: Write Tab: Reorganizing Information
Bloke:
I go to Admin,Plugins tab, I put a check mark next to bot_show_image BUT I do not see the last past of your statement:and then using the ‘With Selected’ tool at the bottom to change the order to 6
My bad, I have to start opening my eyes. Thanks.
progre55
Last edited by progre55 (2009-05-29 13:04:51)
Offline
#19 2009-05-29 13:16:34
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: Write Tab: Reorganizing Information
progre55 wrote:
Regarding the hiding of the ALT field, I tried the above code tucked into your plug in and although it returned no errors, it also did not do the desired effect. I then thought maybe the above code needs to be inserted into the original plug in, but I am uncertain where that may need to be. Any additional guidance would be appreciated.
Hi, I presume after you changed plugins load order it still doesn’t work?
Strange, I use this same code in more than one site and it always works. have you pasted it exactly after the other lines you added before?
Offline
#20 2009-05-29 13:46:48
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: Write Tab: Reorganizing Information
redbot:
This is what I have:
echo
'<script language="javascript" type="text/javascript">'.n.
' $(document).ready(function() {'.n.
' $("#bot_article_image").insertAfter($("#override-form"));'.n.
' });'.n.
' $( function() {
$("#lam-pictures").load( function(){
$(this).contents().find("input[name*=alt]").hide();
$(this).contents().find("label[for=alt]").hide();
});
});'.n.
'</script>';
I also changed its order to number to “6”
progre55
Offline
#21 2009-05-29 13:56:27
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: Write Tab: Reorganizing Information
You must move down the fourth line. Try this
echo
'<script language="javascript" type="text/javascript">'.n.
' $(document).ready(function() {'.n.
' $("#bot_article_image").insertAfter($("#override-form"));'.n.
' $( function() {
$("#lam-pictures").load( function(){
$(this).contents().find("input[name*=alt]").hide();
$(this).contents().find("label[for=alt]").hide();
});
});'.n.
' });'.n.
'</script>';
Last edited by redbot (2009-05-29 13:58:09)
Offline
#22 2009-05-29 14:01:51
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: Write Tab: Reorganizing Information
redbot:
That worked and I think it was my mistake originally. What I was looking at was the blank write tab and not an article that had been already cretaed. when I looked at a created article the alt was now removed.
Do you know if there is a way to remove it from the blank write tab? No big deal, but it would make the form cleaner.
Thanks for all the help.
progre55
Offline
#23 2009-05-29 14:36:04
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: Write Tab: Reorganizing Information
It should work (and works for me) in a blank article also. Which version of bot_show_image are you running?
Offline
#24 2009-05-29 14:37:24
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: Write Tab: Reorganizing Information
bot_show_image (0.4)
Offline