-
Posts
4,077 -
Joined
-
Last visited
-
Days Won
87
Everything posted by horst
-
They want you to create and upload a single TAR archive with the whole site? Do you have no FTP(ES) or SSH access? You need to use a tar-archive software, what depends on your system where the site resides at the moment. (or you first download it from there to your local PC via FTP) If you have a commandline util, google may be your friend to find the right params: https://www.google.com/search?q=tar+pack+directories+and+files If you can use 7-zip, it lets you select from different output formats, including tar. (it seems to be mainly for windows but also has downloads for some linux distributions at the end of the download page) Regardless of the tool, I think what is important is to check if the files and directories have the right permissions after unpacking at the new host, especially the assets folders!
-
When Editing Page, Ability to hyperlink an email address
horst replied to joer80's topic in Wishlist & Roadmap
You may use Textformatter HannaCode and build a little tool for your clients, so that they can use something like []? And additionally you can add Textformatter EmailObfuscator after the Hannacode to make it harder for harvesters? -
Thanks @Hari, great that you have solved it, at least a bit. Regarding the timeout issue, is it right when I'm saying: "As conclusion we have found out that when uploading many images to a cropimage field with multiple cropsettings every thing works fine because every single image is handled in its own (php)-thread. Backend and Frontend work as expected. Later on, when changing the initial cropsettings, there must be a point in code where the imagesizer is called for all changed variations of all images but in a single (php)-thread. Therefore it can run into a timeout." I need to find that point what must be a loop, - there we need to add a set_time_limit() within the loop to avoid those timeouts. Update: I think it has to be in this line: InputfieldFile.module#L212. I will test this when have a bit time for it.
-
Local dev server running slow? This may be of help.
horst replied to MikeB's topic in General Support
Sorry, but just to clarify: And finally the real culprit is the person who has added it to the config when the installer has asked for informations how to access the DB. What I want to say is that there are more cases possible than only "localhost". (e.g. another hostname, an IP, different than 127.0.0.1, regardless if you run a mysql server on the same machine or another, etc). But it is really helpful to add information here that changing a named host, e.g. "localhost", to a IPv4, e.g. "127.0.0.1" can help speed up things on systems that are configured to use IPv6 at first. Many thanks, and sorry for kidding. -
Hi @Hari KT, thanks for the info. A few more questions: You have uploaded the 40 images without running into timeout, right? You only get a timeout later when trying to edit the page? How many crops have you defined for that cropimage field in setup -> fields -> imagefield? I mean the total of all crops, regardless if you have bound some of them to specific templates. (can you drop the settings into your answer, that way I can see the dimensions too) Do you have changed the settings for that field after you have uploaded the 40 images to your page? Can you enter the page edit with another role / account, not superuser? How does it behave? (same as superuser or does it have all imagevariations ready to display?)
-
What's about: $page->parent('parent=' . $page->rootParent); // $page->rootParent returns $foo as Page, not name, not id just for the case that the name of foo will change in future, or: what is about usage in a multilanguage site?
-
@wanze: this may depend of the increased or somehow changed usage of modules cache since PW 2.5. @Isag: Just for testing: I would try to hit refresh in the modules section manually. And then give it a new go. @wanze: Maybe you can add a $this->modules->resetCache(); to the first line of your install routine? @Isag: which PW version you are using? PW 2.5.??
-
@Hari KT: There is no special handling with images cache if a user is logged in as superuser or not. Can you provide some more info? Which kind of imagefield do you use, the core or the cropimage? How have you added the images to the field(s) / page(s), via API or via the Inputfield in backend and uploading? How many images (in numbers) are "lots of images"? 50, 100, 500, 1000, ...? Also, do you have one imagefield per page or multiple fields? If you have multiple fields, how many images are in total on a page? It does not try to recreate images when viewing from the frontend, no? Only when in backend, opening a page for edit? Do you (have) use(d) somewhere in your templates or elsewhere code that calls $pageimage->removeVariations()? Without further information I cannot say much to this, only guessing that you may have added images via API and opening a page for editing the first time in Backend.
-
Spex + AIOM Page Path History Form Save Reminder Maintenance Mode Diagnostics (+ Dependencies for Webserver, PHP, Database, Files, Imagehandling)
-
Name format for children based on any field (not just title)
horst replied to Lars282's topic in General Support
You are missing the second / third argument with the addHook call! 'Pages::setupPagename' $this 'functionName' Also I'm not sure if you can use anonymous functions like you have done. Why do you do want to do this? Is there any advantages over the "normal" method from the docs and the examples? Have you tried it the other way too? public function init() { $this->addHookBefore('Pages::setupPageName', $this, 'functionName'); } public function functionName(Event $event) { ... -
I'm pretty sure that those things can be done already. Styling the Pagetree can be done with a CustomModule like here: https://processwire.com/talk/topic/5609-display-a-template-icon-base-on-date-field/ And to get a list of all pages by certain criterias (template, parent, empty fields etc.) can be done with Find / Lister:
-
Ah, yeah, now after putting on my glasses I see that you have written "config file". This, (reading without glasses) and the fact that I'm currently working on a little autoload module that tweaks $config (only the variable / object, not the file content) was enough to make me not seeing / thinking clear. (This has nothing to do with the bottle cognac whose content decreases continuously here.)
-
You makes me curious and/or puzzled.
-
Hint: https://processwire.com/talk/topic/142-make-session-start-in-session-overridable-from-a-module/#entry1002
-
Hi, actually no. Imagick is a PHP_extension that is used as layer between PHP and ImageMagick, this way ImageMagick can be used on shared hosts without the use of the exec() function. I don't know graphicsmagick, only have heard the name. Is it used by calling through exec(), like ImageMagick, NETPBM, and others? Horst
-
@Mary: do you have uninstalled the core module before you installed the CostumModule? There may be chance that are settings in the modules cache that need to be refreshed after you have deleted it manually. Does the Frontend work? If so, you can simply add a line of code to force a refresh of the modules cache: wire()->modules->resetCache(); If you also cannot use the frontend, you may simply empty the DB table named "caches". (Do not delete the table, but delete all of its records). If this doesn't change the 500 Error, do it again and also check in the table named "modules" around the last entries, (when sorted upon field created), if there exists an entry for your manually deleted CostumModule. If yes, drop that record. Now try to go to the admin again. HTH & good luck. BUT, BEFORE you start with manipulating the DB, please make a backup!
-
hmm, pagination without limit?
-
Name format for children based on any field (not just title)
horst replied to Lars282's topic in General Support
A skeleton as starting point could be: public function HookSetupPageName(Event $event) { $page = $event->object; $options = $event->arguments(0); // maybe a check if the page belongs to a specific template, or not, and if not, return to core function if($page->template != 'myspecifictemplate') return; // your code here ... // at the end declare that you want replace the core method with your result $event->replace = true; $event->return = $name; return $name; } -
Name format for children based on any field (not just title)
horst replied to Lars282's topic in General Support
@Lars: it is better to not change the core files. If you have a look, your desired method already is precedeed by three underscores: ___setupPageName(. This makes it hookable! The prefered way is to create a custom module and hook into pages::setupPageName. You can hook into before and/or after, or you also can replace it completly by using addhook instead of addhookbefore / addhookafter. -
Batch upload images & automatically create one page for each one
horst replied to lucas's topic in General Support
@lucas: If I understand you right, you want to do this upload only once? If yes, you simply may use a custom installer script. Please can you tell a bit on how you have setup things? Your PW installation is an online installation? The imagefiles are on your local computer actually, but if needed, you also have SSH or FTP access to the PW site? Where have you stored the fieldinformations (categories, tags)? CSV, ImageMetadata, a DB? Or do you have a local PW installation with the 1000 image pages and fields for cats, flags, etc and want to upload only those imagepages and not other parts form the local install? Depending on your answers it will be very easy to build an importer script for you. -
@kixe: interesting! If you like, maybe just for testing you can make Notices::add (in wire/core/notices.php) hookable by preceding three underscores: ___add( And then there should be stored the last error / warning / message into class vars and if a comparision of a new arrived notice against that previous stored ones matches, one could simply drop them. Or something along that lines. If you work out a solution to make it better in the regard of double / multiple notices, you can post it to Ryan at Github.
- 5 replies
-
- 1
-
- development
- module
-
(and 1 more)
Tagged with:
-
@alan: thanks for sharing, - but to be fair I don't really get for what this should be good? 1) I can send _me_ an email at the end of a cronjob (or a windows schedule task). Why should I notify unknown people? 2) What is if my cron has run perfectly until its end, but the snicth-service is unavailable? Do I need a snatch-service too, (what monitors the snitch-service)?
-
Strategies for storing and using email templates
horst replied to onjegolders's topic in General Support
maybe not exactly what you are asking for, but related: https://processwire.com/talk/topic/5704-module-wiremailsmtp/page-2#entry68098 (a description from macrura how he uses an own mailsystem, - this post and the few next, with code examples) -
Now after working quite a while with it, the only thing what is bother me a bit is that when I hide the left menubar by clciking the hamburger-icon and save a page, it is visible again. It should remember the last state and only should change back when clicking again the hamburger icon. Otherwise really love and use many of the features!