- 
                
Posts
7,529 - 
                
Joined
 - 
                
Last visited
 - 
                
Days Won
160 
Everything posted by kongondo
- 
	Thanks guys... I located the raw date problem... During the last commit to allow use of date format specified in blog_comments to be displayed for comments I forgot that on a fresh install, one has to first save what is specified in FieldtypeComments's dateFormat for that to kick in (see the fields Details Tab). The default 'relative' is not saved unless the user actually saves the field (normal for fields). So, in our case, the dateFormat was empty and as a fall-back, you were being shown the unformatted date as per line #247 in WireDateTime formatDate(). I've committed a fix. Update: Blog 2.3.9 Fixes above bug PS: There's still 1 or 2 pending requests that I haven't yet gotten time to address...
 - 
	I bet you forgot to save
 - 
	Honestly I'm dumbfounded by this one. Maybe it is a MAMP issue? Did you change any other module code? What happens is you try to save the settings page directly (/your-blog-page/settings/ That's a timestamp (because of some reason an unformatted blog_date is being returned). Again, I have not see such behaviour nor has it been reported before. Are you able to install Tracydebugger or similar to try and debug this? Are you able to test in a different environment?
 - 
	@quickjeff, No need to edit the modules files .. #1. I am afraid I don't follow. There is no setting for displaying summaries. Do you mean the setting for Posts summary length? All settings are saving just fine here. What's your environment? #2: $small = false, the default (which you seem to have changed) will display the full post. To display summaries, just call renderPosts() with $small=false. Examples: // call the module - MarkupBlog $blog = $modules->get("MarkupBlog"); // render a limited number of summarised posts $content = $blog->renderPosts("limit=5", true); // render a limited number of full posts $content = $blog->renderPosts("limit=5"); Blog API (incomplete) is here
 - 
	
	
				Gallery: A photo album module (preview)
kongondo replied to kongondo's topic in Module/Plugin Development
Can't believe it's almost 2 years. Unfortunately in between 'life' happened . - 
	Hi @pmichaelis, Glad you like the module. Have a look at the current_class_level. That in conjunction with current_class should probably do the trick (the 'active' bit).
 - 
	@Günter, Why not use one of the other examples of recursive menu methods in the forums?
 - 
	Hi biber, There's quite a number of ways to achieve this. Here's a couple for starters: https://processwire.com/talk/topic/2475-quick-tip-for-testing-on-live-website/
 - 
	For some methods you might want to just return parent::nameOfMethod()
 - 
	#1 Yes...that is what this would entail. This approach is for those who either have a temporary need (e.g. until a PR is accepted) OR for those who've bought a one-way ticket; no looking back . Going by what you are saying, this is not for you #2 Yes, what you are describing is called overriding in PHP (and many other OOP languages). You would have access to protected and public methods and properties but not private ones. Overriding occurs many times in Fieldtypes. Take for example the method ___getConfigInputfields() that's present in quite a number of Fieldtypes. FieldtypeComments has that method. But that's not its origin. FieldtypeComments extends the class FieldtypeMulti, so it inherits it through this class. But wait a minute. FieldtypeMulti is not the origin of that method. Instead, FieldtypeMulti also inherited the method from its parent class, Fieldtype. Look the table here 'Methods inherited from Fieldtype' (you can follow the links deep into the recesses of PW ;-)) Here's some links to helpful resources about this (and similar/related) OOP concepts http://stackoverflow.com/questions/2994758/what-is-function-overloading-and-overriding-in-php http://www.techflirt.com/tutorials/oop-in-php/overloading-and-overriding.html https://www.codecademy.com/forum_questions/516763621eb11e53a20018d5 http://www.phpro.org/tutorials/Class-Hierachies-And-Overriding.html http://www.phpzag.com/overloading-and-overriding-in-php/ http://php.net/manual/en/language.oop5.visibility.php http://stackoverflow.com/questions/4361553/php-public-private-protected http://www.techflirt.com/tutorials/oop-in-php/visibility-in-php-classes.html
 - 
	One way to do it: Grab a coffee (optional) Copy over the core module to your /site/modules/FieldtypeCommentsCustom/ Rename the files, e.g. FieldtypeComments.module to FieldtypeCommentsCustom.module Rename all PHP classes in that folder to e.g. 'OriginalNameCustom'. For instance: FieldtypeComments could become FieldtypeCommentsCustom Make your changes to the files in FieldtypeCommentsCustom folder Install the module FieldtypeCommentsCustom (could have been done before #5 if no database schema changes made) Create a field of type FieldtypeCommentsCustom, add it to your template, edit a page...the usual drill Take your third sip of the coffee in #1 (optional)
 - 
	@Loges #1: I now get it. When you click the link 'Add Media' the modal it opens is essentially the Media Library part of Media Manager, i.e. ProcessMediaManager, but styled slightly differently from what you see when you directly access the Media Library from the ProcessWire admin menu. I am working on a way to only show navigation/tab items that are relevant to the current field you are inserting to. So, in your case, if you only had images, the only tabs you should see are 'Images' and 'Upload'. If you had allowed, say documents and video, then, you would only see 'Documents Video Upload'. You need a media tab since you would need a way to navigate back to your Media Library if you went to 'Upload' tab. #2. Highlighting of the active media (i.e. the media being previewed) has been sorted in MM v003. Did you get my email notification? As for highlighting the crop, edit, icons, that should be sorted with some minimal training. They will always be on the right hand side. #3 Sort of covered in #1? #4 I'll look into insert and close
 - 
	Yes, use a custom date field. We do this in the module Blog with an autoload module. Here's the code if you are interested.
 - 
	A bit of history: PageTable is part of the ProFields. Thanks to Avoine (the sponsors) it has been made available as a free ProField. Here's a link to more info about the different ProFields, thanks to a question by @cstevensjr
 - 
	Not currently, you can't. Maybe you could submit a (pull) request to Ryan? I like the idea of sorting by page
 - 
	
	
				Module Comments Manager Enhanced (proof-of-concept)
kongondo replied to kongondo's topic in Modules/Plugins
Forgot to note here that the ideas here have now (have since Dec 2015!) been implemented in the core (ProcessCommentsManager). - 
	Pagination is not possible in the Inputfield (unless something has changed that I don't know about). For that number of comments, why not use the (new) Comments Manager? You can do your pagination there, filtering, bulk edit, etc.
 - 
	I believe this is the one: https://processwire.com/talk/topic/2038-distinct-selector-in-processwire/?p=43720
 - 
	@kazu, have a read here: https://processwire.com/docs/security/file-permissions/. It should help you decide. Rather than relax permissions that much, if you have the access, it is better to tweak file ownership or groups. Check who owns the files: PW, Apache, nobody, etc. and tweak those (as per the link above).
 - 
	Not wanting to rain on your parade, but seeing that you are missing out on all the fun of playing with ProcessWire, I'd suggest that for starters you install ProcessWire the 'normal' way. Download a zip file and copy that to your server, unzip it, call that location in your browser and click through . Alternatively, get @Soma's online installer thingy (you can edit it to grab the version of PW you want) and it will do the downloading for you plus start the installation. Totally painless. Later on, if you are still up to it, you can play around with deploying via git ... Just my 2p Edit: Oops. welcome to the forums! (where's my manners, tsk, tsk)
 - 
	Probably best to point out (to new users) that setAndSave() is a recent addition. Otherwise you might bet questions why is it not working for me?
 - 
	The /src-min/snippets/ folder could also be slimmed down There's scripts in there for languages like ruby, python, etc.
 - 
	
	
				Wishlist: Group field for grouping fields
kongondo replied to steveooo's topic in Wishlist & Roadmap
Couldn't Profields Table accomplish this? - 
	
	
				Why checking existence of a session variable always return false
kongondo replied to adrianmak's topic in General Support
PHP type comparison tables http://php.net/manual/en/types.comparisons.php - 
	Documentation Update (Work in Progress!) http://blog.kongondo.com/ Blog docs are back! Still work in progress though. Some latest methods and almost all methods' $options not yet covered in the docs. Will get there eventually. Site may not work properly on all devices (you know me and CSS, sigh... )