Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: txp_image hack/improvement
Here’s my french article on the entire hack file of txp_index.php.
françois
Offline
#14 2008-06-16 10:17:37
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: txp_image hack/improvement
Thanks for sharing your work, François!
Beautiful site, BTW. Above all I like the fixed ornament and how you placed and layered it.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: txp_image hack/improvement
Thanks uli,
It seems that you are under OS X and Safari 3.1, unfortunatly, IE users can’t enjoyed what you’ve seen ! The fixed ornament attribute is not working in IE :-(
Last edited by fpradignac (2008-06-16 10:57:03)
françois
Offline
#16 2008-06-22 00:41:53
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: txp_image hack/improvement
For those liking François’ hack of txp_image.php here’s a tiny mod for it for placing a category edit link alongside the category label. Thanks again, François!
Search for
n.graf('<label>'.gTxt('image_category').'</label>'.br.
treeSelectInput('category', getTree('root', 'image'), safe_field("category", "txp_image", "id = $id"))).
Replace by
n.graf('<label>'.gTxt('image_category').'</label> '.'<span class="small">['.eLink('category', '', '', '', gTxt('edit')).']</span>'.br.
treeSelectInput('category', getTree('root', 'image'), safe_field("category", "txp_image", "id = $id"))).
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: txp_image hack/improvement
I must to say Thank You! Your hack helps me a lot today!
Well done
Offline
Re: txp_image hack/improvement
Is there avaible anything like this for articles’ list? Sometime I have to edit for example custom_fields value through a lot of articles.
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: txp_image hack/improvement
This little hack came in handy for me. I dressed it up a little with jquery (I’m so infatuated with jquery right now!) to hide the edit forms initially, and then added a link that allows the user to toggle them on and off:
$(document).ready(function(){
$("form:has(.xpress-edit)").toggle();
$(".upload-form").prepend('<a href="" id="toggle">Show/hide edit forms</a>');
$("#toggle").click(function () {
$("form:has(.xpress-edit)").toggle();
return false;
});
This goes in the html header, which you can find in the txplib_head.php file.
Also added the awesome jquery.tablesort.js into the mix with $("#list").tablesorter( {sortList: [[3,0],[6,0]]} );
(warning – you have to edit the image list table to include a thead and tbody) and now the image list is fairly user friendly.
Offline
Re: txp_image hack/improvement
If anyone is interested in creating an AJAX-powered articles or images list editor plugin have a look at my events list editor (afw_events). It’s only a hop and a skip away from being a full-blown article editor. This plugin adds a new Tab, which is probably a more reliable way of implementing such a thing rather than editing the Txp PHP files directly. (The tab is added under Extensions, but it could easily be moved to Content)
Offline