Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by bwakad

  1. Great! you was right, needed some sleep. lol After the copy css/js it's good. I then disabled all append and prepend for blog templates. Because: PW latest use _main to output header/body/footer; and blog uses blog-main.inc to output header/body/footer. Kongondo, can you tell me which file is used in back end for the /blog/posts/ - /blog/categories/ - /blog/tags/ It seems in the Edit part is this code displayed as text (image I showed earlier).
  2. Reading instructions wrong I guess. Did a new install. Placed the Blog Master folder in modules and installed with demo template files. But this time css and js is off - I can't see css and js under /site/templates/, I CAN find them under /modules/Blog-master/. Am I installing wrong? or should I disgard multi language?
  3. Hi thanks for the reply. 1A. I installed the latest stable PW and choose multi-language. This is were the header/footer come from (_main / _init). 1B. I then installed your blog module which gave me the empty template files. The blog templates give me blog posts or categories (whatever I put there) and under it: header - content / sidebar - footer. I have seen native PW currently prepend and append the _init / _main to ALL templates - which is fine. But I am not sure how to proceed. _main works with this part, should I add $posts in there? <div id='main'> <!-- main content --> <div id='content'> <h1><?php echo $title; ?></h1> <?php echo $content; ?> </div> <!-- sidebar content --> <?php if($sidebar): ?> <div id='sidebar'> <?php echo $sidebar; ?> </div> <?php endif; ?> </div> 2. The image with the back end issue is in the blog dashboard (posts/categories/tags). It does no damage, but it's just strange. Must be a comma or something in the admin tempate files somewere.
  4. Also had some issues with back end markup...
  5. Just installed Kongondo blog module in PW multilanguage. Great concept! I Just have a small question regarding empty template files. If I would like to display posts under a current category (blog_category) I could go with this: $posts = $pages->find("template=blog-post, blog_categories={$page}"); $blog = $modules->get("MarkupBlog"); //if Blog Posts found, we render them out if ($posts) { echo $blog->renderPosts($posts); } else { echo '<p>No posts found</p>'; } But the haeder and footer are displayed UNDER the post. How do I get posts to be between this?
  6. I have tried both from Soma and Diogo - not working. In this case, they both should reflect "/browse/". Using static works, dynamic not. Strange. I just used $page->parent->children - not working either... But since I do not want to restrict myself only to /browse/ I thought to use page parent. So this static path is working. <?php $navigation = $pages->find("parent=/browse/");?> $page->prev($navigation)->url - EDIT - stupid!!! I forgot, in my old code - I used echo strings : echo "<div><a href='$page->prev($navigation)->url'>Link here</a></div>"; This time I used <a href="<php $page->prev($navigation)->url;?>" (without echo)... Sorry all, thought suddenly something was wrong with my PW.
  7. Just trying something for the prev next functions but I really do not understand, this first one not giving anything contrary to second one. While $page->parent is really a /path/. I have tried without ->name, without qoutes, placed $variable as concatenated outside of qoutes... Nothing seem to do it. Must be loosing my mind. lol <?php $navigation = $pages->find("parent=/{$page->parent->name}/");?> <?php $navigation = $pages->find("parent=/browse/");?> Basically I want the current page parent children as array (siblings). Only on rootparent = home I could not do that (because no parent)...
  8. I get what you say - building blocks. It's also easy and the reason I use it. Basic and to be changed when we need. I have not really changed that much, just changed some things for small mobile sizes and don't use what takes to long. Had trouble with sized PW images shrinked by foundation... I really liked the off canvas - especially the concept Facebook (among others) is using. It's apealling to the eye. Was reading on the off canvas concept and I found out, that content is loaded lazy and placed into focus when needed. It's actually a litle faster then requesting single pages because it is not nescesarry to download header and footer again. Downside is that one has to load yet another jquery for that. Now I try to focus on tabs were tab content slide in with css only (works about the same as off canvas) but is so much more fast. Just have not found a good tutorial on that. codrops has some nice examples...
  9. I just see on PHP that checking on ->id is integer (martijn said that to) while I used =>id =, == and === "0". I now understand why it did not work... This one tumbled me: // the easiest way…if(!$page->id) { // $page is a NullPage} I used it so I could display something else, but I forgot the ->id... which makes it an object, and I did not know how to check an object. So my best bet is either if(!$page->prev($browse)->id) { OR if($page->prev($browse)->id == false ) {
  10. well, thanks all, for helping on this one - I will set my mind to 0 Null or blanc page (NullPage) and try to read from the link...
  11. So, if I want to evaluate if there is none - which one is the best to use... I prefer your example of == false, but is this always accurate with regards to a NullPage ? if($page->prev($browse)->id == false ) { // display somthing else } or if(!$page->prev($browse)->id === true ) { // which is rather confusing // display somthing else } or if(!$page->prev($browse)->id ) { // display somthing else }
  12. you all want to confuse me Lostkobrakai - is right when he say is not 0 but NULL. But checking for that did not solve it. Martijn - is right when $nullpage = new NullPage, hence id = 0 Teppo is right when he say NullPage is not Null. but NOW I don't know anymore!!!
  13. Maybe I do not get what you say, but from what I do understand from the pageArray (limited amount of pages) >>> $browse = $pages->find("parent=/browse/") - the next code would produce a NullPage if there is no previous, there would be none (no id), because I used === "0" == "0" and = "0" ... and it did not work. if(!$page->prev($browse)->id ) {
  14. While developing in PW I use foundation. Mostly because it's easier to read. but i really doubt if they ever succeed in making all what they promote work smoothly: equalizer - does not work on all elements. buttons - configured paddings and font-size are really bad. panels - only work good on <p> tags. dropdowns - does not adapt itself on small screens right away. Worse is it pushes content down. font icons - are very limited to what someone would really need. off canvas - does not go full width and height - unless you hack deep. block grids or columns work well - unless you specify a ->size(x,y) in pw... had to set min- and max on css sizing... Abide - used it, but not anymore. It was looking bad making rows expand on focus or error. so many issues... I now basically use it for the rows and columns, and if needed set small medium or large. Remove most of the padding and margin on small sized rows and columns and set those in css myself. Buttons and tags I make them myself through css. At least it's easier to control padding, margin and font-size. I use font awesome for icons - it seemed they have everything you need and look even better. I am pretty sure bootstrap has issues to. And I am curious to see how people develop with those two. ps. I am really happy with Processwire! It can do almost everything if you really sit down for it. I guess Ryan's next PW implemantation will be: GetMeaBeer() . lol
  15. thats what I said: if NOT id then NullPage = true lol. if false = true then false = false, but if true = true then true = true.
  16. Ohw. That's were I was off track, lol. Thanks, I understand now. The link to NullPage in docs helped! Apparantly I have to check for ->id if(!$page->prev($browse)->id ) { so if there is no ->id, NullPage is true.
  17. but in the docs: http://processwire.com/api/variables/page/ $page->next($pageArray) Given a PageArray which includes the current page (among others), return the next page after the current.† Returns a NullPage if it is the last page in the provided PageArray. If called without a PageArray, it assumes the current page's siblings (same as $page->next). Then why should null not work ps: NullPage != null .... were in cheatsheat ?
  18. - edit - I could only get it to work if testing for empty string: if($page->prev($browse) == '') {
  19. For mobile layout I want to make use of the functions provided by PW: prev and next. So I have this, but it will not display both. Can someone point me in the right direction? <ul class="inline-list"> <?php $browse = $pages->find("parent=/browse/"); if($page->prev($browse) == null) { echo "<li><a href='{$page->url}'>{$page->name}</a></li>"; } else { echo "<li><a href='{$page->prev($browse)->url}'>{$page->prev($browse)->name}</a></li>"; } if($page->next($browse) == null) { echo "<li><a href='{$page->url}'>{$page->name}</a></li>"; } else { echo "<li><a href='{$page->next($browse)->url}'>{$page->next($browse)->name}</a></li>"; } ?> </ul>
  20. lol. I see that now... by using: "more" link. I used modules manager and clicked the download button on the right side. my 2 cents is now: add a column named "compatibility"...
  21. Apparently the one I installed is named AutoUpgrade (Admin Helpers) - which does not work - at least : give so many errors... Just deleted it and now installed Processwire Upgrade - does not give errors on install... Just my 2 cents: I think it is confusing to have modules doing the same, in same directories. But for some reason have either old code or not tested code. If not compatible they should be removed. Or brought under it's own version... -- EDIT -- Ryan's module works flawless ! good job! just upgraded to new version and everything looks great
  22. Seemed a reasonable thing to do, install module and upgrade. But I get a lot of undefined indexes at back-end. I used modules manager to get the upgrade module (was only one there).. Notice: Undefined index: upgrade_available in C:\xampp\htdocs\dating\site\modules\AutoUpgrade\AutoUpgrade\AutoUpgrade.module on line 38 Notice: Undefined index: last_checked in C:\xampp\htdocs\dating\site\modules\AutoUpgrade\AutoUpgrade\AutoUpgrade.module on line 38 Warning: file_get_contents(https://api.github.com/repos/ryancramerdesign/Processwire): failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in C:\xampp\htdocs\dating\site\modules\AutoUpgrade\AutoUpgrade\AutoUpgrade.module on line 39 Notice: Undefined index: git in C:\xampp\htdocs\dating\site\modules\AutoUpgrade\AutoUpgrade\AutoUpgrade.module on line 44 -------------------------------- Now I am afraid to continue - should I delete the module (how)? Or continue? or was the one I installed wrong? Going back to module manager - dropdowns don't work and get Javascript alert: DataTables warning (table id = 'mm_datatable'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.
  23. this was the problem: As long as you include the _init.php in each template... Thanks for that! I did not think about including it in other templates... dang.... topic was getting so longggggg. @ martijn - I did not understood your respons. But maybe because I typed $sort and implies API ->sort ...? I simply used $sort because LostKobrakai used $sort. In my topic first message I used $sorted ...
  24. Maybe this will explain: browse.php // in _init.php I have one line: $sort = ""; include ("./inc/_init.php"); // sorting, here $sort get a value if($input->get->sort) { switch($sort) { case "asc": do something; $sort = "you sorted results on blah blah blah"; break; default: do something; $sort = "sorted by name ascending"; break; } } $selects = $pages->find($selector); // then I include the following, and in head.inc I echo $page->title and $sort. include("./inc/head.inc"); include("./inc/layout.inc"); include("./incfoot.inc"); THIS: $page->get("extrainfo").$sort; WILL WORK, BUT UNDEFINED VARIABLE when I am on other page that does not use browse.php. Even when I used _init.php I never said I wanted to sort fields ....
  25. This is also why i started to explain: In that, variables are defined as $fields, and used as : $variable append $field. Where as my $sorted is not a $field, and I use : $field append $variable. So I can't use - edit -: $sort= $page->get("headline|title"); // variable append field value $sort = $page->body; // variable append field value because I need: $page->get("extrainfo").$sort ; (in head.inc) confusion. lol. $content is just the output of html on grid.php. (without $page->title and $sort value). --- I guess a field can be accesed from any place by using $page->get ... but a variable is not accesible like that. Maybe I should just re-arrange my markup to output the variable in content, in stead of the head (where the page title is)...
  • Create New...