The MU forums have moved to WordPress.org

trying out the slickr plugin (54 posts)

  1. Ovidiu
    Member
    Posted 15 years ago #

    I am playing around with this:

    http://www.stimuli.ca/slickr

    it works ok so far, only one problem persists: in the main plugin file, there is a section that seems to try and give the user a photo tab inside the write post and write page tab that seems to get filtered by wpmu as I jsut get a 404 error inside the write post tab.

    the code from the plugin seems to be this:

     /* Our blog post image insertion tools */
        function uploading_iframe($src) {
            return '../wp-content/plugins/slickr/slickr/templates/'.$src;
        }
    

    can there be a problem with the iframe thingy?

    here is the error log:

    [client 86.122.61.**] script '/var/www/web5/web/wp-content/plugins/slickr/slickr/templates/upload.php' not found or unable to stat, referer: http://sasha.zice.ro/wp-admin/post-new.php
    
  2. kingler
    Member
    Posted 15 years ago #

    It is a great find!

    I got it working. It is intrinsically checking for WP 2.1 version, but it is not aware of WPMU.

    Change the following line

    if (!ereg('^2.1', get_bloginfo('version'))) {

    into:

    if (!ereg('^2.1', get_bloginfo('version')) || !ereg('^wordpress-mu-1.1', get_bloginfo('version'))) {
  3. gumdrop
    Member
    Posted 15 years ago #

    I'm getting this when I go to write something:
    The requested URL /wp-content/plugins/slickr/slickr/templates/upload.php was not found on this server.

    referer: http://domain.com/wp-admin/post-new.php

  4. kingler
    Member
    Posted 15 years ago #

    Oh, my typo here:

    Change to this instead:

    if (!ereg('^2.1', get_bloginfo('version')) && !ereg('^wordpress-mu-1.1', get_bloginfo('version'))) {
  5. gumdrop
    Member
    Posted 15 years ago #

    Great stuff! Thanks.

  6. lunabyte
    Member
    Posted 15 years ago #

    Gotta admit, I modified the silas partners flickr plugin/gallery.

  7. kingler
    Member
    Posted 15 years ago #

    did you do a heavy mod on that plugin?

  8. Ovidiu
    Member
    Posted 15 years ago #

    hey kingler, can you assist a little bit more?

    I still have these inside my error.log :

    [client 62.159.242.114] script '/var/www/web5/web/wp-content/plugins/slickr/slickr/templates/upload.php' not found or unable to stat, referer: http://sasha.zice.ro/wp-admin/page-new.php
    [Thu Mar 15 07:37:39 2007] [error] [client 62.159.242.114] Directory index forbidden by rule: /var/www/web5/web/wp-content/mu-plugins/mu-admin-menus/images/, referer: http://sasha.zice.ro/wp-admin/page-new.php
    

    and when going to the write post page I get a 404 where the plugin tries to insert a photo tab...

    and btw. I changed this line:

    /* This caching method is very experimental and hella slow! */
    /* change "fs" to "db" to use database caching instead */
    if (!defined("SLICKR_FLICKR_CACHEMODE"))
    define("SLICKR_FLICKR_CACHEMODE", "db");
    

    so that db is used for caching instead of file system. If you want to use file system cache, you have to modify severall lines like this:

     $cacheDir = ABSPATH.'wp-content/blogs.dir/'.$blog_id.'/files/flickr-cache/';
    so that every user has the cache inside his own space.

  9. Ovidiu
    Member
    Posted 15 years ago #

    there is actually no upload.php inside the whole plugin, and the only occurrence of upload.php is inside the slickr/slickr/templates/admin-photos-tab.html file looking like this:

    <form method="get" id="photos" action="upload.php">
    

    any advice? which upload file is this thing looking for?

  10. Ovidiu
    Member
    Posted 15 years ago #

    isn't this the right string?

     if (!ereg('^2.1', get_bloginfo('version')) && !ereg('^WordpressMu 1.1', get_bloginfo('version'))) {

    anyway this does not work for me.... still looking for a upload.php file...

  11. Ovidiu
    Member
    Posted 15 years ago #

    ok, I found the problem but don't know how to fix it:

    inside slickr/slickr/templates/ there is a file called inline-upload.php if I rename that to upload.php I am one step further, I don't get any 404s but instead in the write post or page screen I get: This script was not meant to be called directly.

    I don't understand this - the plugin author gives us this file but then the file refuses to be called directly?

    p.s. this plugin seems to replace the upload manager/function of wpmu if I am not mistaken...

    ###edit###
    If I remember right, some time ago the inline-uploader.php was replaced with upload.php in wpmu.

  12. gumdrop
    Member
    Posted 15 years ago #

    if (!ereg('^2.1', get_bloginfo('version')) && !ereg('^wordpress-mu-1.1', get_bloginfo('version'))) {

    I'm using this...seems to work.

  13. Ovidiu
    Member
    Posted 15 years ago #

    ok and do you see a uploader/flickr images chooser inside your write post tab? I mean if you go write a post do you see such a thing instead of the original upload tab from wpmu?

  14. gumdrop
    Member
    Posted 15 years ago #

    yeap, I uploaded a regular photo np. Haven't tried flickr yet.

  15. Ovidiu
    Member
    Posted 15 years ago #

    strange, I have 1.1 and I tried a php function to report my wp_version and it said: WordpressMu 1.1

    or how would I find out what version I am using? is there another function?

    I tried something like:

    <?php  echo get_bloginfo('version'); ?>

    which gave me back this:

    WordpressMU 1.1

    but even if I insert this: WordpressMU 1.1 I have to mv inline-upload.php to upload.php and then I get the this fiel was not meant to be called directly error...

  16. gumdrop
    Member
    Posted 15 years ago #

    Just tested it with flickr...seems to work. Thanks for the db heads up!

  17. Ovidiu
    Member
    Posted 15 years ago #

    you're welcome, but I'd still like to use it myself ;-) any other suggestions? do my problems ring any bells with anyone?

  18. kingler
    Member
    Posted 15 years ago #

    Hi, Ovidiu

    if you are still having problems, simply remove the entire section for checking wordpress version!

    'if (!ereg('^2.1', get_bloginfo('version')) && !ereg('^wordpress-mu-1.1', get_bloginfo('version'))) {
    *********************
    }'

    It is only needed for any earlier version of WordPress 2.1, not needed for WPMU 1.1.

  19. Ovidiu
    Member
    Posted 15 years ago #

    thx.

    I cut that if statement out, no problems. If I go write a post I get a 404 inside , still I can post, its kind of a 404 inside an iframe.

    the error log says:

    [Thu Mar 15 17:55:56 2007] [error] [client 86.122.61.77] Directory index forbidden by rule: /var/www/web5/web/wp-content/mu-plugins/mu-admin-menus/images/, referer: http://sasha.zice.ro/wp-admin/post-new.php
    [client 86.122.61.77] script '/var/www/web5/web/wp-content/plugins/slickr/slickr/templates/upload.php' not found or unable to stat, referer: http://sasha.zice.ro/wp-admin/post-new.php
    

    if I now go ahead and copy slickr/slickr/templates/inline-uploads.php to slickr/slickr/templates/upload.php as the plugi nis somehow looking for this file, I get this error:

    [Thu Mar 15 17:59:48 2007] [error] [client 86.107.54.142] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://sasha.zice.ro/wp-admin/themes.php?page=widgets.php
    [Thu Mar 15 17:59:48 2007] [error] [client 86.107.54.142] mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary., referer: http://sasha.zice.ro/wp-admin/themes.php?page=widgets.php
    [Thu Mar 15 17:59:48 2007] [error] [client 86.107.54.142] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://sasha.zice.ro/wp-admin/themes.php?page=widgets.php
    [Thu Mar 15 17:59:49 2007] [error] [client 86.107.54.142] mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary., referer: http://sasha.zice.ro/wp-admin/themes.php?page=widgets.php
    [Thu Mar 15 17:59:49 2007] [error] [client 86.107.54.142] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://sasha.zice.ro/wp-admin/themes.php?page=widgets.php
    [Thu Mar 15 17:59:49 2007] [error] [client 86.107.54.142] File does not exist: /var/www/web5/web/wp-includes/js/scriptaculous/wp-builder.js, referer: http://sasha.zice.ro/wp-admin/themes.php?page=widgets.php
    [Thu Mar 15 17:59:49 2007] [error] [client 86.107.54.142] File does not exist: /var/www/web5/web/wp-includes/js/scriptaculous/wp-effects.js, referer: http://sasha.zice.ro/wp-admin/themes.php?page=widgets.php
    [Thu Mar 15 17:59:49 2007] [error] [client 86.107.54.142] File does not exist: /var/www/web5/web/wp-includes/js/scriptaculous/wp-dragdrop.js, referer: http://sasha.zice.ro/wp-admin/themes.php?page=widgets.php
    [Thu Mar 15 17:59:49 2007] [error] [client 86.107.54.142] File does not exist: /var/www/web5/web/wp-includes/js/scriptaculous/wp-controls.js, referer: http://sasha.zice.ro/wp-admin/themes.php?page=widgets.php
    [Thu Mar 15 17:59:49 2007] [error] [client 86.107.54.142] File does not exist: /var/www/web5/web/wp-includes/js/scriptaculous/wp-slider.js, referer: http://sasha.zice.ro/wp-admin/themes.php?page=widgets.php
    [Thu Mar 15 18:00:02 2007] [error] [client 86.122.61.77] Directory index forbidden by rule: /var/www/web5/web/wp-content/mu-plugins/mu-admin-menus/images/, referer: http://sasha.zice.ro/wp-admin/post-new.php
    

    I am now going to solve those max rerites problems, than go ahead and downlaod those missing files from trac, and come back and report if the problem is still persisting.

    ###edit###strage, I have all those js files but without the wp- prefix... just noticed these files are in trac without that prefix too - whats wrong with my isntall all of a sudden??

  20. Ovidiu
    Member
    Posted 15 years ago #

    besides this I have done a

     grep -R -i 'slider.js' ../../wp-content/
    and there is not a single slider.js neither a wp-slider.js as a result? at least not in mu-plugins and not in activated plugins...

  21. gumdrop
    Member
    Posted 15 years ago #

    I think slider.js is in wp-includes/js/scriptaculous

  22. gumdrop
    Member
    Posted 15 years ago #

    I'd think about upgrading to v1.1.1

  23. stimuli
    Member
    Posted 15 years ago #

    Slickr intercepts calls to the upload tab in "write post" mode. Instead of showing the vanilla upload page, eg: /wordpress/wp-admin/upload.php, we intercept to point to our local slickr uploading page, inline-uploads.php, which includes a photos tab.

    Basically, it used to work fine with older WP versions, ie: 2.0.x, but in the process of upgrading Slickr Gallery to WP 2.1, I managed to break compatibility with older versions. D'oh!

    I'll try to fix this when I can but between work and family that likely won't be soon.

  24. stimuli
    Member
    Posted 15 years ago #

    Download the latest version and give that a try. It should be compatible with 2.0.x, although perhaps not "mu"

    I've included kinglers fix. Thanks kingler!

  25. suleiman
    Member
    Posted 15 years ago #

    coolies, thanks for joining the discussion stimuli :)

  26. Ovidiu
    Member
    Posted 15 years ago #

    ok I have another doubt. How are you placeing the plugin?

    the download contains a folder slickr which contains another slickr folder and a themes folder.

    how is your structure? mine currently is:

    /wp-content/plugins# ls -al slickr/
    total 56
    drwxrwxr-x   4 web5_postmaster www-data  4096 Mar 16 08:22 .
    drwxrwxr-x  80 web5_postmaster www-data  8192 Mar 16 08:53 ..
    -rwxrwxr-x   1 web5_postmaster www-data  1196 Mar  1 05:42 README.txt
    drwxrwxr-x   5 web5_postmaster www-data  4096 Mar 16 08:03 slickr
    -rwxrwxr-x   1 web5_postmaster www-data 31222 Mar 16 08:58 slickr.php
    drwxrwxr-x   7 web5_postmaster www-data  4096 Mar 15 08:02 themes
    

    is this right? if its right, why does my write post tab give me this error in the photo tab place:

    Warning: main(/var/www/web5/web/wp-content/plugins/slickr/slickr/templates/../../../../wp-admin/admin.php): failed to open stream: No such file or directory in /var/www/web5/web/wp-content/plugins/slickr/slickr/templates/upload.php on line 4

    if I go down from here wp-content/plugins/slickr/slickr/templates/ like this: ../../../../wp-admin/admin.php I won't end up in wp-admin, there is still ../ to go thats why I was wondering if I placed the plugin right...

  27. stimuli
    Member
    Posted 15 years ago #

    *ahem* that's why I suggest nuking your current install completely, especially that upload.php you created, and reinstalling the latest version (uploaded last night) and trying again.

  28. Ovidiu
    Member
    Posted 15 years ago #

    ok, I'll try right now, but am I supposed to have plugins/slickr and then another slickr folder inside that one?

  29. Ovidiu
    Member
    Posted 15 years ago #

    ok, here is my next try:

    cd /plugins
    wget http://www.stimuli.ca/random/code/slickr-latest.zip
    unzip slickr-latest.zip

    chown and chmod to suit my needs

    => album works fine, but when I go to the write tab I get:

    Warning: main(/var/www/web5/web/wp-content/plugins/slickr/slickr/templates/../../../../wp-admin/admin.php): failed to open stream: No such file or directory in /var/www/web5/web/wp-content/plugins/slickr/slickr/templates/upload.php on line 4
    
    Fatal error: main(): Failed opening required '/var/www/web5/web/wp-content/plugins/slickr/slickr/templates/../../../../wp-admin/admin.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/web5/web/wp-content/plugins/slickr/slickr/templates/upload.php on line 4
  30. stimuli
    Member
    Posted 15 years ago #

    send a copy of your /wordpress/wp-admin/upload.php to me at rustyvespa @ gmail and I'll see what I can do.

About this Topic