-
Posts
2,769 -
Joined
-
Last visited
-
Days Won
31
Everything posted by Martijn Geerts
-
Pravin I think you would have more change to get you post answered when you make your post more readable. Use the [] button for better readability of the code.
-
Custom dashboard sorting MarkupAdminDataTable pages
Martijn Geerts replied to Raymond Geerts's topic in General Support
What I would try (Never done this before) - Use jquerui sortable. - start drag (or something), get de index of the item in the list of pages - stop drag (or something), get the new index of the dropped item. - then from your list get the Page id's from start drag index till stop drag index and make from all id's a comma separated string. (1234,3241,6473,1001,1234) Then you need to do a post with Javascript to /processwire/page/sort/, use the following variables: sort (comma separated list of ID's) parent_id move_id (dragged page) -
@Ivan: https://github.com/ryancramerdesign/ProcessWire/blob/dev/wire/core/ProcessWire.php#L36
-
Cache entire page except some part of it? Approaches?
Martijn Geerts replied to Aleksey Popov's topic in General Support
An other option is an cached page with iframe with a link to a page with image. -
@Ivan Gretsky, that one is already fixed (dev). So those settings will work fine again I guess.
-
@LostKobrakai, Very interesting!
-
@mr-fan: I just zap them
-
People who are just one step ahead of the newbies are the best teachers for those newbies. Those newbies will be the next teachers for the new generation. We have a healthy forum and I love the way it goes.
-
Cache entire page except some part of it? Approaches?
Martijn Geerts replied to Aleksey Popov's topic in General Support
On the other hand your page is not heavy for ProcessWire and if you don't expect thousands of visitors every day the site it should perform very well even without caching. This would not mean that you should not use ProCache (Not much time to implement and cheap to buy). But as Soma suggested there's nothing wrong with a few lines of Javascript. -
15mb image is insane
-
Every HTML element get inline styles, external stylesheets can't be used. Some clients like GMail even drops the the whole <head> element. Be aware of that outlook doesn't render with a normal render engine, it uses MS Word to render the news letters. It even has it's own conditional statements like: <!--[if gte mso 9]> Newsletters are heavy for your server, sending part (CPU) and network traffic by the delivering of the assets with very high peaks. Then I guess the customer want to some kind of report like view statistics click rates etc. You've to build the unsubscribe/subscribe part. It's a tremendous lot of work, Is this really worth it ? Maybe as a study project or as an opensource project. And please read my post above. I would say don't do this yourself (commercially). Go for a service. I would just use simple page templates for this. Maybe a structure like: /newsletter/ <--- use this source code | +- header of letter ( let it render in /newsletter/ ) | +- article ( let it render in /newsletter/ ) | +- article 2 ( let it render in /newsletter/ ) | +- footer ( let it render in /newsletter/ ) There's not much different from using tables then using the markup from CSS frameworks like Bootstrap. A bit of source code tels it all. // grid with tables // the 'new' grid <table> <div class='container'> <tr> <div class='row'> <td></td> <div class='col-md-etc'></div> <td></td> <div class='col-md-etc'></div> </tr> </div> </table> </div>
-
Best way to output multiple, HTML formatted pages from pagearray?
Martijn Geerts replied to kathep's topic in Getting Started
There's a weird check in your logic that seems to be unnecessary. Not that it's prevent your code from working. design_technique is a field type of page set to multiple as you told us. So the if($design_tech instanceof PageArray) statement will always be true, thus no need to check it. -
Yep, wikipedia states: While the letter "ß" has been used in other languages, today it is only used in German. I've asked on GitHub to make ß defaulting to ss.
- 6 replies
-
- 2
-
- url generator
- new page
-
(and 2 more)
Tagged with:
-
@adrianmak In the Netherlands there are a lot of rules that must be fulfilled for sending news letters. This brings big responsibility to the end user of the system. When you really trust the user with the sending and subscribe and un-subscribe system you could go that way. When done wrong it's not uncommon that your IP gets blocked or you've to pay big fines as stated by law. The markup generation can be done with ProcessWire ( Don't know any system that handles this better ), but I recommend for the sending an external service. Those services have you covered with good subscribe and un-subscribe systems.
-
No didn't read that. ( I'm a bad reader ) Oké will look into that, should not be hard to fix I guess....
-
That's not a bug, it's meant to be like that. This wil result in more visual image and less UI (margin/paddings), it'll save you at least 45px height per image. Making it totally transparent can be an option, but i'm a little bit afraid text and buttons in the header will be hard to read. Problem is amount of crop variations, the length of the crop text (especially in European languages) and extra vertical space the crop should take due to repetitive buttons. In most cases it'll double the vertical space (I started this way), IMHO it's not an option.
-
Secondary buttons in a form
Martijn Geerts replied to Mike Rockett's topic in Module/Plugin Development
Can't you just set the class ? $button = wire('modules')->get('InputfieldButton'); $button->attr('class', 'ui-button ui-widget ui-state-default ui-corner-all align-me-right'); Didn't test it but looks like: $button->addClass('align-right'); should do the trick. -
A possible solution could be to use an other page to select but you show the current Page title. Here's how to do: In the Page field settings use Custom PHP code to find selectable pages type: $p = $page->parent; $p->title = $page->title; $PageArray = $pages->find("template=type-template, id!=$page->id"); $PageArray->add($p); $PageArray->sort('title'); return $PageArray; Then when the field contains the $page->parent, you know that they wanted to select the current page.
-
Found the issue, posted a possible solution on GitHub.
-
Here the same, but switching wire folders reveals the bug. (switch between, 2.5.7 and 2.5.14) // here $data is an empty array, but it shouldn't. Think Ryan has broke something. public static function getModuleConfigInputfields(array $data) { } I've posted an issue on github.
-
@LostKobrakai & Mike Anthony Yesterday Raymond had the module installed on a fresh dev PW (is that 2.5.14? ): no problems. Gonna try to duplicate the no saving tonight on my local machine.
-
Inputfield Page Source Display a string with the rendered output of the Page (per it's Template) in an Inputfield. The markup could be copied with a button click (flash enabled browsers) and/or copied manually from the Inputfield. The rendered output is a runtime only value which is not stored in the database. Potential Use Provide an easy way for editors to copy the sourcecode of the page for the use in newsletter services and such. Note ! This Inputfield should not be used in the page template directly. (could give some “funky” results ) Download on GitHub
-
Don't think this is theme related as it need some sort of scripting. Have you considered AdminCustomFiles for this?
-
The bottleneck could be the filesystem when you reach more then 30.000 pages with assets. But ProcessWire has you covered with the pagefileExtendedPaths setting. When you expect your site to grow beyond 30.000 pages with images or/or files enable this setting in /site/config.php Ryan states that this feature is beta but I confirm it's working without any quicks. /** * Use extended file mapping? Enable this if you expect to have >30000 pages in your site. * * Warning: The extended file mapping feature is not yet widely tested, so consider it beta. * * Set to true in /site/config.php if you want files to live in an extended path mapping system * that limits the number of directories per path to under 2000. * * Use this on large sites living on file systems with hard limits on quantity of directories * allowed per directory level. For example, ext2 and its 30000 directory limit. * * Please note that for existing sites, this applies only for new pages created from this * point forward. * * @var bool * */ $config->pagefileExtendedPaths = false;
- 12 replies
-
- 5
-
- performance
- page limit
-
(and 1 more)
Tagged with:
-
It's a decision I made after a similar question a year ago. It's rare that I use images in RTE ( can't even remember a project this year where I did ) and I always point editors that they should fill in the description of the image field. The problem with alt text in the RTE is that the text is not API query-able and you don't have an visiual indicater that the alt text is provided or not. What I / you could do is make a note on github, for defaulting to image description, when not provided, go for RTE alt.