Loading

Author Topic: [NEW PLUGIN] Ghostbuster  (Read 4019 times)

trains58554

  • Super Moderator
  • Hero Member
  • *****
  • Posts: 1815
  • The Ghostbuster
[NEW PLUGIN] Ghostbuster
« on: November 10, 2011, 06:55:26 am »
Hi all

Update 5-15-12
Now deletes forgotten rows from item_products_attr table.

Update 5-14-12
The Ghostbuster plugin now deletes forgotten rows left behind from the elitpay plugin.

Update 1-13-12
Small fix

I have created a new plugin called Ghostbuster that seeks out all the ghost ads and deletes them.

Jay

Zip Last Updated 5-15-12
« Last Edit: May 15, 2012, 08:45:31 pm by trains58554 »

sundance

  • Sr. Member
  • ****
  • Posts: 377
    • RexburgSwap.com
    • Email
Re: [NEW PLUGIN] Ghostbuster
« Reply #1 on: November 10, 2011, 07:09:21 am »
I highly recommend, quite the awesome tool  ;D
Sundance

Swede

  • Super Moderator
  • Sr. Member
  • *****
  • Posts: 381
Re: [NEW PLUGIN] Ghostbuster
« Reply #2 on: November 10, 2011, 02:26:14 pm »
It sounds like a good plugin!

How can you be shure it doesnt delete valid ads?

trains58554

  • Super Moderator
  • Hero Member
  • *****
  • Posts: 1815
  • The Ghostbuster
Re: [NEW PLUGIN] Ghostbuster
« Reply #3 on: November 10, 2011, 05:47:55 pm »
@Swede

I am sure it is not deleting valid ads because of the way I am checking. I compare the t_item_description table against the t_item table and which ever rows do not have a row in the description table are deleted that is also how I check the other tables that sometimes could cause problems.

Jay

sundance

  • Sr. Member
  • ****
  • Posts: 377
    • RexburgSwap.com
    • Email
Re: [NEW PLUGIN] Ghostbuster
« Reply #4 on: November 10, 2011, 10:35:16 pm »
It did not delete any of my real ads.
Sundance

kris

  • Full Member
  • ***
  • Posts: 105
Re: [NEW PLUGIN] Ghostbuster
« Reply #5 on: November 11, 2011, 02:05:32 pm »
Is this something like removing duplicate ads, if yes than on what basis it will del, i mean title, or any thing else

trains58554

  • Super Moderator
  • Hero Member
  • *****
  • Posts: 1815
  • The Ghostbuster
Re: [NEW PLUGIN] Ghostbuster
« Reply #6 on: November 11, 2011, 05:32:19 pm »
Hi kris

This plugin does not delete duplicate ads. What it does is deletes the ads that do not fully delete.

Jay

rockitman187

  • Newbie
  • *
  • Posts: 37
Re: [NEW PLUGIN] Ghostbuster
« Reply #7 on: November 11, 2011, 09:54:24 pm »
This is an excellent plugin

trains58554

  • Super Moderator
  • Hero Member
  • *****
  • Posts: 1815
  • The Ghostbuster
Re: [NEW PLUGIN] Ghostbuster
« Reply #8 on: November 11, 2011, 09:59:11 pm »
@rockitman187

Did Ghostbuster find any ghosts hiding in your database?

Jay

rockitman187

  • Newbie
  • *
  • Posts: 37
Re: [NEW PLUGIN] Ghostbuster
« Reply #9 on: November 15, 2011, 02:02:31 pm »
Yeah, it found a few and cleaned them right up, and since I test and play with every plugin made (even the ones I will never need) I had to give it a try, I really like the fact that it was kept simple, The way all plugins should be.. This is one I will be keeping and using.
Great job

Oh, and how is the tagcloud plugin coming?


Thanks,Randy

trains58554

  • Super Moderator
  • Hero Member
  • *****
  • Posts: 1815
  • The Ghostbuster
Re: [NEW PLUGIN] Ghostbuster
« Reply #10 on: November 15, 2011, 05:36:28 pm »
Hi Randy

I am glad you like this plugin. I wanted to keep it simple so it was straight forward in how to use it.

What tag cloud plugin Just Kidding. I have got a good start to it then I got sidetracked but I will be getting back on that plugin.

Thanks

Jay

koltz

  • Jr. Member
  • **
  • Posts: 84
    • Email
Re: [NEW PLUGIN] Ghostbuster
« Reply #11 on: November 16, 2011, 06:26:25 am »
Excellent work!

rafl

  • Sr. Member
  • ****
  • Posts: 415
    • Anunturi
Re: [NEW PLUGIN] Ghostbuster
« Reply #12 on: November 16, 2011, 10:55:39 pm »
A BIG THANK!

Code: [Select]
You currently have 60 ghost ads.

Ghost ads in stats table 216
Ghost ads in meta table 0
Ghost ads in locations table 0
Ghost ads in resources table 0
Ghost ads in comments table 0
Ghost ads in offer_item_options table 0
Ghost ads in paypal_publish table 60

Ghost ad number 20
Ghost ad number 248
Ghost ad number 315
Ghost ad number 354
Ghost ad number 506
Ghost ad number 1037
Ghost ad number 1060
Ghost ad number 1061
Ghost ad number 1078
Ghost ad number 1152
Ghost ad number 1197
Ghost ad number 1270
Ghost ad number 1287
Ghost ad number 1294
Ghost ad number 1297
Ghost ad number 1302
Ghost ad number 1307
Ghost ad number 1316
Ghost ad number 1326
Ghost ad number 1441
Ghost ad number 1477
Ghost ad number 1478
Ghost ad number 1479
Ghost ad number 1480
Ghost ad number 1604
Ghost ad number 1616
Ghost ad number 1617
Ghost ad number 1620
Ghost ad number 1637
Ghost ad number 1810
Ghost ad number 1811
Ghost ad number 1816
Ghost ad number 1874
Ghost ad number 1889
Ghost ad number 1927
Ghost ad number 2157
Ghost ad number 2250
Ghost ad number 2282
Ghost ad number 2288
Ghost ad number 2289
Ghost ad number 2310
Ghost ad number 2357
Ghost ad number 2358
Ghost ad number 2360
Ghost ad number 2361
Ghost ad number 2363
Ghost ad number 2547
Ghost ad number 2548
Ghost ad number 2559
Ghost ad number 2561
Ghost ad number 2562
Ghost ad number 2563
Ghost ad number 2564
Ghost ad number 2730
Ghost ad number 2905
Ghost ad number 2959
Ghost ad number 2961
Ghost ad number 3082
Ghost ad number 3102
Ghost ad number 3103

Code: [Select]
You currently have 0 ghost ads.

Ghost ads in stats table 0
Ghost ads in meta table 0
Ghost ads in locations table 0
Ghost ads in resources table 0
Ghost ads in comments table 0
Ghost ads in offer_item_options table 0
Ghost ads in paypal_publish table 0

You are ghost free!

trains58554

  • Super Moderator
  • Hero Member
  • *****
  • Posts: 1815
  • The Ghostbuster
Re: [NEW PLUGIN] Ghostbuster
« Reply #13 on: November 16, 2011, 11:01:27 pm »
Hi rafl

Your welcome.

There is a small bug in paypal that is why you ended up with 60 ghost ads.

Here are the additions you should make to your paypal index.php file

add the following line at the end by the rest of the hooks

osc_add_hook
('delete_item''paypal_item_delete');


Add the following code around line 493

function paypal_item_delete($itemId) {
    
	
$conn getConnection();
      
$conn->osc_dbExec("DELETE FROM %st_paypal_premium WHERE fk_i_item_id = '%d'"DB_TABLE_PREFIX$itemId);
      
$conn->osc_dbExec("DELETE FROM %st_paypal_publish WHERE fk_i_item_id = '%d'"DB_TABLE_PREFIX$itemId);
    }


Jay

rafl

  • Sr. Member
  • ****
  • Posts: 415
    • Anunturi
Re: [NEW PLUGIN] Ghostbuster
« Reply #14 on: November 16, 2011, 11:28:04 pm »
@trains58554 a really big thank for the update, too. In facts, whenever deleting 'strange' items, I'm getting an error.
As consequence, I usually go in database to manually delete 'item stats' + 'paypal_publish' and last the 'item' itself.

I will implement your code and will report back for any update  ;) but I'm pretty sure that's it is.

luca
« Last Edit: November 16, 2011, 11:32:25 pm by rafl »