Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2008-06-16 09:01:25

fpradignac
Plugin Author
From: France near Cognac
Registered: 2005-01-29
Posts: 359
Website

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

#15 2008-06-16 10:54:18

fpradignac
Plugin Author
From: France near Cognac
Registered: 2005-01-29
Posts: 359
Website

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

#17 2008-06-24 21:55:10

duchamp
Member
From: Patagonia
Registered: 2005-02-03
Posts: 222
Website

Re: txp_image hack/improvement

I must to say Thank You! Your hack helps me a lot today!
Well done

Offline

#18 2008-08-31 12:40:59

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

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

#19 2008-10-16 20:39:03

nabrown78
Member
From: Northampton, MA, USA
Registered: 2006-10-04
Posts: 294
Website

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

#20 2008-11-26 17:25:36

Hipocrite
Member
From: New Orleans, La
Registered: 2007-11-07
Posts: 17
Website

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)

Screen Shots
Download

Offline

Board footer

Powered by FluxBB