-
Posts
364 -
Joined
Everything posted by hellomoto
-
Very nice. This is probably the last little tweak needed to achieve pure perfection, but at least in Chrome for me on 404 page the gradient background for "404 not found" ends before the D, and the 404 is pale against the white.
-
I installed this to a new site I'm working on and love it, just have a few ideas to make it even better: Add calendar_event_recurs checkbox field and display recurrence fields only if =1 Headline field for recurring event instances (show if parent.template=calendar-event) In admin calendar, "Modify this event recurrence only" should create/edit a child page of the recurring event (calendar-event children to be named in date format) Display hidden events in admin calendar Open event editor from admin calendar in modal Simple front-end FullCalendar rendering (hidden events hidden) Actually maybe the Admin Calendar and Calendar itself should be separate, then the Calendar can allow for different templates (e.g., blog posts or something) to also be included...
-
CKEditor won't allow classes {"left", "right"}
hellomoto replied to hellomoto's topic in General Support
Working as it should now, don't know why it wouldn't before... Oh well. Thank you though Olsa; if I come across that again I'll give your suggestion a try for sure. -
Error: Call to a member function getTag() on a non-object
hellomoto replied to hellomoto's topic in General Support
$block is a single item in the repeater field "home_blox". $block->pg is the Page field within the repeater. Image field is named "images". This worked: foreach($page->home_blox as $block) { $bgimg = ''; $pg = $block->pg; if($pg->images->getTag('blockbg')) { $bgimg = "<img src='{$pg->images->getTag('blockbg')->url}'/>"; } -
I have CKEditor set as the input type for my summary textarea field, and in its settings, Use ACF is enabled, and in Extra Allowed Content I have "*(left,right)". Yet when I add either of those classes to a ul or p element in the field, they're still stripped on save. Can anyone tell me why or point me in the direction of solving this..? Thanks much.
-
$blocks = ''; foreach($page->home_blox as $block) { $bgimg = ''; if($block->pg->images->getTag('blockbg')) $bgimg = "<img src='{$block->pg->images->getTag('blockbg')->url}'/>"; $filters = ''; foreach($block->home_filters as $filter) { $filters .= " --{$filter->value}"; } $body = $block->pg->get('summary|body'); $output = <<<EOT <div class="unit-{$block->home_blockwidth}0 element-item{$filters}"> <div class="background">{$bgimg}</div> <div class="overlay"> <header><h2 class="title"><i class="fa fa-clock-o"></i> {$block->pg->title}</h2></header> <div class="inner"> {$body} </div> </div> </div> EOT; $blocks .= $output; } echo $blocks; I have tags enabled on the image field, so why am I getting this error?
-
When creating a new "track" page "uploader" users are supposed to choose a parent page but none show up in the select field. So I included in an autoload module, this: public function init() { $this->pages->addHookBefore('ProcessPageAdd::execute', $this, 'hookAssignTrack'); } public function hookAssignTrack(HookEvent $event) { if ($this->input->get->template_id == 43) { echo "{$this->page->parent->name} | "; $username = wire("user")->get("name"); $profile = wire("pages")->get("/users/{$username}"); $p = new Page(); $p->template = "track"; $p->parent = $profile; $p->save(); //(int) $del = $p->id - 1; //wire("pages")->get($del)->delete(); $goTo = wire('config')->urls->admin . "page/edit/?id={$p->id}"; wire("session")->redirect($goTo); } } However the page that is created and saved here always comes with one preceding it (if the successfully saved new page's ID is 1012 there's also a blank 1011). Hence the commented out attempt to just delete the other one, but that ends up not only not creating an empty page but also deleting the last good one. Why is this, how can I fix it? Edit: I changed the Add New link to {$config->urls->admin}page/add/?parent_id={$profile->id} and removed the above hook but it's still creating the extra empty page right before it. They open in a modal, and even if I just exit the modal and don't enter anything or save anything, I guess since it's already been created under the parent and unpublished pages aren't allowed, two new pages are still created, empty..
-
In addition to a site administrator I need two special types of users, teachers and students. I was simply adding their profile fields to the default user template, but could not seem to set visibility by role for certain fields that were only applicable for the teacher template. I tried role=teacher, page.role=teacher, etc... The test field wouldn't show, so I instead went ahead and set the userTemplateIDs and usersPageIDs in config.php to $config->userTemplateIDs = array(3, 50, 51); // default, student, teacher $config->usersPageIDs = array(29, 1023, 1024); // default, student, teacher -- the above IDs belonging to existing templates and parent pages, of course. But now when I go to the Users page at /processwire/access/users/ I get this: That line is if(!$roles->has("id=$guestID")) $page->get('roles')->add($this->wire('roles')->getGuestRole()); and I don't see the problem there. When I comment it out, I can access the page, and see that my test teacher user indeed has no role, maybe that's throwing the error (although I'm not logged in as him). How do I set the respective roles for these new user templates? What else do I need to do to have these properly set up? I assumed the username would be the page name by default so it's got that and the necessary title, email, password, plus some extra fields. Any tips? I'm using v2.6.15 dev. Thanks.
-
Never mind, had to set the name as an array... like so $sidebar .= "<input id='$i->name' name='$t->name[]' value='$i->name' type='checkbox'><label for='$i->name'>$i->title</label><br>"; and such
-
I have the following sidebar.inc included on my Shop page which is the main index of items: <?php foreach($input->get as $key => $val) { echo htmlentities("$key = $val") . "<br>"; } $selector = ''; $summary = array( "categories" => "", "agegroups" => "", "keywords" => "", ); if($input->get->categories) {} $sidebar = "<form id='search_form' method='get' action='{$config->urls->root}shop/'><div class='row'>"; $taxonomies = $pages->find("template=product_taxonomies"); foreach($taxonomies as $t) { $items = $t->children; $sidebar .= "<div class='small-6 large-12 columns'><h3>{$t->title}</h3>"; foreach($items as $i) { $sidebar .= "<input id='$i->name' name='$t->name' value='$i->name' type='checkbox'><label for='$i->name'>$i->title</label><br>"; } $sidebar .= "</div>"; } $sidebar .= "<input id='search_keyword' name='keyword' type='text'/>"; $sidebar .= "<div class='large-12 columns'><input type='submit' id='search_submit' name='submit' value='Search'></div></div></form>"; Checking more than one input of the same name only produces the last value of those. Can anyone advise me on how to make these multi-select filters return multiple values?
-
Released: PadLoper (commercial eCommerce platform for ProcessWire)
hellomoto replied to apeisa's topic in Modules/Plugins
Anyone tested on PW 2.6 yet? -
I hope there are never that many PW modules for any one general feature such as a gallery. With PW this should never come to pass; WP only has that many because of course they're all plug-and-play with a million minute options for the back- and front-end to choose from, like positioning or color of captions... most of which are, most of the time, for most people, wholly unnecessary. PW should refrain from jumping on that bandwagon. Given the power of PW out of the box there probably will never be nearly as many modules in the directory as there are WP plugins, and that is a beautiful thing.
-
That's pretty true unless you don't have a real reputation...
-
I think it would be a great idea for us to set up a showcase site directed not towards end users but to developers' clients more specifically, as so many people on here have encountered, it can be difficult trying to explain the benefits on a case-by-case basis. It would be much more efficient to simply refer people someplace, or since plenty won't even do that due diligence, have a live and ready source on the web to visit with the client and show them in real time so they can ask any questions as they come up rather than put it off... (Of course anyone who wanted to like myself could do it themselves too. It's just time-consuming to do by oneself.) I like PossibleWith.PW I registered it and would happily donate it to the cause. So PW.pw can draw more "enterprise" or large-scale sites selected in/from processwire.com, give performance and other comparisons between different CMSs, maybe have a blog... if anyone wants to contribute, the Big Things Blog. We could just post inspirational and informative quotes from the forums and stuff... that are convincing and appealing to non-developers... Because it's like Pete said (on page 1, and then more I'm sure, as this convo has been spinning around) that we can't just have a flashy website to appeal to businesses and start like a whole operation catered to them... and like someone else said, most sites we build tend to be for businesses anyway (they're the ones buying)... but, of course, the ones buying usually like to be in control, and given that, despite not really having the expertise to make a well-informed major technical decision for themselves such as the CMS/framework to be used, will want to do so anyway. ProcessWire.com is aimed towards developers, as the CMS is, as it should be, because it's their business. When a developer comes to the site, he or she should be the one the info is targeted to because not having heard about it before, they're the only ones who will be able to make sense of the benefits. But that's why clients haven't heard about it, and why maybe we should put something together, somewhat separate, that's meant for them, that developers can refer their clients to rather than trying to convince each one individually every time…
-
To refresh my thumbnails I have been using a solution found in this thread. It is a script in the root of my PW installation on my localhost that when accessed in the browser displays a list of all "orphaned" image files and directories, this way: if (!in_array($f->getFilename(), $valid)) { echo "Orphaned file: " . wire('config')->urls->files . "$id/" . $f->getBasename() . "\n"; // unlink($f->getPathname()); } So you can preview the list first, and then choose to un-comment the unlink function and re-run the script to delete them, and fresh thumbs will be regenerated the next time they are requested, all the outdated ones will be eliminated. I want to make this a simple module: Include this script on an admin page Create a Fresh Thumbs action option on the page (just a button, rather than having to un-comment that line in the source) Enable a cron job option... Seems simple enough so I was hoping maybe someone could shed some light on this for me. Past the creation of a blank admin page, I'm sure I can just include the file and figure out the rest with that foundation. I have also been curious as to how to do this for a long time. As always all your gracious input is much appreciated in advance.
-
- module
- thumbnails
-
(and 1 more)
Tagged with:
-
could i use other url pattern for a page creation ?
hellomoto replied to adrianmak's topic in General Support
I was wondering how to do this too before, and ended up using ProcessRedirectIds... hadn't known about AutoPageName. But I wanted to have the page name be its ID for URL purposes, since the title of the listing may be subject to change... although I guess PagePathHistory could take care of that as well. In the aforementioned case though do you think there is a better alternative? Because in that case I would have no other use for the listings' name field, besides to identify it, for which I would use its actual ID [field] anyway... so I really have no use for the name field and might as well just replace it with the ID for the URL, anything else would be over the top. I think. -
Mine is preceded by "Proudly" (like WP has by default, which I never put myself, and I feel is unnecessary at this point given how it's usually fairly obvious when a site is built with WP, and their existing popularity)
-
Nice pseudocode, and nice of you to actually consider the proper grammar of English as your second language while so many native speakers disregard it. I'm learning Spanish and am coming across the same thing... Many native speakers don't tend to pay much mind to their grammar or spelling, etc., the technicalities, so when I ask questions they won't know because they had never thought about it. Turns out I can at least write Spanish more accurately now than some native speakers. I enjoy learning the forms and irregularities. But the real simpler way to tell the difference, in my opinion -- being that it is the real difference -- is that "it's" is a contraction, meaning it's the word "it" with "is" or "has", connected to make it shorter, and the apostrophe is there in place of whatever is eliminated in between. This should be obvious... I would think... Then "its" is possessive. It's like "Sam's" means like "belonging to Sam". But since "it's" is already another word, a contraction, we can't use that, so as to be able to distinguish one from the other, grammatically; additionally, all third-party pronouns in English lack the apostrophe: "his", "hers", and "theirs". Another bad one is then and than. They're just two different words -- homonyms, indeed, but different nonetheless, like "so" and "sew". Completely irrelevant, yet both totally common words that everyone should know how to spell... Yeah... grammar's my passion...
-
Sorry for not PMing that!
- 15 replies
-
- responsive
- ajax
-
(and 2 more)
Tagged with:
-
The doc pages are searchable and public, by the way; -------------------------- Moderator note: @hellomoto, That's a very important and helpful find, thanks. However, to protect the integrity of that website (and save Macrura some blushes ), could you please PM him instead? Thanks. Hence, I have removed the link you posted.
- 15 replies
-
- responsive
- ajax
-
(and 2 more)
Tagged with:
-
Awesome work and ideas, thanks for sharing.
- 15 replies
-
- 1
-
- responsive
- ajax
-
(and 2 more)
Tagged with:
-
Is there a somewhat comprehensive guide or tutorial somewhere on theming the PW admin? There's so much untapped potential there I just don't know really where to start to learn my way around it. If not, would anyone care to create one? I know I would greatly appreciate it, as would many more users. There are no admin themes in the modules directory currently that claim to be compatible with 2.5. That would probably change with a solid beginner's guide.
-
If not that, at least display the latest specified compatible version in the list view. I think this would be a nice and helpful feature to have, especially for some module categories (such as Admin Themes) with few listed as being compatible with 2.5... For now you have to open each module's page individually to view this info, and not only that but that brings up another minor annoyance in my experience with the modules directory, which is that trying to open a module's page in a new tab actually loads it in the source tab as well. I mean, the site does load swiftly, thank you guys for upholding such quality standards... but I still don't see why that's even desirable to do... You all know what I'm talking about right? I wish processwire.com was open source, especially to see how the newsletter system is done.
-
Never mind, wasn't the conditional anyway. This did it: foreach ($mainnav as $p) { $p = $p->id; if($page->rootParent->id == $p) $current = 'style="background: #fff;"'; else $current = ''; echo "<a href='{$pages->get($p)->url}' $current class='{$pages->get($p)->name}'>" . strToUpper($pages->get($p)->name) . "</a>"; }