MilenKo

Members
  • Content count

    237
  • Joined

  • Last visited

Community Reputation

52 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

595 profile views
  1. @ComputerKid the SkyScraper profile is what several persons (including me) used to disect the code and find out about the power of PW Api. Please, do yourself a favor and do not just install the profile, but have a look "under the hood" and try to assimilate what, how, why etc. I can guarantee you that quite soon you will realize that Wordpress has also nothing comon other than being developed under PHP I worked myself on Wordpress for quite a few users (as an end user) and was not even able to edit some scripting parts to add custom fields etc. Now with PW in zero time I started developing my own theme with quite extensive functionality. And there is so much more to improve my coding skills, so just search the forum, search in google for ProcessWire and you will be more than good to add what is needed to your website
  2. I can confirm that using Incognito mode in Chrome or private in any other browser did the trick and as soon as I am logged-in, the browser shows the value of $user->name correctly. Same thing applies for the comments posted from any account or just as a guest if I unhide the name, email, web etc. It would be interesting to see how to style my form using the default rendering method for the comments as I can apply the styles if I am building a site from scratch however using a premade theme is a bit different story and I should digg deeper into the CSS to make the necessary adjustments to the styles of the comment field to match the design. Anyway it is a learning process and every week I am eager to read about the new stuff and thinking how can I use that. I am doing in paralel a few projects so once I establish the proper way to achieve this and that, the rest would be just to make it work for the specific frontend. Thank you all for the achievements, as i won't make it this far without the shared ideas, advices, best practices and so forth. You are the ones that make PW growing in popularity!
  3. @adrian After a short break and becoming a father for 4th time, I had a few minutes to redo the comments form and it seems to work fine now. The only thing I could think of messing around would be to have some browser cache for the logged on user form. Today I echoed $user->name above the contact form and noticed that I had to refresh a few times before the name of the logged on user shows correctly. As far as I did not yet activate the cache, I would expect it not to happen but will see what can be done. So for now the comments form is working as expected and I can close that chapter as well. I am thinking on adding some email verification if allowing non-registered users to post comments, but that is beyond this topic. So again, thank you very much for the help and sharing.
  4. @adrian I will move it to my online host in a few hours and will share the login details. Thanks in advance to you and @fbg13 again for spotting my silly error.
  5. Oops I did it again... So yes, it was the semicolon which I forgot to put thinking the PC would know my intentions. So back to the point, after adding the semicolon, bd($input->post->cite); returns empty result in 2ms. Unfortunately that does not point me to the reason why it is not populating only in the form but everywhere else in the template it works fine (to call $user->name). Calling bd($user->name) returned empty result as well which should be good but...
  6. Well it appears like any bd i test shows similar error. I will try to remove Tracy and have it reinstalled to see what could be causing the issue (if I am even going to the right direction, however as far as it works with you, but not with me, that has to do something either with the server or pc setup) but not with the code.
  7. Well I put it to the console which I guess was not the smartest thing to do. That is why I get the 500 error... I will need to read more about the Tracy...
  8. Hmm, that is weird as it does not work on two different computers, but will try it on another PC to move the profile and see. I am checking if there are any caches right now but by default I keep them disabled so that should not be the issue. P.S. I ran the bd($input->post->cite) in TracyDebugger and got an error: 500: Internal Server Error See the browser dev console for the actual error It seems like a strange server issue, however if I try to call $user->name somewhere else within the same template, I get the proper value (in my case test). Tried switching up the user and it is always the correct one. Thinking to redo the whole comment form using your earlier example and see if that would help.
  9. @adrian I am not sure how can I debug the $input->post->cite in Tracy Debugger's bd. I tried to unhide the Name and remove the value from it so that it is populated with the field content, but the comment does not show up and is not in NonApproved comments attached to the page. So something must be wrong with the form submission...
  10. Well to populate the form I replaced name with cite in all instances. Here is the whole part of processing the comments:
  11. OK. After figuring out why the cite was not populating, I changed the code to my Latest comments and in the articles-inner so that the author comes from $cite. Now for the tests I am logging as a different user (created one via the admin) and logged on as it to test the comments adding. Here is my comments adding form: <div id="respond" class="comment-respond form-border"> <h3 id="reply-title" class="comment-reply-title section-title"><br /> <i class="line"/>Leave a Reply <small class="pull-right"> <a rel="nofollow" id="cancel-comment-reply-link" href="<?=$page->url?>#respond" style="display:none;" class="btn btn-custom btn-xs">Cancel reply</a> </small> </h3> <form action="./" method="post" id="commentform" class="comment-form" novalidate=""> <div class="row"> <div class="col-md-12"> <div class="comment-form-author form-group"> <input id="cite" name="cite" type="hidden" class="form-control" value="<?=$user->name?>" size="30"> </div> <div class="comment-form-email form-group"> <input id="email" name="email" type="hidden" class="form-control" value="<?=$user->email?>" size="30"> </div> </div> <div class="col-md-12"> <div class="form-group"> <textarea id="text" name="text" class="form-control" cols="45" rows="8" aria-required="true"></textarea> </div> </div> </div> <p class="form-submit"> <input name="submit" type="submit" id="submit" class="submit btn btn-custom btn-lg" value="Share your opinion" /> </p> </form> </div> <? } ?> So I thought that $user->name would populate the name of the current user and if I am logged on as test, than the 'cite' would get populated with 'test' as author, but it shows admin on all comments in the DB and in the frontend.
  12. I got you, @adrian Well as far as the platform is intended to be used as an internal knowledge database, I would leave the registrations up to someone who will be charged for that, so I can eliminate the login-register forms etc. For sure I will have a look to see how it is done, but as of now it is all working. I noticed that in the comments form I was populating cite with $user->name but even if I post as a different user, all comment authors show admin instead of the user who posted the comment.
  13. Yes, it did populate the name and you were perfectly right (as always ) @adrian So now I will just remove the comments and test the cite for populating the official name of the user. How would you approach leaving a comment from non-registered user? Would you allow to post and then moderate or just offer to register and then comment?
  14. @adrian PR? I just remembered, that the form was actually having the cite but I did not realized that I modified it to name without considering the fact that the field is caled cite but not name. Let me change it and see if it would populate the cite...
  15. So I just checked and there is only one row in the DB that has in cite 'admin' . All the rest of the lines are empty, so it has to be something wrong with the form..