MilenKo

Members
  • Content count

    324
  • Joined

  • Last visited

Community Reputation

87 Excellent

About MilenKo

  • Rank
    Sr. Member
  • Birthday September 17

Contact Methods

  • ICQ
    99982787
  • Skype
    mikemastercorp

Profile Information

  • Gender
    Male
  • Location
    Montreal, Canada
  • Interests
    Web development, coding, Network infrastructures, Linux, BSD, Windows, Cisco, Photography, Cooking

Recent Profile Visitors

1,283 profile views
  1. MilenKo

    Well I've tried to check for the template earlier and it worked, but it was rendering the menu if any page had that template. After you brought this, I thought to re-create the query and this way just add it in the get statement: // Check if the menu has an id of 1234 or has a title equal to my_menu_name // If no match for the ID but a match for the page title, then stil the menu would be rendered // If no condition match, the error page would not be shown on any user and the menu would simpy not render if($pages->get(1234)->title || $pages->get('template=menus, title=my_menu_name') !=''){ echo $footer_menu->render(1047, $options); } So we are adding an extra check to make sure that a similarity with another custom added page would be minimized. For sure it could happen, but there are already 3 criteria to match and I believe this would be enough. Thanks very much, @kongondo for the perfect module and the shared knowledge (as usual)
  2. MilenKo

    Hi @kongondo I almost guessed the check on my first attempt, however the result came the same - I got a whole new "red page" while being logged on as SuperUser and the menu was not rendered if logged out (I did not yet add a non-SuperUser yet). The thing is that once I hand out the profile, it wont be only me the person to hold the SuperUser but an IT team as well. So if someone gets the "red screen" and is not aware of MenuBuilder rendering way, they will report the issue as a profile failure. I found out though, that if I treat the menu as a page and check for existence of a title, than it does not matter whether you are a SU or not - if the page does not exist, nothing would happen and that is it (that is what I need as if someone reports to me, that the menu is not rendered, then I would simply advise to make sure that the menu ID or name is added with the links needed). Following the initial logic, I reworked a bit my check up as to add an OR statement that besides the ID would also look for the menu name (page->title): // Check if the menu has an id of 1234 or has a title equal to my_menu_name // If no match for the ID but a match for the page title, then stil the menu would be rendered // If no condition match, the error page would not be shown on any user and the menu would simpy not render if($pages->get(1234)->title || $pages->get('title=my_menu_name') !=''){ echo $footer_menu->render(1047, $options); } In a real world scenario, the check would work, but in a case where the page title matches another page being added with the same name outside of MenuBuilder, than it would force the menu to be rendered, but I can live with it for now, as the profile would already have the page added and it would be too much for someone to delete and recreate the menu (which would change the ID), then add another page with the same name as my original menu title and then test for rendering. This way I avoid any error page for all users and the only result would be that the menu would not render
  3. MilenKo

    Hello community. For a new project of my company I would like to implement a checck if a menu exist (by ID, name etc.) and only if yes, to render it. So far I was googling and reading the pages here, but could not find a way to implement that. Could you kindly assist me in that? So far what I've tried and obviously it did not work was this: if ($menu->render(1234)!='') { echo $menu->render(1234, $options); } It might be useful to have this check added to the MenuBuilder instructions as I always like to have a check for existence with any field/template so the menu would not differ. It sort of prevents the "danger screen" during website setup or if a typo in a call was made P.S. As far as every menu added is a page, I found a way to check for the page existence and it work, however I am not sure if that is the simplest and most elegant way to achieve the needed: if($pages->get(1234)->title){ echo $header_menu->render(1234, $options); }
  4. Joshuag, from the videos I can tell that the work of your team is a masterpiece. It would be great to test the functionality in real whenever you are ready for a release. Keep up the good work. That is why I signed up for ProcessWire - because of its super creative and extremely supportive community. If you need some testers, you can count on me. I am just starting a new project and a module like yours would help me get more efficient while at the same time I would make sure to report any issues spotted or share ideas of improvement (if any ofcourse )
  5. MilenKo

    Hey guys, I was reading the news of the latest dev branch this morning and noticed the profiles discussion here. As far as I like checking up the profiles as I am not a Pro developer (yet ) but I also like the simplicity in things, to have the PW installer with a single profile (let’s say blank) and provide within a step of the installer to use another profile? Let’s say I am installing PW and after asking for credentials etc. it notifies me that by default I am using blank profile so if I would like to use another one, to select from the list where all default profiles are listed. Doing this I would still end up with my favorite profile, but I won’t have to download extra files just so that I delete them. The only issue I see here is if a developer wants to have a copy of PW and install it locally while being offline (working from remote locations with no Internet access) however if this is happening, most likely we would be talking about a person who knows his things around PW and most likely would have his own profile to use already.
  6. Well I do use Bootstrap and I thought that JS could cause the issue and removed all calls from the code but still am experiencing the issue. WIll try with the CSS as I did not realize it could cause some issues as well if some styles overlap. Anyway I decided that changing the logo from the frontend is too much to provide considering the fact that the profile is not meant to be fully operated within the frontend, however let me remove the css and js calls and test it without them at leasr for the sake of the knowledge. Thanks @wbmnfktr for sharing thoughts
  7. Well the saga continues. I did setup a clean multilingual profile, removed the delayed output logic (_main.php is not appended in config.php) and also cleaned any unused templates. Decided to add my html markup for the home page only and added a single image field called: image_single Frontend editing module has been installed and I submitted the default settings. To call the image on the spot of the logo space, I used the following code: <!-- Website Logo --> <a href="index.html" title="Knowledge Sharing Profile"> <div edit="1021.image_single"> <img src="<?php echo $pages->get(1021)->image_single->httpUrl; ?>" alt="<?php echo $pages->get(1021)->image_single->description; ?>"> </div> </a> where 1021 id is the one of my Settings page that has the image_single assigned. Browsing the page shows every bit of the markup correctly, however as soon as I doulble click on the logo - it shows the modal window again for a blink and closes up. When I tried to insert the logo in the default profile withoug changing the home.php file - it all worked fine, but as soon as I put my markup and it fails to keep it open until I close it up. To try the functionality of non-image field, I added a simple text field and assigned it again to Settings page. As far as it is a text field, I got more options to pick from (A-D) in the input tab. Tried with A : <?php echo $pages->get(1021)->edit('text_box'); ?> And it worked like a charm allowing me to change the text inline. Enabled all the errors in Tracy to be logged and I do not see any reported issue neither in the java console nor in the assets/logs/tracy/ folder. Any other hints to try? I know it is silly that I am stubborn with the logo where one would not be tempted to change the logo from the frontend, however it is just to find the issue and avoid having it in the next projects.
  8. Hey @wbmnfktr, to make sure it is not a glitch of the system, I decided to test the functionality on the default multilingual profile. To simulate a similar scenario, I grabbed the title and placed it in /includes/header.php. Added to the file a simple image and inserted the edit tags from the other profile. To simulate the location of the logo, I also created a settings template and assigned it to Settings page. Adding an image_single to Settings page and attaching a test image allowed me to edit it on the frontend by double clicking. As it appears, it is not the issue with my server nor with Processwire (in the default setup). I will try to rebuild my profile step by step hoping to figure out where is the glitch as to make sure to avoid it from happening in the future.
  9. Well I did check but there are no indications of something missing. Btw, I have the description of the image multilingual so thought it might be related to that one. Even Tracy does not show anything strange as a hint...
  10. Hello guys. I've decided to get brave and start my first delayed output profile for a remake of my knowledge sharing profile. It went all.good so far but I decided to make it multilingual as to fit the users needs. For starters, added a field named: image_single and limited the input to one image as this would be used for the logo. Added.the markup to allow the front end editing (method D or direct edit tag to the <img>. After double clicking on the image, I see the pop-up showing up for a second and then closes. As far as there are no errors in the logs, I am a bit stuck to find the reason. I've read earlier that some users had issues with multilingual fields but could not find anything to point me to the right direction. Any ideas or suggestions?
  11. MilenKo

    As always a fast and efficient reply. I never thought of looking for a release notes module, but it is a great addition. Thanks guys!
  12. MilenKo

    Hey guys, It was hard not to notice the often updates of this AMAZIN' module and I was wondering if there is a changelog where I could read more about it before deciding to do an upgrade?
  13. MilenKo

    Thanks again, @Macrura Will give the module a try and will see how can I fit it in one of my next projects. Thanks to you and @pmarki for the idea and the code.
  14. MilenKo

    I see Macrura. I would watch closely the development of your mod, however, the options and setups seems sort of way too much for the purpose of my simple projects that hold a logo, few text fields etc. At least I got on the right track using a settings page to hold general variables
  15. MilenKo

    Hello all. I was wondering about the use of this module and would like to check for your opinion, guys, before I start testing it. Presently I setup manually a simple page where all my general site settings fields resign (Settings) with no template assigned on it. After that I define a variable $settings (could be a name of your preference ) in _init.php $settings = $pages->get('/settings/'); // Grab the page url and add it here or $settings = $pages->get(settings_page_id); // Grab the page ID and add it here After that, I am able to print any field value in the markup by using: echo $settings->fied_name // text and integer value fields or echo $settings->some_image_field->first->size(X,Y)->url // Just an example for images etc. For sure the limit is the API of PW for any field and the parameters with it. So my wondering is would the use of the module give more functionality as of the present setup? Bear in mind, that for a few clients I already setup the access to Settings page and they can change anything that is there or provide access to somebody else using PW user permissions options. The Settings page can hold all sorts of PW fields available + custom ones that you've created/added and text and text area has absolutely no issues being multilanguage. Respect to the mod development team for the time and efforts for sure, I am just trying to figure out the benefits of use over the present setup.