Jump to content

Search the Community

Showing results for tags 'functions'.

  • Search By Tags

    • functions ×
    Type tags separated by commas.
  • Search By Author

Content Type



Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Found 12 results

  1. anyone, any ideas how to solve? i get following error on a website: Notice: Undefined variable: out in /var/sites/i/islandmemorials.co.uk/public_html/site/templates/includes/functions.php on line 43 and this is a code in that very functions file: <?php function numberOpen() {...
  2. I am wondering, how do you pass a variable into wire('page')->get() inside a function? I have been looking through the forums, but unfortunately I have not found the answer yet. My current set up is: function generateNewPages($parentPageName) { $p = new Page(); $p->template = "paren...
  3. Hello, Another newbie question. My Processwire sites is growing and I'm wondering if my way of doing things sounds goog to you. I tend to avoid what I consider 'heavy and frequent' database requests in my functions. For example : // In functions.php myfunction($player) { wire('$pages')->f...
  4. Hello, I've been struggling ALL day on my loading time problem and I'm stuck... As I said somewhere else on the Forum, I'm discovering TracyDebugger module to try and help me (and it does help !), but I'm still in a dead-end. Tracy told me one of my page loads about 4,500 pages and I can't...
  5. Hi, I'm new to PW and still a novice in PHP. I was just wondering how does one access PW within a function? do I pass the entire $page variable to getTitle()? or do I use global $page within the function...I'm confused.. Especially considering there must be a performance penalty for passing en...
  6. Hi, I'm developing mailbox and I wanna rather use single class then making pages. Here is the plan (or I think that its a good plan): - I have mailbox.php template and mailbox page - when user click on mailbox, on sidebar he have options to write/read massages to and from ppl Instead of making...
  7. I just installed ProcessWire for the first time and I've perused the documentation but haven't seen an explanation of the template files that start with an _. Can someone explain to me how those work? Also, how come they have an opening php tag but no closing tag? Is there anything that explain...
  8. Hello everyone. I thought I'd share a few of the functions I've been working on in case any new users etc find them useful. I've not been programming in PHP long, so excuse the sloppy code, and if you find any errors etc, let me know and I will update it. The following function basically takes...
  9. I'm trying to create a module that will execute functions when a button is pressed. What would be the best way to implement this? The options I've considered are: Using a Process and creating a page in the admin section of the website; Or perhaps creating a module and having a button on the...
  10. The title of this thread isn’t very precise (or correct), sorry for that. Also: possibly this is the wrong section of the forum. I think this is a more general PHP programming question, that’s why I put it here. I have a module that triggers a function after a page is saved in the backend. That fun...
  11. Hi! I'm working on my first processwire project and everything is working ok, but i have a question stuck in mi head: which is the "best" way to organize functions and stuff on php/processwire (is my first php project too). I have something like this: -- functions.inc -- home.php -- foo.php --...
  12. Greetings, I wonder if someone can help me with this issue. I am trying to use a file uploaded via backoffice in a template file but with no success. I am using the same sintax as images, but it seems it doesn't work: $image = $page->images->getRandom(); // this works $file = $page->files->g...
×
×
  • Create New...