Jump to content

evanmcd

Members
  • Posts

    117
  • Joined

  • Last visited

Posts posted by evanmcd

  1. OK, thanks for the info guys.  It's not a huge issue as I don't think clients will use the ability to display images from other pages, and now knowing that this is the expected functionality (at least for now), we won't reveal that feature to them without explanation of the specifics.

    Thanks again for your work on this.  Looking forward to 2.2!

    :)

  2. Hi,

    Just came up against this situation, and am wondering if it's me, or if there's something that can be improved upon:

    1. Add images to a page via an image field

    2. On another page's tinyMCE editor, select an image from the previous page, resizing them (thus creating a new image)

    3. Delete the images from the page in step 1.

    4. The images inserted in step 2 are now missing.

    is this the expected behavior, or have I uncovered a bug?

    Is there a known way to manage this sort of thing without needing to keep track of what pages use which images?

    Thanks!

  3. Hi Ryan,

    Thanks for the detailed response.  I forgot to mention that I used code from the GMap module as well - I guess that's where I got the formatValue function.

    The key part that I didn't understand until your example was the proper way to get a user submitted value.  If doing it in formatValue works, then I'll do it from there.  If you have a better (i,e. more standardized across other modules) way to do it, then I'd do that instead.

    I think I'll stick with fieldType multi because, although my current need doesn't require it, I want to build the module to have the option of tying each vote on a page to the user that cast it.  If a user is logged in, it will save their ID, if not it will save it without.

    This is obviously so we can prevent users from voting more than once on a specific page.  For the non signed-in users, I'll do that with a cookie (not foolproof obviously, but better than nothing).

    Again, thanks for the help.  I'll post an update here once I've got it to the next stage.

  4. Hi guys,

    No, not trying to save a page, trying to save the post value from a form created by my module into the field's table. Just like a comment from a user on a page using the comment module.

    The form is created in the formatValue function, as is done in the comments module. 

    Here's the full code of the module as it stands.

    Thanks for your help.  Really enjoying getting into making a module, and looking forward to contributing it to the community.  :)

    https://gist.github.com/1473421

  5. Hi,

    I've started to work on a simple vote up/down module for PW, and am stuck at how to save the vote from the user.

    Here's the stubbed out function I've got that I thought would do the trick (I got the basics from the the FieldtypeComments module), but when I submit to the page, I don't get anything - no errors (with debugging on), and no inserted data.  Guessing I'm missing something simple.

    Thanks.

    public function ___savePageField(Page $page, Field $field) {
        $sql = "INSERT INTO `{$field->table}` SET pages_id={$page->id}, vote = 1";
        if(!$result = $this->db->query($sql)) $this->error("Error saving item");
        return true;
    }
  6. Oh my gosh, that is fantastic news.  Thanks so much for figuring it out. 

    This will be my first production rollout of a PW site, with another one in the works.  Planning to write a module for the next one which I will happily share once it's ready.  its a simple vote up/down widget.

    Thanks again Ryan.

    • Like 1
  7. Tried that and got the 500 error on the home page. 

    This did start out as a fresh install, so I've gone through the server checks with nothing failing.  The home page that's shown is the default one post install.  Assuming that needs DB access as well, yeah?

    I don't have SSH access into the server, but have triple checked everything in the assets directory to confirm write access.

    I'm gonna try another fresh install into another location on the server and will let you know...

    Thanks again for your help.

  8. Hi Ryan,

    Thanks for the quick reply.  I should have mentioned that I did try that earlier, but didn't end up getting anything more descriptive.

    Not sure if this matters, but I am running on Rackspace Cloud Sites.  I've installed other CMSes (WordPress) without issue, so I'd be surprised if it had something to do with that.

  9. Hi,

    I've just tried installing PW on a remote server (have installed only on my local server until now) and finding 500 error on every page except the index page.

    The site/assets directory has the standard folders, but there's nothing showing up in sessions or logs.  I've double checked and both are writable.  The cache folder has two files in it.

    Any idea what might be going on?

    Thanks.

    - Evan

  10. Hi,

    Just trying this module for this first time, and wanted to check on my expectations re what it is meant to do.

    I've got a page that I don't want to be seen in the admin by users in a custom role I've created.  I've added the page_roles field to the template, and chosen only the superuser role in the Roles that can view this page section of the page.

    However, when logged in as a user with the custom role I still see the page in the admin.

    Am I missing something or shouldn't that page not be seen in the admin by this user?

    Thanks to all of you for your great work on what is now my favorite CMS :)

    - Evan

×
×
  • Create New...