*

krallen

  • ***
  • 37 posts
"edit more plugin" with "gamma osclass theme" include
« on: May 24, 2020, 07:44:18 PM »
    First apologize for my bad english

my osclass site use "more edit plugin" for new post approving new posts

>>>more edit plugin free

more edit plugin Block new post and admin approve and Unblock new post in admin manage listings page

Gamma osclass theme no show "block posts" My account / My listings / Pending items because new post Blocked

Gamma osclass theme show "Inactive posts"

1- I will edit more edit plugin in index.php and

     oc-content/plugins/moreedit/index.php open and change " b_enabled " delete paste " b_active "

     !!! >>> i add changed moreedit index.php this post

and user control page  (My account / My listings / Pending items ) show Pending items this new post and "waiting for admin approval"

new post show " Inactive" in admin manage listings page

if admin wants admin can make Active this post and show this post

2- Last change , so that the user does not approve of her own post delete this code

       open /list.dentalilan.com/oc-content/themes/gamma 

       edit > user-items.php

       delete >
<a class="activate" target="_blank" href="<?php echo osc_item_activate_url(); ?>"><?php _e('Validate', 'gamma'); ?></a>

thank you



« Last Edit: May 24, 2020, 10:00:35 PM by MB Themes »

*

VS

  • **
  • 29 posts
Re: "edit more plugin" with "gamma osclass theme" include
« Reply #1 on: June 05, 2023, 01:09:28 PM »
I have one more option for more edit and help to add one more option.

With this code more edit can use manual approve just for specified categories.

Quote
function moreedit_posted_item($item)
{
    $categoriesToApprove = array(2, 3, 4, 31, ...45); // Categories that require manual approval
   
    if (in_array($item['fk_i_category_id'], $categoriesToApprove)) {
        // Category requires manual approval
        if (osc_get_preference('moderate_all', 'moreedit') == '1') {
            // Ads need to be approved by the administrator
            $error = Session::newInstance()->_get('moreedit_fm_info');
            if ($error == '') {
                Session::newInstance()->_set('moreedit_fm_info', __('Your ad needs to be approved by the administrator, it could take a while until it appears on the website', 'moreedit'));
            }
            Item::newInstance()->update(array('b_enabled' => 0), array('pk_i_id' => $item['pk_i_id']));
        } else {
            // Ads in this category require manual approval but are automatically enabled
            Item::newInstance()->update(array('b_enabled' => 1), array('pk_i_id' => $item['pk_i_id']));
        }
    } else {
        // Category does not require manual approval, automatically enable the ad
        Item::newInstance()->update(array('b_enabled' => 1), array('pk_i_id' => $item['pk_i_id']));
        // Approved ad flash message
        $successMsg = __('Your ad has been approved and is now visible on the website.', 'moreedit');
        osc_add_flash_info_message($successMsg);
    }
}

But I need more, i need solution for cooperate with plugin seller verification if want to auto approve all categories if seller verifyied from admin panel.

Is it possible to code by pulling the data from the database if the user is verified to bypass the manual approval of the specified categories and how?