[GET][VIP] – Plugin Creation Blueprint | NewProxyLists


  1. Ziplack

    Ziplack
    VIP UPLOADER


    Joined:
    Dec 9, 2014
    Messages:
    1,272
    Likes Received:
    140
    Trophy Points:
    63

    SalesPage

    Code:

    Hidden Content:

    You must reply before you can see the hidden data contained here.

    Download:

    Hidden Content:

    You must reply before you can see the hidden data contained here.

     

angular – Karma – ng test – Please import the top-level fullcalendar lib before attempting to import a plugin

When I run ng test, it returns the following error:

Error during loading: Uncaught Error: Please import the top-level fullcalendar lib before attempting to import a plugin. in http://localhost:9876/karma_webpack/vendor.js line 105427

Note that it works in the project, no idea why it needs the fullcalendar/angular when running tests.

primeng.module.ts (it’s imported/exported by SharedModule)

import { NgModule } from '@angular/core';

import { AccordionModule } from 'primeng/accordion';
import { AutoCompleteModule } from 'primeng/autocomplete';
import { AvatarGroupModule } from 'primeng/avatargroup';
import { AvatarModule } from 'primeng/avatar';
import { BreadcrumbModule } from 'primeng/breadcrumb';
import { BadgeModule } from 'primeng/badge';
import { ButtonModule } from 'primeng/button';
import { CalendarModule } from 'primeng/calendar';
import { CardModule } from 'primeng/card';
import { CarouselModule } from 'primeng/carousel';
import { ChartModule } from 'primeng/chart';
import { CheckboxModule } from 'primeng/checkbox';
import { ChipModule } from 'primeng/chip';
import { ChipsModule } from 'primeng/chips';
import { CodeHighlighterModule } from 'primeng/codehighlighter';
import { ConfirmDialogModule } from 'primeng/confirmdialog';
import { ConfirmPopupModule } from 'primeng/confirmpopup';
import { ColorPickerModule } from 'primeng/colorpicker';
import { ContextMenuModule } from 'primeng/contextmenu';
import { DataViewModule } from 'primeng/dataview';
import { DialogModule } from 'primeng/dialog';
import { DividerModule } from 'primeng/divider';
import { DropdownModule } from 'primeng/dropdown';
import { FieldsetModule } from 'primeng/fieldset';
import { FileUploadModule } from 'primeng/fileupload';
import { GalleriaModule } from 'primeng/galleria';
import { InplaceModule } from 'primeng/inplace';
import { InputNumberModule } from 'primeng/inputnumber';
import { InputMaskModule } from 'primeng/inputmask';
import { InputSwitchModule } from 'primeng/inputswitch';
import { InputTextModule } from 'primeng/inputtext';
import { InputTextareaModule } from 'primeng/inputtextarea';
import { LightboxModule } from 'primeng/lightbox';
import { KnobModule } from 'primeng/knob';
import { ListboxModule } from 'primeng/listbox';
import { MegaMenuModule } from 'primeng/megamenu';
import { MenuModule } from 'primeng/menu';
import { MenubarModule } from 'primeng/menubar';
import { MessagesModule } from 'primeng/messages';
import { MessageModule } from 'primeng/message';
import { MultiSelectModule } from 'primeng/multiselect';
import { OrderListModule } from 'primeng/orderlist';
import { OrganizationChartModule } from 'primeng/organizationchart';
import { OverlayPanelModule } from 'primeng/overlaypanel';
import { PaginatorModule } from 'primeng/paginator';
import { PanelModule } from 'primeng/panel';
import { PanelMenuModule } from 'primeng/panelmenu';
import { PasswordModule } from 'primeng/password';
import { PickListModule } from 'primeng/picklist';
import { ProgressBarModule } from 'primeng/progressbar';
import { RadioButtonModule } from 'primeng/radiobutton';
import { RatingModule } from 'primeng/rating';
import { RippleModule } from 'primeng/ripple';
import { ScrollPanelModule } from 'primeng/scrollpanel';
import { ScrollTopModule } from 'primeng/scrolltop';
import { SelectButtonModule } from 'primeng/selectbutton';
import { SidebarModule } from 'primeng/sidebar';
import { SkeletonModule } from 'primeng/skeleton';
import { SlideMenuModule } from 'primeng/slidemenu';
import { SliderModule } from 'primeng/slider';
import { SplitButtonModule } from 'primeng/splitbutton';
import { SplitterModule } from 'primeng/splitter';
import { StepsModule } from 'primeng/steps';
import { TabMenuModule } from 'primeng/tabmenu';
import { TableModule } from 'primeng/table';
import { TabViewModule } from 'primeng/tabview';
import { TagModule } from 'primeng/tag';
import { TerminalModule } from 'primeng/terminal';
import { TieredMenuModule } from 'primeng/tieredmenu';
import { TimelineModule } from 'primeng/timeline';
import { ToastModule } from 'primeng/toast';
import { ToggleButtonModule } from 'primeng/togglebutton';
import { ToolbarModule } from 'primeng/toolbar';
import { TooltipModule } from 'primeng/tooltip';
import { TreeModule } from 'primeng/tree';
import { TreeTableModule } from 'primeng/treetable';
import { VirtualScrollerModule } from 'primeng/virtualscroller';

// FullCalendar
import { FullCalendarModule } from '@fullcalendar/angular';
import dayGridPlugin from '@fullcalendar/daygrid';
import timeGridPlugin from '@fullcalendar/timegrid';
import interactionPlugin from '@fullcalendar/interaction';

FullCalendarModule.registerPlugins((dayGridPlugin, timeGridPlugin, interactionPlugin));

@NgModule({
  exports: (
    AccordionModule,
    AutoCompleteModule,
    AvatarGroupModule,
    AvatarModule,
    BreadcrumbModule,
    BadgeModule,
    ButtonModule,
    CalendarModule,
    CardModule,
    CarouselModule,
    ChartModule,
    CheckboxModule,
    ChipModule,
    ChipsModule,
    CodeHighlighterModule,
    ConfirmDialogModule,
    ConfirmPopupModule,
    ColorPickerModule,
    ContextMenuModule,
    DataViewModule,
    DialogModule,
    DividerModule,
    DropdownModule,
    FieldsetModule,
    FileUploadModule,
    FullCalendarModule,
    GalleriaModule,
    InplaceModule,
    InputNumberModule,
    InputMaskModule,
    InputSwitchModule,
    InputTextModule,
    InputTextareaModule,
    KnobModule,
    LightboxModule,
    ListboxModule,
    MegaMenuModule,
    MenuModule,
    MenubarModule,
    MessageModule,
    MessagesModule,
    MultiSelectModule,
    OrderListModule,
    OrganizationChartModule,
    OverlayPanelModule,
    PaginatorModule,
    PanelModule,
    PanelMenuModule,
    PasswordModule,
    PickListModule,
    ProgressBarModule,
    RadioButtonModule,
    RatingModule,
    RippleModule,
    ScrollTopModule,
    ScrollPanelModule,
    SelectButtonModule,
    SidebarModule,
    SkeletonModule,
    SlideMenuModule,
    SliderModule,
    SplitButtonModule,
    SplitterModule,
    StepsModule,
    TableModule,
    TabMenuModule,
    TabViewModule,
    TagModule,
    TerminalModule,
    TieredMenuModule,
    TimelineModule,
    ToastModule,
    ToggleButtonModule,
    ToolbarModule,
    TooltipModule,
    TreeModule,
    TreeTableModule,
    VirtualScrollerModule,

    // FullCalendar
    FullCalendarModule
  )
})
export class PrimengModule {}

package.json

{
  "name": "academic-schedule",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "watch": "ng build --watch --configuration development",
    "test": "ng test",
    "format:check": "prettier "src/{app,environments}/**/*{.ts,.html,.json,.scss}" --check",
    "format:write": "prettier "src/{app,environments}/**/*{.ts,.html,.json,.scss}" --write",
    "lint": "ng lint",
    "prepare": "husky install"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^12.1.1",
    "@angular/cdk": "^12.1.2",
    "@angular/common": "^12.1.1",
    "@angular/compiler": "^12.1.1",
    "@angular/core": "^12.1.1",
    "@angular/forms": "^12.1.1",
    "@angular/platform-browser": "^12.1.1",
    "@angular/platform-browser-dynamic": "^12.1.1",
    "@angular/router": "^12.1.1",
    "@fullcalendar/angular": "^5.8.0",
    "@fullcalendar/daygrid": "^5.8.0",
    "@fullcalendar/interaction": "^5.8.0",
    "@fullcalendar/timegrid": "^5.8.0",
    "chart.js": "^3.4.1",
    "jwt-decode": "^3.1.2",
    "primeflex": "^2.0.0",
    "primeicons": "^4.1.0",
    "primeng": "^12.0.0",
    "rxjs": "^6.6.7",
    "tslib": "^2.3.0",
    "zone.js": "^0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^12.1.1",
    "@angular-eslint/builder": "12.3.1",
    "@angular-eslint/eslint-plugin": "12.3.1",
    "@angular-eslint/eslint-plugin-template": "12.3.1",
    "@angular-eslint/schematics": "12.3.1",
    "@angular-eslint/template-parser": "12.3.1",
    "@angular/cli": "^12.1.1",
    "@angular/compiler-cli": "^12.1.1",
    "@types/jasmine": "^3.7.7",
    "@types/node": "^16.0.0",
    "@typescript-eslint/eslint-plugin": "4.28.2",
    "@typescript-eslint/parser": "4.28.2",
    "eslint": "^7.26.0",
    "eslint-config-prettier": "^8.3.0",
    "husky": "^7.0.1",
    "jasmine-core": "^3.8.0",
    "karma": "^6.3.4",
    "karma-chrome-launcher": "^3.1.0",
    "karma-coverage": "~2.0.3",
    "karma-jasmine": "^4.0.1",
    "karma-jasmine-html-reporter": "^1.6.0",
    "lint-staged": "^11.1.1",
    "prettier": "^2.3.2",
    "typescript": "^4.3.5"
  },
  "lint-staged": {
    "**/*": "prettier --write --ignore-unknown",
    "*.js": "eslint --cache --fix",
    "*.{js,css,md}": "prettier --write"
  }
}

api – Google credentials and redirect URI for Google OAuth2 in a WordPress plugin, questions

I’m developing a plugin that inserts contacts into a custom table of the WordPress database (name, phone number, email). It is possible to enter data in this table either manually, through a form, or by importing it from WordPress users. I have also developed a feature to import contacts from Google Contacts (Google People). Everything works but I ask you: when I will provide the plugin to my customers how can I do to avoid also providing the client_secret.json file with my credentials for accessing the Google API via OAuth2 together with the plugin?
Furthermore, in order to function correctly, I must also authorize the URI redirect in the Google console but I cannot know in advance the URL of the various sites where the plugin will be installed, is it possible to automate (perhaps always through the Google API) this insertion?

Plugin pages on admin page are broken. Problem with permalinks. Getting “Invalid post type” error and “You are not allowed to access this page.”

Okay let me try to explain what is happening.

Lets say Im trying to open orders page in woocommerce plugin by pressing “orders” in the menu. The link its opening is

https://example.com/wp-admin/edit.php?post_type=shop_order%3Fpost_type%3Dshop_order.

The link will open just fine but if you look at the permalink youll see the problem. The part %3Fpost_type%3Dshop_order shouldnt be there and this causes the next problem. If I try to view the second page of orders it will try to open this link https://example.com/wp-admin/edit.php?post_type=shop_order%3Fpost_type%3Dshop_order&paged=2. This will give me the “invalid post type” error. If I change the percentage signs to ampersand signs the page will open just fine. This will work for every post type but wont work for pages.

As to my permalink settings I have it set to custom with https://example.com/%postname%/. If I change it to anything else the problem persists.

.htaccess file is just the vanilla wordpress one with no changes.

Im not sure what to do anymore. I tried all the simple fixes as deactivating the plugins, theme, resetting the permalinks in settings. Nothing is fixing it. Does anyone have any ideas how to fix this?

Image Permissions Plugin

I’m kicking around the idea of using wordpress for a future project but it’s going to need so many plugins I’m having doubts.

#1 requirement is that images are tied to a user/contributor and to a custom post. Anyone editing the custom post can see any images that have been uploaded. A user can see all their images regardless of which custom post they’re editing.

Does anyone know if a plugin that handles these file permissions?
SEMrush

 

I want a plugin to update all product price on a page

I am working on a woocommerce website that sells blinds, How do I get a plugin that automatically updates (with a single click) the price of all products on the shop page once a custom size (width and height of the window) is been selected…

custom options – How can I get customer data in a plugin class?

I’m trying to access logged in customer data in an “after” plugin.

The plugin is working, but I need some logic based on a custom customer attribute.

I try to do this but I get an error

Fatal error: Uncaught Error: Call to a member function get() on null in /Users/name/file/project/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 170

I’ve tried using create instead of get for the object manager, but I get the same result.

I have a helper function that I use to get this data in some phtml files, but it doesn’t seem to work in this class.

Do I have to get this data from somewhere else?

Thanks

namespace <company>EmailCopyPlugin;

use MagentoFrameworkAppObjectManager;
use MagentoSalesModelOrderEmailContainerOrderIdentity;
use PsrLogLoggerInterface;

class SendOrderCopy
{

   private $logger;
   private $objectManager;

   public function __construct(
       LoggerInterface $logger,
       ObjectManager $objectManager

   )
   {
       $this->logger = $logger;
       $this->objectManager = $objectManager;
   }

   public function afterGetEmailCopyTo(OrderIdentity $identity, $emailList)
   {
       $customer = $this->objectManager::getInstance()->get('MagentoCustomerModelSession')->getCustomer();
       $customer = $customer->getData();
       var_dump($customer);
       $emailList() = "<email>";
       $emailList() = "<email";
       return $emailList;
   }
}

💫 Dark Mode 2 plugin for WP 💫 | Forum Promotion

I feel you on that. I do think you have a lot of potential to win the SEO game with this plugin, and I may have just found a lead for you.

When I searched “dark mode wordpress” I got this WPBeginner article:

In their tutorial they recommend this “dark mode” plugin:

…which, according to the most recent reviews, the authors just pulled a fake-out on their users and hijacked the plugin to be something else. So, WPBeginner’s article is technically outdated, and as an authority—they hate to be out of date. Your move here is to contact them, fill them in on this situation and request they change the links out with a link to your Dark Mode 2 plugin.

Maybe get an affiliate program setup too. It’s hard to get promotion for premium products from large WP outlets and you’ll need everything you can to convince these guys.

Next, and here’s where you can go bold—WP Tavern recently posted a series of articles about a similar controversy where another company acquired a popular plugin and did the same kind of fake-out on their users. You have an opportunity here to ride that wave of controversy—which got a lot of attention from the WP Tavern readers—and bring this story to their attention. Submit it as a tip and mention that you have your own Dark Mode plugin and any link back to your plugin would really help you as an independent plugin developer.

Strike while it’s hot my friend. :cool:

Install Blocksy Pro WordPress Plugin on your website for $5

Install Blocksy Pro WordPress Plugin on your website

Install Blocksy Pro WordPress Plugin on your WordPress website. You can update the plugins from your Dashboard.

You will get:

  • Blocksy Pro WordPress Plugin
  • Lifetime updates within WordPress Dashboard

Note: I’ll install and activate Blocksy Pro WordPress Plugin myself and Key will not be shared buyer!

LIMITED TIME OFFER!

100% Money Back Guaranteed Work!

.

magento2 – Magento 2.4 add multiple Custom Links to Main Navigation via Plugin

You can use like this below way :

<?php

/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

namespace VendorModulePlugin;

use MagentoFrameworkDataTreeNodeFactory;
use MagentoFrameworkUrlInterface;

class Topmenu {
    /**
     * @var NodeFactory
     */
    protected $nodeFactory;

    /**
     * @var UrlInterface
     */
    protected $urlBuilder;

    /**
     * @param NodeFactory  $nodeFactory
     * @param UrlInterface $urlBuilder
     */
    public function __construct(
        NodeFactory $nodeFactory,
        UrlInterface $urlBuilder
    ) {
        $this->nodeFactory = $nodeFactory;
        $this->urlBuilder = $urlBuilder;
    }

    public function beforeGetHtml(
        MagentoThemeBlockHtmlTopmenu $subject,
        $outermostClass = '',
        $childrenWrapClass = '',
        $limit = 0
    ) {
        /**
         * Parent Menu
         */
        $menuNode = $this->nodeFactory->create(
            (
                'data' => $this->getNodeAsArray("Main Menu", "main-menu"),
                'idField' => 'id',
                'tree' => $subject->getMenu()->getTree(),
            )
        );
        /**
         * Add Child Menu
         */
        $menuNode->addChild(
            $this->nodeFactory->create(
                (
                    'data' => $this->getNodeAsArray("Sub Menu", "sub-menu"),
                    'idField' => 'id',
                    'tree' => $subject->getMenu()->getTree(),
                )
            )
        );
        $subject->getMenu()->addChild($menuNode);
    }

    protected function getNodeAsArray($name, $id) {
        $url = $this->urlBuilder->getUrl($id);
        return (
            'name' => __($name),
            'id' => $id,
            'url' => $url,
            'has_active' => false,
            'is_active' => false,
        );
    }
}

I added Parent Menu & Child Menu. You can use it multiple times which you want to add multiple links.

Reference