Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26
  1. #11
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Possible Module installer/upgrader [for mod developers]

    So for the upcoming version: lets just prevent any mod from overwriting
    Or we can do something like this:
    if we found the file exists, we rename it to filename.php.overwriiten_by_mod_name_at_date
    The module can later goes back and undo changes that way.

    And each mod must come with an xml file (in a pre-defined structure) that specify which file is to be merged, which file is to be over-written.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  2. #12
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Possible Module installer/upgrader [for mod developers]

    Going 1 step further, we can certainly do something like this:
    If a mod wants to write a file some where, and that file never existed before, log in database that the file belongs to that mod, and it has all the rights to make any change to that file in future version.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  3. #13
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Possible Module installer/upgrader [for mod developers]

    Then what happens when a second mod is installed that also uses that file? After the two copies are manually merged and saved, the first mod should no longer have auto overwrite privileges.

    What would be nice (ultimately) would be a winmerge-style file comparison built into the installer so at least minor merges could be made on the spot. This adds a whole new level of weight to the installer and is probably not really practical.
    Last edited by gjh42; 27 Jan 2008 at 10:43 PM.

  4. #14
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Possible Module installer/upgrader [for mod developers]

    A mod that uses another mod's files? Interesting, we run into some really interesting problems here.

    Module manager will be asking for users's consent? Assuming the users know what they are doing? ^^
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  5. #15
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Possible Module installer/upgrader [for mod developers]

    Any mod that affects the product listing might have to coexist with the column grid mod, and Expanded Category Tree (or fragfutter's Uncollapsed Category Tree) uses a different category box tpl file which needs to be coordinated with any mod (like Categories Dressing) that alters tpl_categories.php - in this case, the two don't use the same file by default, but they need to be altered/merged so that one of them uses a filename that is not its regular filename.
    Fun, fun!

  6. #16
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Possible Module installer/upgrader [for mod developers]

    Interesting, and this should be planned ahead. But I'd rather keep this simple at first. The mod should work fine with mods that do not alter or overwrite any files (except their own files), once we get that working then we will move ahead.

    So our next step would be:
    1. Allow the mod developer to pack their files, and automatically unzip them to corresponding folders.
    2. If the mod encounters any folder named your_current_template it will automatically use the name by the name of current template being used.
    3. Report back any existing file, let the users deal with that for now.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  7. #17
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Possible Module installer/upgrader [for mod developers]

    Simple question ... how do you intend to cope with hosting environments where apache doesn't have rights to alter files on the server? (ie: the default of chmod 644 is not writable by apache/IIS nor by normal php processes)

    Using PHP from the browser, you can't extract files from a zip into any folder, nor relocate files, without write permissions.

    The exception is running suphp, which uses different permission schemes. But you can't count on this being the case in most hosting environments.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #18
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Possible Module installer/upgrader [for mod developers]

    I think it's just the same as how ZC or any other software is developed, we make a software that works for most, and if there is something it can not do, it reports back to the user. Depending on the type of error, certain actions needed to be taken (for instance: files needed to be uploaded manually)


    I have seen many installers like this on joomla or smf etc, the idea is still the same.

    An interesting thing SMF did: they require you to input ftp login info so they can make changes on the server, i think it's a possible solution.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  9. #19
    Join Date
    May 2005
    Location
    Brussels belgium
    Posts
    203
    Plugin Contributions
    0

    Idea or Suggestion Re: Possible Module installer/upgrader [for mod developers]

    Quote Originally Posted by yellow1912 View Post
    I think it's just the same as how ZC or any other software is developed, we make a software that works for most, and if there is something it can not do, it reports back to the user. Depending on the type of error, certain actions needed to be taken (for instance: files needed to be uploaded manually)


    I have seen many installers like this on joomla or smf etc, the idea is still the same.

    An interesting thing SMF did: they require you to input ftp login info so they can make changes on the server, i think it's a possible solution.
    Goog ID have you seen the module installer from gallery2 ? there is a download , update , install function

    a must to have
    Zen cart or nothing !!

  10. #20
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

    Default Re: Possible Module installer/upgrader [for mod developers]

    Or doing it like Simple Machines... it runs a install test first to see if it can write to the files and if they versions are correct. The outlying structure is the hardest part to ensure that the proper background validation exists for all cases. Requiring that people put version numbers as well as versions of ZC that it works with and such.

    One thing I noticed while installing IH2 today, was that it came with a patch file that looked like it was meant to use some sort of patching tool to implement.

    PHP Code:
    --- Z:\Downloads\ZenCart\zen-cart-v1.3.5-full-fileset-09032006\zen-cart-v1.3.5-full-fileset-09032006\admin\includes\modules\category_product_listing.php    Tue Mar 14 00:27:34 2006
    +++ Z:\Downloads\ZenCart\image-handler_2.0-zc13\image-handler_2.0-zc13\admin\includes\modules\category_product_listing.php    Mon May 01 15:46:02 2006
    @@ -4,7 +4,7 @@
      * @copyright Copyright 2003-2006 Zen Cart Development Team
      * @copyright Portions Copyright 2003 osCommerce
      * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    - * @version $Id: category_product_listing.php 3182 2006-03-14 04:27:33Z ajeh $
    + * @version $Id: category_product_listing.php,v 1.1 2006/04/14 13:42:13 tim Exp $
      */
     if (!defined('IS_ADMIN_FLAG')) {
       die('Illegal Access');
    @@ -324,6 +324,7 @@
             <?php echo '<a href="' zen_href_link($type_handler'cPath=' $cPath '&product_type=' $products->fields['products_type'] . '&pID=' $products->fields['products_id'] . '&action=delete_product') . '">' zen_image(DIR_WS_IMAGES 'icon_delete.gif'ICON_DELETE) . '</a>'?>
             <?php echo '<a href="' zen_href_link($type_handler'cPath=' $cPath '&product_type=' $products->fields['products_type'] . '&pID=' $products->fields['products_id'] . '&action=move_product') . '">' zen_image(DIR_WS_IMAGES 'icon_move.gif'ICON_MOVE) . '</a>'?>
             <?php echo '<a href="' zen_href_link($type_handler'cPath=' $cPath '&product_type=' $products->fields['products_type'] . '&pID=' $products->fields['products_id'] .'&action=copy_to' ) . '">' zen_image(DIR_WS_IMAGES 'icon_copy_to.gif'ICON_COPY_TO) . '</a>'?>
    +        <?php echo '<a href="' zen_href_link(FILENAME_IMAGE_HANDLER'products_filter=' $products->fields['products_id'] . '&current_category_id=' $current_category_id) . '">' zen_image(DIR_WS_IMAGES 'icon_image_handler.gif'ICON_IMAGE_HANDLER) . '</a>'?>
     <?php
     
    // BOF: Attribute commands
     //if (!empty($products->fields['products_id']) && zen_has_product_attributes($products->fields['products_id'], 'false')) {
    is this how subversion is updated or something?

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Is it possible to have tax exemption with VAT-mod for European companies?
    By stomm in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 0
    Last Post: 16 Jun 2009, 04:39 PM
  2. Is it possible to disable an active shipping module for certain items?
    By Eticam in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 4 Dec 2006, 10:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg