Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2011-04-18 09:04:31

Pierre
Member
Registered: 2011-02-28
Posts: 46

[FIXED] Can't delete some things like feeds or advertisements

I have some feeds and some advertisements and want to remove them but the control panel is unresponsive.
I tried deleting the entries via the delete button under the actions column and the dropdown option "delete" on the left.

Offline

#2 2011-04-18 11:07:24

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [FIXED] Can't delete some things like feeds or advertisements

Hmm...please try to clear the browser cache and try again. The RSS Video Feeds delete button doesnt work, however the advertising button should work perfectly. Will add the delete function asap.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#3 2011-04-18 12:07:06

Pierre
Member
Registered: 2011-02-28
Posts: 46

Re: [FIXED] Can't delete some things like feeds or advertisements

its the Advertising->Player->Manage delete function that doesn't work.

Offline

#4 2011-04-18 14:31:14

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [FIXED] Can't delete some things like feeds or advertisements

Ok. Will check and fix.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#5 2011-04-19 14:09:18

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [FIXED] Can't delete some things like feeds or advertisements

Hi,

Edit admin/modules/adv/components/player.php and after the following lines:

$errors     = array();
$messages   = array();

add:

        if (isset($_POST['action']) && isset($_POST['adv_id'])) {
            $action = trim($_POST['action']);
            $adv_id = (int) trim($_POST['adv_id']);
            if ($adv_id) {
                switch ($action) {
                    case 'activate':
                    case 'suspend':
                        $status = ($action == 'activate') ? 1 : 0;
                        $msg    = ($action == 'activate') ? 'activated' : 'suspended';
                        $this->db->query("UPDATE #__adv_player SET status = '".$status."' WHERE adv_id = ".$adv_id." LIMIT 1");
                        $messages[] = 'Banner '.$msg.'!';
                        break;
                    case 'delete':
                        $this->db->query("DELETE FROM #__adv_player WHERE adv_id = ".$adv_id." LIMIT 1");
                        $messages[] = 'Banner deleted!';
                        break;
                    default:
                        $errors[] = 'Invalid action! What exactly did you click!?';
                        break;
                }
            } else {
                $errors[] = 'Invalid advertising! Are you sure this banner exists!?';
            }
        }

        if (isset($_POST['submit_actions'])) {
            $action = trim($_POST['action']);
            $ids    = $this->get_checkbox_ids();
            if ($ids) {
                switch ($action) {
                    case 'suspend':
                    case 'activate':
                        $status = ($action == 'activate') ? 1 : 0;
                        $msg    = ($action == 'activate') ? 'activated' : 'suspended';
                        $this->db->query("UPDATE #__adv_player SET status = '".$status."' WHERE adv_id IN (".implode(',', $ids).")");
                        $messages[] = "Selected banners ".$msg."!";
                        break;
                    case 'delete':
                        $this->db->query("DELETE FROM #__adv_player WHERE adv_id IN (".implode(',', $ids).")");
                        $messages[] = "Selected banners deleted!";
                        break;
                    default:
                        $errors[] = 'Invalid action! What exactly did you select!?';
                        break;
                }
            } else {
                $errors[] = 'Please select at least one banner!';
            }
        }

Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#6 2011-04-19 14:23:42

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [FIXED] Can't delete some things like feeds or advertisements

The feed suspend/activate/delete is also fixed (will release RC2) in a few days with some fixes. If you want this fix right now, please drop me a email and i'll attach the file.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#7 2011-04-20 07:07:04

Pierre
Member
Registered: 2011-02-28
Posts: 46

Re: [FIXED] Can't delete some things like feeds or advertisements

Ok, I edited the file and it's working.
Thanks!

Offline

Board footer

Powered by FluxBB