Jump to content

horst

PW-Moderators
  • Posts

    4,088
  • Joined

  • Last visited

  • Days Won

    88

Everything posted by horst

  1. With the UI, you cannot! Archiveing means what it says. If you want to stop using it, with the possibility to reuse it later, please use pause. I'm not sure on this, as it isn't meant to do this by design, but you may try to cahnge the fieldvalue by API: // get the desired queue page by its id $queue = $pages->get("id=1234"); // get the fieldname that stores the state $fieldname = WireQueue::WIRE_QUEUE_FIELD2; // change value from 4 (archived) to 3 (paused), or 2 (active) $queue->$fieldname = 3; // or 2 $queue->save(); BUT: Without warranty. I'm not sure if this has any sideeffects, its not tested!
  2. Hi Can, a short code example how I would go with it. It is written in the browser, not tested, and it is the bare core of my idea, you need to add the rest by yourself, if it works: // $tags is a string like: "Processwire>Docs>Security" function doTags($tags, $tagParent = 'tags') { $vars = array('sanitizer', 'pages'); foreach ($vars as $var) ${$var} = wire("$var"); $parts = explode('>', $tags); // parts now holds the hirarchical ordered parent list, without the rootParent named in $tagParent $parent = $pages->get("name=$tagParent"); foreach($parts as $part) { // try to get a childpage with name $part and parent = $parent $p = $pages->get("parent=$parent, name=" . $sanitizer->pageName($part)); if(0 == $p->id) { // if it do not exist, create it now $p = new Page(); $p->parent = $parent; $p->template = 'tag'; $p->title = $part; $p->save(); } // switch parent to the next level: $parent = $p; } }
  3. Thanks Charles! Bernhard, I'm not sure, but best thing would be, if you can run this locally and use an IDE with debugger. Everything in this regard is Sessionbased. You need to check / debug those functions in the module: public function hookBeforeProcessLogin(HookEvent $event) { public function hookBeforeProcessLogout(HookEvent $event) { public function hookAfterSessionLogout(HookEvent $event) { public function hookAfterSessionLogin(HookEvent $event) { Also I don't know what you mean with: "after some setup problems"?
  4. checklist that helped me in those situations: are all involved php files saved in utf-8 ? do the involved db_tables save the data in utf-8 ?
  5. Unfortunately not all dependency files (.php, .module) of the croppable images module are detected and compiled by the modules compiler of PW 3. I think this is already told to Ryan, but not sure. If you like, you can add an issue to the Github repo of the devns branch: https://github.com/ryancramerdesign/ProcessWire/blob/devns/wire/core/FileCompiler.php
  6. If I understand right, you need to set the sort order for all children under artists to manual drag-n-drop. This can be done under pages -> artists -> edit -> children -> Sort Settings. Then, in your tempklates / API, you add to your selector sort=sort, // example with manual sort order $children = $pages->find("parent=/artists/, sort=sort, limit=10");
  7. I have tried it out 1 or 2 years back on an apache server in comparision to PHP. The use case was, that I used ProCache there for an archive with 2k+ pages that, once created, never will be changed. But every page has had embedded a section with a register of names as links, what continuosly should grow. I thought and tried if it would be possible to use SSI to include this section into the cached html pages. But for me it worked out that SSI was much slower than PHP on this server.
  8. Hi Arjen, in this case, the InputfieldText extends the Inputfield class and has to provide a class named ___render(). Every class that extends the Inputfield class have to do this, otherwise an error will be thrown by PHP. But the parent class itself has not an executable method. To declare it abstract means, it is declared as mandatory for all (child) classes that extends this (parent) class to have this method.
  9. I'm not sure, but I think it is not possible to hook into an abstract declared method: https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/Inputfield.php#L577, or is it?
  10. @flydev: many thanks for your contribution, I have added it to the module by following your perfect guidance step by step. Very Nice. So, I have not tested it because I have no server with a Self-Signed Certificate at hand. But I very likely trust someones code who is able to contribute PHP code backwards compatible from PHP 5.6 to PHP 3.0! $version=explode(".",function_exists("phpversion") ? phpversion() : "3.0.7");
  11. I have had a read about the way(s) one can embed it into CSS, where base64-encoded was title as sub-optimal as SVG is textbased (XML) and not binary data. They suggested this way: background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http%3A//www.w3.org/2000/svg' width='120px' height='120px' viewBox='0 0 379 379'%3E %3Cg transform='matrix(1.25,0,0,-1.25,40,345)' id='g10'%3E %3Cg transform='scale(0.08,0.08)' id='g12'%3E %3Cpath id='path14' style='fill%3Argb(0,0,0)' d='m 1517.6,1767.02 c 138.62,0 251.01,-112.38 251.01,-251.02 0,-138.62 -112.39,-251.01 -251.01,-251.01 -138.64,0 -251.02,112.39 -251.02,251.01 0,138.64 112.38,251.02 251.02,251.02 z m -1.59,1264.99 C 679.137,3032.01 0.644531,2353.89 0.015625,1517.16 L 0,1517.16 0,749.051 388.961,403.559 l 0,1127.031 c 0,622.48 504.602,1127.06 1127.049,1127.06 622.45,0 1127.03,-504.58 1127.03,-1127.06 0,-622.41 -504.58,-1127.031 -1127.03,-1127.031 l -206.22,0 0,552.769 206.22,0 c 317.15,0 574.32,257.102 574.32,574.262 0,317.2 -257.17,574.32 -574.32,574.32 -317.16,0 -574.291,-257.12 -574.291,-574.32 L 941.719,0 1516.01,0 c 837.26,0 1516.01,678.73 1516.01,1515.99 0,837.28 -678.75,1516.02 -1516.01,1516.02' /%3E %3C/g%3E %3C/g%3E %3C/svg%3E") --- If you like and are brave, just drop the data uri into your browsers URL bar and press enter: data:image/svg+xml;utf8,%3Csvg xmlns='http%3A//www.w3.org/2000/svg' width='120px' height='120px' viewBox='0 0 379 379'%3E %3Cg transform='matrix(1.25,0,0,-1.25,40,345)' id='g10'%3E %3Cg transform='scale(0.08,0.08)' id='g12'%3E %3Cpath id='path14' style='fill%3Argb(0,0,0)' d='m 1517.6,1767.02 c 138.62,0 251.01,-112.38 251.01,-251.02 0,-138.62 -112.39,-251.01 -251.01,-251.01 -138.64,0 -251.02,112.39 -251.02,251.01 0,138.64 112.38,251.02 251.02,251.02 z m -1.59,1264.99 C 679.137,3032.01 0.644531,2353.89 0.015625,1517.16 L 0,1517.16 0,749.051 388.961,403.559 l 0,1127.031 c 0,622.48 504.602,1127.06 1127.049,1127.06 622.45,0 1127.03,-504.58 1127.03,-1127.06 0,-622.41 -504.58,-1127.031 -1127.03,-1127.031 l -206.22,0 0,552.769 206.22,0 c 317.15,0 574.32,257.102 574.32,574.262 0,317.2 -257.17,574.32 -574.32,574.32 -317.16,0 -574.291,-257.12 -574.291,-574.32 L 941.719,0 1516.01,0 c 837.26,0 1516.01,678.73 1516.01,1515.99 0,837.28 -678.75,1516.02 -1516.01,1516.02' /%3E %3C/g%3E %3C/g%3E %3C/svg%3E
  12. This thread is closed now. All further discussions, questions moved to the release thread under this forums module section: https://processwire.com/talk/topic/12151-wire-queue-basic-implementation-of-simple-queues/
  13. Which version was that? I use PHPed and hadn't had that, but also aren't aware of that license "feature".
  14. There were also a proof of concept by @netcarver here: http://modules.processwire.com/modules/crypto-ppp/ Maybe this can become useful at some point.
  15. Thanks for the link to Anttis writeup. ------------------ Following is a description for what the SQLite handler was used in the past before I built WireQueue around it. One use case was for an award winning Cinemaportal where they send up to 2x 13k emails in different newsletters every week. I should embed the WireMailSMTP module there and I suggested that we should use SQLite files for it. This is running a half year in production now without any problems. At the beginning we have had a testing for 2 weeks where we slightly modified and tweeked some little parts. On that server where the website is hosted were running many many different programs and services, so, that for unknown reasons, sometimes the SQLite DB stopped working unexpected. But SQLite has a sort of transaction feature (Sqlite-Journal files), so that no recipient got lost. On every run we retrieve 500 pending recipients. The only thing what could happen there was, that, when immediately after successful sending a mail and the SQLite crashed before it could update the record in the dbfile AND in the journal file, this single recipient will be picked up again with the next batch, what results in sending him the newsletter twice. So, this (only) happened a few times per week, (3-10) on 10k mails, = 0,1 percent. And as this may be a bit specific to that explicit server, as I haven't encountered it with other use cases, it seems to be much more secure to use SQLite with its transaction / rollback functionality as MySQL with MyISAM! Don't know about the differences when using MySQL and InnoDB. But we / you can build storage handlers for every DB we / you like. So, what I have done with building WireQueue, is implementing it for easy usage and monitoring in PWs backend. The previous used fieldsdefinition of the SQLite table has changed from userid, email, sent, tries to data, state, worker, but everything else of the SQLite part is identical in WireQueue. Hope this helps a bit.
  16. Hi Arjen, I haven't used IftRunner and doesn't know it. So, sorry, I cannot answer anything in regard of comparing. If you already know IftRunner and it does support what you need, I would stick with it. WireQueue is new and not (widely) tested currently. In fact, currently it is only tested by me in a few use cases. Before using it in a huge project, you definetly should do thouroughful testing. With a quick look through the repository, it seems that queuing in IftRunner is done internally, means, it is mapped to page actions, you do not have to populate it manually, but you also cannot use it externally, without page actions. But not really sure on this, - it was my first read here.
  17. Tested: ImageAnimatedGif works well with PW 3.0+.
  18. Successfully tested with PW 3.0 today
  19. Successfully tested with PW 3.0 today!
  20. This is a pure info icon. It (only) recommends you that you have $config->debug set to true! So, maybe not that useful in develoment mode, but later, if you use a small set of admin links for editors too, it is useful to be rmembered to turn out debug mode when finished something on a production site.
  21. @BernhardB: thanks for the language explanation, I have corrected it above in my post! I haven't used MySQL tables, because my main motivation was to have a storage that not belongs to the PW-DB. I think this is useful in regard of Backup / Restore processes, if one have not mass temporary records with it. Filebased storage is portable and easy to use (TXT). SQLite is also portable but has DB support what lets you simply push, pull and update records. For example, think of sending newsletters to 5k recipients, SQLite is very convenient to handle this. Another usecase what I have had: A website collected infos over a time of two weeks and the (post) processing should be done afterwards. Here we simply have implemented a download link for the customer into the editpage, so that he could store the textfile (CSV style), locally on his computer for further processing with excel. So, I believe there will be also usecases where a MySQL table is a better storage. For all storage types that will need initial config params, I have implemented a simple Textareafield into the queue page, what can be used to take that settings. (one can use it as key = value pairs each in its own row, like in some other modules, maybe. But it is up to the developer if he like to use that simple approach or if he implements something other). The Textareafield is collapsed by default for admins, and hidden for others. (Whereas the queue pages require minimum the role "wire-queue-admin" or superuser for everything else than viewing the state or count). So, hopefully someone will make a mysql storage handler and commit it here or at github. (or another DB)
  22. Hi and welcome 3dots. You are on the right track, but not fully. Some hints may be: To build a form for the front end, you also can use the PW API: https://processwire.com/talk/topic/2089-create-simple-forms-using-api/ How to create a page is in the DOCs or in the forums many times, I believe: https://processwire.com/talk/topic/352-creating-pages-via-api/ Follow SOmas tut with the simple forms creation and do not forgett to use the validation and sanitizer. Have a look at the Docs and at the cheatsheet, too And have fun If you have any further questions after reading and testing, come back and ask.
  23. This has got some small fixes and updates and is officially released now: https://processwire.com/talk/topic/12151-wire-queue-basic-implementation-of-simple-queues/
  24. Successfully tested ALIF with PW 3.0 and set the version to 1.0.0 stable now.
×
×
  • Create New...