Jump to content

kongondo

PW-Moderators
  • Posts

    7,529
  • Joined

  • Last visited

  • Days Won

    160

Everything posted by kongondo

  1. Ah, OK, I see. Have no idea really why that is happening. Did your config settings change? (the module system notification ones)? Other than that, cool admin!
  2. PW notices in the frontend? You mean the backend/admin?
  3. @kuba2, did you delete your post?
  4. I'm hoping in time for this Christmas
  5. I have been bitten several times... (Blog Module)
  6. $i = 0;//set counter $out =''; $checked = ''; foreach($foo as $bar) { if($i == 0) $checked = "checked" //radio button stuff here...+ stuff with $bar... $out .= "<input type='radio' name='my_radio' value='{$bar}' {$checked}>"; $i++; } echo $out;
  7. You really want to use $pages->count. count($page...) will come back and bite you when you have lots of pages...
  8. Some people do it that way, i.e. do the detection server side. There's pros and cons to each approach: http://mobiledetect.net/ http://www.smashingmagazine.com/2012/09/server-side-device-detection-history-benefits-how-to/
  9. Hi StephenOC, Welcome to PW and the forums. What LostKobrakai said. Also wanted to add that ProcessWire resizes and caches the image (the variations you request) once to avoid doing it subsequent times
  10. Is it not possible to separate your methods; those exclusive for the frontend and those for the backend? Or even better, throw them into different Classes? E.g. a MarkupMyClass vs OtherModuleClassForBackend? Just thinking out loud here...
  11. Shouldn't both work (i.e. with and without www) if you set up you A Records accordingly? That's what I do with mine at namecheap, according to their KB, i.e. Type Host Value A record @ 11.22.33.44 (your IP) A record www 11.22.33.44 (same IP) No messing about with .htaccess and whatever the user types will get them there. Unless of course the client always wants his/her visitors to see 'www'
  12. Andrey, sort by the real name of the database column (in your case it is 'data') and it will work, i.e. $query = 'template=mytemplate,sort=myfield.data';//data here = real name of the mysubfield, not its alias At the moment, I don't know how to tell sort to sort by the alias of a subfield...Searching using an alias (if set) works fine though, e.g. $p = $pages->get('template=mytemplate, myfield.mysubfield=whatever');
  13. Just to clarify, according to Ryan's commit and comment and ESRCH PR, this only applies to FieldtypePage. Unless am missing a trick, the below still doesn't work $items = $pages->find("sort=parent.title, limit=50");
  14. I can access it without www. With 'www', Google reports: I suppose you need to talk to GoDaddy? MInd you, my knowledge about servers is very minimal Edit I am assuming you used to be able to reach it via www.? If you've never, then you'll need to set it up in your DNS A Record. But you probably know this already...
  15. By your project, you mean your template files and custom modules? If not, you know it could also be called using the short syntax, $page->of(). If your project is not on a production server, maybe turn off modules one by one (maybe autoload ones first) to try to debug this.
  16. Output formatting is always off in modules and the backend (by default)...and always on in the fronted (template files) (by default) just like it's stated here (your thread)...-) Maybe I'm misunderstanding you? Conversely, one would normally check it is on in formatValue() method in Fieldtypes since that is meant for output.
  17. If you can't hide the titles in a hidden input that could be sent via post, then you would need to find the pages on the fly, e.g. $error = "Your error message"; $sectors = $sanitizer->pageName($input->get->project_sectors); if(strlen($sectors)) { $sector = $pages->get("name=$sectors");//could make your selector more specific, e.g. specify template if($sector && $sector->id > 0) { $sector = $sector->title; //do something with $sector } else {//display error or similar } } else { //display error or similar since given input was empty }
  18. kongondo

    Adminer

    @MuchDev, yeah, thanks. I've tried it for the last couple of hours and it would intermittently hang. I am now using SFTP where I am the owner of the files in public_html. I can edit remote files using my local ST3. So, it's all sorted, thanks.
  19. What LostKobrai said + you'd want to first check if there was a value saved in your date field otherwise you might get a nice 1 Jan 1970
  20. Something like this should do it. But you'd want to set timezones if necessary and maybe use PHP DateTime Class for more complex needs. Read below links PHP date $d = strtotime($page->datefield); echo date('d', $d) . '<br>';//e.g 8 echo date('F Y', $d);//e.g. November 2015 http://php.net/manual/en/function.date.php http://php.net/manual/en/function.strtotime.php http://php.net/manual/en/class.datetime.php
  21. Peter, http://processwire.com/api/selectors/#operators
  22. kongondo

    Adminer

    Thanks guys. In the end I went with Horst's suggestion, HeidiSQL. This is installed on my PC and I'm connected securely to my remote server via an SSH tunnel. OK, next, how to mount my server locally with write access so I can edit my files locally using my favourite text editor
  23. kongondo

    Adminer

    Thanks. So is your installation web accessible to everyone then? I'd like to avoid that. I looked for alternatives but SQL buddy has been discontinued for a while and as for http://mywebsql.net/ , it has a class Session that collides with ProcessWire's . I think I will just use a locally installed MySQL client that can access a remote database via SSH.
×
×
  • Create New...