Jump to content

kongondo

PW-Moderators
  • Posts

    7,529
  • Joined

  • Last visited

  • Days Won

    161

Everything posted by kongondo

  1. Hi Wes, Try, "allow unpublished pages" under advanced options when editing the page field Edit 1: My bad; that's only in the dev version..but it's throwing up errors anyway...testing some more Edit 2: If I use normal page selection (without custom selector) it works and allows selection and saving of unpublished pages. If I use a custom selector on the Page Ref Field, I get the WireException/error Page $value is not valid for $field->name (line 359 of FieldtypePage.module). Hmmm, strange..
  2. Thanks, will test. Btw, does it matter that the folder name has changed from TextformatterHannaCode to ProcessHannaCode from the point of view of installing/updating via Modules Manager? I recently got a gotcha when updating a module (I think it was PageDelete) who's folder name had changed to ProcessPageDelete or similar). I got a cannot redeclare class fatal error. What happened is that the update did not replace the old folder, hence, the class was getting called twice. Maybe the module name had changed as well, come to think of it..
  3. Just tested on 2.3.2. Save does not continue editing; instead, it saves then goes to the add new Hanna Code screen Edit: The above refers to when you create a new Hanna Code. I was expecting save to let me continue editing; however, it takes me to the add new screen. In the case of existing Hanna Codes, if I edit them, save works as stated; I can continue editing.
  4. Hehe. I'm a strange guy I knew that'd catch on...hehe. Nah, just a typo, in my haste to demo what I meant
  5. Christmas has come early! Thanks Ryan!
  6. Thanks Arjen! I forgot about that (I even liked that post! ). I'll test it and report back..
  7. So am digging deep into the world of module development. Exciting! PW makes it easy to quickly create form elements for use in Process Modules UI. I have searched the forums and looked at different modules but have not been able to find out if it is possible to wrap form elements in one InputfieldWrapper or InputfieldMarkup as shown in the attached screenshot (#2). I don't want the individual form elements within the wrapper/container to also have the collapsible panel wrapper which is what happens by default whenever you add an inputfield in a module (screenshot #1). The only wrapper I want is the outer one. Is this doable using the API or I'll need to fiddle with CSS or directly include the form elements myself? Hope this makes sense. Thanks. What I am getting: What I would like: Edit Possibly related http://processwire.com/talk/topic/59-module-want-form-builder/?p=611
  8. I can think of different ways to deal with this one. Printout: As someone suggested in the forums (Maybe Renobird?), they print out a list of all the fields on their site and what the fields are for. Admin page: Maybe create a hidden page, under Admin, with a list of all the fields and what they represent for each company? Custom Admin page: Create a custom admin page using Diogo's Admin Custom Page module that renders only for superuser showing you the list of fields and what they represent for each company. Maybe this is best because you can view it as read only and can get as creative as you want with the output Just thinking out loud here...
  9. Hi Alex. Welcome to PW and the forums. See screenshot below. Those particular settings are configured under ADMIN > SETUP > FIELDS > INPUT
  10. Andrew, That's obviously MODX syntax. Before I answer your question, I have two things to say: 1. Please, if you have a question, post in either the General Support or the Getting Started or the API & Templates sections of these forums according the the relevance of the question.. This is the Tutorials Section of the Board where your posts/threads should be teaching something rather than asking questions, thanks. 2. Have you read this guide to PW for those familiar with MODX? If not, please do. It will answer questions such as above. As you'll see from that guide, apart from the name of a page, all other fields on a page are custom fields. There is no default title, keywords, description, etc fields. You will have to create those fields and add them to your template. Then, create a page and make it use that template. If you want your keywords to be unique to each page, then do it this way (illustrated below). If you want your keywords to be the same across the whole site, then you can create a page that will act as a settings page. For now, I'am not going to go into details about such a setup but will let you explore the system more. OK, so, 1. Create the following fields types a. Name: keywords; Type: text or text area (depending on how much space you want) b. Name: description; Type: text area Make sure to give the fields labels and a "description" if you want to. Your PW install should already come with the title field (if you installed the default PW profile) 2. Add the fields to your template. Order the fields in the template as you wish 3. Create a page and make it use the template in #2 4. You will see the keywords, description and title fields on that page. Enter your keywords and description in the fields and edit the page as you wish. Hit save. 5. In your template file <meta name="keywords" content="<?php echo $page->keywords;?>"/> <meta name="description" content="<?php echo $page->description;?>"/> <meta name="robots" content="All"/> <title><?php echo $page->title;?></title> You don't need the <base> tag in ProcessWire. You can get fancy and only echo out the keywords and description if they are actually present on your page. How to do that? That'll be your homework
  11. I've tried both the Hanna Code docs example and jmartsch PHP example but no dice. They both don't work for me. Nothing gets written or output. No errors, nothing. What exactly are they meant to do? Write to Hanna or output from Hanna? I am interpreting "populate" as creating a Hanna Code block. I think I am wrong
  12. On the contrary; I don't think it is a waste of time (although I've never used it myself). I'm a Zurb Foundation fan, some folks prefer Bootstrap, others roll out their own. I suppose there are those who would appreciate YUI. Horses for courses they say....
  13. I've used that before. It is good. Basically, you will be scraping your site. Is it possible to download those HTML files locally? You can then scrape the site locally. Scraping can be pretty memory intensive..
  14. Some of the few (MailChimp) modules WIP available I believe... http://processwire.com/talk/topic/4126-mailchimp-list-synchronisation/ http://processwire.com/talk/topic/2705-early-stage-inputfieldmailchimpcampaign http://processwire.com/talk/topic/1678-module-questions-newslettermailchimp/
  15. In a function or module use wire. Otherwise use $page or $pages
  16. Diogo, Am not sure that's what he's after? The screenshot is of the Tempate->Basics screen where you can add fields to the template. He wants those rows/list of fields (the asmList), in addition to the field name, to show the field label. What you are suggesting is for the Page Tree, no?
  17. Hi nfil, Don't know whether I've said welcome to PW or not. If not, welcome . Are you allowing multiple or single file uploads on that field? If single... if ($page->pdf_docs_insert){ $myfile = $page->pdf_docs_insert; echo "<a href='{$myfile->url}' target='_blank'>$myfile->description</a>"; } else { // ... } If multiple files, the field returns an array, hence you need to loop through it... if ($page->pdf_docs_insert){ $myfiles = $page->pdf_docs_insert; foreach ($myfiles as $myfile) { echo "<a href='{$myfile->url}' target='_blank'>$myfile->description</a>"; } } else { // ...please give me some files mate! } Check out the cheatsheet for more info
  18. Hi John, Not sure if I get you correctly but you cannot place PHP code in PW fields (if that is what you mean by programming code). Luckily, we have the module Hanna Code that will do exactly what you want...it will render blocks of PHP, JS and HTML code using a tag system... http://modules.processwire.com/modules/process-hanna-code/ http://processwire.com/talk/topic/3745-hanna-code/
  19. Complimenti!!!
  20. @Adrian, What approach would you use if there were multiple images associated with a page? That is what I can't get my head around, doing it cleanly without cheating .
  21. You are welcome. It is never advisable to mess about with the core code. I believe a module (it is not hard to create a field type, for instance) can be used to add that functionality or there could be another way of doing it via API. I am too tired to think straight now but there will be better answers here soon I know Edit: In fact, I don't see why you can't use API in your template file to output a URL with a particular image...maybe a module is an overkill in this case. I can't think; I need to sleep hehe. Let's wait for the geniuses to answer this one
  22. Images are stored in /site/assets/files/1234/ where 1234 = id of the page containing that/those image(s) .. The reference to the image (the image name, e.g. myimage.png) is stored in the database in a table which bears the image field name. E.g. if you created an image field in PW called photos, in the DB it will be named field_photos. That is where the image(s) name will be stored...The names and other data are stored as rows in that table. Hence, if you created an image field that can only hold 1 image, you will only see I row in the respective table. If you have an image field for multiple images, you will see multiple rows. The columns in the table help identify what image belongs to what page. The columns are: pages_id: (whose image is this column . This will be equivalent to the name of the folder in /site/assets/files/1234. In this case pages_id=1234) data: name of the image sort: sort order of the images; only useful when there's multiple images of course description: self explanatory modified: ditto created: ditto So how does PW know what type a field is? That information is stored in the table fields for each and every field in your site. If this sort of thing interests you, have a look in the PW database using phpMyAdmin or similar... . It will help you better understand the PW DB schema and the genius that it is..simple but effective. As for image compression, I only have limited knowledge about that at present so can't answer definitively...
  23. Or even... $pages->find("template=event, has_parent!=2, status=unpublished"); http://processwire.com/api/selectors/#access_control
  24. Love your site Simon Welcome to the forums!
×
×
  • Create New...