Commit 3cf21bef authored by jan.koester's avatar jan.koester
Browse files

start with media support in blogi

parent ae0599e6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4,3 +4,4 @@ add_subdirectory(content)
add_subdirectory(nodeinfo)
add_subdirectory(youtube)
add_subdirectory(navbar)
add_subdirectory(media)
+5 −0
Original line number Diff line number Diff line
add_library(media SHARED media.cpp settings.cpp)

target_link_libraries(media dl blogidev)

install (TARGETS media  DESTINATION lib/blogi/plugins)
+105 −0
Original line number Diff line number Diff line
#define icondatalen 397

const unsigned char icondata[icondatalen] =
{
    0x52, 0x49, 0x46, 0x46,
    0xc8, 0x01, 0x00, 0x00,
    0x57, 0x45, 0x42, 0x50,
    0x56, 0x50, 0x38, 0x4c,
    0xbc, 0x01, 0x00, 0x00,
    0x2f, 0x1b, 0xc0, 0x06,
    0x10, 0x35, 0x40, 0x6c,
    0xdb, 0x46, 0x90, 0x94,
    0x5a, 0x0f, 0xcb, 0x6f,
    0x63, 0x7b, 0x9f, 0xc9,
    0xce, 0xee, 0x77, 0xe0,
    0x44, 0xc8, 0xb5, 0x6d,
    0xeb, 0xd8, 0xb3, 0x13,
    0xa3, 0x73, 0x67, 0xdb,
    0x36, 0x2f, 0xc0, 0xec,
    0xf8, 0x22, 0x6a, 0x33,
    0x72, 0x03, 0xb6, 0x9d,
    0xca, 0xec, 0xf4, 0xc6,
    0x49, 0x67, 0xdb, 0x76,
    0xf2, 0x1b, 0x0f, 0x15,
    0xb8, 0x6d, 0xa3, 0xa4,
    0xd2, 0x31, 0x0e, 0x3e,
    0xc1, 0xc8, 0x06, 0x82,
    0x05, 0x82, 0x07, 0xf1,
    0x1f, 0x19, 0x38, 0xf3,
    0x28, 0x33, 0xe3, 0x4c,
    0x52, 0xc1, 0x20, 0xf8,
    0x57, 0x61, 0x06, 0x0b,
    0x88, 0x28, 0x9e, 0x60,
    0xbd, 0x3c, 0x3c, 0xa0,
    0x61, 0xa2, 0x40, 0xce,
    0x2a, 0xbc, 0x9b, 0x36,
    0x33, 0x19, 0x4a, 0x92,
    0xc9, 0x7e, 0xc0, 0x8c,
    0x03, 0x0c, 0x8f, 0x99,
    0x02, 0x92, 0xff, 0x38,
    0x66, 0xba, 0xe0, 0x28,
    0x7a, 0x74, 0x93, 0x90,
    0xa1, 0xbd, 0x97, 0x00,
    0xe3, 0x31, 0x73, 0x82,
    0x91, 0x25, 0xbf, 0x9c,
    0x89, 0x29, 0x78, 0xec,
    0x25, 0x41, 0xe7, 0x82,
    0xae, 0x53, 0x3c, 0xf1,
    0x4a, 0xaf, 0x80, 0xb0,
    0xf6, 0x52, 0x0a, 0x2e,
    0x01, 0xc6, 0x73, 0x82,
    0x2f, 0xb6, 0x40, 0x05,
    0x16, 0x10, 0xe1, 0xcd,
    0x5f, 0xee, 0xde, 0x7a,
    0x80, 0x23, 0xb4, 0xf0,
    0x9b, 0x65, 0xeb, 0x50,
    0xf6, 0xd6, 0x9c, 0xa0,
    0xa6, 0x09, 0xc6, 0xfd,
    0x25, 0x50, 0x79, 0x2e,
    0x79, 0x21, 0x61, 0x27,
    0x98, 0x5e, 0x41, 0x42,
    0x40, 0x4e, 0x4b, 0xde,
    0x45, 0x6c, 0x16, 0x95,
    0x8d, 0xac, 0xe2, 0x03,
    0x72, 0xda, 0x5e, 0x92,
    0xff, 0x9f, 0x8a, 0x7e,
    0x4e, 0xdb, 0xea, 0xd2,
    0xb8, 0x51, 0xc5, 0x5c,
    0x1b, 0x54, 0x78, 0x91,
    0x95, 0x28, 0x23, 0xf3,
    0xa4, 0xd6, 0x6d, 0x4e,
    0x86, 0xf1, 0x60, 0x33,
    0x88, 0x7b, 0x25, 0xac,
    0xa9, 0x0b, 0x57, 0x6d,
    0xc3, 0x37, 0x18, 0x41,
    0xe3, 0xcb, 0x8e, 0x73,
    0x0c, 0x1f, 0xb3, 0x05,
    0xf2, 0x31, 0xbc, 0x0b,
    0xf1, 0xe1, 0xce, 0x2f,
    0x0c, 0x3f, 0xca, 0x46,
    0x81, 0xa2, 0xcd, 0x1c,
    0xcf, 0x43, 0xb1, 0x07,
    0x0e, 0x0a, 0xe4, 0xa2,
    0x78, 0xfc, 0xb9, 0xea,
    0xf4, 0xb8, 0x43, 0xf1,
    0x24, 0x18, 0xe4, 0xc3,
    0xaa, 0x26, 0x9d, 0x2e,
    0xfd, 0x85, 0x90, 0x85,
    0x95, 0x66, 0x73, 0x4b,
    0x05, 0xb7, 0xea, 0xcf,
    0x5a, 0xb3, 0x4b, 0x3f,
    0xfd, 0xf2, 0x68, 0x4a,
    0x16, 0x57, 0x1a, 0x05,
    0xa1, 0x27, 0x56, 0x86,
    0x76, 0xf4, 0x68, 0xf3,
    0x5b, 0xb5, 0x80, 0xb9,
    0x00, 0xe1, 0x9c, 0xa9,
    0xbf, 0xd8, 0xbc, 0x79,
    0x85, 0xb2, 0x28, 0x95,
    0x7f, 0xd9, 0xfc, 0x56,
    0x7d, 0xf3, 0xd5, 0xc1,
    0xe6, 0x0e, 0x09, 0x24,
    0x39, 0x97, 0x4c, 0x24,
    0x11
};
+66 −0
Original line number Diff line number Diff line
/*******************************************************************************
 * Copyright (c) 2023, Jan Koester jan.koester@gmx.net
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 * Redistributions of source code must retain the above copyright
 *      notice, this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 *      notice, this list of conditions and the following disclaimer in the
 *      documentation and/or other materials provided with the distribution.
 * Neither the name of the <organization> nor the
 *      names of its contributors may be used to endorse or promote products
 *      derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *******************************************************************************/

#include <plugin.h>
#include <editor.h>

#include "icon.webp.h"

namespace blogi {
    class Media : public PluginApi {
    public:
        Media(){
        }
        const char* getName(){
            return "media";
        }

        const char* getVersion(){
            return "0.1";
        }

        const char* getAuthor(){
            return "Jan Koester";
        }

        void initPlugin(){
            Editor editor;
            editor.addIcon(icondata,icondatalen,"webp","/editor/image","Insert Image from media albums");
        }

        bool Controller(netplus::con *curcon,libhttppp::HttpRequest *req){
            return false;
        }
    };
};

extern "C" blogi::PluginApi* create() {
    return new blogi::Media();
}

extern "C" void destroy(blogi::PluginApi* p) {
    delete p;
}

plugins/media/media.h

deleted100644 → 0
+0 −1
Original line number Diff line number Diff line
Loading