-
Posts
7,529 -
Joined
-
Last visited
-
Days Won
161
Everything posted by kongondo
-
What doesn't work? No link output? Or does it output an internal PW page link? Also, is it uurl or curl?
-
@eyesee, Welcome to the forums. I am wondering if your added functionality is similar to one of these similar modules? http://modules.processwire.com/modules/page-protector/ http://modules.processwire.com/modules/protected-mode/
-
@Mass Harry, There is no need to double post. I will delete your other post Please use the 'forum post code function' to format your code. It is really difficult to follow what you've posted Even so, I haven't seen a question in there. What exactly is your question?
-
I am assuming you mean admin login page? Disclaimer!: Tested and it works but not sure if this is the right place or way to do it..! You might want to wait for the masters to confirm In your /site/templates/admin.php.... //if config debug == true; redirect elsewhere...(you can also redirect to a PW page url) if($config->debug) $session->redirect('http://www.google.com'); But how will you login yourself?
-
On the general question of 'using MVC' in PW, there have been a number of thoughts... https://processwire.com/talk/topic/4892-an-almost-mvc-approach-to-using-templates/ https://processwire.com/talk/topic/6699-use-processwire-in-a-mvc-like-fashion-or-just-use-pages/ https://processwire.com/talk/topic/4947-the-pw-mvc-project/ https://processwire.com/talk/topic/6735-another-idea-for-a-processwire-mvc-approach/ https://processwire.com/talk/topic/5031-get-started-with-pw-mvc-module-by-harmster/ https://processwire.com/talk/topic/821-question-understanding-templates%E2%80%93advanced-templating/ As for your plugging in MVC-built functionality from elsewhere, that seems to be a separate question - about bootstrapping other applications in PW. That is possible, but you might have to contend with variable, etc. collisions, hence the need for namespacing. Others with a better grasp of this will chime in
-
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...