Jump to content

Search the Community

Showing results for tags 'add'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 6 results

  1. Hello Gentlemen and Ladies. I have not posted for a while but now i need your help figuring out some things. The Documentation has come a long way and i love it. Though on the page: https://processwire.com/api/ref/pageimages/ I am trying to figure out if when i want to add an image to an existing image field with multiple images alldready in it and using the method $page->images->add() <?PHP /* get the images object array for the Page */ $myPageImg = $page->images; /* define the image to add */ $newImg = 'http://www.somesite.com/image.jpg'; /* Thanks Autofahrn, forgot about the output formating */ $page->of(false); /* create a new Pageimage object with the given URL and add to the Pageimages array */ $myPageImg->add($newImg); /* save the page */ $page->save(); ?> I am pretty sure i missed a few steps in the code above? Is that string suppose to be an URL like "http://www.somesite.com/image.jpg" and the method will automaticly download the image and create an Pageimage Object and add it to Pageimages array or does it have to exist on the host first and i supply a file path to that image? I guess im confused about that, hope you guys could clarify that for me. And if it needs to be allready downloaded to my host before adding the image, what would be the best API methods for that task? Just point me in the right direction and i will figure it out. Sorry for the bad explaination but i could not figure out a better way of asking. Thanks in advance. /EyeDentify
  2. Hello, Just a simple (I think) question which is in the title of my post. Roughly speaking : here's my code (made-up because my real function is so long... I don't want to post it all here ) function updateScore($player, $task, $real = true) { [...] $player->score = $player->score+$task->score; if ($task->name == 'new-equipment') { $new-eq = $pages->get("name=sword"); $player->equipment->add($new-eq); } if ($real == true) { $player->save(); } } Everything works fine when I call updateScore($player, $task, true), but if I call updateScore($player, $task, false), scores are untouched, but the equipment gets added ! It used to work fine on PW2.7 but my update to PW 3.0.62 seems to have broken this... Is there a simple explanation ? I keep reading my code over and over and this is driving me crazy... Thanks !
  3. Hi Guys I have a question about the Add Page Shortcut Functionality. In General you can set the family settings on template so that you have to choose a new Parent when adding a new page of the defined template with the shortcut menu. In my case I can add new "Newsletter" Pages but I have to choose under which Parent it should be added. But as a "Clinic" - User I can only add the Newsletter Pages under the Parent Page which belongs to this User (was made with a Hook inside Page::addable / Page:editable). Because of that I only see one Parent Item in the Dropdown Shortcut Menu which is correct. Can this Selection be skipped when the shortcut menu only has one Parent to choose (Also in ProLister "Add New")?
  4. Hello, my problem: with the role created for my client, the "add new" button don't list all templates authorized for this role. With the admin role all template are listed: With the client role city (ville) and program (programme) are missing : Have you any idea? Thanks a lot!
  5. Is it possible to make a "Add New" Shortcut-Button on a Custom Admin Page e.g in the ProcessDashboard Module instead on the Sitetree Page?
  6. Hi to all! I want to create custom dashboard page in administration , with buttons to add new pages where current user role can create. Like the new button "add new" in Pages. I use the module "Process Dashboard" but that customisation is hard to me. Any help will be greatly appreciated. Thanks in advance!
×
×
  • Create New...