Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/14/2017 in all areas

  1. MODULE PREVIEW This is a new module I'm working on, Settings Train. Ever needed to setup one or more pages for site settings, need a lot of fields/settings and an easy way to access them in the front end. This module may be of use to you. You can of course either make an editor page using standard fields for settings, but the goal of this module is to allow files within the template folder to define their own 'dependencies' for settings. Description: this module allows you to create an unlimited number of admin/process pages, and on any process page you can enter the path to a json file that defines the fields to use for the process page. 1.) Contents of kitchen-sink.json [ { "name":"text1", "label":"Text Field 1", "type":"InputfieldText", "width":"100", "description":"", "collapsed":0, "placeholder":"", "value":"", "columnWidth":50 }, { "name":"text2", "label":"Text Field 2", "type":"InputfieldText", "width":"100", "description":"", "collapsed":2, "placeholder":"", "value":"", "columnWidth":50 }, { "name":"select1", "label":"Select Test", "type":"InputfieldSelect", "width":"100", "description":"Description of select 1", "options": { "default":"Default", "blue":"Blue", "red":"Red", "yellow":"Yellow", "dark":"Dark" }, "collapsed":0, "placeholder":"", "value":"", "columnWidth":33 }, { "name":"checkbox1", "label":"Checkbox Test", "type":"InputfieldCheckbox", "width":"50", "description":"Checkbox 1 description", "collapsed":0, "placeholder":"", "value":1, "columnWidth":34 }, { "name":"radios1", "label":"Radios Test", "type":"InputfieldRadios", "width":"50", "description":"", "options":{ "black":"Black", "white":"White" }, "collapsed":0, "placeholder":"", "value":"black", "columnWidth":33 }, { "name":"checkboxes1", "label":"Checkboxes Test 1", "type":"InputfieldCheckboxes", "width":"50", "description":"Checkboxes 1 Description", "options":{ "address":"Address", "phone":"Phone", "social":"Social Icons", "top_menu":"Top Menu" }, "collapsed":0, "placeholder":"", "value":"", "columnWidth":50 }, { "name":"checboxes2", "label":"Checkboxes Test 1", "type":"InputfieldCheckboxes", "width":"50", "description":"Checkboxes 2 Description", "options":{ "address":"Address", "phone":"Phone", "social":"Social Icons", "top_menu":"Top Menu" }, "collapsed":0, "placeholder":"", "value":"", "columnWidth":50 }, { "name":"textarea1", "label":"Textarea Test", "type":"InputfieldTextarea", "width":"100", "description":"Textarea 1 Description", "collapsed":2, "value":"" }, { "name":"pagelistselect1", "label":"Page List Select Test", "type":"InputfieldPageListSelect", "width":"100", "description":"Page List Select Test Description", "collapsed":0, "value":"0", "columnWidth":50 }, { "name":"asm_select1", "label":"ASM Select Test", "type":"InputfieldAsmSelect", "width":"100", "description":"ASM Select (templates) - select a template.", "options":{ "43":"Image", "59":"Options", "61":"Post (post)", "62":"Post Index (post-index)" }, "collapsed":0, "value":"", "columnWidth":50 }, { "name":"url_test", "label":"URL Test", "type":"InputfieldURL", "width":"100", "description":"Enter a URL", "noRelative":1, "collapsed":0, "value":"", "columnWidth":33 }, { "name":"integer_test", "label":"Integer Test", "type":"InputfieldInteger", "width":"100", "description":"Enter an Integer", "collapsed":0, "value":"", "columnWidth":34 }, { "name":"email_test", "label":"Email Test", "type":"InputfieldEmail", "width":"100", "description":"Enter an Email Address", "collapsed":0, "value":"", "columnWidth":33 }, { "name":"ckeditor_test", "label":"CK Editor Test", "type":"InputfieldCKEditor", "width":"100", "description":"Some Formatted Text", "collapsed":0, "value":"" } ] The json file can be anywhere (currently limited to the templates folder). For example, if you have a theme folder and that theme requires specific preferences to be set for that theme, you can have the settings page load the fields needed by that theme. Process Page in Menu: Process Page (editing the settings): Then you can access those settings in your front end like this: $train = $modules->get("SettingsTrain"); $themeSettings = $train->getSettings('news-settings'); the settings are delivered as a WireArray: so you can now do this: echo $newSettings->url_test; which outputs http://processwire.com For rapid site development, this can save you from having to manually setup fields for new projects settings, especially if you use those same settings a lot.
    12 points
  2. A couple more options for searching the PW website more easily: 1) New search feature in the ProcessWire Info panel in TracyDebugger https://processwire.com/talk/topic/12208-tracy-debugger/?do=findComment&comment=153342 2) Custom search for Alfred (customizable Spotlight type app for Mac) Simply type "pw" and then your search term: These are the settings to configure Alfred to do this search: https://www.google.com/search?q=site%3Aprocesswire.com%2F {query} You might also want to consider adding the following: pwapi : https://www.google.com/search?q=site%3Aprocesswire.com%2Fapi%2Fref%2F {query} pwblog : https://www.google.com/search?q=site%3Aprocesswire.com%2Fblog%2F {query} pwtalk : https://www.google.com/search?q=site%3Aprocesswire.com%2Ftalk%2F {query}
    5 points
  3. A client of mine was asking for a solution to send newsletter mails to a list of subscribers. I looked around for a module, but couldn't find any. Then I saw a screenshot on this blog post about UIKit update, and decided to recreate it. Huge thanks to @ryan for the inspiration. The module uses regular pages for building HTML content. These pages can be used to create a fallback link in emails (i.e. "Use this link if you can't view email properly"). During render it injects $page->mailerMode, which can be used to change page output between text and HTML, or to show a simplified, email only HTML output. Screenshots: Main screen is just a list of items. Create page: Module configuration page: During installation, module creates a page under admin for storing items similar to FieldtypeRepeater. It also creates some fields for storing mail info Todo: More testing Sending in batches (with a script that runs in background and real-time progress log) Plans: Integration with Mailchimp (for subscriber lists) Automation (as a separate module for creating email content pages) I'm hoping to complete and release the module in the following days. I think these features should be enough for the beginning, but I'm open to suggestions.
    4 points
  4. Hi guys! What do you think about something like this? Because I use this option regularly in the Windows File Explorer breadcrumb and it's very useful. The drop-down menu can display only published/visible child pages. I've tried to find how to do it as a module, but I'm not a coder with enough skills for that ... or I don't know if I can use hooks to do that ...
    4 points
  5. Nice. How about some radios for more focused searches? API reference - site:processwire.com/api/ Forums - site:processwire.com/talk/ Blog - site:processwire.com/blog/ Yeah, I was thinking about doing that - just implemented:
    4 points
  6. New Search ProcessWire website feature in the ProcessWire Info Panel. For updates to old Tracy installs, you will need to manually enable this feature in the module settings. It is on by default in new installs. Any term you type in the box will take you to a Google site search for the PW website, eg a search for Tracy will take you to the results for a site:processwire.com/ tracy Hopefully you guys find this useful!
    4 points
  7. There's nothing to integrate, array-config is a joke repository :), it's just there to show that you can you can return variables from files and use them with include statement, instead of dealing with parsing, validation of JSON/YAML etc. I want the same thing with @adrian, which is essentially how getModuleConfigArray() method of ConfigurableModule interface works. public function getModuleConfigArray() { return [ 'colors' => [ 'type' => 'radios', 'label' => $this->_('Color Set'), 'options' => [ 'classic' => $this->_('Classic'), 'warm' => $this->_('Warm'), 'modern' => $this->_('Modern'), 'futura' => $this->_('Futura') ], 'value' => 'classic', 'optionColumns' => 1 ] ]; } Exactly. Also, I agree with @tpr and @szabesz on the naming. While fa-train looks really smooth, fa-industry or fa-wrench isn't too bad either. We really should switch to Material Icons, though. There's an icon for everything, and every icon is crafted with top notch attention to detail. FA looks quite rough in comparison. Small list of Font Awesome icons can be replaced with their Material counterparts, or both can be combined
    3 points
  8. Really cool . I can see myself using this a lot. One simple request, can you add support for using regular PHP files for configuration? https://github.com/mrkrstphr/array-config Manually typing JSON for building inputs array would get tedious really quick. I'd rather use a PHP file because: I can add logic to my configuration files (and even include other files). This eliminates having to write some parts over and over. I can just write a function to create a text field and use that. I can use my IDE and its tools, autocomplete, intellisense etc
    3 points
  9. I'm thinking of integrating mailing services like Mailgun, SparkPost, SendGrid (currently working on Mailgun), and their `Mailing List` features via their APIs, because it's much easier to delegate potentially difficult points to a service experienced in this kind of work, instead of using regular SMTP to send emails (not to say I'm discarding SMTP option) Using a mailing service also brings an easier way to add/remove subscribers to a list. With a method like $modules->ProcessMailer->getSubscriptionForm($options), I can return an instance of InputfieldForm, and developers can modify and render it as they see fit. Then I can issue a call to their API and add subscriber to a list.
    3 points
  10. Nice. How about some radios for more focused searches? API reference - site:processwire.com/api/ Forums - site:processwire.com/talk/ Blog - site:processwire.com/blog/ I have these as keyword searches in my browser and they get a lot of use. (TBH, it's so easy to Ctrl+L focus the browser address bar and do a keyword search that I'm not likely to give the Tracy feature much use, but maybe some will prefer the Tracy option).
    3 points
  11. https://www.baumrock.com/portfolio/event-voting-tool-social-impact-award/ Another nice little Showcase of what can quickly be done with Processwire I sponsored this voting tool for the Austrian Social Impact Award ceremony (https://socialimpactaward.net/) helping them to pick the winner of the audience voting. The site is based on the default UIKIT theme (obviously) and i basically just placed the logo + changed the colors. The site structure is also very simple, having only one parent to store all teams, one parent to store all votes and one page to show the results (to the admins): The Projects-Template stores some informations of the project and the vote-count: All the votings are single pages as well having only one checkbox, ensuring that every code can only vote once (every visitor got one code at the entrance): Votes are created via Tracy Console as easy as that: The hook that creates the passwords is also simple: /** * create unique code for voting */ $wire->addHookAfter('Pages::saveReady', function($event) { $page = $event->arguments(0); if($page->template != 'vote') return; if(!$page->title) { $rand = ''; while(!$rand OR pages("title=$rand")->count() > 0) $rand = randomPassword(); $page->title = $page->name = $rand; } }); And finally the check if the vote for this code is already done (inside the vote-template). the whole vote-template is as simple as that (thanks to the awesomeness of markup regions and functionsapi): <?php namespace ProcessWire; // handle votes (url segments) if($id = $sanitizer->int($input->urlSegment1)) { // if voting is locked redirect to thankyou message if($page->votingdone) $session->redirect($page->url); // else set voting $team = pages($id); if($team->id) { // increase voting for this team $team->setAndSave('votes', $team->votes+1); // lock this votings page $page->setAndSave('votingdone', 1); } } ?> <?php // if voting is done show thank you and lock page if($page->votingdone): ?> <region id="main"> <div class="uk-card uk-card-primary uk-card-body uk-width-1-1 uk-margin-small-top uk-text-center uk-border-rounded"> <h3 class="uk-card-title">Danke für Ihre Teilnahme!</h3> </div> </region> <?php return; endif; ?> <region id="main"> <div class="uk-text-center uk-margin-top"><?= $page->parent->body ?></div> <?php foreach(pages('template=team, sort=random') as $team): ?> <div class="uk-card uk-card-default uk-card-body uk-width-1-1 uk-margin-small-top uk-border-rounded"> <h3 class="uk-card-title uk-text-center"><?= $team->title ?></h3> <ul uk-accordion="collapsible: true"> <li> <p class="uk-accordion-title uk-text-center"><span uk-icon="icon: chevron-down"></span> Beschreibung anzeigen</p> <div class="uk-accordion-content"> <?= $team->body ?> </div> </li> </ul> <a href="<?= $team->id ?>" class="uk-button uk-button-large uk-button-primary uk-width-1-1 uk-border-rounded">Für dieses Projekt abstimmen</a> </div> <?php endforeach; ?> </region> I'm still impressed by ProcessWire and how much can be achieved with how little effort
    3 points
  12. Sites Manager 16 September 2018: FOR NOW, PLEASE DO NOT USE THIS MODULE IN A PRODUCTION SITE. A RECENT ProcessWire UPDATE HAS BROKEN THE MODULE. I AM WORKING ON A FIX. ################ Sites Manager is a module for ProcessWire that allows Superusers to easily create/install ProcessWire sites on the same serverspace the module is running in. Only Superusers can use the module. You can create both stand-alone and multi-sites. Single/Stand-alone Sites Stand-alone or single-sites are sites that will run in their own document root/directory with their own wire and site folders, .htaccess, index.php, etc. In other words, a normal ProcessWire site. Multiple Sites Multi-sites are sites that will run off one wire folder (shared amongst two or more sites) each having their own site folder and database. In this regard, it is important to note that Sites Manager is not in itself a multiple sites solution! Rather, it is a utility that helps you create multi-sites to be run using the ProcessWire core multiple sites feature. For more on this core feature, see the official ProcessWire documentation, specifically the solution referred to as Option #1. Option #1 approach requires the site admin to initially install ProcessWire in a temporary directory for each new site. The directory then needs to be renamed as site-xxx, where ‘xxx’ is any name you want to use to differentiate the installation from other sites, before it is moved to the webroot. For instance, site-mysite, site-another, site-whatever. In addition, the /wire/index.config.php file must be copied/moved to the webroot. Each time a site is added, the index.config.php has to be edited to add ‘domain’ => ‘site-directory’ key=>value pairs for the site. This process can become a bit tedious. This module aims to automate the whole multi-site site creation process. The module is based off the official ProcessWire installer. Creating a site is as simple as completing and submitting a single form! You also have the option to type and paste values or reuse a pre-defined install configuration. The module will: Install a ProcessWire site in your named directory, applying chmod values as specified Move the directory to your webroot Update/Create a Superuser account as per the submitted form, including setting the desired admin theme and colour For multi sites, update sites.json (used by index.config.php to get array of installed sites) For multi sites, the only difference in relation to the core multi-sites index.config.php is that this file is slightly different from the one that ships with ProcessWire. Download from GitHub: Sites Manager (Beta Release) Features Install unlimited number of sites in one (multi-sites) or independent (single-site) ProcessWire installs. Install by completing a Form, Typing or pasting in configurations or using pre-created install configurations. Choose an Admin Theme to auto-install along with the site installation. For single-sites installation, download, save and reuse ProcessWire versions of your choice. Install and maintain site profiles for reuse to create other sites. Create install configurations to speed up installation tasks. Client and server-side validation of site creation values. Edit uploaded profiles (e.g., replace profile file). Lock installed sites, configurations and profiles to prevent editing. Bulk delete items such as site profiles, installed site directories and/or databases (confirmation required for latter two). View important site details (admin login, chmod, etc). Links to installed sites home and admin pages. Timezones auto-complete/-suggest. Pre-requisites, Installation & Usage Please see the documentation. Technicalities/Issues Only Superusers can use the module. ProcessWire 2.7 - 3.x compatible Currently using ProcessWire 2.7 installer (install.php) For multi-sites, potential race condition when sites.json is being updated on a new site install vs. index.config.php accessing the json file? Not tested with sub-directory installs (for instance localhost/pw/my-site-here/) Currently not doing the extra/experimental database stuff (database charset and engine) Future Possibilities Install specified modules along with the ProcessWire install Profile previews? Credits @ryan: for the ProcessWire installer @abdus: for the index.config.php reading from JSON idea @swampmusic: for the challenge Video Demo Demo showing how quick module works on a remote server [YMMV!]. Video shows downloading and processing two versions of ProcessWire (~takes 7 seconds) and installing a single/stand-alone ProcessWire 3 site using the new Admin Theme UI Kit (~2 seconds) on a remote server. Screens 1 2
    2 points
  13. This week there's a new ProcessWire core version posted (version 3.0.79), as well as a new version of AdminThemeUikit posted. However, the focus this week was on covering issue reports and fixing little things, and I don't think it makes an interesting blog post, so we'll skip it this week. If you want to see what's new for 3.0.79, be sure to check out the dev branch commit log. While the changes to AdminThemeUikit were pretty little, the admin theme does continue to evolve nicely and I recommend grabbing it if you are using a previous version. Actually, even if you aren't using a previous version, I recommend grabbing it (along with the latest PW core version). Other than for a few small details and rare cases—in my opinion it's nearly production ready. Thanks for reading, and I hope everyone has a great weekend!
    2 points
  14. OK, php defined settings are working: 1) process page config: 2) contents of example.php <?php namespace ProcessWire; $fieldOptions = array(); foreach(wire('fields') as $field) { if ($field->flags & Field::flagSystem || $field->flags & Field::flagPermanent) continue; if(count($field->getFieldgroups()) === 0) $fieldOptions[$field->id] = $field->label ? $field->label . ' (' . $field->name . ')' : $field->name; } return [ 'colors' => [ 'name' => 'radiostest2', 'type' => 'radios', 'label' => $this->_('Color Set'), 'options' => [ 'classic' => $this->_('Classic'), 'warm' => $this->_('Warm'), 'modern' => $this->_('Modern'), 'futura' => $this->_('Futura') ], 'value' => 'classic', 'optionColumns' => 1 ], [ 'name' => 'fields', 'label' => 'Fields', 'description' => 'Select the fields you want to delete', 'notes' => 'Note that all fields listed are not used by any templates and should therefore be safe to delete', 'type' => 'checkboxes', 'options' => $fieldOptions, 'required' => true ] ]; 3) result:
    2 points
  15. User agent blocking may help. From Perishable Press: <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_USER_AGENT} ^$|\<|\>|\'|\%|\_iRc|\_Works|\@\$x|\<\?|\$x0e|\+select\+|\+union\+|1\,\1\,1\,|2icommerce|3GSE|4all|59\.64\.153\.|88\.0\.106\.|98|85\.17\.|A\_Browser|ABAC|Abont|abot|Accept|Access|Accoo|AceFTP|Acme|ActiveTouristBot|Address|Adopt|adress|adressendeutschland|ADSARobot|agent|ah\-ha|Ahead|AESOP\_com\_SpiderMan|aipbot|Alarm|Albert|Alek|Alexibot|Alligator|AllSubmitter|alma|almaden|ALot|Alpha|aktuelles|Akregat|Amfi|amzn\_assoc|Anal|Anarchie|andit|Anon|AnotherBot|Ansearch|AnswerBus|antivirx|Apexoo|appie|Aqua_Products|Arachmo|archive|arian|ASPSe|ASSORT|aster|Atari|ATHENS|AtHome|Atlocal|Atomic_Email_Hunter|Atomz|Atrop|^attach|attrib|autoemailspider|autohttp|axod|batch|b2w|Back|BackDoorBot|BackStreet|BackWeb|Badass|Baid|Bali|Bandit|Baidu|Barry|BasicHTTP|BatchFTP|bdfetch|beat|Become|Beij|BenchMark|berts|bew|big.brother|Bigfoot|Bilgi|Bison|Bitacle|Biz360|Black|Black.Hole|BlackWidow|bladder.fusion|Blaiz|Blog.Checker|Blogl|BlogPeople|Blogshares.Spiders|Bloodhound|Blow|bmclient|Board|BOI|boitho|Bond|Bookmark.search.tool|boris|Bost|Boston.Project|BotRightHere|Bot.mailto:craftbot@yahoo.com|BotALot|botpaidtoclick|botw|brandwatch|BravoBrian|Brok|Bropwers|Broth|browseabit|BrowseX|Browsezilla|Bruin|bsalsa|Buddy|Build|Built|Bulls|bumblebee|Bunny|Busca|Busi|Buy|bwh3|c\-spider|CafeK|Cafi|camel|Cand|captu|Catch|cd34|Ceg|CFNetwork|cgichk|Cha0s|Chang|chaos|Char|char\(32\,35\)|charlotte|CheeseBot|Chek|CherryPicker|chill|ChinaClaw|CICC|Cisco|Cita|Clam|Claw|Click.Bot|clipping|clshttp|Clush|COAST|ColdFusion|Coll|Comb|commentreader|Compan|contact|Control|contype|Conc|Conv|Copernic|Copi|Copy|Coral|Corn|core-project|cosmos|costa|cr4nk|crank|craft|Crap|Crawler0|Crazy|Cres|cs\-CZ|cuill|Curl|Custo|Cute|CSHttp|Cyber|cyberalert|^DA$|daoBot|DARK|Data|Daten|Daum|dcbot|dcs|Deep|DepS|Detect|Deweb|Diam|Digger|Digimarc|digout4uagent|DIIbot|Dillo|Ding|DISC|discobot|Disp|Ditto|DLC|DnloadMage|DotBot|Doubanbot|Download|Download.Demon|Download.Devil|Download.Wonder|Downloader|drag|DreamPassport|Drec|Drip|dsdl|dsok|DSurf|DTAAgent|DTS|Dual|dumb|DynaWeb|e\-collector|eag|earn|EARTHCOM|EasyDL|ebin|EBM-APPLE|EBrowse|eCatch|echo|ecollector|Edco|edgeio|efp\@gmx\.net|EirGrabber|email|Email.Extractor|EmailCollector|EmailSearch|EmailSiphon|EmailWolf|Emer|empas|Enfi|Enhan|Enterprise\_Search|envolk|erck|EroCr|ESurf|Eval|Evil|Evere|EWH|Exabot|Exact|EXPLOITER|Expre|Extra|ExtractorPro|EyeN|FairAd|Fake|FANG|FAST|fastlwspider|FavOrg|Favorites.Sweeper|Faxo|FDM\_1|FDSE|fetch|FEZhead|Filan|FileHound|find|Firebat|Firefox.2\.0|Firs|Flam|Flash|FlickBot|Flip|fluffy|flunky|focus|Foob|Fooky|Forex|Forum|ForV|Fost|Foto|Foun|Franklin.Locator|freefind|FreshDownload|FrontPage|FSurf|Fuck|Fuer|futile|Fyber|Gais|GalaxyBot|Galbot|Gamespy\_Arcade|GbPl|Gener|geni|Geona|Get|gigabaz|Gira|Ginxbot|gluc|glx.?v|gnome|Go.Zilla|Goldfire|Google.Wireless.Transcoder|Googlebot\-Image|Got\-It|GOFORIT|gonzo|GornKer|GoSearch|^gotit$|gozilla|grab|Grabber|GrabNet|Grub|Grup|Graf|Green.Research|grub|grub\-client|gsa\-cra|GSearch|GT\:\:WWW|GuideBot|guruji|gvfs|Gyps|hack|haha|hailo|Harv|Hatena|Hax|Head|Helm|herit|hgre|hhjhj\@yahoo|Hippo|hloader|HMView|holm|holy|HomePageSearch|HooWWWer|HouxouCrawler|HMSE|HPPrint|htdig|HTTPConnect|httpdown|http.generic|HTTPGet|httplib|HTTPRetriever|HTTrack|human|Huron|hverify|Hybrid|Hyper|ia\_archiver|iaskspi|IBM\_Planetwide|iCCra|ichiro|ID\-Search|IDA|IDBot|IEAuto|IEMPT|iexplore\.exe|iGetter|Ilse|Iltrov|Image|Image.Stripper|Image.Sucker|imagefetch|iimds\_monitor|Incutio|IncyWincy|Indexer|Industry.Program|Indy|InetURL|informant|InfoNav|InfoTekies|Ingelin|Innerpr|Inspect|InstallShield.DigitalWizard|Insuran\.|Intellig|Intelliseek|InterGET|Internet.Ninja|Internet.x|Internet\_Explorer|InternetLinkagent|InternetSeer.com|Intraf|IP2|Ipsel|Iria|IRLbot|Iron33|Irvine|ISC\_Sys|iSilo|ISRCCrawler|ISSpi|IUPUI.Research.Bot|Jady|Jaka|Jam|^Java|java\/|Java\(tm\)|JBH.agent|Jenny|JetB|JetC|jeteye|jiro|JoBo|JOC|jupit|Just|Jyx|Kapere|kash|Kazo|KBee|Kenjin|Kernel|Keywo|KFSW|KKma|Know|kosmix|KRAE|KRetrieve|Krug|ksibot|ksoap|Kum|KWebGet|Lachesis|lanshan|Lapo|larbin|leacher|leech|LeechFTP|LeechGet|leipzig\.de|Lets|Lexi|lftp|Libby|libcrawl|libcurl|libfetch|libghttp|libWeb|libwhisker|libwww|libwww\-FM|libwww\-perl|LightningDownload|likse|Linc|Link|Link.Sleuth|LinkextractorPro|Linkie|LINKS.ARoMATIZED|LinkScan|linktiger|LinkWalker|Lint|List|lmcrawler|LMQ|LNSpiderguy|loader|LocalcomBot|Locu|London|lone|looksmart|loop|Lork|LTH\_|lwp\-request|LWP|lwp-request|lwp-trivial|Mac.Finder|Macintosh\;.I\;.PPC|Mac\_F|magi|Mag\-Net|Magnet|Magp|Mail.Sweeper|main|majest|Mam|Mana|MarcoPolo|mark.blonin|MarkWatch|MaSagool|Mass|Mass.Downloader|Mata|mavi|McBot|Mecha|MCspider|mediapartners|^Memo|MEGAUPLOAD|MetaProducts.Download.Express|Metaspin|Mete|Microsoft.Data.Access|Microsoft.URL|Microsoft\_Internet\_Explorer|MIDo|MIIx|miner|Mira|MIRE|Mirror|Miss|Missauga|Missigua.Locator|Missouri.College.Browse|Mist|Mizz|MJ12|mkdb|mlbot|MLM|MMMoCrawl|MnoG|moge|Moje|Monster|Monza.Browser|Mooz|Moreoverbot|MOT\-MPx220|mothra\/netscan|mouse|MovableType|Mozdex|Mozi\!|^Mozilla$|Mozilla\/1\.22|Mozilla\/22|^Mozilla\/3\.0.\(compatible|Mozilla\/3\.Mozilla\/2\.01|Mozilla\/4\.0\(compatible|Mozilla\/4\.08|Mozilla\/4\.61.\(Macintosh|Mozilla\/5\.0|Mozilla\/7\.0|Mozilla\/8|Mozilla\/9|Mozilla\:|Mozilla\/Firefox|^Mozilla.*Indy|^Mozilla.*NEWT|^Mozilla*MSIECrawler|Mp3Bot|MPF|MRA|MS.FrontPage|MS.?Search|MSFrontPage|MSIE\_6\.0|MSIE6|MSIECrawler|msnbot\-media|msnbot\-Products|MSNPTC|MSProxy|MSRBOT|multithreaddb|musc|MVAC|MWM|My\_age|MyApp|MyDog|MyEng|MyFamilyBot|MyGetRight|MyIE2|mysearch|myurl|NAG|NAMEPROTECT|NASA.Search|nationaldirectory|Naver|Navr|Near|NetAnts|netattache|Netcach|NetCarta|Netcraft|NetCrawl|NetMech|netprospector|NetResearchServer|NetSp|Net.Vampire|netX|NetZ|Neut|newLISP|NewsGatorInbox|NEWT|NEWT.ActiveX|Next|^NG|NICE|nikto|Nimb|Ninja|Ninte|NIPGCrawler|Noga|nogo|Noko|Nomad|Norb|noxtrumbot|NPbot|NuSe|Nutch|Nutex|NWSp|Obje|Ocel|Octo|ODI3|oegp|Offline|Offline.Explorer|Offline.Navigator|OK.Mozilla|omg|Omni|Onfo|onyx|OpaL|OpenBot|Openf|OpenTextSiteCrawler|OpenU|Orac|OrangeBot|Orbit|Oreg|osis|Outf|Owl|P3P|PackRat|PageGrabber|PagmIEDownload|pansci|Papa|Pars|Patw|pavu|Pb2Pb|pcBrow|PEAR|PEER|PECL|pepe|Perl|PerMan|PersonaPilot|Persuader|petit|PHP|PHP.vers|PHPot|Phras|PicaLo|Piff|Pige|pigs|^Ping|Pingd|PingALink|Pipe|Plag|Plant|playstarmusic|Pluck|Pockey|POE\-Com|Poirot|Pomp|Port.Huron|Post|powerset|Preload|press|Privoxy|Probe|Program.Shareware|Progressive.Download|ProPowerBot|prospector|Provider.Protocol.Discover|ProWebWalker|Prowl|Proxy|Prozilla|psbot|PSurf|psycheclone|^puf$|Pulse|Pump|PushSite|PussyCat|PuxaRapido|PycURL|Pyth|PyQ|QuepasaCreep|Query|Quest|QRVA|Qweer|radian|Radiation|Rambler|RAMP|RealDownload|Reap|Recorder|RedCarpet|RedKernel|ReGet|relevantnoise|replacer|Repo|requ|Rese|Retrieve|Rip|Rix|RMA|Roboz|Rogue|Rover|RPT\-HTTP|Rsync|RTG30|.ru\)|ruby|Rufus|Salt|Sample|SAPO|Sauger|savvy|SBIder|SBP|SCAgent|scan|SCEJ\_|Sched|Schizo|Schlong|Schmo|Scout|Scooter|Scorp|ScoutOut|SCrawl|screen|script|SearchExpress|searchhippo|Searchme|searchpreview|searchterms|Second.Street.Research|Security.Kol|Seekbot|Seeker|Sega|Sensis|Sept|Serious|Sezn|Shai|Share|Sharp|Shaz|shell|shelo|Sherl|Shim|Shiretoko|ShopWiki|SickleBot|Simple|Siph|sitecheck|SiteCrawler|SiteSnagger|Site.Sniper|SiteSucker|sitevigil|SiteX|Sleip|Slide|Slurpy.Verifier|Sly|Smag|SmartDownload|Smurf|sna\-|snag|Snake|Snapbot|Snip|Snoop|So\-net|SocSci|sogou|Sohu|solr|sootle|Soso|SpaceBison|Spad|Span|spanner|Speed|Spegla|Sphere|Sphider|spider|SpiderBot|SpiderEngine|SpiderView|Spin|sproose|Spurl|Spyder|Squi|SQ.Webscanner|sqwid|Sqworm|SSM\_Ag|Stack|Stamina|stamp|Stanford|Statbot|State|Steel|Strateg|Stress|Strip|studybot|Style|subot|Suck|Sume|sun4m|Sunrise|SuperBot|SuperBro|Supervi|Surf4Me|SuperHTTP|Surfbot|SurfWalker|Susi|suza|suzu|Sweep|sygol|syncrisis|Systems|Szukacz|Tagger|Tagyu|tAke|Talkro|TALWinHttpClient|tamu|Tandem|Tarantula|tarspider|tBot|TCF|Tcs\/1|TeamSoft|Tecomi|Teleport|Telesoft|Templeton|Tencent|Terrawiz|Test|TexNut|trivial|Turnitin|The.Intraformant|TheNomad|Thomas|TightTwatBot|Timely|Titan|TMCrawler|TMhtload|toCrawl|Todobr|Tongco|topic|Torrent|Track|translate|Traveler|TREEVIEW|True|Tunnel|turing|Turnitin|TutorGig|TV33\_Mercator|Twat|Tweak|Twice|Twisted.PageGetter|Tygo|ubee|UCmore|UdmSearch|UIowaCrawler|Ultraseek|UMBC|unf|UniversalFeedParser|unknown|UPG1|UtilMind|URLBase|URL.Control|URL\_Spider\_Pro|urldispatcher|URLGetFile|urllib|URLSpiderPro|URLy|User\-Agent|UserAgent|USyd|Vacuum|vagabo|Valet|Valid|Vamp|vayala|VB\_|VCI|VERI\~LI|verif|versus|via|Viewer|virtual|visibilitygap|Visual|vobsub|Void|VoilaBot|voyager|vspider|VSyn|w\:PACBHO60|w0000t|W3C|w3m|w3search|walhello|Walker|Wand|WAOL|WAPT|Watch|Wavefire|wbdbot|Weather|web.by.mail|Web.Data.Extractor|Web.Downloader|Web.Ima|Web.Mole|Web.Sucker|Web2Mal|Web2WAP|WebaltBot|WebAuto|WebBandit|Webbot|WebCapture|WebCat|webcraft\@bea|Webclip|webcollage|WebCollector|WebCopier|WebCopy|WebCor|webcrawl|WebDat|WebDav|webdevil|webdownloader|Webdup|WebEMail|WebEMailExtrac|WebEnhancer|WebFetch|WebGo|WebHook|Webinator|WebInd|webitpr|WebFilter|WebFountain|WebLea|Webmaster|WebmasterWorldForumBot|WebMin|WebMirror|webmole|webpic|WebPin|WebPix|WebReaper|WebRipper|WebRobot|WebSauger|WebSite|Website.eXtractor|Website.Quester|WebSnake|webspider|Webster|WebStripper|websucker|WebTre|WebVac|webwalk|WebWasher|WebWeasel|WebWhacker|WebZIP|Wells|WEP\_S|WEP.Search.00|WeRelateBot|wget|Whack|Whacker|whiz|WhosTalking|Widow|Win67|window.location|Windows.95\;|Windows.95\)|Windows.98\;|Windows.98\)|Winodws|Wildsoft.Surfer|WinHT|winhttp|WinHttpRequest|WinHTTrack|Winnie.Poh|wire|WISEbot|wisenutbot|wish|Wizz|WordP|Works|world|WUMPUS|Wweb|WWWC|WWWOFFLE|WWW\-Collector|WWW.Mechanize|www.ranks.nl|wwwster|^x$|X12R1|x\-Tractor|Xaldon|Xenu|XGET|xirq|Y\!OASIS|Y\!Tunnel|yacy|YaDirectBot|Yahoo\-MMAudVid|YahooSeeker|YahooYSMcm|Yamm|Yand|yang|Yeti|Yoono|yori|Yotta|YTunnel|Zade|zagre|ZBot|Zeal|ZeBot|zerx|Zeus|ZIPCode|Zixy|zmao|Zyborg [NC] RewriteRule ^(.*)$ - [F,L] </IfModule> Or block requests directly if `name` parameter includes your strings RewriteCond %{QUERY_STRING} (^|&)name=(Not%20Recognized|No%20Subscription%20Detected)(&|$) RewriteRule ^(.*) - [F] It looks like "hackers" are using a paid tool with expired/pirated/trial license
    2 points
  16. $reason parameter looks like it's for internal use $page = $this->checkAccess($page); if(!$page || $_page->id == $config->http404PageID) { return $this->pageNotFound($_page, $this->requestURL, true, 'access not allowed'); } Why do you need $reason for?, if you want to narrow down 404s to missing template files than you can use wire()->addHookBefore('ProcessPageView::pageNotFound', function (HookEvent $e) { $page = $e->arguments('page'); if ($page->id && !$page->template->filenameExists()) { // page exists, but template file does not } });
    2 points
  17. Maybe it would help to know a little more about your scenario. Perhaps you could try Page::viewable - it checks to see if a template file exists?
    2 points
  18. Well, your code runs slow because: You have multiple nested loops, each of which is querying pages, which would be slow by definition. Inside every loop you're getting, resizing images, which is even slower than querying pages (on the first request, at least) You seem to use repeater fields to store metadata for images, and each repeater item has page reference fields, which slows down your code even more Points for improvement: Use Image Extra module instead of repeaters for saving extra data with images Use WireCache a lot Check out this thread Not a speed improvement, but escape long spreads of HTML from PHP, you don't have to write all of your HTML into strings http://php.net/manual/en/language.basic-syntax.phpmode.php Look up ternary operators and elvis operator Instead of writing CSS into HTML elements, use CSS classes and separate your CSS from HTML. You can refactor $bgcolor as .bg-white and .bg-gray, for example That said, here's an reformatted/rewritten version of your code: <?php namespace ProcessWire; ?> <style> .bg-white { background-color: #fff; } .bg-gray { background-color: #e4e4e4; } .group { min-height: 110px; } .prod-list-category-label { font-size: .7em; } .list-headline { font-size: .8em; } .featured-icons-list { margin: 2em .5em; } </style> <div class='span_12_of_12'> <?php foreach ($products as $p): ?> <?php // $bgcolor = $sum % 2 == 0 ? '#fff' : '#e4e4e4'; $bgClass = $sum % 2 == 0 ? 'bg-white' : 'bg-gray'; $par = $p->parent; $img = $p->prod_image; $thumb = $img->pim2Load('squarethumb100')->canvas(100,100,array(0,0,0,0),'north',0)->pimSave()->url; ?> <?php // Replace inline styles with classes ?> <div class="section group <?= $bgClass ?>"> <div class="col span_2_of_12 hide" data-match-height="<?= $p->title ?>"> <a href="<?= $p->url ?>"><span class="product-image-box"><img src="<?= $thumb ?>" alt="<?= $p->title ?>" title="<?= $p->title ?>"></span></a> </div> <div class="col span_6_of_12" data-match-height="<?= $p->title ?>"> <div class="prod-list-name-label"><a href="<?= $p->url ?>"><?= $p->title ?></a></div> <?php if ($page != $par): ?> <?php // Replace inline styles with classes ?> <div class='prod-list-category-label'>Category: <a href='<?= $par->url ?>'><?= $par->title ?></a></div> <?php endif; ?> <?php // Replace inline styles with classes ?> <div class="list-headline"><?= $p->headline ?></div> <div class="learn-more-buttons-sm"> <a href='<?= $p->url ?>' title='Product Specs and Documentation'><span class='find-out-more-button' style='font-size: .8em;'><i style='font-size: .8em;' class='fa fa-lightbulb-o' ></i> Learn More</span></a> </div> </div> <div data-match-height='<?= $p->title ?>' class='col span_4_of_12'> <?php if ($p->prod_feat_imgs->count > 0): ?> <div class='featured-icons-list'> <?php foreach ($p->prod_feat_imgs as $feat) { $icon = $pages->get("$feat->prod_featicon_pages"); if ($icon->image) { // Loop up Elvis operator $icontitle = $feat->prod_feat_textlang ?: $icon->title; $out .= "<img src='" . $icon->image->size(35, 35, $imgOptions)->url . "' alt='" . $icontitle . "' title='" . $icontitle . "' class='listing-feat-icon' style='margin-right: .5em;' />"; } } ?> </div> <?php if($p->prod_product_line){ foreach($p->prod_product_line as $pline) if($pline->image) { $out .= "<div style='height: 35px;'>\n"; $out .= "<img src='{$pline->image->size(75,35,$imgOptions)->url}' alt='{$pline->title}' />"; $out .= "</div>"; } } ?> <?php endif; ?> </div> </div> <?php endforeach; ?> </div>
    2 points
  19. Sounds awesome, thanks! How about changing the name to Settings Factory? Train doesn't sound proper to me.
    2 points
  20. Agreed! While I love the idea of this module and especially the easy setup of option type fields (checkbox, ASM, etc) without needing to point to somewhere for the source of the options, I would like to be able to define the options via PHP when I want. Maybe the approach I have taken in AdminActions might work ok here as well, eg: $fieldOptions = array(); foreach($this->wire('fields') as $field) { if ($field->flags & Field::flagSystem || $field->flags & Field::flagPermanent) continue; if(count($field->getFieldgroups()) === 0) $fieldOptions[$field->id] = $field->label ? $field->label . ' (' . $field->name . ')' : $field->name; } return array( array( 'name' => 'fields', 'label' => 'Fields', 'description' => 'Select the fields you want to delete', 'notes' => 'Note that all fields listed are not used by any templates and should therefore be safe to delete', 'type' => 'checkboxes', 'options' => $fieldOptions, 'required' => true ) );
    2 points
  21. Tracy will report all those errors even with debug mode off - just use the "Force superuser into development mode" option so that it shows on a live production site when you are logged in.
    2 points
  22. awesome project! an additional "newsletter subscribe" addon for the frontend would be awesome and a listing for the subscribers in the backend. So alternatively you can send the newsletter to these recipients instead of a txt file.
    2 points
  23. I thought all the bundled actions were enabled for superuser by default on install, but now I see that superuser is preselected for all the actions but this doesn't actually take effect until you save the module config. Maybe that is intentional in Admin Actions, but in general I think that is something it's better to avoid. Users might navigate away without realising they need to save to confirm the settings on screen. And even if they later return to the module config, there is nothing to indicate that the settings they see on screen are not actually live. It can be a problem for the module dev too if you are expecting those default config values that show on screen to actually be available in the module. It's caught me out a few times in my own modules - I've learned now that a better approach is to define the config defaults in the construct() method so that the config that users see is what is actually in effect, right from the moment of install. Anyway, I see where you're coming from regarding the activation of actions, although personally I don't see any downside to having all the actions active and listed on the Admin Actions page (for superusers) so they can be explored. It's the step of adding actions to the menu where I would be limiting it to just regularly-used actions.
    2 points
  24. Not sure why you are seeing that. What you should see is an exception message that explains things pretty well: IDs are the way to go for that sort of selector, so I would stick to what you have changed to rather than install PagePaths. Edit: it just occurred to me that you may not be seeing the exception if do not have debug mode enabled. In /site/config.php: $config->debug = true; You should enable debug mode while you are developing a site and then disable debug mode when the site goes to production.
    2 points
  25. Hi @adrian, a few ideas for tweaks to AdminActions... How about adding a $title option inside the action class? To specify a title rather than deriving it from the camel-case in the action class name. It doesn't look quite right if there is a capitalised acronym in the class name. Maybe new actions should be automatically enabled for the superuser role? To save having to visit the module config and enable each manually. The "Actions" tooltip appears when hovering any part of actions list in the module config (it comes from the title attribute on the inputfield wrapper). This is a bit distracting so maybe remove that?
    2 points
  26. @matjazp Just sent in a pull request for your consideration. I was in need of an admin edit option that would allow me to specify files in the templates/styles/skin subdirectory of a site under development. I therefore added a recursive scan of the templates/ directory to the config options for the root of the editable files. I also noticed that whenever I used the module to edit one of the files (hosted on a linux server) , git would pick up every line of the file as having changed, not just the little edits that had actually been made. It seems that the post of the file through to the back end was converting all the original linux end-of-line characters into Windows end-of-lines. This makes finding and describing edits made by clients very difficult. I therefore added a config option for you to specify what line endings to use on save (Win/Mac/*nix) so the files show no eol differences and git diff shows only what was really changed. Small update to the choice of font-awesome icon too. Thanks for considering!
    2 points
  27. https://www.baumrock.com/portfolio/individuelles-crm-und-controlling-tool/ I'm happy to share my biggest and most interesting ProcessWire project so far with you It's a 100% custom office-management solution that helps my client to keep track of all their contacts, projects and finance/controlling stuff. Conception was done back in 2016 and the software is productive since begin of this year. My client is very happy with the result and so am I. Some technical insights: Everything is done inside the PW Admin. I'm using the Reno Theme with some custom colors. In the beginning I was not sure if I should stay with the pw admin or build my own admin-framework but now I'm VERY happy that I went with PW Almost all of my custom Process Pages use my RockDatatables module - there are still some limitations but without it, this project would not have been possible For the charts I used Google Charts and chartjs - both play well together with the datatables and make it possible to display filtered data instantly: also my handsontable module was created for this project to have a nice and quick option for matrix data inputs: Lister and ListerPro were no options as i needed much more flexibility regarding data presentation (like colorization, filtering and building sums of selected rows): invoices are highly customisable as well and easy to create. PDFs are created by php and mPDF by the way: all data is dummy data populated via my Module RockDummyData have a nice weekend everybody
    1 point
  28. In the admin we have an option to set a sorting for children using one field only. I have a problem with children getting sorted randomly when using a date field that is the same for multiple children. Usually we would sort by date and by ID or title, but we are only allowed to specify one field at a time. The problem with this is that once you edit one of those children, the sorting is randomly changed (actually everytime you edit a children) That's not really nice and very confusing. I had to use a dirty hook to change the children sorting one parent manually. $this->addHookBefore("ProcessPageList::find", $this, "sortingChildren"); public function sortingChildren(HookEvent $event){ $sel = $event->arguments("selectorString"); $page = $event->arguments("page"); if($page->template == "news-category"){ $event->setArgument("selectorString", $sel . ",sort=-datetime, sort=-id"); } } Maybe there's already a way I don't know or a module? But then I think this should be in core of course and not a module. Thanks.
    1 point
  29. If you want to use $page->render(), then $page has to have a template file, but if a page is viewable (i.e. has a template file) you won't get a 404 error. I'm not sure you can have both. If you want the same template file for multiple templates, then you can set it so in template settings > File tab
    1 point
  30. If you mean PW in general, then... Add Material Icons: yes Replace FA with Material icons: no While that long list of Material Icons looks nice at first (and I use them often) there is a heap of essential things missing. A couple of random examples: Facebook, external link.
    1 point
  31. I found the culprit. I commented out the RewriteBase / line in my htaccess... # ----------------------------------------------------------------------------------------------- # 11. OPTIONAL: Set a rewrite base if rewrites aren't working properly on your server. # And if your site directory starts with a "~" you will most likely have to use this. # ----------------------------------------------------------------------------------------------- RewriteBase /
    1 point
  32. I am worried that there won't be any 404 responses to any requests to your site though. It still feels like it's the wrong solution to whatever the problem is, but maybe I am not understanding the use case.
    1 point
  33. should be really easy, you'd just need create a php file that returns an array of inputfields; DO you think i should try and integrate that array-config, or just allow the php file to return an array, like in Adrian's example? right now i just feed the array converted from json right into the form; the values are almost all automatically read from the module config except for checkbox that takes some special handling.. // ------------------------------------------------------------------------ // USER DEFINED FIELDS // ------------------------------------------------------------------------ if(wire('page')->st_filepath) { $path = wire('config')->paths->templates . wire('page')->st_filepath; $settingsKey = $this->wire('page')->name; $modData = $this->modules->getConfig('SettingsTrain'); $thisData = isset($modData[$settingsKey]) ? $modData[$settingsKey] : null; if(file_exists($path)) { $json = file_get_contents($path); $fArray = json_decode($json, true); // update values foreach($fArray as $key => $cField) { $name = $cField['name']; $cField['value'] = $thisData ? $thisData[$name] : ''; // or get default value in json file? if($cField['type'] == 'InputfieldCheckbox' && $cField['value'] == 1) { $cField['checked'] = 'checked'; } $fArray[$key] = $cField; } $form->add($fArray); } } i started building it on Thursday night, and have probably like 7 hrs on it, mostly figuring out the logic of the process pages each saving their unique data to the main module that extends wiredata... this also might need someone else to have a look at; i do have it working fine, but there could most likely be some places where the code could be tightened up. yeah, i was wondering how that was going to work with this; for some people they may want to use the json system, but it should also support php; So in your example if the file ending is php, then the process module would do this: $fArray = wireRenderFile($path); instead of this: $json = file_get_contents($path); $fArray = json_decode($json, true); ok possibly, yeah i couldn't come up with anything and needed to start building it with some name... the FA train icon does look cool though! How about a vote on what to call it?... Settings Factory could be a good option... I do understand that this is a downside of using a process module for this; so usually i setup a media type page with 1 image and then i let the users upload the images to their media library; then i let them choose the page (image) from this module, somethings using Selectize, or just a plain page select.. not ideal; once i have the code on github, anyone is certainly welcome to insert some code into the logic somewhere to allow images to work, would be cool..
    1 point
  34. I haven't tried it with image input, but you are able to use InputfieldImage and InputfieldFile in isolation. I'm using it with one of my modules like this: [ 'type' => 'file', 'name' => 'recipientListFile', 'id' => 'recipientListFile', 'label' => $this->_('Recipient Emails File'), 'description' => $this->_('The file must contain one record per line'), 'notes' => $this->_('First column in CSV files is assumed to be email addresses'), 'maxFiles' => 1, 'extensions' => 'csv txt', 'noAjax' => true, 'uploadOnlyMode' => true, 'destinationPath' => $temp->get(), 'attr' => [ 'required' => true, ], // 'uploadOnlyMode' => true, 'overwrite' => true, 'icon' => 'file-text-o', ], Then save the file using $temp = $this->files->tempDir($this->className); $recipientList = (new WireUpload('recipientListFile')) ->setDestinationPath($temp->get()) ->setValidExtensions(['csv', 'txt']) ->execute(); As InputfieldImage extends InputfieldFile, it should be quite similar.
    1 point
  35. Thanks for this great module, @Robin S! Can i request to add this as I still think this is useful, and it fits within your module:
    1 point
  36. Hmm, something went awry on my blog after an upgrade from .72 to .79: Call to a member function get() on null at /site/modules/AdminThemeUikit/init.php:121: $classes['item'] = 'Inputfield {class} Inputfield_{name}' . ($adminTheme->get('useOffset') ? ' InputfieldIsOffset' : ''); Although, it must be because I updated the core before the module...? Edit: Indeed, that was the case. All fixed.
    1 point
  37. @ryan Could you please consider working on the collapse/expand feature of Inputfields of AdminThemeUikit so that it makes more sense when Inputfields are side by side? It would be great if they could slide sideways to make room for more usable space. Here is a mockup to show what I mean:
    1 point
  38. Wouldn't mind having this feature in the core either. Just saying Admittedly my first impression was "oh man, not again". Some sites (Basecamp, Dropbox) have recently implemented their own flavors of "breadcrumb dropdowns", and in my opinion both get it wrong. In Basecamp clicking what seems like a link to the previous item actually opens a dropdown with that item and its children, while in Dropbox deeper down all but the last two levels are removed from the breadcrumbs and the first item turns into a dropdown. Both make sense in their own ways, but a) break the "open this link in a new tab" feature and b) are totally unexpected and confusing, at least to me. Your approach makes use of the spacer items, which not only makes more sense in this context, but also doesn't break the familiar breadcrumb pattern. Thumbs up for this
    1 point
  39. Definitely. One of my pet peeves is desktop-sized images being served to mobile users. Now that browsers have a decent solution for this, there's no excuse not to do things properly. In our case there are also some useful modules for handling the "tricky" parts
    1 point
  40. What about this in your ready.php file: $this->addHookBefore("InputfieldCheckboxes::render", function($event) { if($event->object->id != 'Inputfield_roles') return; $optionsWithTitles = array(); foreach($event->object->options as $id => $name) { $roleTitle = $this->wire('roles')->get($id)->title; $optionsWithTitles[$id] = $roleTitle != '' ? $roleTitle . ' ('.$name.')' : $name; } $event->object->options = $optionsWithTitles; }); In this screenshot I have only added a title to the "Editor" role:
    1 point
  41. Done. https://github.com/horst-n/WireMailSmtp/pull/9/ Here's how it looks now:
    1 point
  42. great to hear that you are working on that, indeed very needed! how do you plan to send the emails? imho it would be nice to be able to easily integrate services like https://www.sparkpost.com or https://sendy.co/ . i'm not sure but i think for large amounts of emails it is better to use some kind of substitution based sending method (https://developers.sparkpost.com/api/substitutions-reference.html ). good luck for this module and have fun
    1 point
  43. just add the "pw-panel" class to your link. if you want it to reload on every open add "pw-panel-reload". see here for details: https://github.com/processwire/processwire/blob/master/wire/modules/Jquery/JqueryUI/panel.js
    1 point
  44. @Mike Rockett That looks even better - having it as a popup would be good.
    1 point
  45. I wouldn't start by installing a Module such as Blog etc. I believe for you, a better approach would be to gradually build your own from scratch. You'll learn a lot more that way. Start with a few individual pages based on a template called "blog-post" and add a few basic fields. Just title, summary and body would be fine. Once you can make and view them then try to create a blog overview or homepage displaying the title and summary of each and a link to each full post. Lets say that template is called blog-posts (plural) You'll get a real kick out of just being able to do that and you're just echoing simple tags and getting to know "foreach" statements. Then try to add a date field to each blog post and add that to both templates. Later you can try adding a main image, maybe even an author and then move onto tags and categories. I think you'll get much more enjoyment out of building your own and a better understanding of the fundamentals.
    1 point
  46. I would argue that as @louisstephens pointed out, much of the php you need is simple echo'ing and foreach'ing and a willingness to learn. As for the problem with the blog, perhaps we should get the blog module author @kongondo in on the discussion to see if he can get you up and running.
    1 point
  47. Fbg13 is right, in that you will need a working knowledge of php. However, my knowledge of php is not up to par (to some of the members here), but I am still able to code out a lot of "complex" pages. It can be as simple as getting the page title/body (very basic example. <h1><?php echo $page->title; ?></h1> <p><?php echo $page->body; ?></p> I guess what I am saying is not to get too discouraged. A simple site (with a bit of knowledge in php) can be made quite quickly. I have learned more than ever with just doing and various other forums. Also, the forums here are great to search through to find answers to your questions. Looking back, I have asked some pretty "silly" questions that now I can tackle no problem.
    1 point
  48. This is the first time that I'm going to post anything under the showcase forum, although I have a few ProcessWire powered websites under my belt. This one is special because I think the use case is somewhat unique. Caltex Loyalty Club - initial the situation Caltex Loyalty Club is a customer loyalty and rewards program of Caltex Palawan aimed to provide exciting promos and incentives their customers' continuous patronage. Caltex Palawan originally bought their system from a large software company that also provides card-based solutions. The previous system consist of the following: two high-end Dell servers that are located in two separate Caltex' offices traditional EFTPOS devices for reading loyalty cards MIfare RFID cards as loyalty cards Running within one of the Dell servers was a crude and barely usable loyalty/rewards manager application that runs the whole thing. Here's what I mean: You're free to imagine what the rest of the application looks like. The other dell server acts as a VPN server through which all the EFTPOS devices and the application server connect to. To cut the long story short, this setup was running smoothly for a total of 3 weeks before problems started popping up, mostly because VPN server did not have a static IP address and the EFTPOS devices could not connect. The developers refused to provide service to the system because Caltex Palawan does not want to shoulder the travel and boarding expenses of the developers (since it was just working 3 weeks). We were called in at this point (we being a local tech solutions provider in Puerto Princesa), and we made the VPN server work, but other problems soon surfaced. The whole system was barely working for about 3 years when they finally decided they were fed up with the customer complaints they keep getting everyday. Our Solution We studied the existing system for quite some time to examine where the problems we're coming from. The most obvious one we found was that because the servers were located inside Caltex Palawan's offices, the servers were prone to downtimes caused by power outages and internet connectivity problems. It was obvious that the better way would be a web-based solution that would always be online. We also wanted to replace the bulky and outdated EFTPOS devices with android based NFC device that are more portable, and easier to work with. We retained the cards that originally came with the system since there are thousands left unused, but eventually replaced them with NTAG stickers, and newer cards. To sum it up: A web-based application to manage the loyalty / rewards system Android based NFC device to read the loyalty cards NTAG stickers to act as loyalty cards ProcessWire to the Rescue Having used ProcessWire before, it was our best choice, after considering using Laravel, and other frameworks, because of ProcessWire's key strengths: all custom fields - no unnecessary bloat powerful api scalability Although this straight up looks like it's been lifted from processwire.com's front page, but this really is the case, and these are all we need from a web-application framework to do almost anything! All custom fields Since we are working with a unique dataset, it's impossible for us to find anything out there that would have anything even remotely close to what we need. In the beginning we were planning to use custom database tables that we would deploy alongside ProcessWire. I even posted one time in the forum, asking if there's any way to integrate an ORM library with ProcessWire, and the answer I got was that it would be redundant, and almost surely unnecessary. And this turned out exactly the case! When we designed our database (using ERDs), we we're delighted at how closely we were able to replicate our relational design using templates, fields, and pages. This is mainly due to FieldtypePage. We were able to create meaningful relationships within our templates. We ended up with ~60 templates and ~70 fields. Powerful API About 70% of our code are API calls. The rest are just control structures and simple computations. That's how powerful the ProcessWire API is. So powerful that we did not even need to write a single sql query to complete the whole project. We needed to handle user login, API has it. Session handling, API has it. Selecting and manipulating huge amount of interrelated data, the API has it! Scalability At the onset of the project, the existing CLC program already has some 20 thousand members with hundreds of thousands of transactions. Right now, our current system has around 500,000 pages and counting and were not experiencing any slowdown. How we used ProcessWire The first thing that we decided that our client would not be able to see the processwire admin page. We wanted to present them with a simplified UI that does not present them with anything they don't need. We created a whole frontend UI for the client to use. We had custom forms for all the pages that they can create, and all the actions that they can do. We, on the otherhand, use the admin backend thoroughly in continuously developing, and supporting the system. What the clients see vs what we see: Our setup ProcessWire 2.8 running on a LEMP stack DigitalOcean droplet AjentiV VPS manager Modules we used We used a very minimal amount of modules for the project: ImportPagesCSV - to import the data migrated from the old system FieldtypeDecimal - for all our decimal values Modified RestHelper - from clsource for all the communication between ProcessWire and our android POS app Modified PagesSum from esrch ProcessSelectorTest - for quickly checking some selections Things we had to do on our own Frontend user login Frontend password recovery Fine-grained permission handling for users Cron jobs for scheduled tasks. The rest are API calls, and business logic. The Result Our Caltex Loyalty Club web application is now running on its sixth month without so much as a hiccup! Compared to the previous system that was averaging 200 transactions per day, we are now getting 800 and it's growing. We are running 10 campaigns and promos simultaneously across 18 Caltex Stations all over Palawan, with 30 android NFC terminals communicating to a single ProcessWire installation. We are very happy with ProcessWire in terms of performance, ease of use, and most importantly it's simple and yet very powerful functionality as a web-application framework even though it doesn't primarily market itself as one. PS. Also one of the best things we experienced while doing this project is the awesome, unparalleled community support. Throughout the project, although we had a lot of moments when we just couldn't figure out what to do, never once did we have to ask a question in the forum. A quick search here and there, and someone already helped someone else that faced the same problem we were having. It's almost as if people are being paid to diligently answer all the questions! We most of the time just had to like an answer that was already there! Screenshots and photos Android POS terminals and CSR training
    1 point
  49. For anyone that has the map hidden initially before being opened resulting in bad rendering of the map. I tried the following that was mentioned here on this post but with no success. After a while(2 hours ) scratching my head I changed it to the following: setTimeout(function() { google.maps.event.trigger($("#mgmap1")[0], 'resize'); mgmap1.map.setCenter(mgmap1.options.center); }, 250); Now works perfectly.
    1 point
×
×
  • Create New...