-
Posts
1,331 -
Joined
-
Last visited
-
Days Won
61
Everything posted by BitPoet
-
[Solved] Navigation breaks on form template after using relative paths
BitPoet replied to ryanC's topic in General Support
Don't use relative paths. They are an artifact of days long gone (at least in regular websites - there are use cases in routed app components) and they create more problems than they solve. If you worry what happens when you move a site to a deeper directory, use PHP to prefix your links with $config->urls->root. -
I don't think this works. The size property for @page only accepts the values "auto", "portrait", "landscape" or an absolute width/height tuple. Named page formats aren't listed as supported.
-
That would be brilliant. Though @Soma might have to rename his module from Pollino to Pollissimo (it feels like it's about to outgrow the diminutive...)
-
Update: I have been playing around some more. There's now another branche dev-bitpoet-cke that includes a Textformatter which replaces ##POLL:name-of-poll-page## with the poll output and a CKEditor plugin for easy insertion.
-
What would be the best way to mirror json data into the Processwire DB
BitPoet replied to h365's topic in Getting Started
If you don't need to search by specific field names nested in the matrix, you could add a concatenated (hidden) textarea field, hook into saveReady and render the matrix contents into that field. Then include that field for your search. Or, if you want to be able to search by property names (at any depth) have at least MySQL 5.7.8, you could try out the attached module JsonSearchable.zip. It's a field type derived from Textarea that uses native JSON storage. Supposed you made a page field named "myfield" and entered a JSON of: { "testdata":[ { "segment":1, "title":"Hello World", "average":20, "max":"30", "min":5 }, { "segment":2, "title":"This is Funny", "average":40, "max":"30", "min":5, "details":{ "name":"nobody", "email":"secret" } } ] } You could e.g. search for <?php $pages->find("myfield=30"); $pages->find("myfield.max=30"); $pages->find("myfield.details.name=nobody"); Note however that this kind of search on many large datasets can be an absolute performance killer. Numeric comparisons are not supported. -
Hi @Soma! First of all, thanks for another really useful module. Since I'm planning to add polls to my blog site profiles, I've dabbled with it abit. To make things work nicely with the existing templates, I had to tweak a bit of the generated HTML and, in the course of that, changed your module a bit: It now uses templates for every bit of HTML produced Added config settings for all these HTML template snippets There's a template for the main wrap, so wrapping the renderPoll() return manually is no longer necessary Added a config option and poll template field for a poll closing date (+time) pollino-ajax-script.js now wraps a div around the result before inserting it. That prevents a jQuery error if the result contains more than one HTML element. I'm storing any array $config data passed to renderPoll() in the user session and retrieve it in the AJAX action Added collapsed fieldsets for different template areas (generic, form, result) in the module config Last but not least, added "PHP" hints to the code blocks in README.md I have made a fork and added a branch with all these changes here. Perhaps you could give it a look (test drive?) and tell me if I should prepare a pull.
-
[SOLVED(ish)] priviledges redirecting users from template wrong
BitPoet replied to benbyf's topic in General Support
Just perform the login while you have the developer console (F12) open, once on the dev site, once on live, and compare response headers line by line. See if something is missing or different on the live server. -
site-profile Yet Another Blog Profile: Editorial
BitPoet replied to BitPoet's topic in Themes and Profiles
Great minds think alike -
[SOLVED(ish)] priviledges redirecting users from template wrong
BitPoet replied to benbyf's topic in General Support
Are you logged in at all after the call to login (perhaps output your user name somewhere on the home page)? Are there any noticeable differences in the raw responses, especially the cookie headers (either in the login call or the redirect)? -
site-profile Yet Another Blog Profile: Editorial
BitPoet replied to BitPoet's topic in Themes and Profiles
Nah, ProcessWire is enough of an addiction -
Great job, @ryan! It was really astounding to watch the commits roll in and the open issues melt over the last few weeks, and there are so many new features too! I've been using latest dev versions extensively, and the few minor bugs I stumbled upon were solved before I could report them I even used some of the newly implemented features without realizing it This year already rocks!
- 16 replies
-
- 13
-
-
site-profile Yet Another Blog Profile: Editorial
BitPoet replied to BitPoet's topic in Themes and Profiles
Hehe. The yearly hey fever hit me over my holiday week, so I could a) dose myself up with that anti-allergy stuff that makes me too tired to do anything (including going out) or b) stay inside without drugs and find the time to spend a few hours every day doing fun things on my computer Choosing b wasn't difficult. The lacking choice of nice blogging templates in PW was something that has been nagging me for quite a while, so this was the perfect opportunity. I do hope so! -
Since all good things come in threes, here's another responsive blog profile for PW3: Editorial Travel Blog Template Like the previous two, it builds upon @kongondo's Blog module and uses @justb3a's Simple Contact Form. It also makes use of @Pete's XML Sitemap and @ukyo's Font Icon Picker. Features: Responsive Slide-in sidebar Homepage with picks and last posts, 3-column layout Selectable widgets, e.g.: Recent posts Recent comments Current month calendar with links to posts per day User-switchable sort order for lists (ascending/descending) Configurable list pagination An online demonstration can be found here. And again: all feedback is welcome!
- 15 replies
-
- 17
-
-
-
site-profile Blog profile "Striped" (in development)
BitPoet replied to BitPoet's topic in Themes and Profiles
Let's give the users a choice -
site-profile Another Blog Profile: Strongly Typed
BitPoet replied to BitPoet's topic in Themes and Profiles
Update: there's now a preview available here.- 1 reply
-
- 1
-
-
site-profile Blog profile "Striped" (in development)
BitPoet replied to BitPoet's topic in Themes and Profiles
I have just set up a small preview with a few "real life" pages here. -
And here's another site profile, again based on a free template from html5up.net: Download link: Strongly Typed Travel Blog Template (Responsive) GitHub Repo Features are much the same as in: Additionally, the sidebar can be aligned either to the left or right, and navigation is cached for 24 hours using MarkupCache. As always, I'd be happy about any feedback. Mobile Screenshot:
- 1 reply
-
- 7
-
-
Repeater field error: table creation not allowed
BitPoet replied to ivineets's topic in General Support
Sounds like MyISAM is switched off in your database server. You can either switch this back through a storage engine setting in your server configuration (see MySQL docs for details) or you could try switching to InnoDB (if your version already supports FULLTEXT indexes for InnoDB) by adding $config->dbEngine = 'InnoDB'; in site/config.php. -
I'm not sure. You could add some htaccess/rewrite trickery to avoid redirects, but that would mean that all template settings have to be identical. If somebody changed the trailing slash setting for just one template, that would fail even worse (like end in an endless redirect loop). It might be possible to avoid his kind of error if the backend issued a redirect with a 307 status code instead of 301 for slash url redirects, as that would preserve the request method and POST data for the repeated request, but there has been a lot of back and forth about 307 and308 methods, browser implementation details, compatibility with older browsers and possible security issues which I haven't been following up on. Perhaps @ryan himself might be able to say whether redirecting with 307 would be an option.
-
site-profile Blog profile "Striped" (in development)
BitPoet replied to BitPoet's topic in Themes and Profiles
Thanks for pointing that out. I only changed this after I removed all the test posts that triggered the pager I have updated the repo. -
A PageTable field perhaps? That way, you can factor most options out of module settings pages. Or just use regular (hidden) pages without a dedicated php template under an extra page in the page tree and allow creation of new pages in the field's options (parent and template need to be configured for that to work smoothly). It's also possible to add your own pw-modal link to edit and create new encoder pages from a custom process module. That's not really a problem. See for example @kongondo's blog module. It adds a toplevel entry in the navigation bar for its process module. There's also a wealth of information on that topic in @bernhard's blog entry on building admin pages. Either just make them pages, or give your module (best not the process module) a method that returns the stream data and call $modules->get("YourModule")->yourMethodThatReturnsStreamdata() in the frontend template. @formmailer's Schedule Pages module might already be quite close to what you want.
-
-
I've played around a bit with setting up a blog in PW using @kongondo's blog module and, since I'm anything but not a designer, incorporated the free "Striped" template from HTML5UP. The result is Striped Travel Blog Template (Responsive). Update: link now points to the official module repository. The layout is classical (some might say "very nineties" ) but I do like sidebars on the left and content starting close to the top. Features are: You can the sort order for lists that are sorted by date to ascending or descending. This is the "killer feature" I'm missing everywhere else, and as an avid reader of hiking blogs (mostly long distance, so long series of blog entries) I always hate when "next" buttons take me backwards (in time) and lists have to be read top down. Post lists are paginated Since it uses the blog module, comments and email notifications for them are a given Contact form using @justb3a's Simple Contact Form module Auto-generated sitemap.xml using @Pete's XML Sitemap module The usual stuff like recent comments, recent posts, recent tweets Calendar for the current month with links to dates with pages 3-column home layout with posts, configurable number of posts shown there "Sticky" option for posts to glue them to home RSS feed Already added all templates with translatable strings to site translation files Todos: Add post overview by year and month Allow paging through the calendar widget by month I'm a bit of two minds whether to show the full posts in lists or just summaries and still have to decide on that As written in the title, it is still in development, and I'm not completely happy with the lack of integration of my additional site-wide settings with the blog module's settings widget. I just thought I'd share it. Of course, I'd be happy about any feedback. Screenshots:
- 5 replies
-
- 15
-
-
The first thing I'd check after any up-/downgrades are file permissions and ownership.
-
You treat the repeater like any other field. <?php foreach($page->repeaterfield as $rep) { echo "<p>{$rep->pagereffield->title}</p>\n"; echo "<p>{$rep->textfield}</p>\n"; } $page->repeaterfield (like $page->get("myfieldgroup") in your example) will get you the repeater field itself, and in string context, return the IDs of its individual repeater elements.