Welcome to Geeklog, Anonymous Wednesday, October 09 2024 @ 06:01 pm EDT

Geeklog Forums

Warning to plugin writers about data folder and subfolder name


Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
Just a warning for plugin writers:
For your plugins, do not store any data under the data folder in a folder name like your plugin. This folder will be delete during your plugin upgrade and plugin upload Frown

Text Formatted Code
// Extract the tarball to data so we can get the $pi_name name from admin/install.php
            $archive->unpack($_CONF['path'] . 'data/',
                             array($dirname . '/admin/install.php'));
            $plugin_inst = $_CONF['path'] . 'data/' . $dirname . '/admin/install.php';
            $fdata = '';
            $fhandle = @fopen($plugin_inst, 'r');
            if ($fhandle) {
                $fdata = fread($fhandle, filesize($plugin_inst));
                fclose($fhandle);
            }

            // Remove the plugin from data/
            require_once 'System.php';
            @System::rm('-rf ' . $_CONF['path'] . 'data/' . $dirname);

I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

All times are EDT. The time is now 06:01 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content