Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by MilenKo

  1. Hello again. After a while of being away it is time to renew my work and bring it to the end now. I had some digging in google to search for any good approach that I can use for the tags cloud and I got a module that might work, however in the forum here there was a guess that it would overload the site at one point when 1000-5000 pages are added and some have 5-6 tags. As far as the speed of the load is a concern for me, I am still looking for a best approach to just get the most used 10 tags ordered and that is all. For the moment I have managed to setup the tags as pages and can use existing one or new ones so that is good. I am also needing to link the existing tags to a search result of all pages containing the tag but that should not be a problem and will just work it out. So if anyone has a working example that does not overkill the system, would be good to share it. I looked into a few blog profiles to check about that, but am still not able to find my answer I am not going to give up and while being away I even started working on another personal project of mine (PW of course). I am trying to modify Ryan's query suggested by @Robin S but am experiencing some difficulties, so should work a bit harder I guess
  2. @flydev & @szabesz I have already placed the keywords in place for every page I need them and now am able to select already existing or add a new if needed so now I am aiming at showing some "top" keywords on the main page. And to be clear, by "top" I most probably would select to choose the tags that were used the most. Btw 'reading the morning coffee first' made me laugh @Robin S thanks for your suggestions. I would give a try to the Connect Page Fields & Ryans SQL query and see how can I fit in the keywords appearance.
  3. Hello, again fellas. I was away for some time to concentrate on personal stuff, so here I am back. Today I was able to add the keywords/tags functionality using pages and it works like a charm to show them on every page they are added now. What I am looking now is to show a small list of top used tags. So does anyone of you have an idea how that can be accomplished as I searched the Internet, the forums here and a few demo profiles but am still unable to figure that out?
  4. For sure. This time the theme development was mixed with "stolen 5 minutes spare time" and the excitement of being able to achieve it but I will be concentrating more on the technical part next time especially after I have done the "long version" and will be having some support that would need more guidance at the beginning. P.S. Mauriziobonami workflow is really cool so I would give it a try and see some additional ideas and eventually improve the my coding.
  5. @szabesz by separate tutorial you mean to launch a new topic to distinguish from Launch&Learn? If you think this is a better idea, I don't have issues with that This morning I read about the tags and am already aware how to do it using PageAutocomplet so it is just a matter of time to put the code in. I find the idea behind tags added as child pages to allow all the freedom of usage via API (and the simplicity for a newbie to finish the job). It is true that this would require an additional core module to be installed, however, knowing the developers If the functionality, I have no issues using it Let's see how would that goes as after the tags comes the turn to the comments. The only thing to play with would be to put the tag cloud on the main page containing X-amount of tags. I guess, that it can be done through the page sorting, but will see about that...
  6. Hey, everyone. As far as NowKnow project is about to be finished soon and presented to the team, I decided that it would be great to invite my 12 years old daughter to work with me on another theme which I found and am willing to share the transitioning from pure mobile friendly HTML to PW theme. This time I chose a theme that has a few different contents in it but should be pretty simple once the bits and pieces of NowKnow are in place. Once you try to do a theme, the rest is easy and you are actually starting to improve the code -> enjoy the work. As far as my daughter have some basic HTML & Jquery coding skills, it is not yet clear who will be the student What is more important is to provide both of us some creative time and to be able to share the result (even if it might need some polishing etc.) As a theme, I selected a theme from ShapeBootstrap.net called Corlate. The source is absolutely free so feel free to grab it if needed and assist in the development with what you can. Unfortunately, I can't tell exactly when will we be starting as I still need to implement tags/keywords, comments and eventually add a possibility to upload files other than images as it would be beneficial for the team to be able to attach any already premade files into the new site. As far as my important job tasks are almost complete and I will have some more spare time after work, we should start soon. Should you think that there is a more interesting theme to work on (with more advanced features etc.) that is free to use and share with the rest, feel free to let me know and we will see what can be done
  7. OK, Before going to bed I decided to take my ProcessWire pill and finished doing the Latest News block in the footer. So far I did not bother with the order as there will be tons of fine tunings etc. when the basic functionality is achieved but the block works as it should, so the rest would be to get to the admin and change the template sort options. Here is the footer code responsible for the block: Again, if you spot something strange, or that can be improved, speak freely and you will be heard That is it from me for today as I have to start dealing with job-related stuff early in the morning and there is no better advisor than the good old fashioned long hours sleep
  8. Alright, found the issue with the sidebar.php - I was doing a check to $page->children where the FAQ had no children so the condition returned 0 and the categories were not showing. I should stop doing multiple things at the same time. I fixed the FAQ by changing the condition and now it is applied to all pages in the theme. Maybe I should improve that too at the end, but for the moment it works as intended. Here is the file: I think the next step would be to do the latest news block in the footer as that seems to be easy and straight forward. Once done will move to the tags block where I read today that is pretty elegant and organized through Pages type. Will have to review the blog profile and some posts I marked for reading and see how would that go. Also, I am still reading about the comments as I will need to style the reply form as well as the appearance showing the nested comments eventually if I am able to.
  9. @AndZyk , my friend, at work today I realized that I already had a variable defined in _init.php for $pages->get('/') and actually came back to here to update the code as I applied the changes already with some small fixes of the category block working from the home but not from the inner pages. The Category listing (Articles->Child) is showing fine in Articles, Articles-inner, News, News-Inner php files, however, on FAQ it just shows the Categories title and no listings in the block. The strange thing is that every template file has an insert of the ./includes/sidebar.php so there should not be any difference. I opened the Articles compared all the settings with FAQ and see no difference that would restrict the page to properly show the categories. I am attaching the FAQ code, maybe someone can spot the issue as I looked over it and seems like no clue so far. faq.php and here is the latest sidebar.php: The only thing I am questioning as a reason is the fact that the FAQ template is using Repeater to add/show the short FAQ instructions. Could that be the reason?
  10. Having a bit more time, I just added two additional fields to provide the Support block in the sidebar with a changeable title and text (sidebar_support_title & sidebar_support_text). Simply put, for the moment I assigned them to the home page template at the bottom in order Title & text. In the sidebar.php added the code to call the two variables, assigned the text for both in the homepage and voila: What is left to finish the sidebar is the Keywords block that I might start checking in. To have it working I guess I should add another field: keywords and assign it to the appropriate templates (articles-inner, news-inner) and then somehow call the top used articles that would be hyperlinked to the search results or else. This would be the end of the today development as I have some other work related priorities and need to take care of them first. P.S. I just noticed that I had an error in the sidebar.php as I was using a call $page->sidebar_support_text instead of getting the info from the home page. The file is corrected with the proper syntax: $pages->get('/')->sidebar_support_title; and $pages->get('/')->sidebar_support_text; Now any browsed page will show the title and content properly.
  11. As far as I had the solution for the blocks moving around, I decided to make the category appearance dynamic as well. It was super easy now when I already had all the needed calls working. I am attaching the code of my home.php with the changes and the blocks title "fix" as well as the sidebar.php that contains the categories. My goal now would be to finish the home page besides showing the latest comments. What is left is to add the fields for the support box (title/body text) and show them in the right spot as well as to pull up the latest X-news from the News. Where I might have some issues would be the top tags, however, let's first finish with the rest and will deal with it too. Home.php and sidebar.php
  12. @fbg13 I tried that too, however, the blocks start to move around in very awkward order, so I went to a simpler (for me) solution that works fine so far. Thanks again for the sharing and efforts to help. I figure I can get back to the theme devs too, and ask for support but so far the styles are applied, if a title is longer than 45 characters, get cut with ... and the full title text is shown on mouse over, so it is easy to read. Moving forward now.
  13. Thanks for spotting the issue @fbg13 and for the advice. Masonry seems pretty cool to try for another project, however, I don't feel strong enough yet to implement it into the existing theme. I tested the style you proposed by putting it inline at first place: <style="text-overflow: ellipsis; overflow: hidden; white-space: nowrap;"><?php echo $child->numChildren(); ?></style> but that hid the whole title. Then I started thinking that I can simply limit the output to 45 letters and then add ... at the end of the line if the title would be longer than the maximum characters so the case would be solved. I remembered that for the news.php template I used a word limited to limit the body content (act as excerpt text) and I could have used that, however, if the title contains a long word, it might look ugly. So I decided to go with a simple substring function and strip out the text to 45 letters with adding at the end the ... Right now it looks and works just fine no matter where I move any block. I decided, however, that will add a title to the href in order to show the full title on mouse over. Doing so I get the best of two worlds and the case is simply solved.
  14. @fbg13 Thanks. This is what I thought too, however I am looking for ways to work this out. I was looking for some information regarding the best Title length approach and I found this: So as far as in my case 45 characters is sort of the recommended max, it might not be a bad idea to limit the title and avoid a super heavy URL sort of: http://FQDN/articles/super-duper-heavy-long-title-to-describe-how-the-long-terminology-appear-in-text For sure, nothing wrong with it, however as per the text above, Google would list the initial 60 chars max or what could fit in the 512-pixel display. So what would be the best approach if you were on my spot?
  15. Tried to erase the whole Software category and recreate it. As of now, moving software around does not change the appearance and it is properly showing, however moving Networking started causing the same issue. It feels like if I set a limit of the title of the page, that would fix the things, however it might not be such a good idea to limit the title less than the SEO recommended max. limit. As always, any shared knowledge is welcome.
  16. OK, playing a bit with the settings, if I decide to lower the limit of the child pages in every category to 1, then the blocks are aligned properly. Seems like it might be something related to the fact that some titles are longer than one line (45 characters) and that is pushing the next block away. That does not explain, however, why when I move the same category (Cisco) as first - it works fine with the same names and the limit of 4 as per the original styling. Any ideas? P.S. I decided to print the Child ID's and saw that the Software category was the first one I added. Having it moved to the top causes the blocks to move away. Any other combination works. At first I thought that it could be a special character somehow got into the title so thought to have the titles stripped however manually changing the titles of all 4 pages in Software did not help either. Something else is happening however not sure what.
  17. Hey everyone. Thanks to the cold Montreal weather I felt like being stuck at home so what could I do best in my spare time than to get back and learn something and work on my theme further. Like the weather in Canada, I am changing my mind often sometimes, so I left the reading about the comments in ProcessWire to settle a bit and decided to work on the main page. I just had a word with the team last week and advised that very soon I will be ready to present my rough work for some team feedback. As I expected, I had no big issues in presenting the Articles "categories" and their children (actual howtos) in the content block. What I had to do was to delete the repeating blocks and leave just one to play with. At first I was able replace the title of every block showing the child name in Articles page. After, I was able to add the link to view all the articles in the category. What was left was to pull up and print the names of the children of the "category pages". This got me a bit confused as it was my first foreach inside a foreach. I had to do a few trials and errors, however at the end I got a satisfying result. As of now, I have all (4 for now) child pages of Articles (categories) listed with the number of child pages in each one and a list of 4 pages from each category pointing to the howto-inner page. View all button points to a listing of all pages in the parent. So far so good, however I noticed a little issue with the styling of the html where I have four blocks in the main content block where they are grouped by a div 2 by 2 in a row. So calling the code for one block 4 times made 3 of them to appear properly and the 4th to be out of the bottom row. As far as I set the Article template order to manuall dragging, moving the 4th one as first fixed the issue and now they appear normally. What I am in doubt is how come if I move the problematic block to appear first, it lines up with the rest of the blocks but if I move it as last - it goes out of the order. I am attaching the code so far and a screenshot of the images, so if anyone can enlight me would be perfect. In the future I might need to add a few more Article child pages (as categories) so if I don't do it properly, only god knows what is going to happen. Here is the code for the home page: The first screenshot is the proper view. This one is with the same page just changing the order to last (4th)
  18. Nice work Sylv. One of the good things to be a member of PW community - now I will have the chance to visit some classes in Montreal Keep up the good work
  19. Alright. As far as the reading and approach thinking still goes, I have noticed a small need of correction in the FAQ page where in the theme there are two blocks - Pre Sale and Customer FAQ. The change was not a big one, but as far as I used a static text for the title of the block, I decided to make even that dynamic. To do that, I simply added two new fields to the FAQ template (faq_top_title & faq_bottom_title) and assigned them to the faq template. After that, I just added the values of the text I needed to appear on the page and replaced the existing text in the faq.php (template file) with a call to the vars: $page->faq_top_title as well as $page->faq_bottom_title calls. After doing that, I am able to easily change the Title of the page (FAQ presently), the Headline text (A good descriptive SEO optimized text would be nice there), the top FAQ part title and the bottom FAQ part. Once the theme is finished, as planned I will do my best to kick out most (if not all) of the theme settings to a new page and make the vars to appear from there. I don't know yet how good idea is that, however it looks to me more neat and easy to apply changes in 2-5 years from now on
  20. I started reading this morning about the comments and how can that be implemented as in the theme I not only have the comments, however, they are even nested. My personal preference goes to non-nested comments as I like to follow up the chronology and with the nesting sometimes it goes a bit blurry or off the wagon, however, trying to stick to the theme would squeeze a bit more fun. From what I understood so far, I need to have a mod for the comments field as that is not a part of the core. Let me see what I can find and see what issues I might stumble across with that. To implement the comments seemed well described and should be achieved easily, however it was not much clear how to apply my personal styles to the comments as well as to the comment form. So this is where I expect the things to go cloudy but will work on it and see
  21. Adrian, thanks for pointing that out. What you say makes perfect sense and seems to be even shorter sollution. I tested that out as well and it worked like a charm. Well noted for the future use. I just did not realize that the $child is already a result of $page->child so counting the number of the children as you propose would return the correct value. I am extremely grateful to all of you who are sharing the knowledge and assisting me not to go the slippery road sometimes
  22. Now that is the elegance I was looking for. I still have a lot to read but I tried out the $child->children->count and it worked like a charm. Thank you extremely very much fbg13. Today I learned a lot and I will be using this in the approach to my main page. I tried both count options and they gave the same result so it is good to know. I guess I can pass some extra parameters: $child->children->count(blabla=blabla) to return count result that match the results in the brackets. Am I guessing right?
  23. Btw, it worth mentioning that I am thinking to play a bit at the end of the theme development with articles and articles-category as I am sure if I add a few conditions and checks for the page, I can easily combine them and avoid unnecessary file duplication. So far I am trying to achieve the functionality, and then I will start polishing it. The funny thing is that the topic has been viewed about 2000 times but a few people share bravely their experience. Even if someone is not a coder, it would worth sharing an idea, better approach, even if it is just a logic. As it says, there is no right or wrong but there is always a place for improvement
  24. @fbg13 Hahaha, I knew I am close and it was just to discover the count but sometimes the lack of PHP knowledge is causing some funny situations. Thank you fbg13, one less task to deal with. Do you think it is a good idea to have my approach to counting the child pages? As I am using: <?php echo "Contains: " . count($child->children); ?> and it works fine, but might not be that elegant Anyway, I am attaching the latest changes, as I had to clear out the parent category from articles.php and the articles-category.php. It would not make sense to have the title above the listings in H1 saying Network and under every howto page to have either the parent (Articles) or the parent-category (Network, Software etc.) Instead, I just kept the date of adding for articles-category.php articles.php: And here is the articles-category.php: Well, after having that functionality fully achieved, I am starting to think should I move to the comments of the how-tos and news. I checked out Ryan's information about the comments and in theory, it seemed sort of easy to implement. Will start playing with that and see how it goes
  25. OK. I had some progress but still it is no go yet. By using the following I was able to show the ID of the child pages: <?php echo "Contains: " . $child->children; ?> I thought that I can just count the $child->children but instead of getting the right number as it is showing the proper value of ID's it just shows the number of the parent (1). So $child->children in my case shows the 5 howto pages ID's but count('$child->children') returns the number of the children of Articles which in my case is one. Any suggestions or corrections as I feel it is something silly (again) I am missing here
  • Create New...