Jump to content

netcarver

PW-Moderators
  • Posts

    2,230
  • Joined

  • Last visited

  • Days Won

    47

Everything posted by netcarver

  1. Hello USSliberty. Welcome to the PW forums and thank-you for your contribution.
  2. Methinks this... 'url' => "./$event[id]", // event ID is the url segment ); return json_encode($json); // <<<< wrong data? } ...should be this... 'url' => "./$event[id]", // event ID is the url segment ); return json_encode($items); // <<<< right data? }
  3. Hi Harm, try to develop the habit of always putting the constant first in statements like this... if('inactive' == $u->user_status) ... Then if you miss out an '=' sign PHP will shout at you about it.
  4. I don't know if this is possible or not, but I wonder if MySQL has any events/triggers you can set on ALTER commands. If there are then perhaps you can install something in the DB itself that can log schema changes via ALTER or CREATE commands to a 'structure_change_log' table (or whatever).
  5. @rob, I echo bcartier's thanks for your work on this module. Looking forward to seeing it added to the PW arsenal. @bcartier, welcome to the PW forum!
  6. @diogo, thank you, overall that seems better to me but may not be to everyone's taste and I do now see mindplay's point about the navigation not being so obvious.
  7. The Link Shortener module hides the title field for children of a known parent template. Maybe some code in there that can help you.
  8. I don't know 100% for sure as I haven't dug that deeply into the code. However, I'd guess it goes like this: 'as global' fields are needed in every PW page, PW can collect it before you choose the template. If a field isn't global, the collection will have to get pushed back till after you choose the template.
  9. Hello Deane, welcome to the PW forum. This question (well, one very similar) came up recently in the forum. Basically it's because the title field is setup as a global field and is therefore needed in every template. To cure it, please try... setup > fields > title > advanced tab > turn off the global flag > save. setup > templates > basic-page (or whichever template doesn't need a title) > delete the title field > save And enjoy ProcessWire!
  10. I've tried this and like it. The idea in your second post sounds like a good addition too. However, I do have one thought: would it be even nicer if the hover target was narrower? Currently the list items are pretty wide so the menu pops up even if the cursor is over the other side of the screen which seems a little over-animated to me. BTW, I'm using the default theme - I guess other themes may have a more restricted width on the list items.
  11. These are just quick ideas off the top of my head about running at the same time every day. If you can add cron jobs to the server box, that's probably the best way to go. Try... Making the script executable by whatever user the webserver uses. From the server's command prompt setup the cronjob via "crontab -e". You will need to add a line to this file and you can use this cronjob calculator to help you set it up. However, if you have no access to cron on the server, install the lazycron module instead and then set up a cronjob on another internet connected box that is always on at 2am that uses wget to visit your site and hence trigger your script.
  12. Hmm, could this be due to some kind of QOS/throttle settings at the host combined with your ISP pipe limit? With (s)ftp/rsync you are pushing to the server from your box through a relatively thin pipe (+ QOS filter?), when using SSH + git clone you are telling the webhost server to go pull files from github directly and both the webhost + github are both on fat pipes.
  13. We've touched on common use of Vim before unless; you are forgetting or... I'm delusional. Of these, option 2 is probably more likely Seriously though, XDebug + VDebug is a great combination. I've modded VDebug a little to compress the local variable context view which was a little sparse for my liking.
  14. Ryan, I'm happy to take over maintenance of those two modules once the next version of textile is released. Lets stick with the status quo until then.
  15. @Gazley yeah, it's like having a microscope and being able to see inside the code again -- I had forgotten how useful it can be and it's certainly easier than having to instrument routines with all kinds of debug output. It's given me a much better insight into one of the other PHP codebases I look after so I'm really glad your thread prompted me to look for a Vim solution.
  16. Hi arjen, if you are using the TextformatterTextile module then you could try this... Go to site/modules/TextformatterTextile* and rename classTextile.php to classTextile.orig.php Click this link and save the file as classTextile.php in site/modules/TextformatterTextile* *Adjust exact path as needed You should now be able edit any page using the new version of textile and see if it produces changes (for better or worse.) Edited to add: diogo got there first!
  17. Thanks diogo. I didn't touch the table code but please take a look at any links you have in textile just to make sure they are still working as expected.
  18. Folks, I've been working on an experimental re-write of the link & image handling code in textile as I've become increasingly annoyed with the existing code. If you don't know what textile is then pass this over but if you do know what I'm talking about could you try out the code from the link-detection-rewrite branch and see if it improves or breaks anything for you? Thanks in advance!
  19. Hi Matthew & welcome to the forum. Looks like apeisa got there with a suggestion first so I'll just add: here is some additional reading on the matter.
  20. If any of the users who get to enter stuff into these fields are students then I'd say "Yes!" Make sure every field they can type into is encoded. Similarly, if input is coming from staff or contractors, any of whom may get disgruntled or leave with a grudge, then leave it on.
  21. Just found this thread and it set me off exploring to see what debugging features were possible in Vim. I've not used a proper debug environment/IDE with PHP though I used to with assembly/C/C++. I found an excellent plugin (joonty/vdebug) that, coupled with XDebug, works amazingly well and allows you to single-step, watch variables (global and local scopes), set breakpoints on lines/conditions and do evaluations - in short, all the usual suspects. I've been using it to single step through PW as it builds pages - neat!
  22. There's also a textformatter for the Textile lightweight markup system if you'd prefer
  23. Setup > fields > title > advanced tab > turn off global flag > save > remove from templates where you don't need it. I think that should fix it -- but don't know if that's the official way to do it.
  24. I'm trying this out now as it's a new Inputfield type to me. Can you point me in the direction of a module that uses this Inputfield type so I can get a look at how it's used? I tried the following but I'm missing something... $field = $m->get("InputfieldPageAutocomplete") ->set('label', 'Select individuals you wish to notify') ->attr('id+name', 'users') ->set('parent_id', $this->config->usersPageID ) ->set('labelFieldName', 'name') ->set('columnWidth', 50) ->attr('value', explode("|", $user_ids) ); ; $form->add($field); Thank you in advance!
×
×
  • Create New...