Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. They CAN certainly do. But it's not plug&play, it will need some more or less simple coding 🙂
  3. Hi Kathleen! Welcome to the forums. For the blogposts pages content, you need to import the database from the server. But for the assets (files folder inside templates/assets/) there's a technique to get them using hooks like Ryan shows on his post: https://processwire.com/blog/posts/pw-3.0.137/
  4. Today
  5. Hi, I would like to inquire if anyone already had a solution in pulling the live website into the dev site and sync the media files and blogposts. Or replicating the processwire website without breaking it. Thanks, Kathleen
  6. Sry for confusion.... corrected the Post.
  7. I'm confused. Are you using checkboxes or radio buttons? Unless you don't check the relevant radio button, you won't get any value after submitting the form. Or maybe I don't understand what you're really asking?
  8. Hi Guys, i use the embed-method "D" in Formbuilder. In the form i use some checkboxes for calculating. To achieve this i set the value of the checkbox like this: <input name="myCheckbox" type="checkbox" value="<?= $someValue ?>" /> When i send the Form, the value changes into the entry, i made in formbuilder in the Detail-Section of the checkbox-field. does anybody know, how to accomplish, that the Form sends my specific value? many thanks!
  9. Hi @adrian, I have a little problem with the User Switcher panel: there's a config option for limiting the list of users that appear in the panel, which is great because often there can be a lot of front-end-only users. But the problem for me is that the option gets defined in terms of roles that are excluded rather than included: I'm not sure how common this is for others, but I often give back-end users (who I want to be able to switch to via the User Switcher) front-end roles because they can also be "members" as well as "administrators". So these kinds of users have multiple roles. What do you think about adding an "include only these roles" option for User Switcher as well as a "exclude these roles" option? Or maybe you have another idea of how this might be accommodated?
  10. Yesterday
  11. This is my code fragment that is currently working.. but I save the image to file because my case // here I load the SVG file $svg = file_get_contents("https://www.domain.com/site/templates/images/$image.svg"); // here goes code to modify some elements, colors and texts in the svg .... // here I set the SVG var to Imagick and save to a PNG file ready for download $im = new \Imagick(); $im->readImageBlob($svg); $im->setImageFormat("png24"); $im->scaleImage(1024, 1024, true); $im->writeImage("../downloads/$filename"); $im->clear(); $im->destroy(); $file = "https://www.domain.com/site/downloads/$filename"; echo $file; I implemented it as a service that is called by AJAX and returns the URL to the generated image.
  12. header("Content-Type: image/jpg"); $im = new \Imagick(); $im->readImageBlob("https://www.ketocon.org/site/assets/files/1130/ketovangelist-lockup-w-tag_glc-lg.1500x0.png"); Still getting a blank square. (doesn't work if I put 'png' for the header, either, or try the other half of the image I'm trying to composite, which is a jpg) Here's my imagick install (from phpinfo):
  13. Thanks. I've already used your tutorial on building custom admin pages and found it really helpful. Rockfinder2 + RockTabulator are new to me, but it looks like they'll do what I want.
  14. v0.1.10 released. Now that new core ways of setting field widths in template context have been introduced it seems that users are sometimes setting a field width using a core input and then saving the Edit Template form. Although it's not necessary to save the Edit Template form after adjusting a field width using a core input (those settings are AJAX-saved), it's not unlikely that users will do this and in these circumstances the old width stored in the Template Field Widths inputfield was overwriting the new width. So from v0.1.10 onward the widths entered into the Template Field Widths inputfield are only saved if Edit Template is saved with the Template Field Widths inputfield in a open state. And it's recommended to use the default "Collapsed" config option for Template Field Widths if you think you might also use core inputs for setting field widths.
  15. It work for me. Try to assign the image path manually to verify that the Imagick is working: $im->readImageBlob("https://www.domain.com/site/templates/images/image.svg"); If you are able to open the picture in the browser using the path, this should render the picture on the page.
  16. Instead use <link href="<?php echo $config->urls->templates; ?>styles/assets/css/font-awesome.min.css" rel="stylesheet" /> and place them in the same folder on your local PC. Or you modfiy the url path to the templates folder in your site/config.php
  17. Apparently the setting takes time to settle in. Two days later I'm not logged out at random anymore. Fingers crossed.
  18. Thanks. This displays an empty image object (which renders as a small empty square). 😩 I also tried changing the source images in $ex_logo and $background from path to url but that didn't have a positive effect.
  19. @Sevarf2 thanks for giving it a try. I'll try to reproduce your error in the next days, maybe I can find a solution. sorry for your troubles.
  20. I must change every code manually for template file, by ftp-cpanel I develop html file in local-pc, and for online I must rewrite all Then... there is also the api processwire!
  21. for example: in online processwire site: <!-- FONTAWESOME STYLE CSS --> <link href="/site/templates/styles/assets/css/font-awesome.min.css" rel="stylesheet" /> <link href="/site/templates/styles/assets/css/font-awesome.css" rel="stylesheet" /> <link href="/site/templates/styles/assets/css/animate2014.css" rel="stylesheet" /> <link href="/site/templates/styles/assets/css/font-awesome-animation.css" rel="stylesheet" /> <link href="/site/templates/styles/assets/css/text-changing.css" rel="stylesheet" /> In local pc: <!-- FONTAWESOME STYLE CSS --> <link href="assets/css/font-awesome.min.css" rel="stylesheet" /> <link href="assets/css/font-awesome.css" rel="stylesheet" /> <link href="assets/css/animate2014.css" rel="stylesheet" /> <link href="assets/css/font-awesome-animation.css" rel="stylesheet" />
  22. Yes, there is a way. Just go to permissions -> add new permission. Then under "Install predefined system permissions" choose "page-edit-created" and maybe even "page-edit-trash-created" if you would like that users can trash their own created pages. After saving, add those permissions to the role/s you want to restrict. I did not checked if this is working in the Frontend editor or Fredi, it is working in the ProcessWire admin.
  23. I deleted the posts. I do use URL segments for the AMP versions of my pages but I'm not creating any jumplinks for those (yet). The only htaccess directives I added are for alternate domain names to redirect them to our primary domain. Like this: RewriteCond %{HTTP_HOST} ^secondarydomain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.secondarydomain.com$ RewriteRule (.*)$ https://www.primarydomain.com/$1 [R=301,L]
  24. @bernhard Yeah, I think I will add this. But I had to get it working first. Thanks for the suggestion.
  25. Looks like a good use for $page->meta 🙂 If you stored the data raw (userid + timestamp) and created the german string + date on render you'd be safe for future updates (multilanguage for example) and you'd be able to change the date time format instantly for all files.
  26. Here is my working solution, which looks not exactly as in my example screenshot, because for that I had to use a str_replace. So I added the information below the file. The process is the following: User uploads file. The URL of the file and my custom information string are saved via $page->meta. Then before rendering the PageFile item the URL in the $page->meta is looked up and the custom information appended to the markup. I do this only on pages with a specific template. Here is the code: $this->addHookBefore("InputfieldFile::fileAdded", function ($event) { $pagefile = $event->arguments[0]; //$pagefile->description = "Hochgeladen von {$this->user->name} am " . date("Y-m-d H:i:s"); // not used, because description can be altered by users if ($event->object->data["hasPage"]) { $page = $event->object->data["hasPage"]; if ($page->template->name == "abteilung" || $page->template->name == "fachbereich") { $page->meta($pagefile->url, "Hochgeladen von {$this->user->name} am " . date("m.d.Y H:i:s")); } } }); $this->addHookAfter('InputfieldFile::renderItem', function ($event) { $url = $event->arguments[0]["url"]; $page = $event->object->data["hasPage"]; if ($page->template->name == "abteilung" || $page->template->name == "fachbereich") { $event->return .= "<p>{$page->meta($url)}</p>"; } });
  1. Load more activity
×
×
  • Create New...