-
Posts
651 -
Joined
-
Last visited
-
Days Won
6
Everything posted by rick
-
Since bootstrap uses the input group addon to position the icon within the container, your code is also setting the label to email, which also appears. Removing the label entry should remove the text and leave the icon. so 'item_label' => "<label class=input-group-addon>{out}</label>" should be 'item_label' => "<label class=input-group-addon></label>"
-
Maybe this will help.
-
Adding a second set of "Add" buttons on top to PageTable
rick replied to titanium's topic in Module/Plugin Development
It isn't part of a PageTable or AdminDataTable. The showInHeader() is part of the header of the current page. It will display like the Add New Template button on the Template page. // in process execute function: $table = $this->modules->get('MarkupAdminDataTable'); $table->setEncodeEntities(false); $table->setSortable(true); $table->setCaption('Table Caption'); $table->headerRow(['col1', 'col2', '...']); $button = $this->modules->get("InputfieldButton"); $button->showInHeader(); //$button->setSecondary(); $button->href = "{$this->page->url}something"; $button->icon = 'some_icon'; $button->value = "Add New Something"; // $table->row( array() ); // populate table rows loop return $table->render() . $button->render(); // Button is shown after table list (and in page header) -
Adding a second set of "Add" buttons on top to PageTable
rick replied to titanium's topic in Module/Plugin Development
Maybe I am misunderstanding. Does this not do what you need? $button = $this->modules->get("InputfieldButton"); $button->showInHeader(); //$button->setSecondary(); $button->href = "{$this->page->url}whatever"; // ??? execute whatever $button->icon = 'some_icon'; $button->value = "New Thing"; // output button render return $button->render(); -
I'm not sure if you have seen the profile export module but it has been a great addition for me when setting up initial sites.
-
Hooks, compare page before and after save
rick replied to heldercervantes's topic in General Support
Try this from ryan regarding tracking changes and notifications. -
How to remove the seconds from %X time format?
rick replied to PWaddict's topic in Multi-Language Support
Ah, ok. I knew strftime was locale aware, but not that it took into account the 12/24 hour format. Good to know. -
How to remove the seconds from %X time format?
rick replied to PWaddict's topic in Multi-Language Support
You can use the format "%l:%M %p" to display the time, without seconds. For example: $p = wire("pages")->get(some_id); echo strftime( "%l:%M %p",$p->getUnformatted($p->created)); returns a time like, 6:00 AM. I apologize if I am misunderstanding what you are wanting to achieve. -
I agree. I come from a very old school of IBM bookmaster coding so I still prefer the simple approach.
-
Get template's allowed templates for children from API
rick replied to Sipho's topic in API & Templates
Not sure but I seem to recall reading that either debug mode or advanced mode triggered the field name display when hovering. -
@heldercervantes, Completely off topic. I hope that you and your family were not damaged by the recent fires. I have a friend whose family members are still hospitalized; she is recovering from smoke inhalation and the he has severe burns he received while rescuing a dog from a burning building.
-
require "index.php"; $admin = $users->get('admin'); // or whatever your username is $admin->setAndSave('pass', 'yo123456'); $session->redirect($config->urls->admin); @jen, something else is happening that we don't know about. Do you get any error messages? 404 page? Do y'all know the admin url?
- 7 replies
-
- 1
-
-
- reset
- locked out
-
(and 1 more)
Tagged with:
-
Howdy @jen, and welcome to the forums. First, you can use this RESET to gain access to the admin page. Then we can proceed from there.
- 7 replies
-
- 3
-
-
- reset
- locked out
-
(and 1 more)
Tagged with:
-
Something inserts "/processwire/" in my form label
rick replied to modifiedcontent's topic in General Support
Valid or not, it is not commonly used and is difficult to read. Nonetheless, it appears you are creating a new password object passing confirm as a parameter. Do you have the namespace set? -
Form Builder does not forward email to administrator
rick replied to AndySh's topic in Modules/Plugins
Howdy @AndySh, You purchased the pro version so you will need to post your request in that private support forum. If you do not have access, then please send Ryan a PM and he will give you access. -
Looks good! One item: The blog menu shows, Security & Privacy rather than Security & Privacy.
-
Hi @arjen, Thanks for the reply. I have changed the code to match $this->wire() for fields, fieldgroups, and templates, and I am still getting the same results. [edit] Robin posted before I finished entering this reply. @Robin S, Thanks for the test. Yes I have to remove the orphaned fields manually when the uninstall fails to do so. I changed the uninstall to your code source and everything is correctly removed. I also left the field name and template name case unchanged for this test, but I'll change everything to lower-case to match the existing naming convention in the database. Even though the Add New Field option allows upper- and lower-case, and template names match the case of the php template file or whatever you enter for template names without a file. The only thing I can think of as to why it works now and not before is some typo present in my naming that isn't showing up in phpstorm. I agree with the lack of documentation too. I've spent three days writing this module and troubleshooting this install/uninstall oddity. I have copied so many forum topic links into module comments for my reference that it should be a book! Thanks for y'alls help. I appreciate it.
-
Hi @szabesz, I have dissected many modules, and used the method described in the related post to gather the properties, which is how I came to create the example. The problem is that the one api-created template functions correctly while the other (with the exact same code) does not. There is something wrong, different, out of order, or whatnot, that I am missing. Of course starring at the problem for hours narrows my tunnel vision even more. I need another pair of eyes, and more time during the day. Where does that line form? haha
-
I have a problem that is making my hair even more gray. I am writing a process module which constructs seven fields and two templates as shown in this excerpt: /** *** Process Module Install *** * * The following seven fields are created successfully. * No other field attribute nor context is yet defined. * */ public function ___install() { if( !$this->fields->get('field1') ) { $f = new Field(); $f->name = 'field1'; $f->type = $this->modules->get('FieldtypePageTitle'); $f->label = __('Title', __CLASS__); $f->description = __('Description.', __CLASS__); $f->save(); } if( !$this->fields->get('field2') ) { $f = new Field(); $f->name = 'field2'; $f->type = $this->modules->get('FieldtypeText'); $f->label = __('Text', __CLASS__); $f->description = __('Description.', __CLASS__); $f->save(); } if( !$this->fields->get('field3') ) { $f = new Field(); $f->name = 'field3'; $f->type = $this->modules->get("FieldtypeTextarea"); $f->label = __('Text', __CLASS__); $f->description = __('Description.', __CLASS__); $f->save(); } if( !$this->fields->get('field4') ) { $f = new Field(); $f->name = 'field4'; $f->type = $this->modules->get("FieldtypeImage"); $f->label = __('Image', __CLASS__); $f->description = __('Description.', __CLASS__); $f->save(); } if( !$this->fields->get('field5') ) { $f = new Field(); $f->name = 'field5'; $f->type = $this->modules->get('FieldtypePageTitle'); $f->label = __('Title', __CLASS__); $f->description = __('Description.', __CLASS__); $f->save(); } if( !$this->fields->get('field6') ) { $f = new Field(); $f->name = 'field6'; $f->type = $this->modules->get("FieldtypeTextarea"); $f->label = __('Text', __CLASS__); $f->description = __('Description.', __CLASS__); $f->save(); } if( !$this->fields->get('field7') ) { $f = new Field(); $f->name = 'field7'; $f->type = $this->modules->get("FieldtypeImage"); $f->label = __('Image', __CLASS__); $f->description = __('Description.', __CLASS__); $f->save(); } /** * Template1 name displays correctly in Setup > Templates. * Template1 shows three assigned fields. * Template1 shows assigned fieldgroup. */ if( !$this->templates->get('Template1') ) { $fg = new Fieldgroup(); $fg->name = 'Template1'; $fg->add( $this->fields->get('field1') ); $fg->add( $this->fields->get('field2') ); $fg->add( $this->fields->get('field3') ); $fg->save(); $t = new Template(); $t->name = 'Template1'; $t->fieldgroup = $fg; $t->save(); } /** * Template2 name displays correctly in Setup > Templates. * Template2 shows zero (0) assigned fields. * Template2 shows assigned fieldgroup. */ if( !$this->templates->get('Template2') ) { $fg = new Fieldgroup(); $fg->name = 'Template2'; $fg->add( $this->fields->get('field4') ); $fg->add( $this->fields->get('field5') ); $fg->add( $this->fields->get('field6') ); $fg->add( $this->fields->get('field7') ); $fg->save(); $t = new Template(); $t->name = 'Template2'; $t->fieldgroup = $fg; $t->save(); } } /** *** Process Module Uninstall *** * */ public function ___uninstall() { $t = $this->templates->get('Template1'); if( $t ) { $this->templates->delete( $t ); } $fa = array( 'field1', 'field2', 'field3', 'field4', ); $fg = $this->fieldgroups->get('Template1'); if( $fg ) { // also tried with, $fg->count > 0, ... foreach( $fa as $f ){ // ...and, $fg->items as $f, without $fa array $df = $this->fields->get( $f ); $fg->remove( $df ); $fg->save(); wire('fields')->delete( $df ); } $this->fieldgroups->delete( $fg ); } $t = $this->templates->get('Template2'); if( $t ) { $this->templates->delete( $t ); } $fa = array( 'field5', 'field6', 'field7', ); $fg = $this->fieldgroups->get('Template2'); if( $fg ) { foreach( $fa as $f ){ $df = $this->fields->get( $f ); $fg->remove( $df ); $fg->save(); wire('fields')->delete( $df ); } $this->fieldgroups->delete( $fg ); } } The installation is partially successful in that it creates all seven fields as I have them defined and displays them in the fields list. The two templates are created and display in the templates listing. However, only the first template (Template1) has the three assigned fields listed on the basics tab. Template1 does not list any fields. The next issue is during uninstall. The templates and fieldgroups are removed, but the fields are not. There are no errors in the ProcessWire logs, dev console, tracy, or my server logs. I'm running php7.0, blank ProcessWire 3.0.62, and MySQL 5.0, apache 2.4, on localhost. Can someone offer a suggestion as to what I should be doing differently?
-
@Dinodog, This doesn't appear to be a ProcessWire issue. However... The error is displayed from this div element located just after the closing form element: <div id="error" class="error box"> Something went wrong, please try again later. We truly apologize for the inconvenience. </div> This indicates that the javascript validation function is failing causing this div element to become visible (rather than the success message). The validation is failing for some reason, either improper user input, or a bug in the code. The form contains this hidden element which gets submitted with the other form data: <input type="hidden" name="recipients" value="developer2@puredataconsulting.com, stay@reeflodge.com.au, designer@puredataconsulting.com" /> Do you get any emails at the stay@ address? Also, the two references to pure data suggests two things. First, pure is the company that produced your web site, and two, they also get copies of all your confirmation emails (why?). Are there any error entries in your server logs which might indicate another cause? Such as the email routine? If so, please post back with that information so we might be able to help further.
-
I've looked there before. -1 Removed? +1 [edit] Just now says it is not available for my account. Remove: +9
-
Post your question(s), including any code you're having trouble with, and someone will be glad to help. Welcome to the forum.
-
Howdy @bkno, and welcome to the forum. ProcessWire itself is very secure, in that there have been few, if any, security related updates. In fact, I am not aware of any such update in the couple of years I have been using ProcessWire. Consequently, there isn't a security mailing list like what you have become familiar with in other platforms. As far as an upgrade regiment is concerned, if you stick with the latest master version you should have no issues. For those times that you do wish to upgrade, the procedure is very simple and as a result, not anywhere close to being tiring as with the other cms/cmf you have worked with. And the only real reason you might upgrade is when new functionality becomes applicable to your site. The modules that you can install are created by the community, and should be treated as any user-defined content. As with any publicly accessible resource, it is up to the developer to guard against malicious intent. ProcessWire provides a number of tools to assist you, such as sanitizing data submitted by your users. That being said, the community members here are very knowledgeable and very experienced, and again, I am not aware of any security issues with the modules they produce. The previous security issues you experienced is why I also left those other environments. I have had no disappointments or regrets moving to ProcessWire. In addition, you can browse any topic in this forum and see the quick and accurate support provided by the community members. I don't intend for this to sound like a sales pitch. I'm only stating the facts as I have come to know them. There ya go. @LostKobrakai is one of those community members. He beat me to the post. Again.
-
Howdy @Thorsten, and welcome to the forum! The only thing I can think of in my limited experience is since it is a different server maybe the rewrite in htaccess is not correct. If throwing this exception worked on a previous server, and now does not work on a new server, that leads me to believe there is something out of whack with the new server. Others more knowledgeable will be along shortly to help further. Again, welcome to the fold.
-
Howdy y'all! I am referencing this great tutorial by @abdus regarding an orders list displayed in the admin section. One thing I would like to accomplish is having each order row expand (child rows) to display each line item of the selected order. (The image is an example of child rows from datatables jquery plug-in). I haven't found anything relating to this functionality in the admin data tables source or in the forum. Is this possible either using existing ProcessWire functionality, or do I need to include a reference to the datatables jquery plug-in in the module to achieve this effect? I would prefer to stay with internal ProcessWire functionality rather than adding dependencies. I appreciate the help!