Leaderboard
Popular Content
Showing content with the highest reputation on 07/01/2018 in all areas
-
@pwFoo, here is demonstration module you can use as a starting point. Just install the module and then view "My Page". MyModule.module <?php namespace ProcessWire; class MyModule extends WireData implements Module { /** * Module information */ public static function getModuleInfo() { return array( 'title' => "My Module", 'version' => 1, 'autoload' => true, ); } /** * Init */ public function init() { $t = $this->templates->get('my-template'); if(!$t) return; $t->filename = $this->config->paths->MyModule . 'my-template.php'; } /** * Install */ public function ___install() { $this->createTemplate('my-template', 'My Template'); $this->createPage('My Page', 'my-template'); } /** * Create template */ protected function createTemplate($template_name, $template_label) { if($this->templates->get($template_name)) { $this->warning("Template '$template_name' already exists."); return; } $fg = new Fieldgroup(); $fg->name = $template_name; $fg->add($this->fields->get('title')); $fg->save(); $t = new Template(); $t->name = $template_name; $t->label = $template_label; $t->fieldgroup = $fg; $t->compile = 0; $t->noPrependTemplateFile = true; $t->noAppendTemplateFile = true; $t->save(); $this->message("Created template '$template_name'."); } /** * Create page */ protected function createPage($page_title, $template_name) { $page_name = $this->sanitizer->pageName($page_title, true); if($this->pages->get("parent=/, name=$page_name")->id) { $this->warning("Page '$page_name' already exists."); return; } $p = new Page(); $p->template = $template_name; $p->parent = '/'; $p->name = $page_name; $p->title = $page_title; $p->save(); $this->message("Created page '$page_name'."); } } my-template.php <?php namespace ProcessWire; echo "This is the template file for my-template"; MyModule.zip3 points
-
Ok, thanks for your opinions. I'll leave AOS as it is, and when things start going out of control it will support only one admin theme.2 points
-
Yeah, it will cause problems if the name field is not available somewhere. If you enable PW's Advanced mode you can use the "Display 'name' field in content tab?" option in a template's System tab. Or you can do this in a module with: $page->template->nameContentTab = 1; You may also want to do: $form->_pw_page_name->collapsed = Inputfield::collapsedYes; Both of these can be seen in action in: https://github.com/adrianbj/RestrictTabView Hope that helps.2 points
-
Hi @horst, Not sure if you have already solved this now, but below is a quick demo module. A couple of notes: The Children tab is supposed to AJAX-load automatically when visible, but it's buggy: https://github.com/processwire/processwire-issues/issues/618 I can't remember the details but I seem to recall there might be an issue if the name field is not present in the ProcessPageEdit form. So if you strike problems you may need to move the name field to the Children tab and then hide it. Maybe @adrian knows about the name field issue? <?php namespace ProcessWire; class HideTabs extends WireData implements Module { /** * Module information */ public static function getModuleInfo() { return array( 'title' => "Hide Tabs", 'version' => 1, 'autoload' => 'template=admin', ); } /* @var ProcessPageEdit $ppe */ protected $ppe; /* @var InputfieldForm $form */ protected $form; /** * Ready */ public function ready() { $this->addHookAfter('ProcessPageEdit::buildForm', $this, 'afterBuildForm'); } /** * After ProcessPageEdit::buildForm * * @param HookEvent $event */ protected function afterBuildForm(HookEvent $event) { // Only for ProcessPageEdit (not ProcessUser) if($this->process != 'ProcessPageEdit') return; $this->ppe = $event->object; $this->form = $event->return; $page = $this->ppe->getPage(); // Only for one template (adjust as needed) if($page->template != 'my-template') return; // Remove the unwanted tabs $remove_tabs = [ 'ProcessPageEditContent', 'ProcessPageEditSettings', 'ProcessPageEditDelete', ]; foreach($remove_tabs as $tab_id) $this->removeTabFromForm($tab_id); // Trigger loading of Children tab // Hacky workaround for bug: https://github.com/processwire/processwire-issues/issues/618 $this->form->appendMarkup = " <script> $(window).load(function () { $('#_ProcessPageEditChildren').trigger('click'); }); </script> "; } /** * Remove tab from ProcessPageEdit form */ protected function removeTabFromForm($tab_id) { $tab = $this->form->find("id=$tab_id")->first(); if(!$tab) return; $this->form->remove($tab); $this->ppe->removeTab($tab_id); } }2 points
-
ProcessWire & Vue.js — a Lovestory Introducing the all new ICF Conference Website The new ICF Conference Page — Fearless » What would happen if we were equipped to fearlessly face the daily challenges and live a life without fear? « This question is at the core of our next ICF Conference in 2019 in Zurich. Its also the question we set out to answer in terms of developing the new website; the all new ICF Conference website is our most advanced website in terms of technology, designed to take advantage of the latest web-technologies. Its a brand new design powered by a lean setup, using ProcessWire for easy content management and a slick frontend based on Vue.js, Quasar and a heavily customized Uikit theme. Technology-stack — From backend to frontend, technologies that are fun, easy and fast to develop with We built on the ICF Ladieslounge website as a solid foundation and took our learnings from building our last Conference Booklet PWA (Progressive Web App) and applied it to the new website. Some highlights of the new ICF Conference website: Completely decoupled backend and frontend Custom design based on Uikit frontend framework Changing of languages happens instantly, no page-reload required Easy content updates thanks to ProcessWire All data is transferred using a single request returning custom JSON » Continue reading on Medium And please don't forget to clap and share:1 point
-
Maybe you are logged into admin in Safari and not the other browsers? In which case the issue probably relates to something that is accessible to a logged in user (or superuser) but not to guest.1 point
-
1 point
-
1 point
-
I agree with Adrian - in the future you might get too busy or just want to take a break from developing AOS and then users wouldn't be able to get new features or bug fixes that Ryan applies to the core admin theme. I also think it might turn out to be quite a hassle for you to apply core admin theme changes to your custom theme, because once the methods have been modified you won't be able to see changes easily via a simple diff. You'd have to monitor the core diffs instead and then manually hunt through your custom methods to find the equivalent locations. But once AdminThemeUikit has been the default admin theme for some period of time then I think it would be quite reasonable to say that AOS requires AdminThemeUikit and doesn't support the older themes.1 point
-
1 point
-
I'm not sure I understand the whole scenario/setup... You should tell us more about the "big picture". What exactly is the "zone" you are talking about? What (or where) does that "zone" get defined? Per branch, or on a per-page basis?1 point
-
Finally I was able to release RockGrid I decided to release it as MIT, so everybody can contribute and maybe use it for other great additions to ProcessWire. I think it's a great way of listing data and I can think of several situations where it would make the admin UI a lot better than it is now with our existing tools. For example @adrian s batch child editor could maybe benefit from such a tool? I don't know. Let's see what happens... The module is still alpha and not perfect... But it was also a lot of work and can't provide anything better than that at the moment. If anybody here can do it better: Please feel free to take over ? Thanks everybody for all the feedback here in this thread! Special thanks to @MrSnoozles for showing me agGrid and making me replace datatables ?1 point
-
Hi, as i'm in south germany...i could provide some kind of experience change and fast entry in all terms and things that are PW specific as kind of briefing or consulting. Also i could provide demoaccess to client pages from me, or examples that show you some kind of Page Builder Systems, since i've build some. On topics like forum integration and other tasks i've to admit that there were much more experienced people around...;) PM me if you are interestet in a call. Best Regards Martin1 point
-
Hi there I'm in the UK but can help with this definitely - I've integrated the forum software we use here into ProcessWire (user logins, topic creation etc) and the rest sounds similar to a project I completed a couple of months ago actually ?1 point
-
And start your timer. You have only: Sorry for this, I could not resist1 point