-
Posts
2,321 -
Joined
-
Last visited
-
Days Won
44
Everything posted by tpr
-
-
Its a CSS pseudo element: /* display paused text on top of paused slideshow */ .cycle-paused:after { content: 'Paused'; color: white; background: black; padding: 10px; z-index: 500; position: absolute; top: 10px; right: 10px; border-radius: 10px; opacity: .5; filter: alpha(opacity=50); } http://jquery.malsup.com/cycle2/demo/demo-slideshow.css
-
Which site you are talking about? The one in the first post seems OK in this regard.
-
Check the "Responsive behaviour" section above sticky bounder. You can add media queries like so to limit the effect: <div data-uk-sticky="{boundary: true, top: 20, media: '(min-width: 960px)'}">
-
Yes, it is JavaScript. If an element is in the viewport, another element is set to fixed position until the element goes offscreen. In UIkit it is called the "sticky" component (the linked site does not use this one): http://getuikit.com/docs/sticky.html
-
Where to set image resizing quality and how to re-resize images
tpr replied to Adam Kiss's topic in General Support
I wonder which would be a better solution: include all fields (the way it works now) and provide an exclude list setting exclude all fields by default and add an include list feature -
Where to set image resizing quality and how to re-resize images
tpr replied to Adam Kiss's topic in General Support
RemovePageimageVariations is a great tool but unfortunately this limitation makes it hard to use. How about adding a check to delete only variations where the field name does not have "rte" in it? // after line 109 // do not process fields having "rte" in name (eg. "images_rte") if(strpos($field->name, "rte") !== false) { continue; } I know it is hacky but allows adding fields to pages where images won't be deleted. Of course I'm open to other solutions too. -
Updated my fork to 1.2.6: https://github.com/rolandtoth/ProcessWire-MarkupSitemapXML/tree/master The readme file is updated with info on the new features: auto generate sitemap on module submit ajax button to generate sitemap comments feature in exclude list
-
Yes, my approach would probably result in cleaner markup and I guess more maintainable too. You can use this to avoid empty data (or class) attributes: <div <?= data_edit_id($page->id); ?>></div> I would do an each loop in js to add the actual edit buttons where data_edit_id is available. Plus add the click handlers of course. This also means that it won't run without javascript, but in the admin it is always available.
-
I'm still not fully convinced about your approach but I'm sure you see a bigger picture than me Wouldn't such mod work? Just because if you could set the parent with PHP than the positioning issue would gone. <div class="uk-width-medium-3-4"> <?= editlink($post->id); ?> <div class="uk-width-medium-3-4" data-edit-id="<?= editlink($post->id); ?>"> Of course in the second one the editlink function would return an ID only, not an anchor.
-
No need to use addClass at all. You could add 'data-edit-id="currentEditID"' to the parent container itself, with PHP. I see. Setting editor buttons position to absolute didn't work?
-
Am I right that it generates so many $(document.ready) as many edit buttons are? Perhaps this could be further tweaked to add the edit id as a data attribute, and use only CSS hover to show edit buttons (using :after for example). Then jQuery should do the rest on a click event. Anyway, just an idea, it may fail somewhere And do you check the padding size because of the 1px border? If so, perhaps inset box-shadow could solve it.
-
Nice solution LostKobrakai, and thanks for the info on repeaters. I would certainly add some checks to ensure images are available, better now than after going live <?php // check if there is any "before_after" repeater on the page if($page->before_after->count()) { foreach($page->before_after as $r) { // ensure there are exactly 2 images in the repeater if($r->count() == 2) { $before = $r->Images->first(); $after = $r->Images->last(); $thumb = $after->size(300, 300); // Markup } } }
-
Support $page->next returning NullPage erroneously
tpr replied to Mike Rockett's topic in API & Templates
So basically you may found a bug in the previous version? -
Oh, I did take it personally
-
You mean the Repeater field? If yes, you mean visually or because it adds too much overhead? (or else?) Btw, I agree that a simple Image field would do (without Repeater) if the client will be able to use it. Perhaps somehow adding custom CSS to the admin to force images to be 2 items in a row would make things look more obvious (e.g. n:th child clear)
-
Quality work! Just out of curiosity, a search feature was not planned?
-
Simple Repeater with an Image field in it, setting "maximum files allowed" to 2? Plus add an explanatory note/Description to the field.
-
Here is a quick screencap of "Generate sitemap" feature I'm experimenting with. It is button added by JavaScript that ajax-calls " /sitemap.xml?nocache=1". In the module, if "nocache=" GET parameter is 1, then cache time is set to 0 instead of 3600. Because of this, the sitemap is re-generated. If module settings (currently only the exclude list) is modified, then the user have to save settings first, only then is possible to regenerate sitemap. View in action (in the upper part there's WinSCP window):
-
You will need something like this (untested!): <ul id="topnav"> <?php $root = $pages->get("/"); $children = $root->children(); // insert the following line $children->prepend($root); foreach($children as $child) { $activeClass = ($child->id == $page->id) ? ' class="active"' : ''; echo "<li><a href='{$child->url}' $activeClass>{$child->title}</a></li>"; } ?> </ul>
-
I forked this module to add an ignore list feature, see here: https://github.com/rolandtoth/ProcessWire-MarkupSitemapXML/blob/master/MarkupSitemapXML.module This adds a textarea where you can enter ProcessWire selectors. Matching pages will be excluded from the sitemap. For example: artist.date_birth!="" name=my-page parent.path=/my-page/ Screenshot: This is how the exlusion works, using $page->is(): public function processExcludeList($page) { // get module settings $configData = wire('modules')->getModuleConfigData($this); // process exclude list if ($configData['sitemap_exclude_list'] != '') { $excludeList = trim($configData['sitemap_exclude_list']); $excludeList = explode("\n", $excludeList); $excludeList = array_filter($excludeList, 'trim'); // remove any extra \r characters left behind // loop through lines and return false if current page matches foreach ($excludeList as $item) { if ($page->is($item)) { return false; } } } return true; } Submitting the module settings doesn't clear the cache - this has to be done manually (just like in the current 1.1.0 release). I made some attempts to fix this but no success. It would be nice if a ProcessWire expert could have a look on it as this is my first module contribution and I'm relatively new to PW.
-
Which fieldtype should i use for Bootstrap Lists?
tpr replied to GeraldSchmidt's topic in Getting Started
There's no such thing in ProcessWire as I know, at least built-in. You need to add bootstrap classes in your template file, if that's what "enable bootstrap" should mean -
You should save the order to session, see https://processwire.com/api/variables/session/ Thus the order will be always available in "$session->itemOrder" (or whatever you name it). For prev-next links, I assume you should use this: http://cheatsheet.processwire.com/page/built-in-methods-reference/page-next-pagearray/ Here you will need to set the order again in the $pageArray (here you can use $session->itemOrder). I have no experience with this so maybe I'm wrong.
-
Consider yourself very happy
-
Haha, you would be a great marketing face for PW