Jump to content

MilenKo

Members
  • Content Count

    336
  • Joined

  • Last visited

Community Reputation

89 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,535 profile views
  1. Good day fellas. I was working on a theme that required me to setup a comment system with star rating and votes and it is all completed markup wise, however I noticed something strange during the test - if the field option is set to use Up/Down votes a user can do both simultaneously. My question is, would it be possible to allow ONLY up or down-vote to be used at a single time as presently I could click that I like a page and at the same time dislike it. Logically, if I would click to like the page and then click to dislike it, it would diminish my previous vote and only allow to either like or not a page. Also, when in the field settings I set a reply depth, I would like to have the Reply button still showing instead of disappearing. It is much more functional to have the reply button showing even after the depth limit is reached which would allow the user to reply quickly if a lot of comments are shown on the page. Instead of scrolling down to the comment adding form, the reply button would still show it under the chosen comment, however the indent would stop changing. Any ideas how to allow only one voting at the time and keep the reply button after the depth limit is reached would be really appreciated. I am attaching an image to better demonstrate the need...
  2. Looking at the code of the FieldtypeComments module, I found the following short codes that could be used to render the comments: {votes} - shows the up/down votes as per the options set in the comments field (Details tab) {stars} - shows the rating stars if the rating is allowed within the Details tab {url} - inserts the URL link to the comment
  3. Hello @OLSA Could you please explain where should I put the CommentStars::setDefault('star', '<i class="fa fa-star"></i>'); //<= star item using fontawesome icon as this is my first time needing to replace the default stars with some FA icons and it would be a great addition to my learning curve I see the same info in the comments field details tab, however am not sure how to insert it properly to have the stars changed to else.
  4. Never mind, I was able to find the answers: // Rating // Note, that the result comes as a number so you might need to modify the markup to make the stars appear $rating = $comment->stars; // Upvotes $upvotes = $comment->upvotes; // Downvotes $downvotes = $comment->downvotes; The only thing I was not able to come up with was how to check if a comment is an reply to apply the proper tags (div, ul, ol etc.) If anyone has a way to achieve that, it would be great...
  5. Hello gents. I know this topic is an year old now, however, could you please share with me how would I insert the comments rating, vote and nesting in a custom build form where I do not just modify FieldtypeComments and put a copy in /site/modules but rather use the method described by Ryan in the description of the module & API (section of Generating your own output)? So far I was able to get the cite, email, website and text to show but it seems like using $coment->rating (or ->vote) does not do the trick. It would be great if one could share a comment form that would have the all the fields + vote, rating and be styled for comment replies...
  6. Hello there. I am not sure if the issue I experience is a bug of AOS or there is some weird setting I have, but I noticed that on a PW latest version with just AOS installed, when I select the Sticky header option and scroll down the page a bit, the submenu's are not showing until I scroll back up where they are dropped originally. Any ideas on how to have that fixed as it is not that convenient to have the sticky header if you are not seeing your menu and still need to scroll back up to make it appear?
  7. Hello @Soma I might be too sleepy today as I was there and looking at the file->parameter and would believe I've tried with the $file->description but anyway, thanks for pushing me to the right direction it all worked like a charm and the description was the one I've needed for now.
  8. Hello all. Could someone refresh my memory or point me where to look for the parameters/options that can be used to input the content of an InputFieldFile field with some files uploaded from the admin? I know I could do: echo $page->field_name and that would show me the file name attached (if a single file is uploaded), however, I can't really remember how to show the file description or the name that is added under the file attachment? I've searched in google and this forum, as well as in the cheatsheet, however, am having bad luck finding the params...
  9. OK, it seems like Ampps is working fine for linux (atleast I've tested it with Ubuntu 18.04LTS and Linux MInt 19 which are my preffered choice for now), however there is a glitch in the app that does not edit the hosts file (/etc/hosts) so everytime you add a parked domain, you should just add the record for it in the hosts file, like: 127.0.0.1 blablabla.com (where blablabla.com has been added in Ampps). I know it is not the perfect world, however starting to work on a project does not take a minute or so so it is OK if one has to add the domain for now and use it for a week, month etc. I got in touch with the technical support and proved that it is not an issue of permissions by changing the permissions to /etc/hosts to 777 as well as running the app as super user, so they should look into this issue and have it fixed, however as of now (5 days later as of my last reply) there was nothing pinpointing the issue and an eventual fix, so just decided to share the experience so far with the rest of you. Hope it helps someone in his choice of preferred stack as I really liked Ampps for Windows and Mac, but not so much on Linux yet...
  10. @FrancisChung Maybe I did not express myself correctly but under Ubuntu, I was able to install AMPPS but it shows empty screen on the AMPPS Admin. I passed through the empty screen by adding some strings to /etc folder and have the ability to start/stop services and see the apache fired up promptly. The only issue left is that it still does not add the parked domains to /etc/hosts and I have to manually add it so I am in touch with the support to have this fixed somehow. If I achieve a fully working state, I will provide a little installation howto for anyone that is looking forward trying it. It is very good for local development (even though I am not comparing the performance as I am working on a computer with tons of ram and cpu power) and what is most important - works under Windows, Mac and Linux (for now hosts file needs to be edited manually even if the app is started as SU) It is not a big deal, but is a glitch that I would like to learn how to have fixed and do everything from the admin panel
  11. Hello Francis. To be honest, I was trying to find an easy to work with platform that would be OS independent - that is why I tried to use AMPPS. The issue I mentioned earlier was nicely pointed out during the Processwire Installer - mod_rewrite was not enabled by default, so after enabling it and restarting AMPPS - it is all working just fine. So if anyone is trying to use AMPPS for MAC OS - at least under High Sierra 13.6 it is working perfectly fine. One of the things I liked about AMPPS was that through the web admin I could just type my desired domain and it would add automatically all the info to the hosts file as well as all configurations of Apache, PHP etc. For sure I could use a simple MySQL, Apache and PHP installers and configure them manually, however it is just nice and easy to "install" ampps to Applications folder and even backup the hosts/domains easily. It is true, that I had issues with the virtual hosts being added under Linux in the past and I remember contacting the support for that, but I should test it now to confirm if that issue still exists. For now I am sticking with macOS HS and AMPPS. Thanks for the feedback. P.S. As far as I've been working with Ubuntu for quite some years, I will fire up my Linux box and try to install the Devilbox to see where the issue might be and how to recover it. I've just never heard/used that stack so it would be nice to try it and make it run (eventually).
  12. Hello all. I just got into this topic while searching if someone else had issues using AMPPS with PW, where I can import the DB, pull up the admin but it is not logging. Funny enough, the reason for me using AMPPS is because I am playing with a MAC to see how good is the performance over Linux. So far it is all good and I know AMPPS is for LINUX, WINDOWS, MAC but with Linux I had an issue with the parked domains where the records of the domain were not added automatically to the hosts file. In other words it works fine for web dev on the three major OS'es and I will give a try to devilbox, but bear in mind that you might loose the ability to login to admin (at least under macOS High Sierra). I am testing now with a fresh install of ProcessWire as the first attempt was to import an existing project I am working on under Win with another server and see its portability.
  13. 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)
  14. 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
  15. 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); }
×
×
  • Create New...