Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#76 2008-07-21 01:14:33

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: aro_myadmin

Hi Jonathan,

was that on a local install or something internet accessible? If it’s on the net — can you shoot me over a login so I can see what’s happening? Aeron’s written a fantastic plugin and I’d like to work out what’s going on as I intend using this on my live sites.

Last edited by net-carver (2008-07-21 01:15:10)


Steve

Offline

#77 2008-07-21 13:37:24

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: aro_myadmin

Jonathan

The problem is actually the same as the one reported here by Zanza. I’ve updated the files needed. As this requires a css overwrite on the filesystem, could you please try this out (Please install the plugin too!)…

aro_myadmin.v0.3.4.alt.gz.txt

This also seems to fix upm_image_popper on my local test site.

Edit: Removed download link. Please read on…

Last edited by net-carver (2008-07-26 15:43:13)


Steve

Offline

#78 2008-07-21 19:30:44

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: aro_myadmin

Hi Steve, I installed from the above .zip file, and overwrote the CSS file in the TXP folder.

I don’t see any change in upm_img_popper nor ebl_upload. I am able to add links using wet_quicklink, but I find the “ok” message only displays in the top right corner of the wet_quicklink window.

One out of three is a good start :-)

Offline

#79 2008-07-22 06:39:26

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: aro_myadmin

jstubbs wrote:

I don’t see any change in upm_img_popper nor ebl_upload.

Ok, I’ll take another look.

Edited to add: In the case of upm_image_popper, it doesn’t seem to be aro_myadmin per se.

With aro_myadmin off, I dropped upm’s images per page to 15 or 25 and then switched aro back on — all works just fine. It’s only the higher image count per page that kills things. Could this be an out of memory error in the standard php replacement functions that aro_myadmin uses to search those pages? You’d need to check your web server logs to see if that is the case. Edit: Fixed.

Not looked into ebl_upload yet. Edit: Fixed. Wow – I learned a lot about preg_replace doing this :)

I am able to add links using wet_quicklink, but I find the “ok” message only displays in the top right corner of the wet_quicklink window.

Hmm, it does that when aro_myadmin is turned off too.

Last edited by net-carver (2008-07-22 15:26:56)


Steve

Offline

#80 2008-07-22 15:24:46

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: aro_myadmin

All

How about aro_myadmin.v0.3.4.alt.gz.txt ???


Steve

Offline

#81 2008-07-22 19:31:58

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: aro_myadmin

Very nice Steve – for me it works perfectly now! Thanks!

Offline

#82 2008-07-22 19:53:48

rloaderro
Archived Plugin Author
From: Costa Rica
Registered: 2006-01-05
Posts: 190
Website

Re: aro_myadmin

Hey Steve – thanks for the fix – I’m curious… what did you do? ;)


Travel Atlas * Org | Start Somewhere

Offline

#83 2008-07-23 11:58:12

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: aro_myadmin

Aeron

FIrst, thanks for this plugin — I really like your re-skinning of the admin interface.

It was a little slow tracking it all down but here’s what I did…

1 Changed the div id="body" to div id="myadmin_body" in the code and css as this was preventing some jQuery selectors from locating the correct DOM element.

2 Updated your global output buffer routine so that it doesn’t even attempt to modify the buffer if there is no html in it, or if it isn’t obviously outputting a txp-like structure. As all your replacements are html for html, I took the approach that I didn’t want to continue processing the output if there was no html in it.

I did this in three steps…

a) Exiting if gps('event') is empty — because some plugins (mine, and at least one of wet’s) serve some non-html things (JS/CSS/XML) without there being any event in the request. This was the first thing I did and it successfully fixed my own sed_section_fields and wet’s link inserter. Now I have the rest of the steps listed below in place, this one could probably be safely removed in case any such ‘non-event’ plugin were to generate html.

b) Checked the content-type of the headers sent to the browser and exiting if it was not text/html. (I still need to tidy this up in case the php function it uses isn’t available on some installs.)

c) Checked if the very first replace (based on finding the textpattern.css entry) was actually successful and exiting if it wasn’t. This fixed things like ebl_upload which do serve html but it has no resemblance to txp’s output whatsoever. I figured that if it didn’t use textpattern’s css file, then it wasn’t going to be looking much like textpattern!

3 Replaced the unsafe occurrences of…

$buffer = preg_replace( $find , $replace , $buffer );

…with…

$tmp = preg_replace( $find , $replace , $buffer );
if( NULL !== $tmp )
    $buffer = $tmp;

This was necessary as the pagetop replace was sometimes failing with upm_image_popper (I can only speculate that this was due to it going out-of-memory when it searched through the buffer.) Anyway, when this happened preg_replace returned NULL killing the entire buffer! Checking the return value sorted this.

The last one (null returned from preg_replace) is new to me and I’ll need to be more careful with return values in my own plugins now I know about it.

Once again, many thanks Aeron.

Last edited by net-carver (2008-07-23 12:41:11)


Steve

Offline

#84 2008-07-23 13:36:30

rloaderro
Archived Plugin Author
From: Costa Rica
Registered: 2006-01-05
Posts: 190
Website

Re: aro_myadmin

That’s awesome! I’m so happy you came through since I’ve had little time to look into this. Open source lives!!

y’r pal -Aeron


Travel Atlas * Org | Start Somewhere

Offline

#85 2008-07-23 13:43:22

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: aro_myadmin

Aeron

No problem. If you want the final source code, just get in contact and I’ll send it over by return email (when I’ve cleaned it up a little) — it would be great if it could make it into your official release rather than having to live in an “alt” version.


Steve

Offline

#86 2008-07-26 15:39:12

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: aro_myadmin

Jonathan

Can you give aro_myadmin.v0.3.5.alt.gz.txt a try and let me know if it still maintains compatibility with all your plugins. If it does I can send the source for this cleaned-up version over to Aeron.

Many thanks.


Steve

Offline

#87 2008-07-26 17:14:01

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: aro_myadmin

Hi Steve, just downloaded your file and tested all 3 plugins mentioned earlier – all seems fine. Thanks again.

Offline

#88 2008-07-27 13:06:48

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: aro_myadmin

Jonathan, Aeron

Ok, thank you, I’ve sent the sources over.


Steve

Offline

#89 2008-07-27 19:47:06

rloaderro
Archived Plugin Author
From: Costa Rica
Registered: 2006-01-05
Posts: 190
Website

Re: aro_myadmin

Thanks Steve! I’ve updated the downloadable and moved the sources over to Github (thanks for the recommendation Steve – I’ve been wanting an excuse to check out Git!) – anyone who wants to contribute, checkout the plugin from the repository!

Thanks again to everyone for their enthusiasm and support – I’m glad this plugin proved to be useful for more than just me!

y’r pal -Aeron


Travel Atlas * Org | Start Somewhere

Offline

#90 2008-07-28 05:03:52

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: aro_myadmin

Aeron

hey, that’s fantastic. Can you add the css file for completeness too?


Steve

Offline

Board footer

Powered by FluxBB