Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [plugin] [ORPHAN] bas_img_selector
3 questions though: can I edit the code so the ‘More Options’ automatically open?
Also: can I edit the code so it inserts the image into the body by default?
- I dont use the ‘article image’. I insert the main image in the body, and the thumb in the excerpt.
Also: can I edit the code so it uses txp tags by default? – I prefer that.
Last edited by jameslomax (2005-06-02 21:02:09)
Offline
Re: [plugin] [ORPHAN] bas_img_selector
Yes you can edit it (Shame of me, you must edit, because I kicked of the prefs, later i want to store them in db).
Go into textpattern/lib/bas_img_sel_lib.php.
Find basGetStructur() in Line 117. This on delivers the plugins’s html.
1) ‘More Options’ automatically open
Edit line 127 <code><div id=“basMore” style=“display:none;”></code>
into <code><div id=“basMore” style=“display:block;”></code>
2) inserts the image into the body by default
Edit line 128 (that is a long one)
<code><input onClick=“toggle_insertAs(this.value)” type=“radio” name=“insertInto” value=“article field” class=“radio” checked=“checked” /></code>
Delete checked=“checked” and add checked=“checked” to
<code><input onClick=“toggle_insertAs(this.value)” type=“radio” name=“insertInto” value=“Body” class=“radio” /></code>
3) uses txp tags by default
Some like 2. Goto line 129.
Delete checked=“checked”
<code><input type=“radio” name=“insertAs” value=“xhtml” class=“radio” checked=“checked” /></code>
And add it to <code><input type=“radio” name=“insertAs” value=“txp” class=“radio” /></code>
To see this last change you have to give (same line) <code><p id=“basInsertAs” style=“display:none”></code> display:block
Offline
Re: [plugin] [ORPHAN] bas_img_selector
OK thanks.
I’ve done 1) and 2) but 3) is confusing me.
- but add what to input type=“radio” name=“insertAs” value=“txp” class=“radio” ?
<br>
Last edited by jameslomax (2005-06-02 22:26:58)
Offline
Re: [plugin] [ORPHAN] bas_img_selector
Line 129 is:
<textarea cols=“50”>insertThis += ‘<p id=“basInsertAs” style=“display:none”>Insert As<br /><label><input type=“radio” name=“insertAs” value=“xhtml” class=“radio” checked=“checked” />XHTML</label><br /><label><input type=“radio” name=“insertAs” value=“txp” class=“radio” />TXP</label><br /><label><input type=“radio” name=“insertAs” value=“textile” class=“radio” />Textile</label></p>’;
</textarea>
And if you want to use textile by default it should be
<textarea cols=“50”>insertThis += ‘<p id=“basInsertAs” style=“display:block”>Insert As<br /><label><input type=“radio” name=“insertAs” value=“xhtml” class=“radio” />XHTML</label><br /><label><input type=“radio” name=“insertAs” value=“txp” class=“radio” checked=“checked” />TXP</label><br /><label><input type=“radio” name=“insertAs” value=“textile” class=“radio” />Textile</label></p>’;
</textarea>
display:block to see the Insert As Radiobuttons. And the moving checked=“checked” from xhtml-input to the txp-input , to make txp-tags default.
If you strg+c it, beware of the ‘!
Last edited by Bastian (2005-06-02 23:07:27)
Offline
Re: [plugin] [ORPHAN] bas_img_selector
I seem to be doing something wrong.
Its still entering default xhmtl and has changed the name of the xhtml radio button to txp. But its still xhtml.
This is the file I’m using now:
http://jameslomax.com/bas.txt
Any idea?
Thanks!
Last edited by jameslomax (2005-06-03 00:17:34)
Offline
Re: [plugin] [ORPHAN] bas_img_selector
This is with expanded options, insert into body as txp-tag as default.
I hope it works and have a good night!
Last edited by Bastian (2005-06-03 00:51:04)
Offline
Offline
Re: [plugin] [ORPHAN] bas_img_selector
Update:
Using this in 4.0 messes up my write page, locating the buttons etc at the top of the page, forcing the article text are and everything else below it and making it unbalanced and inefficient.
Any ideas on how to correct this?
Offline
Re: [plugin] [ORPHAN] bas_img_selector
Yes, i have an idea, that happend to my to.
That problem is that i used td-tag number 18 to inserted the plugin into the write screen.
But it seems that no 18 is not alsways besides the body-textarea.
In next version i will use regex the finde the td wich has the “textile help” Link inside.
Im working on that, stay tuned :)
Offline
Re: [plugin] [ORPHAN] bas_img_selector
OK I will!
This plug in is essential for me.
Offline
#83 2005-09-28 20:21:33
- paolo
- New Member
- Registered: 2005-09-28
- Posts: 6
Re: [plugin] [ORPHAN] bas_img_selector
Hi guys,
I wanted to use this plugin but… the link is broken :)
Offline