-
Posts
189 -
Joined
-
Days Won
5
Everything posted by blad
-
Thanks @adrian. I will try to update the module as soon as possible. I need to pass the configurable settings to js.
-
AlternativeGridImages module for Processwire Details Add a slider directly proportional to the size of the images introduced in the input field image. Installation copy AlternativeGridImages folder to /site/modules/ Screenshot https://github.com/LuisSantiago/AlternativeGridImages Updated 1.0.6: - Renamed altGrid as AlternativeGridImages. (Thanks @adrian) - Changed styles. - The slider value is saved in a cookie. (Thanks @Martijn Geerts) Updated 1.0.7: - Limit the number of characters in the file name (all items have the same height) (Thanks @enricob)
- 20 replies
-
- 15
-
Thank you for the explanation @adrian! it works
- 10 replies
-
- multiple image
- list of images
-
(and 1 more)
Tagged with:
-
Should i use InputfieldFile for the hook?
- 10 replies
-
- multiple image
- list of images
-
(and 1 more)
Tagged with:
-
What hook can i use for create a simple module? I tried : $this->addHookAfter('InputfieldImage::render', $this, 'xxx'); did´t work... The hooks of inputfieldimage are: /wire/modules/Inputfield/InputfieldImage/InputfieldImage.module #27:public function ___render() { #39:protected function ___fileAdded(Pagefile $pagefile) { #65:protected function ___renderItem($pagefile, $id, $n) { #91:public function ___getConfigInputfields() { Thanks.
- 10 replies
-
- multiple image
- list of images
-
(and 1 more)
Tagged with:
-
Frankly, I have not thought and I just did. Create a hook module is the best way.
- 10 replies
-
- 1
-
- multiple image
- list of images
-
(and 1 more)
Tagged with:
-
Sorry you can delete this topic. For me it's useful because I want my client doesn´t have to click to see all pictures and write descriptions.
- 10 replies
-
- 1
-
- multiple image
- list of images
-
(and 1 more)
Tagged with:
-
Edited: read this https://processwire.com/talk/topic/7379-module-altgrid/
- 10 replies
-
- 3
-
- multiple image
- list of images
-
(and 1 more)
Tagged with:
-
PassiveCron - Background Task Scheduling Service
blad replied to Marvin Scharle's topic in Modules/Plugins
I love your module minimize.pw and his red webpage and now i find this blue web I must use it for something. Great job! -
Answered: https://processwire.com/talk/topic/107-custom-login/
-
Based on objetive data: Size and number of files: Best Small to Midsize Business PHP CMS: Processwire 2.4 Tree menu: Joomla 3.3 Tree menu:
-
I don´t know how you can do a flushdns in a tablet but it would be a good idea. I use as my dns servers 8.8.8.8 and 8.8.4.4 (google). I have a fast response: http://distribucionesjuanperdomo.es/ Delay Check HTTP Success - response in 102 ms Good luck
-
Is Joomla better than Processwire? Is Justin Bieber better than Freddie Mercury? I can´t vote because I don´t have finished any of the sites I am creating in processwire. edit : I can vote A few days ago I couldn´t.
-
The dns server may take several days until it spreads but It's strange because it works on my pc and my mobile without any error. The traceroute: TraceRoute from Network-Tools.com to 88.26.248.41 [41.red-88-26-248.staticip.rima-tde.net] Hop (ms) (ms) (ms) IP Address Host name 1 0 0 0 129.250.202.253 xe-0-4-0-12.r01.dllstx04.us.bb.gin.ntt.net 2 0 0 0 213.140.52.217 - 3 34 34 111 94.142.120.94 xe-4-1-2-0-grtwaseq1.red.telefonica-wholesale.net 4 161 114 188 94.142.119.154 xe7-0-6-0-grtparix3.red.telefonica-wholesale.net 5 110 40 40 94.142.127.133 xe5-1-0-0-grtnycpt3.red.telefonica-wholesale.net 6 121 134 115 213.140.37.250 xe4-1-8-0-grtloneq1.red.telefonica-wholesale.net 7 132 Timed out Timed out 176.52.251.214 xe2-1-3-0-grtmadad1.red.telefonica-wholesale.net 8 132 161 133 213.140.51.14 - 9 160 164 160 88.26.248.41 41.red-88-26-248.staticip.rima-tde.net Trace complete Retrieving DNS records for 41.red-88-26-248.staticip.rima-tde.net... DNS servers rsdbgi1-10.rima-tde.net rsdmno1-13.rima-tde.net Answer records 41.red-88-26-248.staticip.rima-tde.net A 88.26.248.41 172800s Authority records red-88-26-248.staticip.rima-tde.net NS rsdmno1-13.rima-tde.net 172800s red-88-26-248.staticip.rima-tde.net NS rsdbgi1-10.rima-tde.net 172800s Good luck and sorry I can't provide any further help
-
I come from drupal and expression engine communities. I hope Processwire have the impact it deserves. I think it´s great and i can´t find a cmf like it (Open Source and fast learning curve). My opinion about cms with custom fields https://processwire.com/talk/topic/6798-yet-another-cms-switch/#entry67224 .
-
Ok i will translate comments to english. I´m sorry about it (i think in spanish)
-
The concept A custom table module process (requires Jquery Datatables module by @soma) with configuration. Features: - Custom selector to find the pages. - Custom fields in columns. - Custom fields search. - Set the number of columns. - Create, View, edit, publish/unpublish pages. I´m working on it. Please correct my mistakes is my first processwire´s module have mercy Screenshots: The code: <?php /** * Administrador de Noticias * * Luis Santiago (blad) 2014 * ProcessWire 2.x * Copyright (C) 2012 by Ryan Cramer * Licensed under GNU/GPL v2, see LICENSE.TXT * * http://processwire.com */ class AdminCustomTable extends Process implements Module, ConfigurableModule { const adminPageName = 'AdminTable'; public static function getModuleInfo() { return array( 'title' => 'AdminCustomTable', 'summary' => 'Fully customizable administration table', 'version' => 110, 'permanent' => false, 'permission' => 'AdministrationTable', 'requires' => array("JqueryDataTables") ); } public function __construct() { $this->idparentnews = 'parent=1, include=all'; $this->campo1 = 'title'; $this->campo2 = 'body'; } public static function getModuleConfigInputfields(array $data) { $inputfields = new InputfieldWrapper(); $field = wire('modules')->get('InputfieldText'); $field->name = 'idparentnews'; $field->label = "Custom selector to find pages"; //$field->label = "Selector para encontrar las noticias"; //$field->notes = __('Selector para conseguir las noticias ejemplo: parent=1018, include=all .Se recomienda usar include=all para ver todas las páginas'); $field->notes = __('This selector will be passed to a $pages->find("your selector") Example: parent=1018, template=product, sort=name, include=all .Use include=all for publish/unpublish these pages.'); if(isset($data['idparentnews'])) $field->value = $data['idparentnews']; $inputfields->add($field); $field = wire('modules')->get('InputfieldText'); $field->name = 'campo1'; $field->label = "Custom field for first column"; //$field->label = "Selector para encontrar las noticias"; //$field->notes = __('Selector para conseguir las noticias ejemplo: parent=1018, include=all .Se recomienda usar include=all para ver todas las páginas'); $field->notes = __('Example: title'); if(isset($data['campo1'])) $field->value = $data['campo1']; $inputfields->add($field); $field = wire('modules')->get('InputfieldText'); $field->name = 'campo2'; $field->label = "Custom field for second column"; //$field->label = "Selector para encontrar las noticias"; //$field->notes = __('Selector para conseguir las noticias ejemplo: parent=1018, include=all .Se recomienda usar include=all para ver todas las páginas'); $field->notes = __('Example: body'); if(isset($data['campo2'])) $field->value = $data['campo2']; $inputfields->add($field); return $inputfields; } /** * Inicio del módulo * */ public function init() { $this->config->scripts->add($this->config->urls->AdminCustomTable . 'prog.js'); // $this->config->styles->add($this->config->urls->AdminCustomTable . 'style.css'); $this->modules->JqueryDataTables; } /** * Ejecución del módulo * */ public function ___execute() { $this->modules->get("JqueryFancybox"); $selector = $this->idparentnews; $campo1 = $this->campo1; $campo2 = $this->campo2; $noticias = wire('pages')->find("{$selector}"); $out = "<table id='mitabla' style='margin-top:20px; margin-bottom:20px;'> <thead> <tr> <th style='width:40%'>{$noticias->fields->$campo1->label}</th> <th style='width:50%'>{$noticias->fields->$campo2->label}</th> <th class='sin-orden' style='width:10%'>Actions</th> </tr> </thead> <tbody> "; $adminUrl = $this->config->urls->admin; $noticias->fields->title->label; /** * Nos deja buscar el id de la página * */ // if( $this->input->get->sSearch ) { // $q = $this->sanitizer->text($this->input->get->sSearch); // if (is_numeric($q)) { // $selector .= "id=$q,"; // } else { // $selector .= "title|body%=$q,"; // } // } /** * buscamos el selector * */ foreach($noticias as $noticia) { $out .= " <tr> <td>{$noticia->{$campo1}}</td> <td>{$noticia->{$campo2}}</td> <td> <a class='fancybox-iframe' href='{$adminUrl}page/edit/?id={$noticia->id}&modal=1'><i class='fa fa-edit'></i></a></br> <a href='{$adminUrl}page/delete/?id={$noticia->id}'><i class='fa fa-times'></i></a></br>" ; /** * botón de publicar-despublicar * */ if ($noticia->is(Page::statusUnpublished)) { $out .= "<i style='color:red' class='fa fa-square-o'></i>"; } else { $out .= "<i style='color:green' class='fa fa-check-square-o'></i>"; } $out .= "</td></tr>" ; } $out .= "</tbody></table>" ; return $out; } /** * Instalación * */ public function ___install() { $admin = $this->pages->get($this->config->adminRootPageID); $parent = $admin; $page = new Page(); $page->parent = $parent; $page->template = $this->templates->get('admin'); $page->name = "AdminCustomTable"; $page->title = "AdminCustomTable"; $page->process = $this; $page->save(); $this->message("You have installed AdminCustomTable"); if (!$this->permissions->get('AdministrationTable')->id) { $permission = $this->permissions->add('AdministrationTable'); $permission->title = 'AdminCustomTable permission.'; $permission->save(); } } /** * Desinstalación * */ public function ___uninstall() { $page = $this->pages->get('template=admin, name=AdminCustomTable'); $page->delete(); $permission = $this->permissions->get('AdministrationTable'); $permission->delete(); } }
-
The module: <?php class AdminHelperHooks extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'HideTabs ProccesPageEdit', 'summary' => 'Hide the tabs Childrens, Configuration, Delete, View', 'version' => 1, 'singular' => true, 'autoload' => true ); } public function init(){ $this->addHookAfter("ProcessPageEdit::buildForm", $this, "buildFormHook"); } public function buildFormHook(HookEvent $event){ if(wire("user")->hasRole("superuser")) return; $form = $event->return; $fieldset = $form->find("id=ProcessPageEditSettings")->first(); $form->remove($fieldset); $fieldset = $form->find("id=ProcessPageEditDelete")->first(); $form->remove($fieldset); $fieldset = $form->find("id=ProcessPageEditChildren")->first(); $form->remove($fieldset); $fieldset = $form->find("id=ProcessPageEditView")->first(); $form->remove($fieldset); } } Based on https://processwire.com/talk/topic/4680-block-access-to-settings-delete-and-view-tabs-for-page/ by Soma
-
Thanks Soma
-
Thanks Very helpful
-
Hi! I´m trying to edit the ProcessPageEdit for hide the tabs "Childrens, Setup, Delete, View" if user dont have X permission. My client doesn´t need these tabs. Any ideas?.
-
Okey i´m stupid $salida .= "</table>"; Sorry. Delete this post please.
-
I am doing a module to show tables of contents like widgets. The problem is that I receive the code footer before the tables. Any ideas? Sample: The code: public function ___execute() { $noticias = wire('pages')->find('template=noticia, limit=5'); $salida .= "<table style='width:30%; margin-right: 3%;' class='widget_admin'> <tr> <td colspan='3' class='cabeceraplugin' style='width:100%; background-color:#FF7F50; color:#fff;'><a href='#'><i style='margin-right:10px;' class='fa fa-home'></i>Últimas noticias</a> <a class='crearboton' href='{$config->urls->admin}page/add/?id={$noticia->parentID}'>Crear <i class='fa fa-plus'></i></a></td> </tr><tr>"; foreach($noticias as $noticia) { $salida .= "<td><a href='{$config->urls->admin}page/edit/?id={$noticia->id}'>{$noticia->title}</a></td> <td style='width:5%'> <a href='{$config->urls->admin}page/edit/?id={$noticia->id}'><i class='fa fa-edit'></i></a></br> <a href='{$config->urls->admin}page/delete/?id={$noticia->id}'><i class='fa fa-times'></i></a></td> </tr>"; } return $salida;
- 1 reply
-
- 1