-
Posts
7,479 -
Joined
-
Last visited
-
Days Won
146
Everything posted by kongondo
-
Mac installs: https://processwire.com/talk/topic/5797-setup-a-processwire-environment-on-a-fresh-macos-x-install/ https://processwire.com/talk/topic/4917-the-admin-cannot-be-reached-in-new-installation/ https://processwire.com/talk/topic/98-installing-on-mac-localhost-going-all-sorts-of-wrong/ https://processwire.com/talk/topic/6803-help-needed-for-local-setup-on-a-mac/
-
A different way of using templates / delegate approach
kongondo replied to Soma's topic in API & Templates
For those reading this great thread, if you haven't seen it, Ryan has neatly summarised various approaches in the Tutorials section How to structure your template files: http://processwire.com/docs/tutorials/how-to-structure-your-template-files/ -
A different way of using templates / delegate approach
kongondo replied to Soma's topic in API & Templates
@Adrian, Thanks for this. Not sure your solution would work in Soma's approach? Remember, there is only one template file in his approach (main.php) which has most of the html. The .inc come after <body>. Hence $head in main.php would remain undefined. Your solution would work with Ryan's approach though. I could be wrong -
A different way of using templates / delegate approach
kongondo replied to Soma's topic in API & Templates
@thistimj, Yes. Something like this in the head of your main.php should do it: if ($page->template == "special") { echo '<script src="' . $config->urls->templates . 'js/modernizr.foundation.js"></script>'; echo '<link rel="stylesheet" href="' . $config->urls->templates . 'css/style.css" type="text/css" media="all">'; } -
@Teppo. Works like a charm with CSS and PHP. It remembers code type. With HTML on one occasion it remembered, then forgot. JS, it hasn't remembered. For CSS and PHP code on frontend is generated with lang=PHP or lang=CSS, i.e <pre class='php' lang='php'>. With the HTML and JS, they only get the class=html...etc. No worries, I can live with it like this..Thanks again.
-
Thanks Teppo...this is what I was missing (I think): pre[class,lang](*); Let me try it out...Otherwise it was just generating <pre class=php>....</pre>
-
How to generate /install for a site profile
kongondo replied to rooofl's topic in Themes and Profiles
Hi EtienneOz, Welcome to the forums. Have a look at Adrian's Migrator module. I think it could accomplish this. -
@Teppo. Care to elaborate pls? I tried your trick but pbckcode still doesn't remember language when I edit a code block. Thanks
-
Admin > Access > Permissions....is one way of finding out (although in there you might find other non-PW permissions)...
-
Yeah, incidentally I mentioned this elsewhere today. I got stuck on some recursive function . It's not high on my priority list atm but will have a rethink at some point...
-
@OrganizedFellow Thanks. Glad you like the module. You've been away a while...
-
I agree on the need for such tutorials. Meanwhile, have search of the forums (using Google, of course); all your requests have been previously addressed in some way. These will give you an idea on how to approach the issues....But I agree, tutorials will explain them better and will be more visible than searching the forums for hidden gems
-
One of the reasons I created my module... https://processwire.com/talk/topic/2787-custom-menu-not-related-to-page-tree/
-
Thanks for the install instructions. I guess that's where I went wrong...
-
Oops I thought I added no error messages. Yeah, no errors...yes debug is on...Let me try again...
-
Nico, After installing any of the two testing themes I get a blank white screen everywhere (back and front)...am I missing something? On Dev PW 2.4.11.
-
Well your idea to build this using PW pages has just given me an idea...In my case I was using a custom database to allow for any menu item (be it an external or internal link) to be a parent or child of any other menu item (i.e. not align to the PW tree). I got stuck at deleting and recursively re-parenting menu items....
-
Sparrow, no need to apologise for anything . Your question will help the next guy. Once I write the API documentation, you'll realise that you can also tweak this Blog to make fundamental layout changes. You can output bits and pieces (tags, posts, categories, authors, comments, etc) anywhere using its API since it is a PW module. All these bits and pieces are independent of each other. This is similar to PW pages in the sense that you can output page fields anywhere in any order in your site or even not output any of the fields.
-
You mean like this one? https://processwire.com/talk/topic/4451-module-menu-builder/ I got stuck somewhere and stopped developing it....In the (probably very distant future) I might rethink and revisit it . I am liking your eagerness to learn module creation and the inner architecture of PW. Keep the fire burning and enjoy the ride ! I can promise you two things: (i) As you hit the 'aha moments', you'll wonder why you didn't discover PW earlier . (ii) You'll realise even more that Ryan Cramer is an unsung hero; what he's done with the PW API is amazing; he's carefully thought out (almost) everything.... ...respect... Happy coding...
-
This post is in response to this question posted on GitHub Comment Layout First, I'd like to reiterate that this Blog Module does not use any CSS framework. The Blog (site) Profile (on which Blog Module is based) uses the Skeleton CSS framework. However, in this Module's demo/example output/template files, I have used PocketGrid CSS. It is not a requirement. You can use whichever CSS framework (or not) you wish. The following example is for this module (but is equally applicable to the Blog Profile). It is very easy to style Blog's comments by targeting the output HTML IDs and Classes in your CSS. In my example template files, my custom styles are in blog.css. The example code below is an HTML output of Comments where 'comments are allowed'. <div id="comments"> <span class="num-comments-icon">2</span> <h4>Comments</h4> <ul class="comments CommentList"> <li class="comment CommentListItem" id="comment1"> <p class="comment-head CommentHeader">Comment by kongondo on 13 April 2014 11:16 pm</p> <div class="comment-body CommentText"><p>Simply the best CMS.</p></div> </li> <li class="comment CommentListItem" id="comment10"> <p class="comment-head CommentHeader">Comment by kongondo on 23 May 2014 2:42 pm</p> <div class="comment-body CommentText"><p>ProcessWire rocks, yeah!</p></div> </li> </ul> <!--CommentForm--> <div id="CommentForm" class="CommentForm_new"> <h4>Post a comment</h4> <form id="CommentForm_form" action="./#CommentForm" method="post"> <p class="CommentForm_cite"> <label for="CommentForm_cite">Your Name</label> <input type="text" name="cite" class="required" required="required" id="CommentForm_cite" value="" maxlength="128"> </p> <p class="CommentForm_email"> <label for="CommentForm_email">Your E-Mail</label> <input type="text" name="email" class="required email" required="required" id="CommentForm_email" value="" maxlength="255"> </p> <p class="CommentForm_text"> <label for="CommentForm_text">Comments</label> <textarea name="text" class="required" required="required" id="CommentForm_text" rows="5" cols="50"></textarea> </p> <p class="CommentForm_submit"> <button type="submit" name="CommentForm_submit" id="CommentForm_submit" value="1">Submit</button> <input type="hidden" name="page_id" value="2488"> </p> </form> </div><!--/CommentForm--> </div> So, you do not need to tweak any file. All you need is to style the output. For the PHP stuff, I am in the process of writing some documentation... Hope this answers your query. Thank you for using Blog
-
How to manage template files inside a module
kongondo replied to enricob's topic in Module/Plugin Development
Only thing to add here is that it is only one of the various approaches possible. Work with what makes sense most to you and what you are currently developing -
How to manage template files inside a module
kongondo replied to enricob's topic in Module/Plugin Development
Yes, you are missing something cool ....You do not need to have a template file named 'abc.php' to use with a template called 'abc'. You can tell PW that you will be using an alternative name for you template file. Have a look at the links I provided. For example, you can have one template file called 'main.php' for use with your template 'events'. Then, you can create a sub-folder called events, i.e. /site/templates/events in which you can place your related template files, e.g. 'details.inc' (or even details.tpl), 'list.inc'...etc...Hope I got you correctly..I have a feeling you already know all these and I am misunderstanding you...slow Friday here! -
How to manage template files inside a module
kongondo replied to enricob's topic in Module/Plugin Development
Hi Enrico, Welcome to PW and the forums... As for template files, the have to go inside site/templates but remember you can use includes in your template files to grab other files in other folders or sub-folders... Have a read here: https://processwire.com/talk/topic/740-a-different-way-of-using-templates-delegate-approach/ http://processwire.com/api/templates/ http://processwire.com/docs/tutorials/how-to-structure-your-template-files/ -
Btw, default RTE is now CKEditor (in the dev version of PW). I've read something about Redactor in these forums I think...can't find it now... Edit: Here's one of the discussions: https://processwire.com/talk/topic/1964-redactor-wysiwyg-editor/page-3 Main issue is licensing... Tip: best way to search these forums is by using Google, e.g. Redactor site:processwire.com/talk
-
Wise words from a wise man; Thx T