Jump to content

kongondo

PW-Moderators
  • Posts

    7,379
  • Joined

  • Last visited

  • Days Won

    139

Everything posted by kongondo

  1. 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.
  2. 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
  3. Christmas has come early! Thanks Ryan!
  4. Thanks Arjen! I forgot about that (I even liked that post! ). I'll test it and report back..
  5. 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
  6. 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...
  7. Hi Alex. Welcome to PW and the forums. See screenshot below. Those particular settings are configured under ADMIN > SETUP > FIELDS > INPUT
  8. 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
  9. 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
  10. 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....
  11. 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..
  12. 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/
  13. In a function or module use wire. Otherwise use $page or $pages
  14. 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?
  15. 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
  16. 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/
  17. @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 .
  18. 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
  19. 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...
  20. Or even... $pages->find("template=event, has_parent!=2, status=unpublished"); http://processwire.com/api/selectors/#access_control
  21. On dev branch... echo $config->version;//returns 2.3.2 - documented here echo $config->systemVersion;//returns 3 What gives? Edit: OK, answer here for $config->systemVersion class SystemUpdater extends WireData implements Module, ConfigurableModule { public static function getModuleInfo() { return array( 'title' => __('System Updater', __FILE__), // Module Title 'summary' => __('Manages system versions and upgrades.', __FILE__), // Module Summary 'permanent' => true, 'singular' => true, 'autoload' => false, /** * This version number is important, as this updater keeps the systemVersion up with this version * */ 'version' => 3, ); } protected $configData = array( // systemVersion generally represents the DB schema version, but // can represent anything about the system that's related to the individual installation. // 0 = the first version when this module was created, should remain there. 'systemVersion' => 0, );
  22. TK3, It is very hard to debug without more information. Please post: Using the forum code utility, the code in your template file around the problem area Details of the modules you have installed (though I don't think this is the problem) If you have a test site (front-end) that we can look at, you can post a link here too In your TEST site (local not remote), turn on debug in your /site/config.php. Are there errors reported when you load the page with the empty body? Check your /site/assets/logs/errors.txt file. Any errors reported? Do you get errors/weirdness with other fields? E.g. rich text area field? What if the field is not empty, do you still see the <span> in the output/source? Are you using the default ProcessWire install or are you using some other profile? (Foundation, Bootstrap, etc.) It could be coming from some Javascript. Are you using some JS in that template file? Edit: Searching your output above Google has led me to the module ProcessHeatmap (Heatmap by Userclicks). Are you using that? See below code from here public function setOffset(){ //we assume that the $page->body is inside main layout and add a span //hidden span indicates offset left to make fluid layout handling possible $this->page->body .= '<span class="offset" style="margin:0;padding:0;position:absolute;width:0px;height:0px;"> </span>'; }
×
×
  • Create New...