Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#73 2008-07-14 13:35:40

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

Re: aro_myadmin

rloaderro wrote:

Basically wherever you see str_ireplace, you’ll want to wrap the first and last params with strtolower

Thank you so much! This is actually working:

$replace = str_replace(strtolower(textpattern), $sitename, strtolower(gTxt(login_to_textpattern)));

Cheers!

Offline

#74 2008-07-20 15:54:08

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

Re: aro_myadmin

Aeron, All

Hi, I think I tracked down the problems people were posting regarding the jQuery/JS incompatibilities with other plugins. Here’s an alt version of your plugin that I hope fixes this for most people.

aro_myadmin.v0.3.4.alt.gz.txt

I’ve only tried it on one site but I hope it helps.

Edit : Link removed so I don’t have to update it anymore! Follow the thread for a more recent version.

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


Steve

Offline

#75 2008-07-20 21:04:04

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

Re: aro_myadmin

Hi Steve, tried your edited version, and can confirm that it did not work, at least for me. I tried upm_img_popper, ebl_upload and wet_quicklink. None worked :-(

Offline

#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
Moderator
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
Moderator
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

Board footer

Powered by FluxBB