1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Pixel Suite 0.4

Discussion in 'Plugins' started by narc, Apr 29, 2013.

  1. narc

    narc Well-Known Member

    Pixel Suite
    Version: 0.4

    Author: Andreas Votteler
    Created: 2013/04/27
    Last Updated: - 2013/05/31
    Tested on: Hotaru 1.5.0 RC6
    Plugins Required: None
    Plug & Play: Yes
    Supported: No


    Description:
    This plugin allows to insert multiple images per post. The number of images can be configured through User Roles. The images are automatically resized and do not require additional plug-in to display.
    Pixel Suite plugin ist alternatively for Image Upload, Thick Box and Tim Thumb plugins

    Live Example:
    live example can be viewed here: trendkraft.de/19145

    Features:
    • Automatic resize of images
    • Automatically creates a "uploads/img" folder, if not available
    • Automatically creates a subfolder "USERID / YEAR" for each user, if not available
    • integrated lightbox


    Configuration options:
    • minimum size of the image
    • maximum size of the image
    • maximum file size
    • testing of user roles for the number of possible uploads
    • size of the thumbnail adjustable


    Bonus:
    • SEO optimization: automatic rename the filename (post title = image name)
    • SEO optimization: Title and Alt tags are inserted automatically checking (post title = title and alt-tag)


    Instructions:
    1. Upload the "pixel_suite" folder to your plugins folder.
    2. Install it from Plugin Management in Admin.
    3. Edited Settings in Admin -> Plugin Settings -> Pixel Suite
    4. Search the following code in submit2.php and submit_edit.php:
    Code:
    <form name='submit_2' action='<?php echo BASEURL; ?>index.php?page=submit2' method='post'>
    5. Replace old code with the following code in submit2.php and submit_edit.php:
    Code:
    <form name='submit_2' id='submit_2_form' action='<?php echo BASEURL; ?>index.php?page=submit2' method='post'>
    6. Search and delete the following code in submit2.php und submit_edit.php:
    Code:
    <tr><td>&nbsp; </td><td style='text-align:right;'><input type='submit' onclick="javascript:safeExit=true;" class='submit' name='submit' value='<?php echo $h->lang['main_form_next']; ?>' /></td></tr>
    7. add the following below the </ form> tag:
    Code:
    <?php $h->pluginHook('pixel_suite'); ?>
    Please click "Rate Thread" and give this plugin a rating. Thank you. :rolleyes:

    Revision History
    v0.4 2013/05/31 - narc add included lightbox, thumbs codes with base_64, autocromb, rename to pixel suite
    v0.3 2013/05/28 - shibuya246 - update for jquery 1.9.1 - replace .live() with .on()
    v0.2 2013/05/03 - narc - new installations routinely; changed default settings for image sizes; hooks updated, amended and new; autoUpload disabled; jQuery library removed (control over theme)
    v0.1 2013/04/27 - narc - Released first alpha version. Hooks added. jQuery library version 1.8.3 inserted. small fixes.



    On Git
    https://github.com/zcht/pixel_suite
     

    Attached Files:

    Last edited: May 31, 2013
  2. narc

    narc Well-Known Member

    PLACEHOLDER / TODOLIST

    - caching
    - selection of external CDN for images
    - migrate to HTML 5 and CSS3
    - adding a new field: Caption for every image
    - implement cron job for unnattached images (auto delete)
     
    Last edited: Apr 30, 2013
    nothingman likes this.
  3. seekyt

    seekyt Donor Donor

    Awesome job!
     
  4. nothingman

    nothingman Active Member

    Ok, I tested it and here's what I'm getting - i tried uploading a gif file by the way.

    After browsing for the file and then clicking the start upload button, I was prompted if I wanted to leave the page.

    confirm.jpg

    I clicked the Leave Pagebutton and the page was redirected to http://jquery-file-upload.appspot.com/ with the page displaying the following message.

    Also, when I go to Admin -> Plugin Management, I don't see any option of changing the setting for this plugin i.e. the Image Multi Upload 0.1 was not clickable.
     
    Last edited: Apr 30, 2013
  5. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    The plugin needs to add a hook reference at the top of the image_multi_upload.php file

    It currently has the following references
    Code:
    * hooks: install_plugin, image_multi_upload, submit_2_fields, post_add_post, post_update_post, header_include, header_include_raw, theme_index_top
    and if you compare another plugin here, you can see the "admin_sidebar_plugin_settings" and "admin_plugin_settings" references needed

    Code:
    * hooks: install_plugin, admin_sidebar_plugin_settings, admin_plugin_settings, theme_index_top, footer
     
    nothingman likes this.
  6. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    Would like to find a way that we can avoid having to edit these files in steps 4,5 and make the plugin work straight out of the box
     
  7. nothingman

    nothingman Active Member

    I agree. Having to edit the files can be somewhat annoying when there's an upgrade to a plugin or HotaruCMS - I always end up searching these forums looking for 'that' file which has to be updated. :eek:
     
  8. narc

    narc Well-Known Member

    I noticed that my plug-in does not work with the version 1.5 alpha. it's the double load of jquery. The plugin is designed to jquery 1.8.3. I have now fixed some things in the new alpha version 0.1.1. hotaru 1.4.2 runs under the plugin easily.

    I have to think of something. since you have a button NEXT otherwise, then comes the upload window. this looks more than unpleasant. maybe you could put the upload form on title etc. but it looks very out stupid.
    usually the input fields should look like this: category, title, content, tags, upload, NEXT button
    If I remove the step 4 and 5 wirds look like this: category, title, content, tags, NEXT button, uploads
     
  9. nothingman

    nothingman Active Member

    Narc, I think there's still a problem.

    1. I click the green colored "Add file" button
    2. Progress bar seems to move and I get the "Uploaded succesfully!" message.
    3. Then I click the blue colored "Start upload" button - Nothing happens (do I need to do this?)
    4. Even if I skip step 3, I decide click Next so I can move on and try to submit my post. But again, nothing happens.

    EDIT: After installing the plugin (0.1.1), the theme color changed to the default blue-colored theme (all the fonts change to blue) - I"m using the default theme.
     
    Last edited: Apr 30, 2013
  10. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    I think we initially were including the reference to jquery with Hotaru and then decided to leave it up to the theme designer to put in the reference. I dont think it is a good idea for plugins to include jquery themselves. Can you try running it without the reference from the plugin?
     
  11. narc

    narc Well-Known Member

    I changed some things again. including the jquery library away. so anyone can select the theme designer.

    the installation routine has changed somewhat.
    have the plugin now with hotaru 1.5.x beta tested. with the default theme, it is now also compatible.

    Please retest a.
     
  12. nothingman

    nothingman Active Member

    So, it's not yet 'safe' to use it as of now? :confused:
     
  13. nothingman

    nothingman Active Member

    narc, sorry about my comment above. I didn't see your comment when I posted my comment. Will retest and get back.
     
  14. nothingman

    nothingman Active Member

    Tested.

    1. Clicked the green colored Add files... button, nothing happened.
    2. Clicked start upload , I was prompted if I wanted to leave the page.

    So, it's not working.
     
  15. narc

    narc Well-Known Member

    installed correctly? delete old settings? jquery active? can you show me the url where it is installed?
     
    nothingman likes this.
  16. nothingman

    nothingman Active Member

    Yes, I followed the steps by the book. I've PM'd you the link to my site.


    1. Uninstalled the prev. version via plugin management
    2. Uploaded the new files
    3. Made the changes to the submit2.php and submit_edit.php files
    4. Installed the new version via the plugin management
     
  17. nothingman

    nothingman Active Member

    I realized I didn't do this. How do we delete the old settings?
     
  18. nothingman

    nothingman Active Member

    Has anyone tested and got this working? Or am I the only one having problems?
     
    Last edited: May 4, 2013
  19. narc

    narc Well-Known Member

    only patience. I have to work next to the developed. so my time is quite limited. I will test everything and see. as you can see the plug in running with me on the site :)

    Moreover, it is still an alpha version that I ported from my plugin.
     
  20. nothingman

    nothingman Active Member

    Oh ok. Will wait patiently for it. :)

    It has a lot of potential and from the looks of it, it would be just perfect for my site.
     

Share This Page