Jump to content

Mike Rockett

Members
  • Posts

    1,452
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by Mike Rockett

  1. I quite like it - saw it the other day on the laravel-news.com site. I guess my only issue at this point is that it's customisable to a point, out of the box. Heavy customisation would require a lot of work. But then again, because they're 're-imagining' forum software, I don't think it's intended to look like the rest of the website (which is the kind of customisation I'm referring to).

    Nonetheless, it looks like a really great platform, and I can't wait to get my hands on it.

  2. You're probably missing one of the conditions from the list: "The selected parent template must have defined this template as one allowed for children."

    So the parent-template you selected must also have defined that this template is allowed as a child.

  3. Hi guys :)

    I may as well spill the beans now... I'm actually working on an extended version of the Redirects module. It's intention is to be more feature rich.

    That said, I could look into including a 404 looker-upper. Only problem is, I'm not quite sure how to implement it the way @ceberlin described. However, I shall give it a try.

    First, let me get the basis of the module up and running. All I've done so far is the front-end page, the page to create a new redirect, and saving. Still a lot to do, in terms of editing, processing, importing, exporting, etc.

    (Edit: Oh, and @apeisa, don't worry - you shall be credited in the module :) )

    • Like 2
  4. @nikola - great, can't wait! :) Loving the theme so much, that I made a custom admin bar for the front-end of a site that I'm building at the moment. Gives it an 'embedded' feel, which I think is quite cool.

    Also made a patch on my installation that changes the buttons for the page tree. It's really irritating that the height of each item grows when you open it... It's not thorough though, as it makes the item count lower when the item is open - I'll find a way though...

  5. If you're will to use page ids for the story id, I think this will help out:

    http://modules.processwire.com/modules/process-redirect-ids/

    Hmm, I think that's out of scope here - @statestreet wants to manually specify the page name, and not base it on the page ID.

    I think it might be a better idea to create a new module that hooks onto the page save event. That callback would then check to see if the user/editor has entered a page name (in a separate field on the page's editor), and if he/she has, then change the page name to that field's content.

    Yes?

    • Like 2
  6. Just my two cents: When using HTML in (that is, within a function), I tend to use heredocs, which makes code visualisation easier - especially when you're using an editor like Sublime Text, or something along those lines.

    In your case, you could do the following:

    print <<<HTML
        <div id="button2" class="button_style" onclick="location.href='page2.html';" style="cursor: pointer;">product</div>
    HTML;
    

    You'll noticed I used print instead of echo, as print is a better option, in my opinion, for heredocs and nowdocs, as you only ever need to print one at a time.

    • Like 2
  7. Thanks Adrian, works just the way I wanted. Though, it seems to resize the row once it's been picked up - makes it thinner. When you put it back, it goes back to normal...

    Edit: Also, what event do I listen for in order to show a button (say, "Save New Order") when it is changed? (That is, not when the row is picked up, but when it's put down in a different place.)

    Update (row width): 

    I've managed to get it mostly right with this:

    table tbody tr>td:first-child {
        width: 1%;
    }
    table tbody tr>td:nth-child(2) {
        width: 26%;
    }
    table tbody tr>td:nth-child(3) {
        width: 35%;
    }
    table tbody tr>td:nth-child(4) {
        width: 35%;
    }
    table tbody tr>td:last-child {
        width: 3%;
    }
    
  8. Greetings :)

    I'm busy working on my first module (finally). Part of the module entails rendering the usual MarkupAdminDataTable on the module's admin page.

    Because of the nature of the module, I'd like to be able to re-order items in the table, by means of drag 'n drop, and perhaps save that order as an order field in the DB table for each item.

    Can't seem to find anyone who's done this before... Can anyone point me in the right direction?

  9. It is correct to use template appending and prepending for your purposes. I use it to display my header and footer - it makes the code a little 'cleaner', as you do not need to manually import the files into a rendered template.

    What version of PW are you using? I am using 2.5.0, and everything works as expected.

  10. I've never used this functionality before, but surely you could call $page->createdUser in your template, and the custom fields will be available in the User object? Someone will have to correct me if I'm wrong, though.

    What are the fields that you added to the system template?

×
×
  • Create New...