22 января 2008 ~ 5284 Комментария

Приятное комментирование

cometi_yaebanulsyanahuy

Готов поспорить, та часть моих читателей, которая уже комментирует мои заметки(за что им огромный поклон), не могла не заметить мою маленькую инновацию в области комментирования, а именно запоминание всех данных при первом комментарии, которые в последствии уже вводить не придется.

Так о чем это Я, как-то давненько Я обещал написать небольшую заметку как реализовать этот прием. Выполняю обещание.

Принцип этого приема

У блогового движка WordPress, есть прекрасная встроенная функция запоминания данных при комментировании, но мало кто ею пользуются, из-за того, что зачастую не знают всех тонкостей верстки тем под WordPress.

Так вот, мы будем проверять введены ли данные и на основании этой проверки будем оставлять либо убирать ненужные формы.

Техническая реализация

Данные сохраняются в печеньках(cookies), получить значение, к примеру имени можно при помощи переменной $comment_author.

Собственно сам код с комментариями , добавляем его, точнее даже редактируют свой под этот формат, в файле comments.php:

<!-- Проверяем значение $comment_author: пусто или не пусто  -->
<?php if($comment_author =="")
{
?>
<!-- Формы видны, $comment_author — пуст  -->
<input type="Text" tabindex="2" name="author" value="Ваше имя *" > 

<input type="Text" tabindex="3" name="email" value="Электропочта *"> 

<input type="Text" tabindex="4" name="url" value="Ваш сайт">

<?php } else { ?>
<!-- $comment_author — заполнен, формы скрыты  -->

Рад видеть Вас снова <b><?php echo $comment_author; ?></b>. Ничего заполнять не нужно.

<!-- Меняем тип  input'а на hidden для его скрытия -->
<input type="hidden" name="author" value="<?php echo $comment_author; ?>" />
<input type="hidden" name="email" value="<?php echo $comment_author_email; ?>" />
<input type="hidden" name="url" value="<?php echo $comment_author_url; ?>" />
<?php } ?>
<!-- Не забывайте удалять комментарии -->

Вот собственно и весь трюк, пример простенький, но жутко полезный.

Если Вы решите использовать данный прием, поставьте ссылочку(трекбек) на данную запись мне будет очень приятно, кроме того я смогу отследить людей которым моя заметка была действительно полезно.

Всем спасибо! До встречи! ;-)

5284 Комментария для “Приятное комментирование”

  1. dating oslo 21 мая 2012 at 13:36 Permalink

    I do enjoy the manner in which you have framed this particular difficulty and it really does give me a lot of fodder for consideration. However, from everything that I have personally seen, I just simply hope as the actual opinions pack on that individuals stay on issue and don’t start on a tirade involving some other news du jour. Yet, thank you for this outstanding piece and whilst I do not go along with this in totality, I value the perspective.

  2. buty damskie 21 мая 2012 at 13:39 Permalink

    Very interesting details you have mentioned , appreciate it for posting . «Success is a journey, not a destination. The doing is often more important than the outcome.» by Arthur Ashe.

  3. Sewa Komputer 21 мая 2012 at 14:08 Permalink

    Hello my loved one! I want to say that this article is awesome, great written and come with almost all vital infos. I would like to see extra posts like this.

  4. bes900xl 21 мая 2012 at 14:10 Permalink

    I haven’t checked in here for some time as I thought it was getting boring, but the last few posts are good quality so I guess I’ll add you back to my everyday bloglist. You deserve it my friend :)

  5. remortgage advice 21 мая 2012 at 14:28 Permalink

    Wonderful blog you have here but I was wanting to know if you knew of any user discussion forums that cover the same topics discussed here? I’d really love to be a part of online community where I can get comments from other experienced individuals that share the same interest. If you have any recommendations, please let me know. Cheers!

  6. sunny 21 мая 2012 at 14:59 Permalink

    Dead indited content , thanks for selective information .

  7. Haynes Station Homes 21 мая 2012 at 15:23 Permalink

    I would like to thnkx for the efforts you have put in writing this site. I’m hoping the same high-grade website post from you in the future too. In fact your creative writing abilities has inspired me to get my own blog going now. Actually blogging is spreading its wings and growing quickly. Your write up is a good example.

  8. time management 21 мая 2012 at 15:25 Permalink

    Hi, I just discovered your blog via Bing. Your viewpoint is truly relevant to my life at this moment, and I’m really pleased I discovered your website.

  9. Nike Free shoes 21 мая 2012 at 15:39 Permalink

    I have read a few of the articles on your website now, and I really like your style of blogging. I added it to my favorites blog site list and will be checking back soon. Please check out my site as well and let me know what you think.

  10. mini motor racing apk 21 мая 2012 at 15:48 Permalink

    Приятное комментирование | Ð§ÐµÑ€Ð½ÐµÐ².ру I was recommended this web site by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my problem. You’re incredible! Thanks! your article about Приятное комментирование | Ð§ÐµÑ€Ð½ÐµÐ².руBest Regards Justin

  11. Lathe Xhuck Supplies 21 мая 2012 at 15:59 Permalink

    I hope you never stop! This is one of the best blogs Ive ever read. Youve got some mad skill here, man. I just hope that you dont lose your style because youre definitely one of the coolest bloggers out there. Please keep it up because the internet needs someone like you spreading the word.

  12. banken 21 мая 2012 at 16:23 Permalink

    I regard something really interesting about your web site so I bookmarked.

  13. parainfluenzae 21 мая 2012 at 16:24 Permalink

    Great blog right here! Additionally your web site quite a bit up fast! What web host are you the usage of? Can I am getting your affiliate hyperlink to your host? I want my website loaded up as fast as yours lol

  14. carpet cleaner 21 мая 2012 at 16:29 Permalink

    Thanks for the auspicious writeup. It actually was once a enjoyment account it. Look advanced to more brought agreeable from you! By the way, how can we keep in touch?

  15. banken 21 мая 2012 at 16:30 Permalink

    I am impressed with this internet site, very I am a big fan.

  16. off plan turkey 21 мая 2012 at 17:30 Permalink

    Thank you for sharing this great post. Very interesting ideas! (as always, btw)

  17. mini motor racing apk 21 мая 2012 at 17:43 Permalink

    Приятное комментирование | Ð§ÐµÑ€Ð½ÐµÐ².ру I was recommended this blog by my cousin. I am not sure whether this post is written by him as nobody else know such detailed about my trouble. You’re incredible! Thanks! your article about Приятное комментирование | Ð§ÐµÑ€Ð½ÐµÐ².руBest Regards Lawrence

  18. lacoste online 21 мая 2012 at 17:50 Permalink

    That’s a great post. Thank you so much.

  19. Kata Bijak 21 мая 2012 at 17:55 Permalink

    You actually make it seem so easy with your presentation but I find this matter to be actually something that I think I would never understand. It seems too complex and extremely broad for me. I’m looking forward for your next post, I will try to get the hang of it!

  20. rokettube 21 мая 2012 at 18:15 Permalink

    Congratulations on your site that is always open to innovation. Thank you Free Porn, porno, sex, rokettube, xxx management rokettubee.biz «porno» Thank youu videos

  21. bingo sites online 21 мая 2012 at 18:46 Permalink

    Hello.This article was really interesting, particularly because I was browsing for thoughts on this issue last week.

  22. financial markets 21 мая 2012 at 18:51 Permalink

    I’m still learning from you, while I’m making my way to the top as well. I certainly love reading everything that is posted on your blog.Keep the posts coming. I enjoyed it!

  23. bingo players 21 мая 2012 at 19:09 Permalink

    You are a very clever individual!

  24. mango african weight loss 21 мая 2012 at 19:21 Permalink

    I was wondering if you ever considered changing the layout of your blog? Its very well written; I love what youve got to say. But maybe you could a little more in the way of content so people could connect with it better. Youve got an awful lot of text for only having one or two images. Maybe you could space it out better?

  25. bayan escort izmir 21 мая 2012 at 19:51 Permalink

    izmir bayan escortlar kulubü.

  26. Ogrody Wrocław 21 мая 2012 at 19:58 Permalink

    I actually wanted to jot down a message so as to thank you for the unique tricks you are writing here. My particularly long internet research has now been rewarded with good quality insight to talk about with my friends and classmates. I would state that that we site visitors actually are extremely blessed to live in a useful site with so many perfect people with very helpful concepts. I feel quite grateful to have encountered your entire webpages and look forward to so many more exciting times reading here. Thanks a lot once again for all the details.

  27. Mała architektura 21 мая 2012 at 20:05 Permalink

    Simply desire to say your article is as surprising. The clarity in your post is simply excellent and i could assume you are an expert on this subject. Fine with your permission allow me to grab your RSS feed to keep updated with forthcoming post. Thanks a million and please keep up the enjoyable work.

  28. fotografia slubna wroclaw 21 мая 2012 at 20:06 Permalink

    Hey this is kinda of off topic but I was wondering if blogs use WYSIWYG editors or if you have to manually code with HTML. I’m starting a blog soon but have no coding know-how so I wanted to get guidance from someone with experience. Any help would be greatly appreciated!

  29. sell my car 21 мая 2012 at 20:26 Permalink

    I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! keep up the good work.

  30. Samochodem do Chorwacji 21 мая 2012 at 20:58 Permalink

    Thank you a bunch for sharing this with all people you actually know what you are speaking approximately! Bookmarked. Please additionally talk over with my site =). We could have a hyperlink change contract among us!

  31. dududukkkkkkk 21 мая 2012 at 21:04 Permalink

    Great post at Приятное комментирование | Ð§ÐµÑ€Ð½ÐµÐ².ру. I was checking constantly this blog and I’m impressed! Very useful information particularly the last part :) I care for such info a lot. I was looking for this particular info for a very long time. Thank you and good luck.

  32. Online Casino Review 21 мая 2012 at 21:35 Permalink

    Oh my goodness! an amazing article dude. Thank you However I am experiencing issue with ur rss . Don’t know why Unable to subscribe to it. Is there anyone getting identical rss problem? Anyone who knows kindly respond. Thnkx

  33. Cheap Hotel 21 мая 2012 at 22:08 Permalink

    I have been absent for a while, but now I remember why I used to love this web site. Thanks, I’ll try and check back more often. How frequently you update your web site?

  34. phen375 review 21 мая 2012 at 22:08 Permalink

    hey there and thank you for your info – I’ve certainly picked up something new from right here. I did however expertise a few technical issues using this site, as I experienced to reload the website many times previous to I could get it to load correctly. I had been wondering if your web host is OK? Not that I am complaining, but sluggish loading instances times will often affect your placement in google and can damage your quality score if advertising and marketing with Adwords. Anyway I am adding this RSS to my email and can look out for a lot more of your respective interesting content. Make sure you update this again soon..

  35. I do not even know how I ended up here, but I thought this post was good. I don’t know who you are but certainly you are going to a famous blogger if you are not already ;) Cheers!

  36. lacoste online 21 мая 2012 at 22:37 Permalink

    Of course, what a splendid site and informative posts, I surely will bookmark your site.Best Regards!

  37. seo specialist 21 мая 2012 at 22:47 Permalink

    You lost me, friend. I mean, I assume I get what youre saying. I recognize what you are saying, but you just seem to have ignored that you’ll find some other folks inside the world who view this matter for what it truly is and may well not agree with you. You might be turning away many of folks who may have been followers of your website.

  38. facebook fans 21 мая 2012 at 22:52 Permalink

    Congratulations for posting such a useful blog. Your blog isn’t only informative but also extremely artistic too. There usually are extremely couple of individuals who can write not so easy articles that creatively. Keep up the good writing !!

  39. klip indir 21 мая 2012 at 22:56 Permalink

    oo good page thanks you admin

  40. channel partner marketing 21 мая 2012 at 23:18 Permalink

    I was very thrilled to discover this site on yahoo.I wanted to say thank you to you with regard to this great post!! I undoubtedlyenjoyed every little bit of it and I’ve you bookmarked to check out new stuff you post.

  41. weight loss supplement 21 мая 2012 at 23:23 Permalink

    Wow that was odd. I just wrote an incredibly long comment but after I clicked submit my comment didn’t show up. Grrrr… well I’m not writing all that over again. Anyways, just wanted to say superb blog!

  42. bryce harper 21 мая 2012 at 23:26 Permalink

    Thanks for your suggestions. One thing I’ve noticed is that often banks plus financial institutions understand the spending practices of consumers and as well understand that the majority of people max out their cards around the breaks. They sensibly take advantage of this real fact and begin flooding ones inbox along with snail-mail box by using hundreds of no-interest APR card offers immediately after the holiday season concludes. Knowing that should you be like 98% in the American community, you’ll soar at the chance to consolidate credit debt and move balances for 0 APR credit cards.

  43. buy phen375 21 мая 2012 at 23:28 Permalink

    Throughout the great design of things you actually receive a B- just for hard work. Where exactly you actually confused us ended up being in your particulars. As people say, details make or break the argument.. And it could not be more true in this article. Having said that, allow me say to you what exactly did work. The writing is definitely pretty engaging which is most likely why I am making the effort in order to opine. I do not make it a regular habit of doing that. Next, although I can certainly notice a leaps in reason you come up with, I am not certain of just how you seem to connect the points that help to make the final result. For now I will yield to your position however trust in the future you actually connect the facts much better.

  44. Extremely decent post. I found your webpage and wished to state that I have quite loved browsing your blog posts.

  45. [phen375 customer reviews] 21 мая 2012 at 23:56 Permalink

    Hi! Someone in my Facebook group shared this site with us so I came to give it a look. I’m definitely enjoying the information. I’m book-marking and will be tweeting this to my followers! Fantastic blog and terrific design and style.

  46. Dan from razor mx350 22 мая 2012 at 0:11 Permalink

    Woah this blog is excellent i really like reading your posts. Stay up the great paintings! You recognize, lots of individuals are hunting around for this info, you could help them greatly.

  47. accident lawyer mesa 22 мая 2012 at 1:17 Permalink

    Outstanding read, I just passed this onto a colleague who was doing a little research on that. And he really bought me lunch because I found it for him smile So let me rephrase that: Thanks for lunch!

  48. here 22 мая 2012 at 1:17 Permalink

    I don’t suppose I’ve never learned anything like this before. So good to find somebody with some original ideas on this subject. I really thank you for beginning it. This website is one thing that’s wanted on the internet, someone with a bit of originality.


Оставить комментарий