Forums

[resolved] [Plugin: PhotoContest Plugin] permalinks and other questions (38 posts)

  1. Ovidiu
    Member
    Posted 2 years ago #

    trying to understand the plugin:

    I created a page called contests. all new contests will be subpages of this one.

    now I was jsut wondering if the permalinks coulb be improved? my test contest looks like this: http://021club.co.za/wp-content/plugins/wp-photocontest/view.php?post_id=13

    also I'd be interested to know what template is used for the individual contests? I mean the contest page can be assigned a template, but when visitors click on "Enter the contest" my design looks weird, so I was wondering what tempalte is being used there?

    Or is this were the customizing facility comes in?

    http://wordpress.org/extend/plugins/wp-photocontest/

  2. Ovidiu
    Member
    Posted 2 years ago #

    oh, as a side note, I also found this plugin: http://wordpress.org/extend/plugins/photoracer/ which seems a bit outdated, but maybe you can check what permalink solution this one uses?

  3. Ovidiu
    Member
    Posted 2 years ago #

    Oh, and I noticed a far bigger problem:

    what file permissions get set upon upload? I simply get a 403 error for uploaded pictures :-(

    would you mind changing that and using the built-in settigns (media uploader?) as those work?

    running on suPhp but pictures uploaded through wordpress media library itself are working perfect :-)

  4. Ovidiu
    Member
    Posted 2 years ago #

    oh, and I also have to input an email address even though I am logged in :-(

  5. frekel
    Member
    Posted 2 years ago #

    Sorry, the author (me ;) didn't know about the support forum... but I'm here and will try to answer all questions within 24 hours!!

    Greets,
    Frank

  6. frekel
    Member
    Posted 2 years ago #

    Ok, starting with your first post:

    Permalinks:
    This plugin doesn't use any permalinks and will not be developed in the near future (or anyone is interested to help development!)

    Template used for the individual contests:
    The plugin creates a page with a link to enter the contest (or if you use the refresh option in the admin panel, a view of the latest 9 pictues).
    All other pages after that are generated by the plugin. Other have reported that the first versions of this plugin, broke their sites (mainly the position of the sidebar). I have created a function that will read the wp-photocontest/skins/<skinname>/templates.tpl file and replaces the string

    [WP-PHOTOCONTEST CONTENT]
    with the generated content. You need to create the templates file or else the plugin will print a blank page with a warning and the generated content. View the Customization part of the documentation.

  7. frekel
    Member
    Posted 2 years ago #

    Second post:

    About PhotoRacer
    The reason why I created this plugin was because the PhotoRacer plugin is outdated and seems not to be under any development. I will look at the plugin for the permalinks used there (can't remember that that was the case)

  8. frekel
    Member
    Posted 2 years ago #

    Third post:

    The far bigger problem: What file permissions set upon upload
    Depends which version you are using:
    < 1.2: The main directory (/plugins/wp-photocontest) needs write permissions for the user who runs the site (apache user)
    >= 1.2: Only the CONTEST_HOLDER directory (default: /plugins/wp-photocontest/photocontest_holder) needs write permissions for the user who runs the site (apache user)

    Using the built-in settigns (media uploader?)
    I will look into that and if its not to hard to integrate I will.

  9. frekel
    Member
    Posted 2 years ago #

    Fourth post (you a a busy poster ;)

    Inputting an email address even when logged in
    True, I will look into that to.
    (if you mean, that if a user is logged in, we use the email from their profile)

  10. frekel
    Member
    Posted 2 years ago #

    Fourth post (you a a busy poster ;)

    Inputting an email address even when logged in
    True, I will look into that to.
    (if you mean, that if a user is logged in, we use the email from their profile)

    This will be in version 1.3

  11. Ovidiu
    Member
    Posted 2 years ago #

    Ok, I will give all these answers a try as soon as we manage to solve my other problem that the plugin's tables aren't created when I activate it :-(

    when I get the plugin running again, I'll try out these suggestions.

  12. frekel
    Member
    Posted 2 years ago #

    Ok, I already replied on the other post!

  13. Ovidiu
    Member
    Posted 2 years ago #

    Ok, I am reading through your answers and processing them one by one:

    - regarding the uploaded file permissions: it seems currently they are being set to 777 which my suPhp installation forbids. I get told to change to 755 for safety reasons. Could this be accommodated? Could maybe someone else with a suPhp installation check if they have the same problem? It seems the built-in media uploader sets permissions to a compatible level with suPhp

    - the notification emails says: New photo oploaded by - there is a typo there :-)

    - is there no options page to set i.e. a max photo size? btw. if using the integrated media uploader, that would be the case :-)

  14. frekel
    Member
    Posted 2 years ago #

    1. I can set the default file permissions to 755. (will be in version 1.3)
    2. oploaded changed into uploaded
    3. No max photo size integrated yet. I still need to take a look into the integrated media uploader

    Greets,
    Frank

  15. frekel
    Member
    Posted 2 years ago #

    Hi Ovidiu,

    Can you check something for me? suPhp is very picky about file permissions AND the permissions are held between apache en suPhp (in a config file).

    Can you add the following line to play.php and test:

    chmod($files["imagefile"]["tmp_name"],0755);

    this goes right after (line 241):

    if (is_uploaded_file($files["imagefile"]["tmp_name"]))
    				{

    Thanks,
    Frank

  16. Ovidiu
    Member
    Posted 2 years ago #

    sorry, tried that yesterday, dunno what happened, must have forgotten to click the post button here.

    that line doesn't help as the folders for each contest are still having 777 permissions and the files itself too. seems just like that line didn't affect them!?

  17. frekel
    Member
    Posted 2 years ago #

    So the contest_folder should have (0)755 and the file (0)644?

    Can you tell me with what permissions the integrated mediamanager uploads files and creates directories?

    Thanks,
    Frank

  18. Ovidiu
    Member
    Posted 2 years ago #

    ok, just tried and uploaded an image on a fairly new wp installation and here are the permissions set by wordpress and it works on suPhp with these:

    uplaods are organized into monthly fodlers so this is the first upload this month so the folder was created just now by wordpress:

    drwxr-xr-x 2 webXX clientXX 4096 2009-11-10 17:22 11

    and the uploaded file is:

    -rw-r--r-- 1 webXX clientXX 872578 2009-11-10 17:22 10_p5240054.jpg

    and all is working fine :-) although I have not tried if overwriting that image via wordpress works...

  19. frekel
    Member
    Posted 2 years ago #

    Ok, this confirms that the contest_folder should have (0)755 and the files (0)644?

    Will try to add this into the 1.3 release (i'm testing the 1.3 version now)

  20. Ovidiu
    Member
    Posted 2 years ago #

    jepp I think that is right. please keep up to date so I can test the new version.

  21. frekel
    Member
    Posted 2 years ago #

    Version 1.3.2 is just released!

    REMEMBER TO BACKUP YOUR FOLDERS ;)

  22. Ovidiu
    Member
    Posted 2 years ago #

    another quick request:

    one can't delete contests if the folders were previously deleted :-(

    'Error in checking PhotoContest directory 'test02'.
    There is no directory with this contest name.
    If you believe this is not correct, please remove the directory manually'

    also I guess the settings should have a default value prefilled in so if a user isn't sure and doesn't know what to use, there should be some values filled in.

    Also only published pages can be set as parents. For testing purposes I kept my contest page as a draft....

  23. Ovidiu
    Member
    Posted 2 years ago #

    oh saving the settings gave me a lot of errors with other plugins now. maybe its because I haven't filled in all the options for the photo contest before saving?

    Notice: Undefined index: widgets in /var/www/clients/clientxx/webxx/web/wp-content/plugins/cforms/cforms.php on line 1298
    
    Notice: Use of undefined constant HYBRID_DIR - assumed 'HYBRID_DIR' in /var/www/clients/clientxx/webxx/web/wp-content/themes/hybrid/functions.php on line 16
    
    Notice: Use of undefined constant HYBRID_LIBRARY - assumed 'HYBRID_LIBRARY' in /var/www/clients/clientxx/webxx/web/wp-content/themes/hybrid/functions.php on line 17
    
    Notice: Use of undefined constant HYBRID_ADMIN - assumed 'HYBRID_ADMIN' in /var/www/clients/clientxx/webxx/web/wp-content/themes/hybrid/functions.php on line 18
    
    Notice: Use of undefined constant HYBRID_EXTENSIONS - assumed 'HYBRID_EXTENSIONS' in /var/www/clients/clientxx/webxx/web/wp-content/themes/hybrid/functions.php on line 19
    
    Notice: Use of undefined constant HYBRID_FUNCTIONS - assumed 'HYBRID_FUNCTIONS' in /var/www/clients/clientxx/webxx/web/wp-content/themes/hybrid/functions.php on line 20
    
    Notice: Use of undefined constant HYBRID_LEGACY - assumed 'HYBRID_LEGACY' in /var/www/clients/clientxx/webxx/web/wp-content/themes/hybrid/functions.php on line 21
    
    Notice: Use of undefined constant HYBRID_WIDGETS - assumed 'HYBRID_WIDGETS' in /var/www/clients/clientxx/webxx/web/wp-content/themes/hybrid/functions.php on line 22
    
    Notice: Use of undefined constant HYBRID_IMAGES - assumed 'HYBRID_IMAGES' in /var/www/clients/clientxx/webxx/web/wp-content/themes/hybrid/functions.php on line 26
    
    Notice: Use of undefined constant HYBRID_CSS - assumed 'HYBRID_CSS' in /var/www/clients/clientxx/webxx/web/wp-content/themes/hybrid/functions.php on line 27
    
    Notice: Use of undefined constant HYBRID_JS - assumed 'HYBRID_JS' in /var/www/clients/clientxx/webxx/web/wp-content/themes/hybrid/functions.php on line 28
    
    Notice: Use of undefined constant HYBRID_CHILD_DIR - assumed 'HYBRID_CHILD_DIR' in /var/www/clients/clientxx/webxx/web/wp-content/themes/hybrid/functions.php on line 31
    
    Notice: Use of undefined constant HYBRID_CHILD_URL - assumed 'HYBRID_CHILD_URL' in /var/www/clients/clientxx/webxx/web/wp-content/themes/hybrid/functions.php on line 32
    
    Notice: Undefined property: stdClass::$hook in /var/www/clients/clientxx/webxx/web/wp-content/plugins/members/components.php on line 90
    
    Notice: Undefined property: stdClass::$active_components in /var/www/clients/clientxx/webxx/web/wp-content/plugins/members/components.php on line 131
    
    Notice: Undefined property: stdClass::$hook in /var/www/clients/clientxx/webxx/web/wp-content/plugins/members/components.php on line 90
    
    Notice: Undefined property: stdClass::$hook in /var/www/clients/clientxx/webxx/web/wp-content/plugins/members/components.php on line 90
    
    Notice: Undefined property: stdClass::$hook in /var/www/clients/clientxx/webxx/web/wp-content/plugins/members/components.php on line 90
    
    Notice: Undefined property: stdClass::$hook in /var/www/clients/clientxx/webxx/web/wp-content/plugins/members/components.php on line 90
    
    Notice: Undefined property: stdClass::$hook in /var/www/clients/clientxx/webxx/web/wp-content/plugins/members/components.php on line 90
    
    Notice: Undefined index: _ajax_submit in /var/www/clients/clientxx/webxx/web/wp-content/plugins/custom-field-taxonomies/scb/AdminPage.php on line 259
    
    Notice: Use of undefined constant hybrid_theme_page - assumed 'hybrid_theme_page' in /var/www/clients/clientxx/webxx/web/wp-content/themes/hybrid/library/admin/theme-settings.php on line 20
    
    Notice: Use of undefined constant REQUEST_URI - assumed 'REQUEST_URI' in /var/www/clients/clientxx/webxx/web/wp-content/plugins/tdo-mini-forms/admin/tdomf-overview.php on line 10
    
    Notice: Trying to get property of non-object in /var/www/clients/clientxx/webxx/web/wp-content/plugins/tdo-mini-forms/admin/tdomf-edit-post-panel.php on line 35
    
    Notice: Use of undefined constant REQUEST_URI - assumed 'REQUEST_URI' in /var/www/clients/clientxx/webxx/web/wp-content/plugins/tdo-mini-forms/admin/tdomf-form-options.php on line 15
    
    Notice: Use of undefined constant REQUEST_URI - assumed 'REQUEST_URI' in /var/www/clients/clientxx/webxx/web/wp-content/plugins/tdo-mini-forms/admin/tdomf-options.php on line 13
    
    Notice: Use of undefined constant REQUEST_URI - assumed 'REQUEST_URI' in /var/www/clients/clientxx/webxx/web/wp-content/plugins/tdo-mini-forms/admin/tdomf-edit-form.php on line 28
    
    Notice: Use of undefined constant REQUEST_URI - assumed 'REQUEST_URI' in /var/www/clients/clientxx/webxx/web/wp-content/plugins/tdo-mini-forms/admin/tdomf-your-submissions.php on line 91

    all pages were having errors. maybe because I checked the option to show errors inside your plugin's options?

  24. frekel
    Member
    Posted 2 years ago #

    Looks like you have actived the debug flag.
    Goto the settings page and set DEBUG_FLAG to false.

    This option is really only for solving problems with other plugins!

    Greets,
    Frank

  25. Ovidiu
    Member
    Posted 2 years ago #

    ok, taking the debug flag out removed those errors. please also have a look at the other questions/suggestions

  26. frekel
    Member
    Posted 2 years ago #

    one can't delete contests if the folders were previously deleted :-(

    'Error in checking PhotoContest directory 'test02'.
    There is no directory with this contest name.
    If you believe this is not correct, please remove the directory manually'

    True, I found that inconsistency as well. I have to think about how to handle that.

    also I guess the settings should have a default value prefilled in so if a user isn't sure and doesn't know what to use, there should be some values filled in.

    Maybe, I can write that in the help beneath the input form.

    Also only published pages can be set as parents. For testing purposes I kept my contest page as a draft....

    Humm, used a default wp function for the dropdown. Maybe I missed a setting. Will look into that!

    The only suggestion left in this post is the Using the built-in settigns (media uploader?) (correct me if I'm wrong.
    I'm sorry to say that that isn't easy to integrate. This said, I won't forget your request.

    Greets,
    Frank

  27. frekel
    Member
    Posted 2 years ago #

    about the default prefilled values; are you talking about the settings page or the add photocontest page?

    I now see sometimes the settingspage returns empty input fields...
    Will release version 1.3.3 tomorrow to fix this.

  28. Ovidiu
    Member
    Posted 2 years ago #

    :-) I was talking about the settings page as mine came up blank without any values

  29. frekel
    Member
    Posted 2 years ago #

    I now see sometimes the settingspage returns empty input fields...

    Version 1.3.3 (now uploading) has the fix for the settingspage.

    True, I found that inconsistency as well. I have to think about how to handle that.

    Version 1.3.3 (now uploading) deletes the contest even if the contest_folder doesn't exists or renaming fails. Warnings are still printed.

  30. Ovidiu
    Member
    Posted 2 years ago #

    tried the autoupgrade via wordpress: the plugin deleted itsself :-(

    log file says:

    ´[Thu Nov 12 18:15:45 2009] [error] [client 41.240.93.225] PHP Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'photocontest_maps_upgrader_restore' was given in /var/www/clients/clientXX/webXX/web/wp-includes/plugin.php on line 166, referer: http://021club.co.za/wp-admin/index.php
    ´

Topic Closed

This topic has been closed to new replies.

About this Topic