Mass deletion of unused blogs

Re: Mass deletion of unused blogs

Postby newtech1 on Wed Jan 14, 2009 2:50 pm

Revisiting this topic.
Anyone now interested in creating this plug-in?
newtech1
 
Posts: 593
Joined: Thu Oct 13, 2005 12:02 am
Location: Seattle, WA, USA

Re: Mass deletion of unused blogs

Postby newtech1 on Sat Jan 17, 2009 3:31 pm

I would think there would be many larger blog owners that would want to have a mass blog deletion plug-in. Anybody want to work on this plug-in. I am willing to pay a few bucks.
Richard D'Andrea Dover
http://www.christianblogsites.com
newtech1
 
Posts: 593
Joined: Thu Oct 13, 2005 12:02 am
Location: Seattle, WA, USA

Re: Mass deletion of unused blogs

Postby jondaley on Sun Jan 18, 2009 9:12 am

I think the trouble is that the "large blog hosts" are the ones who almost never contribute to LifeType. I'd think since they are the ones making money via advertising, etc. that they would be able to contribute more than the individuals, but if I am remembering correctly, except for one site, all the people who have paid for stuff have been individuals.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Re: Mass deletion of unused blogs

Postby newtech1 on Sun Jan 18, 2009 11:51 am

Well I am one of the those individuals who offers free blog sites and does not have any advertising and just experienced a $1,000 a month pay cut. But as an individual I would be willing to contribute a few bucks towards this plugin if others will join in.
newtech1
 
Posts: 593
Joined: Thu Oct 13, 2005 12:02 am
Location: Seattle, WA, USA

Re: Mass deletion of unused blogs

Postby thestroller on Sun Feb 08, 2009 11:11 pm

Hello,

Yesterday I came back this entry and remember I didn't complete my promise. So I try to complete the first version with basic functions:
- List all blogs with last update date in 1 week, 1 month,...
- List all blogs with total posts less than 1, 5, 10,...

The function "owner never login in 1 week, 1 month,..." will be in the next version.

This plugin is located at "Admin > Miscellaneous" section.

This is the download link of the first version:
http://admin.vnweblogs.com/gallery/1/cl ... plugin.zip

Thank you and sorry for late.
Mai Minh
thestroller
 
Posts: 80
Joined: Fri Sep 29, 2006 12:05 am

Re: Mass deletion of unused blogs

Postby kouaa-blog on Mon Feb 09, 2009 5:22 am

Great news. I have install it and test. It's realy good.
Thanks taking time to help us
kouaa-blog
 
Posts: 174
Joined: Wed Nov 09, 2005 1:56 pm
Location: France

Re: Mass deletion of unused blogs

Postby jondaley on Fri Feb 13, 2009 3:45 pm

Thanks for the plugin.

I took a look at it, simplified the code, removed unused files, and fixed a security issue or two.
It is now uploaded at sourceforge.

http://downloads.sourceforge.net/lifetype/1.2_clean.zip

Anyone want to write the appropriate entry at http://wiki.lifetype.net/index.php/Plugin_clean
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Re: Mass deletion of unused blogs

Postby newtech1 on Fri Feb 13, 2009 5:25 pm

I downloaded the sourceforge version of this plugin. It installs fine, but I cannot get it to work. No matter what variables I choose it will not show any blogs.
What would you put in the search field (what field would it be searching? For now I am leaving it blank.
Note: I do not get any apache errors when trying to use tis plug-in.

Also, this is only deleting a blog, not the owner to it, correct? So we would need to still manually delete owners?
Richard D'Andrea Dover
http://www.christianblogsites.com
newtech1
 
Posts: 593
Joined: Thu Oct 13, 2005 12:02 am
Location: Seattle, WA, USA

Re: Mass deletion of unused blogs

Postby jondaley on Sat Feb 14, 2009 2:18 am

Leaving the search field blank should show the most stuff.
It does not touch owners, correct.
It was a little hard for me to test, since I don't have a huge site with idle blogs, but I made some fake blogs, and they showed up on my list. I'll probably need your lifetype password, and access to ftp to try to figure out if I made a mistake, or why you aren't seeing anything.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Re: Mass deletion of unused blogs

Postby newtech1 on Sat Feb 14, 2009 7:07 pm

I downloaded Minh version and it works fine.
I downloaded Jon's version again and it still does not work.

With Minh version as soon as you click the clean tab it will show some blogs listed before choosing options. With the other version, there is just white space below the option drop downs.
newtech1
 
Posts: 593
Joined: Thu Oct 13, 2005 12:02 am
Location: Seattle, WA, USA

Re: Mass deletion of unused blogs

Postby jondaley on Sun Feb 15, 2009 2:10 am

Ok, I'll have to see what I broke.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Re: Mass deletion of unused blogs

Postby jondaley on Sun Feb 15, 2009 8:12 pm

If you click the "show" button without picking any options, does it show anything? My defaults might be different than Minh's.

I just checked it again. Everything looks fine to me.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Re: Mass deletion of unused blogs

Postby newtech1 on Sun Feb 15, 2009 11:09 pm

No matter what option I choose, when I click show, still have a blank page other than the dropdown options.
Also, in the search terms field it defaults with these words in it:
self::SEARCH_TERMS_DEFAULT
newtech1
 
Posts: 593
Joined: Thu Oct 13, 2005 12:02 am
Location: Seattle, WA, USA

Re: Mass deletion of unused blogs

Postby thestroller on Mon Feb 16, 2009 3:26 am

Hello Jon,

Thanks for your help. I copied the class from blogs.class.php and forgot deleting un-used functions. Can you show me where is the security issues you fixed so I can remember in the future?

I will download the new version from SF and add new functions like:
- Add a checkbox to allow delete owner also.
- Add a combobox to list blogs whose owner never login in 1 month, 1 year,...

Any thing else guys?

Thank you
Mai Minh
thestroller
 
Posts: 80
Joined: Fri Sep 29, 2006 12:05 am

Re: Mass deletion of unused blogs

Postby jondaley on Mon Feb 16, 2009 2:02 pm

ah, the self:: part might explain it - I might have used php5 specific functions. What if you put one letter in the search field, or maybe even a space - so, it will override the default?

Mai Minh:

Changed things:

The english locale file had old random ("forex"?) strings in it.
plugins should use keys in the locale file that won't conflict with other plugins - otherwise, you'll find that if such-and-such a plugin is installed weird strings show up, etc. I try to prefix the keys with clean_ or something that will make the string more unique - unless it really is a string that everyone will use exactly the same.

blogs.class inheritance, I think if you see how I did it, you'll see that it is easier, and clearer what is going on.

there was a leftover action in the view directory that wasn't used at all.

I put the defaults in constants at the top, but maybe that is php5 specific, and so they should be changed to defines instead. But, easier to have the constants in one place in case someone wants to modify them.

You shouldn't hardly ever use stuff from the HttpVars class, as validation is harder to control that way, and using the registerFieldValidator() stuff is easier and safer. You didn't validate the search terms at all, so SQL could be put in there.

It is also easiest with the validators to see if you are validating the data in the constructor of the action, rather than having to check if you remembered in the view, or wherever the variable is accessed. (this is the bulk of the changes in 1.2.9 - we were quite sloppy with that previously).

I removed the deleteBlog(s) traps, but maybe that wasn't the best - it simplifies the code, and checks, etc. since you had to copy all of that code just to replace the view - that does happen in different plugins some what often - it'd be nice if there were a way to inherit the class or something to avoid all the code duplication for just a template change.

Please remember to use version numbers (the date) for plugins - this allows the plugin to notify the admin when there are updates, as well as keep bug reports sane, since people will know what version of the plugin they have.

You used 1.1 style permissions, rather than the newer, more specific permission structure - probably the "site_admin" bit could be removed, and anyone with update_site_blogs permission could run your plugin, but I wasn't sure, so I left it as site_admin for now.

You had used "clean" as the op and strings in various places, and I thought "clean unused blogs" was more exact.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

PreviousNext

Return to General Plugin Development