Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by MilenKo

  1. Hello all. It is my first time playing with MB and I am thrilled how simple it was to attache two menus (header and footer) to my current project. Now my goal is to have the menus in multilanguage and that is where something is still missing on my end. Reading carefully the manuals, I switched the rendering to menu IDs (getting them from the URL of the menu edit link) and both menus work fine. Presently I switched the default language to be Bulgarian and second - English. The issue I am having is that if I browse the default website: domain.com it shows everything in Bulgarian (which is fine). However if I point to domain.com/en/ it still shows the menu in Bulgarian instead of switching the page titles to the english version. My menu structure is quite simple and I only added the MB to have a better understanding of its functionality so here is the structure: -- Home -- About -- Services ---- Service 1 ---- Service 2 ---- Service 3 -- Portfolio -- News -- Contact us To call the menu I am using the following rendering code: //Building the array of options $options = array( 'wrapper_list_type' => 'ul',// ul, ol, nav, div, etc. 'list_type' => 'li',// li, a, span, etc. 'menu_css_id' => 'menu-top-menu',// a CSS ID for the menu 'menu_css_class' => 'menu-item',// a CSS Class for the menu 'submenu_css_class' => 'sub-menu',// CSS Class for sub-menus 'has_children_class' => 'menu-item-has-children',// CSS Class for any menu item that has children 'current_class' => 'current-menu-item', ); // load the module $menu = $modules->get('MarkupMenuBuilder');// $menu is an example // Render the menu by title echo $menu->render(1029, $options); // calling menu by ID to allow it on multilanguage site Is there anything I am missing here? In the MB admin if I switch the language I see the links properly changing (for english it changes the path to /en/... but the titles are kept the same...
  2. Nevermind, I figured it out looking at the content of the folder. It appeared that for some reason there were no profile nor template files iin the appropriate folders. Choosing to create a zipped profile made the export promptly with all the files needed. Tested again to export the profile to a folder and this time it worked like a charm. Thanks for the nice mod, @ryan and anyone else involved in the coding/testing. I simply can't get enough of PW
  3. Hello all. I've tested a few times the export of a working profile and there seems to be something that I am missing or doing wrong. I am using latest PW version as of now and just setup a multilanguage profile (default one) with minimal touch but just adding a few modules needed for my new project. As soon as I export the profile adding a simple name (test) and giving a name Test with some description text and a small image for the preview, it proceeds well and exports the profile, however if I try to reinstall it later it does not show in the profile installer. Is there anything I could do to make sure the exported profile would work upon moving to a new host or being set by someone else? I was thinking that some modules could cause the issue so tried to disable some of those but had the same result. Sometimes it works, sometimes it does not. Any ideas/hints where to look for a possible reason? Btw, I am using Apache 2.4 and PHP 5.6 with MySQL 5.6 if that matters.
  4. OK, so I added the segments to the links and now it is the turn to implement the logic. Before I proceed and add the logic, I was wondering what would be the best practice to add the segments. Presently I do not have a template for categories nor for tags, so I could either create two and have a URL like: http://exampledomain.com/category/Category1 | http://exampledomain.com/tag/Tag1 For the moment I have a template for listing all articles (articles.php) so if I insert the logic in it, the URL would become: http://exampledomain.com/articles/category/Category1 | http://exampledomain.com/tag/Tag1 For the segment part it does not matter, however, I am not sure if it does matter for search bots and better ranking. Any input on that?
  5. Thank you very much for the approaches @Sergio. I think that I could try the approach 1 for the sidebar links but in a case of the advanced filter, the approach 2 would fit better for multiple criteria. So approach 2 would be: // example.com/articles/?cat=category1&os=windows //Sanitize the category value from the url $category = $sanitizer->entities($input->get->cat); //Sanitize the OS value from the url $os = $sanitizer->entities($input->get->os); //Filter the results by the two values in the url //categories and os are the fields attached to articles inner page $filtered_articles = pages()->get('/articles/')->children("categories=$category, os=$os, limit=10"); So now I will only have to apply the logic to articles.php and test it in action. Thanks again!
  6. Hello all. A few days ago I decided to redo my first PW theme (knowledge sharing one) trying to apply some more elegant logic and most important - to learn to filter page results by a Page reference field with some values. So far it is all going well except the fact that I am now at a stage to add some page parameters and am a bit stuck as to how to filter them. Here is an example of the structure planned to use: !-- Articles (template = articles.php) !---- Article 1 (template = articles-inner.php) !---- Article 2 .. !---- Article 3 .. !-- Categories (no template file) !---- Category1 (same template as parent) !---- Category2 .. !---- Category3 .. !-- OS (no template file) !---- Windows (same template as parent) !---- Linux !---- MacOS So far the home page and articles-inner pages are fully working. I need to show in the sidebar two blocks; Categories, OS where clicking on one would show only the posts containing the PageReference field value. To list the categories and OS in the block won't be a problem as I would just need to query the parent and list all the children (if any) with the proper markup. However, how to have the Categories and OS blocks link only to the specific posts that is the issue. In my previous version of the knowledge profile, I had the "categories" listed as a parent and the posts matching the category were just children of it. But now my goal is to learn how to add different parameters using Page Reference and have a way to show the results per the specific value. How would you organize a similar structure and what approach to take to have a simple and elegant solution? Or, if you know of a PW profile that I could dissect and learn the filtering mechanism of Page Reference etc. it would be even better. I am presently looking at the Ghost profile however Wire-approach is still not very much clear to me, unfortunately.
  7. Hello guys. Even though I had quite a few projects released now under ProcessWire and never had the issue aforementioned, it seems like the learning curve never ends. I ran into the same issue as described above and was having a hard time figuring it out so I can confirm that having enabled the CKEditor for textarea field is requiring to have the textformatters removed in order to avoid seeing the HTML tags converted to text. Admirations to you again @szabesz !
  8. Hello again, folks. As my project is close to the end and I am on the stage of implementing schema.org markup, I decided to revisit my old post and share the code that suits my needs so far. So as previously mentioned, I am having numeric fields holding the prep_time & cook_time interval in minutes. I decided to have that instead of going to a text field and entering the values manually (1h 25min) as to standardize and unify the appearance in case different people would be allowed to share content. So here is my final code that I used to convert from minutes to X d Yh Zmin ZZsec (original source provided for further reference and explanations ) So far so good, however for the itemprop I needed to convert the fields values from minutes to ISO 8601 values that can be then populated. To do so, I used the following function: So to speak, if my prep_time field holds 75min, this would be converted to PT1H15M. If someone knows a shorter/more elegant way of converting minutes to days:hours:min:sec (eliminating the 0 values) and converting the time to ISO 8601 it would be great to hear about it P.S. Forgot to mention that the minutes-to-human readable timing function uses seconds conversion so in my template I call the function: <?php convert($page->prep_time * 60); ?> Not sure if it is the best way, but I know for sure it works
  9. @gmclelland, @tpr The issue appears if I enable tooltips for field description and field notes (even without having marked to use the overlay style). As soon as I turned off the Tooltips option completely, everything came back to normal. Any suggestions to try to have the tooltips activated and avoid the spacing? At least for now I am OK to use the module even without the tooltips, so thank you both...
  10. Hello all. Does anyone experience an issue with the spacing between different fields in the admin while using AdminOnSteroids? I determined that the issue appears with the module prior to the fact that if I disable it, everything shows up correctly. Presently I am using the latest PW 3.0.91 with the default Uikit theme and any place I go that shows fields in the admin is showing with a huge white space in between two. At first, I thought that I set some settings incorrectly, but even after a reset of the module I still see the issue appearing. Any suggestions how to fix this as I was browsing through all the 40 pages in this topic, used search keywords to try to find the result, however so far I had no luck. In case of a need, I am using a few other modules: FieldTypeComments, MarkupSEO, ProcessWireUpgrade however if I disable AOS it all works fine. P.S. The screenshot is a real one to one on 1396x768
  11. Well, I did try kai.test as local domain and still got the 404 with the same symptoms when trying to access admin, other links from the menu or switch languages. Anyway, let me re-download the files and will try it again to confirm the result or have it fixed.
  12. Well, I am trying to but get the 404. I ran the script to show the admin URL and it really shows /processwire/ but the URL is not browsable. Also if I try to switch to other languages or to browse a page from the menu, it shows me 404 again. Something strange is happening here, so I am more leaning to re-download the whole site and set some test.local domain for the try.
  13. @adrian Thanks for the info and yes, I did check to make sure my local server is working fine as to avoid going to the Internet instead of going to my local domain. What I did to test was to add a simple index.html file and point back to kai.pw - the result - well I saw the content of the index.html However, I did find some glitches in my server where an update was needed so now I can see the front page using kai.pw with no issue grabbing the info from my local server with priority over the real domain. The only thing to figure out is how to get to the admin as I am not able to browse kai.pw/wire (as stated), nor kai.pw/processwire as it is by default. Has anyone been able to login to the admin (not the issue with the pass but to see the login prompt? @gmclelland Yes, I can confirm that the only change needed is in the config file located in /site/config.php but not the one in the wire. P.S. I found that the admin URL is really /processwire/ , however it gives me 404 when I try to browse it.
  14. Hello @Kai I decided to give a try to your theme to see any interesting approaches etc. I created a new temp domain on my localhost (kai.pw) and created the DB, Imported the sql in it with no issue and following the steps I was supposed to edit the /wire/config.php to enter my database credentials. Are you really meaning to put the user/pass/host only or you mean to edit the /site/config.php which contains the database name as well? Based on my experience, I have edited the /site/config.php and added my db info (100% accurately). Headed to http://kai.pw/processwire (there was a typo to the admin URL which was corrected in @gmclelland post. When I try to browse the URL, for some weird reason it does not show the website but the 404 error of GitHub I am starting to wonder now, where did I do wrong?
  15. @rafaoski, I tried to install another profile of yours - site-bs4-master and it appears promptly in my PW 3.0.85 installation. So something else is happening and I do not blame the profile in no way, there is something else. It happened to me as well once I was exporting an old profile, I could not find it listed on the list during install. I even tried to move my files to the Default profile that was visible promptly, however, the install failed. Will test with your server out of curiosity to see how would that show the profile.
  16. Hello @rafaoski . For my test environment, I use OpenServer under windows, so it has no issues with the permissions (windows is not that tight as the Unix environment is). So far I've installed several profiles and it was working, however only with this one, I am not able to see it. What I did was to place the latest copy of ProcessWire and then copy your profile folder and files in it to the root of my domain. Then I fire up the installer and am seeing any other profile, but yours. Will try again and see what would happen. Thank you for the suggestions and links. Will try the other profile as I will be soon on paternity leave for a while so should have some spare time for my learning curve Edit: All works fine now, by redownloading the profile and extracting it to the root folder. Now I will start the exploration and learn something new. If someone has a similar issue, feel free to try to re-download the profile, maybe extract it with a different extractor if you use anything out of the built-in windows.
  17. Hey, @rafaoski I just stumbled across your kindly shared profile and decided to give it a try to check what other approaches I could borrow from the PRO's to make my life easier and the code beautiful. So I grabbed a fresh copy of PW 3.0.85 and put your profile in the default server folder. Created a local DB for the test and then browsed the installer. I can see every profile but yours on the list. I know I could upload the SQL and manually place the folders, however, would you know of any reason why the profile would not show during the install? I really like the Markup Regions approach and would be nice to play a bit with it to get used to that. I am also looking into the delayed output to mess around but one step at a time
  18. Hey guys, I know this might fall a bit off the topic, but in CKEditor, how would you call for the toolbar to be moved to a new line under the first one? In the official documentation it is said to use: '/', // Line break - next group will be placed in new line. So I tried using '/' as well as just /, but I am still seeing the toolbar extended until the end of the text box size and only after that it starts the new row. Anything I am missing here?
  19. @SamC It would be SUPERB if I can find some more info about Uikit. I found tons of mods to enable bootstrap with CKEditor but there is not much info in regards to Uikit and its custom styling and approaches. I feel like it is related to the mobile Uikit platform that is found in every Google search. Anyway, my goal is to learn frameworks and see them in symbiosis with ProcessWire. For now, I am using a pre-made HTML themes to get myself familiar with the structures etc. as I do not have much time to learn both while working and taking care of my kids, wife etc. So slowly and gradually I am adding some. In my first attempt with ProcessWire I started a Knowledge Sharing profile that has been completed using BootStrap (Premium) theme. Now I got another theme that is simpler but fits better my needs and is Uikit based. That is why I am expanding the theme with custom toolbars etc. Right now, I am reordering my toolbars to fit my idea of the editor, so once I am OK with it would share if a need is for those, that would need it
  20. Thank you @SamC So far I have not yet touched Less or Sass, but was quickly reviewing it and it seems like a pretty cool (almost a must) for my needs if I need to have some flexibility etc. Will see the SASS and try to compile it as I also do not like tinkering with CKEditor but more like learning how to create my own button etc. For example, if I want to have an accordion, button or else. And yes, I know there are tons of mods already, but I am trying to learn to make one custom.
  21. Hello all. I am also trying to modify the default CKEditor styling for "ol" tag as I am testing the uikit framework, so in order to apply the proper styling, I need to click on the ol tag in the status bar so that I can select the list properly and apply the css. Does anyone has a better idea for an approach, as to a non-tech user, this might be a bit confusing and I am more aiming at a custom button or else that would allow me to select a few lines of text and would turn them in ul/ol with the custom styling: <ol class="ol-pretty uk-list-large">
  22. Thank you @Pixrael . Will test it later on today and report. Seems like a very clean way to have it.
  23. @adrian I tested out the jumplinks and it worked like a charm. It is, however, not clear, how can I handle when I need to show the TOC not within the same field but in the sidebar. During the test, I put the Hanna code inside the body and it showed the proper values of the TOC based on the for values. So now if I can only get those values and move them outside the field it would be perfect. Presently I am playing with Uikit (getting inspired by the admin theme) so would like to show the page headings in a sidebar for easier navigation instead of having them at the top/bottom of the document and loose focus of them once a visitor starts scrolling or clicks on the hyperlinks.
  24. Thank you very much guys for all the suggestions. I am amazed again of the options to achieve the task. It seems like @Pixrael has given a complete solution and a similar one got from @Macrura but the @adrian one seems to me to be the easiest and simplest. Besides that it would be a good start to get my hands around HannaCode which I tried in the past but did not have much progress like I had with ModX Revo, so decided to play clean and simple. But it is never too late to add some more experience. Let me see how would that turn and report what was done. The way I see it, H1 tag would be the main anchor (page title) but I could use H2 for sub-anchors and going down to eventually 3-5. Would you consider a smart move to use several H2-5 tags within the same page from the SEO perspective or I should look for another way to grab them? It seems to me like H-tags would be the best to implement and would be styling the paragraphs of the text the way it is meant, but what is the best and common sense practice?
  25. Thank you @BitPoet and @abdus . Both sound as a plan, but will google for jquery toc first to see if I can come up with some easy to implement TOC.
  • Create New...