-
Posts
7,479 -
Joined
-
Last visited
-
Days Won
146
Everything posted by kongondo
-
Best practice for backend set up this type of home page
kongondo replied to Alfred's topic in Getting Started
@Alfred, I must admit I haven't read your post thoroughly but would like to suggest you look at PageTableExtended...it might be of help https://processwire.com/talk/topic/7459-module-pagetableextended/ -
What Adrian said
-
Welcome to ProcessWire and the forums Mukarram. Here you go: https://github.com/ryancramerdesign/ProcessWire/releases - all the way down to 2.2.4 Any particular reason why you need the older version? Just curious.
-
I'd say to first test with a 'normal' PW comments setup outside Blog pages. https://processwire.com/api/fieldtypes/comments/
-
Btw, seems the inline creation of new tags changes the tag's title case to lower case (must be the js). Since this are used to create page titles, is it possible to change this behaviour? i.e. If I enter the tag 'Tech', I expect that and not 'tech'.
-
In that case there is something else wrong with your setup. It is difficult to tell without seeing/testing on the actual site Any other changes you have made to your template files? Some other modules possibly interfering? What about testing comments + form apart outside of the Blog (non-blog pages)?
-
Aah, I think I know what is happening....It is not directly related to Blog but the settings of your comments field. Edit the field blog_comments. Go to.. Admin > Setup > Fields > Edit Field: blog_comments. Go to the Details tab. In the second row on that settings page, under Redirect after comment post?, I think you have that checkbox checked. Read the info there and decide whether you want to have it redirect or not.
-
Not sure what funkiness is going on there. Have a look at the demo blog-post.php. All you need to render both comments and the form is MarkupBlog's method renderComments() (form will only be displayed if the page uses the template blog-post). $blog = $modules->get("MarkupBlog"); echo $blog->renderComments($page->blog_comments);
-
Cool. No worries.
-
Yes, see my post above. I have edited it. Note there is a difference between template and template file in ProcessWire. Where you add your code above is in the template file. What I am talking about is the template, in the admin
-
Did you see my post just above yours?
-
@closer12, did you enable pagination for the template that page uses? E.g. Admin > Setup > Templates Edit Template: basic-page in the URLs tab
-
Or just use a ProcessWire URL field rather than a text field...it will automatically add the http:// for you... ...and you can edit it if it is https:// you want..
-
It is hookable...(unless am mixing things up). See this and this...
-
@doolin, You can add as many custom fields to ImageExtra module as you wish. Just add a url field for your custom external links and you are good to go...see otherField below More here https://processwire.com/talk/topic/7910-module-fieldtype-image-extra-multi-language/
-
$page->children("sort.... from smallest to greatest number
kongondo replied to Matte85's topic in General Support
Hi Matte85, Welcome to PW and the forums... Technically, this is a PHP issue and not a PW one . What you are looking for is PHP's natsort — Sort an array using a "natural order" algorithm or the related natcasesort — Sort an array using a case insensitive "natural order" algorithm. The implementation of the former can be seen in the following posts: https://processwire.com/talk/topic/3392-emulate-natsort/ https://processwire.com/talk/topic/3805-trying-to-sort-by-number-in-string/ https://processwire.com/talk/topic/6144-how-to-natural-sort-a-pagearray/ https://processwire.com/talk/topic/4587-sort-images-by-title-in-image-inputfield/ A shortcoming is that you probably want to grab a limited number of children based on the natural sort, rather than sorting after grabbing them...Not sure how to overcome this. Edit: I am late to the party as usual! Beaten by @Adrian -
Issue fixed in the dev branch - by including a trailing space much earlier....
-
selectable pages defined dynamically for Page field in repeater
kongondo replied to valan's topic in General Support
Trying to understand this...What exactly do you mean by 'current repeater item'? -
Ryan, you have a MySQL syntax error in SelectableOptionManager.php. This prevents values from being updated. You are missing a 'space' in the sql statement on line #548 the concatenation gets mangled up resulting in this: Option 14 'New York': SQLSTATE[HY093]: Invalid parameter number: parameter was not defined The fix is simple: Change: $sql .= "WHERE fields_id=:fields_id AND option_id=:option_id"; To: $sql .= " WHERE fields_id=:fields_id AND option_id=:option_id"; I see the 'space' on line #543 but I suppose that's only for multi-language environments? I guess I am getting the above error because I am testing on a single language environment. $sql .= ", $name=:$name "; Not sure how the suggested change will affect those in multi-language environments, but am sure you will sort it out Also filed a bug report in GitHub case you miss this.
-
OK, I see and agree with your point guys...
-
I see, but adding pages below has the advantage of being able to add multiple pages in one swoop. I wouldn't want to reinvent the wheel myself, but of course, it's your decision I edited my post above: Did you see my request?
-
This is in-built in ProcessWire and it already works with your Inputfield. I have tested and it works fine unless I am missing something? A request: Do you know if it is possible to sort the tags by drag and drop like in asmSelect? In your case this would have to be horizontal, of course..
-
Like this: <img src='https://github.com/LostKobrakai/InputfieldChosenSelect/raw/master/screen.png' /> in your README Since this will be the modules support forum, please add instructions here on how to install and use it. Also add in your README, thanks.
-
You can only sort by fields that exist in that template or internal properties (e.g., sort). There is no field called 'date' in the template 'blog-post'...unless you added it yourself? Otherwise, the following should work. I don't know why you had two $pages->find()? Did you also add the field 'blog_summary'? <!-- CENTRE COLUMN - MAIN --> <div class="small-12 medium-9 large-9 columns "> <!-- START Nested Column containing featureimage and post-summary --> <?php $blogposts = $pages->find("template=blog-post, sort=-blog_date, sort=sort"); foreach ($blogposts as $b) { echo " <div class='row row-spacer'> <div class='small-12 large-6 columns'><img src={$b->blog_images->first()->url} /></div> <div class='small-12 large-6 columns'> <div class='posts-date'>{$b->blog_date}</div> <h3><a href='$b->url'>{$b->title}</a></h3> {$b->blog_summary}</div> </div> "; } ?> <!-- END Nested Column containing featureimage and post-summary --> </div>
-
DISCLAIMER: The Blog Module already provides an in-built Cleanup Utility that enables you to remove all its components. As per the instructions in the module's README, which must be thoroughly read before using the module (as instructed in the first post in this thread and in various other places), in case you wish to uninstall Blog, you FIRST have to run the Cleanup Utility whilst logged in as a Supersuser. Further, as of this writing, a clear warning text is now visible right above the uninstall button in Blog's module configuration screen reminding you of this fact. Failure to follow the correct uninstall routine means that you will not be able to reinstall Blog until you (often manually) delete all the leftover components (that the Cleanup Utility would have removed for you) - a tedious, frustrating and painful exercise. In case, for some reason, you did not adhere to the above instructions, I am providing in the link below code to help you automatically remove any Blog leftovers in order for you to reinstall the module (if you wish, of course) or in case you just want to clean up. On install, Blog stores the IDs of its main pages in its configuration settings. Uninstalling Blog means those settings are lost. Hence, if using this code, the only way to find Blog pages is by their templates which in some cases, may not be very foolproof. This and others issues are documented in the utility code linked to below. This code is provided as is, with no obligation on my part, without any warranty, implied or otherwise. In plain English; whilst I have thoroughly tested the code, you will be using it at your own risk for which I will bear no responsibility . The code should ONLY be used in case you reversed the uninstall procedure; otherwise use the normal procedure (see README) to uninstall Blog. Link: blogCleaner Instructions: Back up your database and template files Log in as a Supersuser Copy and paste the Cleaner code in the link above at the very top of a template file Save the template file On the frontend, visit a page that uses that template file The Cleaner's screen will be loaded Tick the checkbox to agree you 'know what you are doing, etc..' Complete the questions about the type of Blog you had before the uninstall Run the Cleaner If no errors found a success message will be displayed In your Admin, check that things went OK (and if need be re-run the Cleaner) Restore the template file in #3 to its previous state Save the template file Reinstall Blog (optional ) Screens ------------------------ PS: I hope none of the above comes across as rude or forceful. I'll read this again in the morning just to be sure or in case someone PM's me, whichever is the sooner . I will then amend as appropriate.