WordPress.org

Ready to get started?Download WordPress

Forums

New Plugin: xGallery (71 posts)

  1. noname
    Member
    Posted 9 years ago #

    How's this setup?

    .\main\photos.php
    ..\wp-content\gallery (images folder + thumbs & modified )
    -------------------------------------------
    ..\wp-content\plugins\xgallery.php
    ...\wp-content\plugins\xgallery (sub folder)
    ...\wp-content\plugins\xgallery\xgallery-options.php
    ...\wp-content\plugins\xgallery\*.jpg

  2. noname
    Member
    Posted 9 years ago #

    pls deleted

  3. noname
    Member
    Posted 9 years ago #

    argh!

  4. noname
    Member
    Posted 9 years ago #

    sorry double posted...pls deleted.

  5. zeeg
    Member
    Posted 9 years ago #

    Ill go debug some more, can you try putting photos.php in your main dir and see if it runs off that? Shouldnt make a dif tho

  6. noname
    Member
    Posted 9 years ago #

    been there, done that :(

  7. zeeg
    Member
    Posted 9 years ago #

    Ok do this, search for:

    if (!is_dir($dir_path_abs))
    {
    gallery_error("Unable to access the specified directory");
    return;
    }

    and right before gallery_error, add "echo $dir_path_abs;" and show me what that outputs

  8. noname
    Member
    Posted 9 years ago #

    the results:


    if (!is_numeric(strpos(realpath($dir_path_abs), realpath($_SERVER['DOCUMENT_ROOT'].'/'.$root_path))))
    {
    gallery_error("Unable to access the specified directory");
    echo $dir_path_abs;
    return;
    }

    outputs:

    There was an error with your request
    Error Message: Unable to access the specified directory
    C:/xampp/htdocs/wp-content/gallery/

    oki.. got xgallery working by changin the default gallery path to: /main/wp-content/gallery/

    That did the trick...thank you for your fast resspons, it was a great help for me.. Great gallery! David Keep up the good work!

    How to scale an image down and add clickable link to fullsize pic. if it's too wide and it would break the horizontal layout..Let's say no image can be wider than 400px.

  9. zeeg
    Member
    Posted 9 years ago #

    Set the maximum page width to 400px, and click the box for "Show link to original file" or whatever under Image Options

    Page width makes it so the thumbsnails as well as resizing dont break your design :)

    I'll probably add a note about the directory for later versions :D

  10. noname
    Member
    Posted 9 years ago #

    great thanks :)

  11. noname
    Member
    Posted 9 years ago #

    ops

  12. rat
    Member
    Posted 9 years ago #

    hey zeeg! thank's a lot for this very very cool plugin. i just installed v0.4 for wp 1.5.
    i think, i ran into four minor bugs but i got it working now. i'd like to share my ugly hacks with you:

    all bugs are in the xgallery.php

    navigation counter:
    -------------------

    #261 if ($page == ($key+1))
    bug: causes not actual, bun next image to be in "active" state

    fix:
    #261 if ($page == ($key))

    thumbnail table start:
    ----------------------

    #399 echo "<table id=\"gallery_area\">\n";
    bug: no tr is opened, the loop afterwards starts right with a td

    fix:
    #399 echo "<table id=\"gallery_area\">\n <tr>\n";

    thumbnail check:
    ----------------

    #418 if (($error = create_thumbnail($file)) == false)
    bug: check might return "false" even if a thumbnail is created

    fix:
    dunno. error message was "1" - not very usefull. i couldn't figure out what caused it. i just commented it out.

    thumbnail table end:
    --------------------

    #456 }
    #457 echo "</tr>\n</table>\n";
    bug: table closes outside the "display thumbnail" if-case. it gets echoed even if no table was opened..

    fix:
    #456 echo "</tr>\n</table>\n";
    #457 }

    that's it. thank's again for your work. keep it up.
    all the best, roman

  13. tonyzeoli
    Member
    Posted 9 years ago #

    I am having the same problem as the member, noname.

    There was an error with your request
    Error Message: Unable to access the specified directory

    Go to netmix.com/wordpress/example-photos.php and you will see the error message.

    Although I can understand a little PHP, I am not familiar with how to change the code to get it working. If you can give me step by step instructions, that would be greatly appreciated.

    I have created a folder in "/wp-content/" called "gallery"

    Now the path is "/wp-content/gallery/" just like it is stated in the path field the WordPress Options section.

    I put a .jpg image in the folder. It doesn't display. What should I do?

    Also, I want to change the file name from "examples-photos.php to just "photos.php" like you have on your site. When I change the file name, what line in the PHP code do I change?

    Please let me know. Thanks.

    Tony Z.

  14. noname
    Member
    Posted 9 years ago #

    @tonyzeoli

    change the path "/wp-content/gallery/" to "/wordpress/wp-content/gallery/"

    #photos.php (copy or make new file to wordpress folder)

    <?php
    /* Don't remove this line. */
    require('./wp-blog-header.php');
    get_header();
    get_sidebar();
    ?>
    <div id="content">
    <?php gallery_show_photos(); ?>
    </div>
    <?php get_footer(); ?>

  15. tonyzeoli
    Member
    Posted 9 years ago #

    Thank you, I will try it and let you know how it works...much appreciated for your quick response!

  16. tonyzeoli
    Member
    Posted 9 years ago #

    David,

    Worked great, but I have to change the CSS code, I think, because the gallery is falling outside the WP 1.5 template.

    Take a look at netmix.com/wordpress/photos.php

    By the way...this is great work. It amazes me that people just jump in and contribute new plug-ins all the time. I really appreciate your efforts, it makes life easier for everyone else. Thanks so much!

    Tony

  17. joeytrimmer
    Member
    Posted 9 years ago #

    if this works for me you are my hero.

  18. joeytrimmer
    Member
    Posted 9 years ago #

    just so you know...i got this error when I activated it and when I checked the admin section for xgallery:


    Warning: Cannot add header information - headers already sent by (output started at /home/web/joey/joeytrimmer.com/wp-admin/admin-header.php:8) in /home/web/joey/joeytrimmer.com/wp-admin/admin.php on line 6

    Warning: Cannot add header information - headers already sent by (output started at /home/web/joey/joeytrimmer.com/wp-admin/admin-header.php:8) in /home/web/joey/joeytrimmer.com/wp-admin/admin.php on line 7

    Warning: Cannot add header information - headers already sent by (output started at /home/web/joey/joeytrimmer.com/wp-admin/admin-header.php:8) in /home/web/joey/joeytrimmer.com/wp-admin/admin.php on line 8

    Warning: Cannot add header information - headers already sent by (output started at /home/web/joey/joeytrimmer.com/wp-admin/admin-header.php:8) in /home/web/joey/joeytrimmer.com/wp-admin/admin.php on line 9

    i mean, it seems to be working nonetheless, i'll keep ya posted.

  19. joeytrimmer
    Member
    Posted 9 years ago #

    almost my hero :)

    Fatal error: Call to undefined function: array_chunk() in /home/web/joey/joeytrimmer.com/wp-content/plugins/xgallery.php on line 379

  20. joeytrimmer
    Member
    Posted 9 years ago #

    any idea why i'm getting this fatal error?

  21. satoshi
    Member
    Posted 9 years ago #

    Posted on your site as well:

    I’m having a serious problem. I can’t delete the thumbnail files, apparently I don’t have enough permissions to do so. Yet I’m trying to delete them with the ADMIN account. WTF? I can’t even chmod them.

    Also, it only creates thumbnails for one image at a time. I have to keep reloading the page to get another thumbnail. Why is this?

  22. satoshi
    Member
    Posted 9 years ago #

    Posted on your site as well:

    I’m having a serious problem. I can’t delete the thumbnail files, apparently I don’t have enough permissions to do so. Yet I’m trying to delete them with the ADMIN account. WTF? I can’t even chmod them

    Also, it only creates thumbnails for one image at a time. I have to keep reloading the page to get another thumbnail. Why is this?

  23. rat
    Member
    Posted 9 years ago #

    hello satoshi

    the thumbnails are probably owned by the wwwrun user and NOT your ftp user. therefore you don't have the rights to delete/chmod/etc them.
    in order to delete them, the wwwrun user has to chmod them to 666. if you don't have a shell access, you can do this via a small php-script:


    if(isset($file) && isset($mode)){
    $file = escapeshellarg ($file);
    $mode = escapeshellarg ($mode);
    $out = exec("/bin/chmod ". $mode ." ". $file);

    print_r($out);
    }else{
    echo "no file / mode given" ;
    }

    you can also chmod a whole folder with "chmod -R".
    just remove the script from your webserver when you're done. son noone can mess around with it.

    best regards
    rat

  24. asbjoern
    Member
    Posted 9 years ago #

    hmm I have another php problem related to xGallery, I get this error. "
    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 6400 bytes) in /customers/soebjerggaard.com/soebjerggaard.com/httpd.www/wp-content/plugins/xgallery.php on line 541"
    Does anyone have a surgestion for a workaround or something (since I don't have full control over the php setup on the server. (they will only allocate 8 mb of memory for me :-( )

    /asbjoern

  25. asbjoern
    Member
    Posted 9 years ago #


  26. pinkeyedjim
    Member
    Posted 9 years ago #

    I'm getting some wierd errors as well.

    "Warning: main(admin.php): failed to open stream: No such file or directory in /home/.garnet/pinkeyedjim/pinkeyedjim.com/wp-admin/xgallery/xgallery-options.php on line 2

    Fatal error: main(): Failed opening required 'admin.php' (include_path='.:/usr/local/lib/php') in /home/.garnet/pinkeyedjim/pinkeyedjim.com/wp-admin/xgallery/xgallery-options.php on line 2"

    Any ideas on what is causing this?

  27. webwide
    Member
    Posted 9 years ago #

    THAT WAS THE FIX.........in the xGallery options page you need to include the folder IN FRONT OF wp-content.....this may not apply to you if you have installed WordPress in the root folder of your server, but if it is in a sub-directory you have to put that sub-directory name in front of wp-content....

    Still getting Error 1 but that seems to be related to thumbnail creation issues.....???

  28. zeeg
    Member
    Posted 9 years ago #

    I've updated xGallery to 0.5 and included several bug fixes.

    Thanks to everyone w/ reporting these, and sorry about the delay I've been very busy lately.

  29. Jinsan
    Member
    Posted 9 years ago #

    zeeg, do you happen to have a run down (is it included in the download) of the features of the plugin? Such as image publishing within a post, thumbnail creation etc?

  30. zeeg
    Member
    Posted 9 years ago #

    It's just an image gallery, has nothing to do w/ posts, it creates thumbnails and such ya

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.