Leaderboard
Popular Content
Showing content with the highest reputation on 11/14/2016 in all areas
-
This module comes in handy when you need related pagefields that are dependant on each other. Example: you have a sports team and team members belonging to that team. you need 2 fields: one on the team-page, one on the member-profile. this module keeps both fields in synch. Other examples would be hierarchical company structure or any other kind of membership relation. Demo: settings in this example: Gitlab: https://gitlab.com/baumrock/PagefieldPairs Modules Directory: asap only tested on PW3 and reno theme. Please test it faithfully before using it. please report any issues4 points
-
@Rudy Have a look at the WireMailBranding module by @Martijn Geerts. It allows custom html templates in outgoing email - but I've never used it in your situation so I can't say if it will do the job or not. Please have a try, and let us know how it goes.3 points
-
foreach($page-children(…) as $key => $post) { if($key == 3){ // Render static content after 3 posts } // Render post as normal }3 points
-
Just uploaded v104 that adds ctrl+u source mode toggle to CKEditors (CKEaddons keystrokes), plus a new CKEditor plugin Keep TextSelection. The latter works with the non-dialog source mode only (plugin limitation). Also contains bernhard's request to allow field edit links on non-pageedit pages, and a possible fix for the PHP 5.3.8 issue reported by @Noboru which is probably due to the missing support for closures - if so, I'll rewrite all of them in the module.3 points
-
Tried it on another machine and the icons are there. Suspect it's because my main PC has a touch screen and PW falsely identifies it as a mobile device or something like that. Will file a GitHub issue for this because there are many large screen touch devices out there with mouse attached and PW should account for this.2 points
-
2 points
-
Great to see these types of modules appearing. Similar functionality to ConnectPageFields? I was working on my own implementation but seems that's no longer necessary!2 points
-
2 points
-
The stackoverflow post relates to Microsoft SQL Server, not MySQL. Searching for Unicode characters works fine in PW. If your characters get stripped, my bet is that they aren't valid utf8, which means the script itself is in another encoding, and/or the webserver announces a different one. I just tested by creating a page titled "你好 World". Running <?php foreach($pages->find('title%=你好') as $p) { echo $p->id . ": " . $p->title . PHP_EOL; } returned exactly that one entry as it should. To check, save your test code as a script and set your editor to utf8-encode it. Don't trust the command line. If that works, check the encodign headers of the webserver using the developer console (F12).2 points
-
BTW, to update pages after they are added to a PageTable field I found one approach, and that is to hook the field save done in InputfieldPageTableAjax.php. The reason you want to hook this for added pages rather than the save of the container page is that the editor could add pages to the PageTable field and then leave Edit Page without saving the page, meaning your hook wouldn't fire. You have to place the hook in init.php - this hook doesn't fire for InputfieldPageTableAjax.php if you place it in ready.php (would love to know why). $this->pages->addHookAfter('saveField', function($event) { $page = $event->arguments('page'); $field = $event->arguments('field'); if(is_string($field)) $field = $this->fields->get($field); if($field->name !== 'my_pagetable_field') return; $new_value = $page->{$field->name}; $pages_added = $new_value->getItemsAdded(); // here save something about $page to a field in $pages_added }); To update pages after they are removed from a PageTable field you would hook Pages::saveReady for the container page and look for changes to the PageTable field, doing something similar to this section of ConnectPageFields.2 points
-
Mh, what kind of field is author? If thats a Page field, try author.title=... Also, what FieldType is alias? I assume Text?2 points
-
Updated 2018-05-06: Version 2.0.0 released Updated 2017-03-27: Version 1.1.3 released Updated 2016-04-11: Version 1.1.2 released Updated 2016-02-26: Officially in the module directory! http://modules.processwire.com/modules/webmention/ Updated 2016-02-25: Version 1.1.0 is now released. It's been submitted to the module directory so should appear there soon. In the meantime, it's available on GitHub: https://github.com/gRegorLove/ProcessWire-Webmention. Please refer to the updated README there and let me know if you have any questions! ------------ Original post: This is now out of date. I recommend reading the official README. I've been working on this one for a while. It's not 100%, but it is to the point I'm using it on my own site, so it's time for me to release it in beta. Once I finish up some of the features described below, I will submit it to the modules directory as a stable plugin. For now, you can install from Github. It works on PW2.5. I haven't tested on PW2.6, but it should work there. Feedback and questions are welcome. I'm in the IRC channel #processwire as well as #indiewebcamp if you have any questions about this module, webmention, or microformats. Thanks to Ryan for the Comments Fieldtype which helped me a lot in the handling of webmentions in the admin area. ProcessWire Webmention Module Webmention is a simple way to automatically notify any URL when you link to it on your site. From the receiver's perspective, it is a way to request notification when other sites link to it. Version 1.0.0 is a stable beta that covers webmention sending, receiving, parsing, and display. An easy admin interface for received webmentions is under development, as well as support for the Webmention Vouch extension. Features * Webmention endpoint discovery * Automatically send webmentions asynchronously * Automatically receive webmentions * Process webmentions to extract microformats Requirements * php-mf2 and php-mf2-cleaner libraries; bundled with this package and may optionally be updated using Composer. * This module hooks into the LazyCron module. Installation Github: https://github.com/gRegorLove/ProcessWire-Webmention Installing the core module named "Webmention" will automatically install the Fieldtype and Inputfield modules included in this package. This module will attempt to add a template and page named "Webmention Endpoint" if the template does not exist already. The default location of this endpoint is http://example.com/webmention-endpoint After installing the module, create a new field of type "Webmentions" and add it to the template(s) you want to be able to support webmentions. Sending Webmentions When creating or editing a page that has the Webmentions field, a checkbox "Send Webmentions" will appear at the bottom. Check this box and any URLs linked in the page body will be queued up for sending webmentions. Note: you should only check the "Send Webmentions" box if the page status is "published." Receiving Webmentions This module enables receiving webmentions on any pages that have have "Webmentions" field, by adding the webmention endpoint as an HTTP Link header. If you would like to specify a custom webmention endpoint URL, you can do so in the admin area, Modules > Webmention. Processing Webmentions (beta) Currently no webmentions are automatically processed. You will need to browse to the page in the backend, click "Edit," and scroll to the Webmentions field. There is a dropdown for "Visibility" and "Action" beside each webmention. Select "Process" to parse the webmention for microformats. A better interface for viewing/processing all received webmentions in one place is under development. Displaying Webmentions (beta) Within your template file, you can use `$page->Webmentions->render()` [where "Webmentions" is the name you used creating the field] to display a list of approved webmentions. As with the Comments Fieldtype, you can also generate your own output. The display functionality is also under development. Logs This module writes two logs: webmentions-sent and webmentions-received. Vouch The Vouch anti-spam extension is still under development. IndieWeb The IndieWeb movement is about owning your data. It encourages you to create and publish on your own site and optionally syndicate to third-party sites. Webmention is one of the core building blocks of this movement. Learn more and get involved by visiting http://indiewebcamp.com. Further Reading * http://indiewebcamp.com/webmention * http://indiewebcamp.com/comments-presentation * http://indiewebcamp.com/reply1 point
-
Thanks - actually the screenshot helped, you have debug mode on and that adds an extra item there. Replace line 45 in Hotkeys.js with this: $('#breadcrumbs a:not(.pw-panel):not([href="#"])').each(function (i) { @adrian I'm just generating the editurl/url for the current page and add the data-attributes with jQuery, which is not the smartest way I admit. Maybe this thing needs to be revised some day.1 point
-
Sometimes I feel I write the readme in vain Add long-click and ctrl+click actions to breadcrumbs: if enabled, long-click on a breadcrumb item will open the corresponding front-end page in a new tab/window, and holding the Ctrl key when clicking on them will navigate to their edit screen. I know it's not too user-friendly but it's there and working1 point
-
1 point
-
1 point
-
Never mind! Practice makes perfect1 point
-
From the video demo it looks great, so good job regardless!1 point
-
oh noooooo then it seems i was working too much on the todo-module it's the first pw weekly i missed since a while... anywhay. it was not too much effort...1 point
-
But it was in PW weekly https://weekly.pw/issue/131/1 point
-
oh man... exactly the same... i knew this would happen. not enough time to follow the forum and it seems it was not on pw weekly also in this thread it was not mentioned thanks for your hint...1 point
-
1 point
-
@s3nior If you want to split the content of the field up by lines, you can use the PHP explode() function with "\n" (probably) as the $delimiter; something like this... $lines = explode("\n", $image->description); // $lines is now an array of strings, indexing starts at zero $second_line = $lines[1]; echo "Second line is: $second_line"; Hope that helps.1 point
-
1 point
-
Looks like I didn't test my module for single Page fields. Will get that sorted in an update soon. In the meantime just set the 'featured_on' Page field to 'multiple' and it should work.1 point
-
Option 1 is unfortunately not viable as I need the client to be able to reorder the featured quotes. Option 2 this sounds like it could be perfect but I've tried doing exactly as you said and I'm getting errors. If I try to save the Quote page with the checkbox ticked it timesout with the error: Error: Maximum execution time of 30 seconds exceeded (line 1431 of /Users/alexcapes/Freelance-work/canongate/01_prototype/wire/core/Page.php) If I try to save the 'featured_quotes' page field on the homepage I get the following: Session: Method NullPage::add does not exist or is not callable in this context1 point
-
I don't know that it will, because the default behaviour for removing pages from a PageTable field involves marking them for deletion (uses JS) and the deletion takes place when the container page is saved. Pages don't disappear from the inputfield when marked for deletion, as opposed to the way pages appear when they are added. But I can think of some alternatives. Seems like what you want is to have some featured Quote pages: you mark a Quote page as 'featured' when editing that page, and when editing the Home page you can see all the Quote pages that were marked 'featured'. Option 1: use a 'featured' checkbox on the Quote template. Use a RuntimeMarkup field on the Home template to list all the featured pages, maybe with a link to Edit Page for each featured Quote to make it easy to 'unfeature' a page. Option 2: Use the ConnectPageFields module. Create a 'featured_quotes' Page field on the Home template (multiple, allows pages using Quote template, uses AsmSelect inputfield) . Create a 'featured_on' Page field on the Quote template (single, allows pages using the Home template, uses Checkboxes inputfield). Link these Page fields in the ConnectPageFields module. Now you can add/remove featured Quotes when editing the Home or a Quote page.1 point
-
Unless you need the reference number inside PageEdit for some reason (e.g. an inputfield dependency, and for that there are workarounds using RuntimeMarkup or FieldtypeReference), it should be possible to get the reference using the API in your template. You either get the page via the container page's PageTable field, or in the page's template you do similar to what you showed in your first post: $container_pages = $pages->find("my_pagetable_field=$page");1 point
-
1 point
-
Template Notes Adds a "Help" tab to pages for notes and instructions on the current template used. You can add content by simply putting a html or markdown file in /site/templates/notes/ the module will automatically load that file if it finds one and adds a "Help" tab to the page edit form. Name the files using the template name. You can use html or markdown to write the help text. - /site/templates/notes/[tplname].html - /site/templates/notes/[tplname].md To style the content you can specify a custom css file url you add to the module settings. http://modules.processwire.com/modules/template-notes/ https://github.com/somatonic/TemplateNotes This module was quickly written after seeing a wish-list request by Joss http://processwire.com/talk/topic/5016-help-tab-for-template/1 point
-
Just a follow up on the issue of Tracy suppressing these notices. I have posted a Github issue here: https://github.com/nette/tracy/issues/233 Note that you will see the actual original error message if you have your browser dev console open, although obviously this is not ideal and I really want it shown in the Errors panel on the AJAX bar in Tracy.1 point
-
@SiNNuT, if we stay in the non-proprietary category, you might be interested by http://sk1project.net/.1 point
-
Create a child class of Bar, which does have public methods to modify those properties? Use that child class from your module.1 point
-
Elixir / Phoenix - A really great functional programming language running on the erlang VM. Damn fast and with great concurrency tools. Phoenix is the corresponding webframework (inspired by rails, but also not really)1 point
-
Hello, If you use this module, you may be interested by my fork https://github.com/jlj/MarkupTwitterFeed, that adds the following features to the official MarkupTweeterFeed module: support of the recent Twitter extended tweet format (tweets longer than 140 chars); support of emoji characters in tweets; display of image in a tweet (only the first image is displayed in the curent version); display of video in a tweet (with a html5 video markup); for retweets, display of the original author and avatar in the tweet. Also, it allows a more flexible per-item rendering, as in the following example: $t = $modules->get('MarkupTwitterFeed'); $t->limit = 10; $renderOptions = array( 'showDate' => 'before, after', 'dateFormat' => __("M j, Y"), // Tweet block date format 'listItemOpen' => "\n\t<div class='tweet-item'>", 'listItemClose' => "</div>", 'listItemText' => "<i class='fa fa-twitter'></i> <span class='tweet-text'>{text}</span>", 'listItemDate' => " <div class='date'><i class='fa fa-calendar'></i> {date}</div>", 'listItemLink' => "<a rel='nofollow' href='{href}'>{url}</a>", 'videoAttributes' => "autoplay loop muted", 'preserveLineBreaks' => 'coalesce', ); foreach($t as $tweet) { echo $t->renderItem($tweet, $renderOptions); } Examples from my website: This module has been tested with pw 2.7.2 only, so I cannot guarantee the proper working with 3.0… Hope this will be useful for others here.1 point
-
I found the culprit: debug mode. I realized that when the Tracy debugger was on, everything was fine, even not logged. This debugger reroute Processwire debug mode, I presume... So I switch off the debug mode in config.php and voilà! Remains this bug...1 point
-
This is a start for you that comes from the Migrator module: $p = $pages->get() // use this to get the page that you are importing comments to foreach($comments as $comment){ $c = new Comment(); $p->of(false); $c->text = $comment['text']; $c->cite = $comment['cite']; $c->email = $comment['email']; $c->ip = $comment['ip']; $c->website = $comment['website']; $p->fieldname->add($c); $p->save(); // setting the status doesn't current work due to this: https://github.com/ryancramerdesign/ProcessWire/issues/1034 $c->status = $comment->status ? $comment->status : 0; //need to set after saving to allow setting status without being subject to moderation settings $p->save(); } This assumes that you have already parsed the rows of the CSV file into the $comments array. To do that, take a look at: http://php.net/manual/en/function.str-getcsv.php Hope that helps to get you going.1 point
-
Or use my migrations module, to kinda get the best of both worlds. The ease of the ProcessWire API with the ability to have migrations run/downgraded as needed.1 point
-
just because i needed this again today: if you are dealing with any sort of tags (HTML data) in your fields, than the easiest solution is to base64_encode($var) your data in the export and then base64_decode($var) it in your import. i had to import some pages with inline images today and if you know how to do it, that is also quite easy and straigtforward. the problem is, that you have some html like img src="/site/assets/files/12345/your-image.jpg" in your field and the ID will change after the import! sample export xml - note the tag <pid> holding the old id echo "<?xml version='1.0' ?>"; echo '<pages>'; // find pages $results = $pages->find('parent=/your-parent/'); $results->add($pages->find('parent=/something-else/')); foreach($results as $p): $p->of(false); ?> <page> <title><?= $p->get('headline|title') ?></title> <date><?= $p->created ?></date> <featured>1</featured> <pid><?= $p->id ?></pid> <pic><?= $p->coverpic->first()->httpUrl ?: '' ?></pic> <body><?= base64_encode($p->body) ?></body> <images><?php foreach($p->images as $image) { echo '<image>' . $image->httpUrl . '</image>'; } ?></images> <files><?php foreach($p->attachments as $file) { echo '<file>' . $file->httpUrl . '</file>'; } ?></files> <gallery><?php foreach($p->gallery as $image) { echo '<image>' . $image->httpUrl . '</image>'; } ?></gallery> </page> <?php endforeach; echo '</pages>'; die(); and then the import: $items = simplexml_load_file('your-url-of-export-data'); foreach($items as $page) { $p = new Page(); $p->template = 'blogitem'; $p->parent = '/news'; $p->title = $page->title; $p->name = $sanitizer->pageName($page->title, true); while($pages->find('parent='.$p->parent.',name='.$p->name)->count() > 0) $p->name .= '-'; $p->date = $page->date; $p->featured = $page->featured; // get body html and remove root node $p->body = base64_decode($page->body); $p->save(); // change images in body field $re = '/src="\/site\/assets\/files\/' . $page->pid . '\//'; $p->body = preg_replace($re, 'src="/site/assets/files/' . $p->id . '/', $p->body); $p->save(); // add images if(strlen($page->pic)) $p->pic->add((string)$page->pic); foreach($page->images->image as $image) $p->images->add((string)$image); foreach($page->files->file as $file) $p->files->add((string)$file); foreach($page->gallery->image as $image) $p->gallery->add((string)$image); $p->save(); echo 'new page <a href="' . $p->editUrl . '" target="_blank">' . $p->path . '</a><br>'; } die(); just set your ckeditor field settings porperly before your import and all images will be recreated on your new site! remark: this will only replace images from the same page and not any images that are linked from a different page with different page-id. that would need some extra mapping of old-id --> new-id1 point
-
You can set the classes to be used for left, center and right alignment in the configuration settings of ProcessPageEditImageSelect.1 point
-
i had this problem some days ago and wrote a simple script on both websites. both online on different domains: export on old website: <?php $export = false; if($export AND $input->get->export == 'blogitems') { echo "<?xml version='1.0' ?>"; echo '<pages>'; $parent = $pages->get('/blog'); $results = $parent->children(); //$results = $pages->find('id=3198'); // ohne pic //$results = $pages->find('id=3204'); // mit pic foreach($results as $p): $p->of(false); ?> <page> <title><?= $p->title ?></title> <date><?= $p->blog_date ?: $p->created ?></date> <featured>1</featured> <pic><?= $p->main_slider_coverpic->first()->httpUrl ?: '' ?></pic> <body><?= $p->body ?></body> <images><?php foreach($p->images as $image) { echo '<image>' . $image->httpUrl . '</image>'; } ?></images> <files><?php foreach($p->files as $file) { echo '<file>' . $file->httpUrl . '</file>'; } ?></files> <gallery><?php foreach($p->gallery as $image) { echo '<image>' . $image->httpUrl . '</image>'; } ?></gallery> </page> <?php endforeach; echo '</pages>'; die(); } and then the import: <?php $import = false; if($import AND $input->get->import == 'blogitems') { $items = simplexml_load_file('https://www.your-old-website.com/?export=blogitems'); foreach($items as $page) { $p = new Page(); $p->template = 'blogitem'; $p->parent = '/news'; $p->title = $page->title; $p->name = $sanitizer->pageNameUTF8($page->title, true); while($pages->find('parent='.$p->parent.',name='.$p->name)->count() > 0) $p->name .= '-1'; $p->date = $page->date; $p->featured = $page->featured; // get body html and remove root node // $p->body = substr($page->body->asXML(), 6, -7); // ###### update: it's better to use base64_encode($page->body) in your export and then base64_decode($page->body) in your import ##### $p->save(); // add images if(strlen($page->pic)) $p->pic->add((string)$page->pic); foreach($page->images->image as $image) $p->images->add((string)$image); foreach($page->files->file as $file) $p->files->add((string)$file); foreach($page->gallery->image as $image) $p->gallery->add((string)$image); $p->save(); echo 'new page <a href="' . $p->editUrl . '" target="_blank">' . $p->path . '</a><br>'; } die(); } of course that is not bulletproof but it's really simple and you can do whatever you want (export junks by adding start=0, limit=10 or the like to your selector) you can also try adrians batch child editor. or csv importer. but for me the example above worked like a charm ps: try it with limit=1 for testing1 point
-
By the way, I don't remember which version introduced this, but you can use $field->getLabel() instead http://processwire.com/api/ref/field/get-label/1 point
-
If there's nothing in the errors.txt the error does happen before pw's error handling kicks in. So probably some error either in config.php (simply checked by adding die() in various places and see if the error persists) or with any autoloading modules or in init.php. Also check your php/mysql/apache versions for any obvious mismatches.1 point
-
Version 1.1.2 is released: http://mods.pw/BC - Updated packaged php-mf2 library to version 0.3.0 - Added config option to automatically monitor a page for approved vouch domains (see below). - Better authorship algorithm support. One of the bottlenecks for the Vouch protocol is "how do you easily manage the list of domains you will accept a vouch from?" In the 1.1.0 release, it was just a text field that you had to manually enter each domain into. As of version 1.1.1, there is a new config field “Vouch whitelist URL.” You can enter the URL of your blogroll or other whitelist. It will be monitored once a day and new domains will be added to the list of approved vouch domains. Links must use the h-card microformat. No domains will be removed from the approved vouch domains. This should help automate the approved vouch domains list. I'm trying this out on my own site currently: http://gregorlove.com/following/ If you're using this plugin, I'd love to hear from you! Feel free to send webmentions to this post: http://gregorlove.com/2016/02/quite-pleased-to-officially-release/1 point
-
https://github.com/gRegorLove/ProcessWire-IndieAuth This module allow users to sign in to your site using IndieAuth: IndieAuth is a way to use your own domain name to sign in to websites. It works by linking your website to one or more authentication providers such as Twitter or Google, then entering your domain name in the login form on websites that support IndieAuth. This module has two different functions: IndieAuth Authentication After a user enters their domain name and successfully authenticates, they will be redirected back to your site and the session variable indieauth_domain will be set. You can then use this session variable to customize your site for the user or offer additional functionality. Note: The user is not logged in to ProcessWire at this point. ProcessWire Authentication If you would like to allow users to log in to ProcessWire using IndieAuth, you will need to make a few changes to the user profile. Add a field named website Add that field to the user template Update the User Profile module to make the website field user-editable The user will need to set their domain name in their user profile before they can log in with IndieAuth. Setup After installing the module, copy the template file extra/templates/indieauth.php into your site/templates/ directory. In the admin area, add the new indieauth template. On the "URLs" tab for the template, check "HTTPS only." Create and publish a new ProcessWire page using this template, e.g. https://example.com/auth/ The included template is a minimal, sample template that covers both of the functionalities described above. You can expand the template or integrate it into your existing templates as needed. For more information about the sign-in form and how the verification works, please refer to https://indieauth.com/developers Notes This module does not create user records if they do not exist already.1 point
-
Yeah, it is probably pretty niche, but it can be very handy if you want to implement something like OAuth or OpenID without all the heavy lifting those entail. My immediate use case is that it's easier for me to log in to my site on mobile by just entering my domain now. On http://indiewebcamp.com it's used as the authentication mechanism for the wiki. It's worked great there to prevent spam accounts/wiki edits.1 point
-
Version 1.1.0 is now released. It's been submitted to the module directory so should appear there soon. In the meantime, it's available on GitHub: https://github.com/gRegorLove/ProcessWire-Webmention. Please refer to the updated README there and let me know if you have any questions!1 point
-
If you want to see page A on page B you can install the Page References Tab module. This adds another tab in your page showing which pages are linked.1 point
-
Good morning little app builder ninjas, As promised yesterday I will point you to the important forum posts on how you could build your own app in Processwire. Are we all seated? First we assume that our app is separated into two main parts. The Frontend with custom login and the Backend for App Administration and User Dashboard. Before we beginn follow this link: http://processwire.com/api/cheatsheet/ Say hello to the Processwire API Cheatsheet made by Soma, whenever you meet Soma just give him a hug for this outstanding work. Well the Cheatsheet would be definitely your best and maybe your most intimate friend during developing process. Make yourself familiar with the Cheatsheet and make sure you activated the advanced view. Ok, lets beginn. Right before coding any line in our editor we have to think about our App. What should the App do? Which functionality do we need? Maybe you mockup your first design, but do not start to code! Think about your App, think about structuring your data, fields, templates,folder structure and ,believe me (really important), think about name conventions. A little example from one of my projects. The app handles three use cases, Frontend, Backend Administration and Client Dashboard, maybe a normal setting. I started to think about naming template files and folders. So I came up to the decision to name folders like this: includes-backend --admin --views --scripts --client --views --scripts includes-frontend --views --scripts Template files are named like this: backendHome.php backendMyData.php home.php homeNormalContent.php homeLogin.php Think about naming your page tree, this is maybe the first step in data structure you do. Sure you could start this way, but do you know how large your app possibly could grow before really thought about? So, do yourself a favour and write down your thoughts. I´m working currently on a App which contains round about 300 Files of Script Logic and Output forms, editing without any logic in naming would definitely be a mess. Ok, we thought a lot of our App in theory, what now? We need a custom login! You find some usefull snippets and logic about login from frontend in this posts: http://processwire.com/talk/topic/1716-integrating-a-member-visitor-login-form/#entry15919 http://processwire.com/talk/topic/107-custom-login/ (I really could recommend Renobirds login thoughts and his script) Read carefully through this posts, they contain almost everything you have to consider on frontend user management. You are now on a point of using processwire where you definitely receive input from users, so think about security and make yourself familiar with $sanitizer. Never ever work with user generated data without sanitizing them! There are two main headlines you always have to remember: 1st DO NOT SAVE PASSWORDS IN PLAIN TEXT IN YOUR APP 2nd DO NOT TRUST INPUT YOU RECEIVE FROM USERS Calm down little Ninja. Ryan just gave you a strong and powerful tool. He gave you Excalibur and named it just API. Follow this links: http://processwire.com/talk/topic/352-creating-pages-via-api/ (creating content via api) http://processwire.com/talk/topic/296-programmed-page-creation-import-image-from-url/ (image handling) Thats it.1 point
-
I'm responding from phone so keeping it short: $image = $pages->get("template=page-headers, sort=random")->images->getRandom();1 point