comments

Wordpress Comment reply link does not appear

為{幸葍}努か 提交于 2019-12-12 11:34:02
问题 I am using custom code to print the comments but the problem is whatever i do, i cant print the comment reply link under any comment.... here is the code <?php // Do not delete these lines if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) die ('Please do not load this page directly. Thanks!'); if (!empty($post->post_password)) { // if there's a password if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't

wordpress - call a function when a comment is posted

穿精又带淫゛_ 提交于 2019-12-12 09:55:34
问题 I would like to take some action in php whenever someone posts a comment. How can I set up a hook for that? I assume it would go in functions.php... EDIT - here is my udpated code: add_action('comment_post', 'comment_posted'); function comment_posted() { $MyClass = new MyClass(); //I do this in other functions and don't have any blank screen problems $test = ""; $MyClass->doSomething($test); } 回答1: See: http://codex.wordpress.org/Function_Reference/wp_new_comment Calls 'comment_post' action

Eclipse Neon Json editor - allow comments

筅森魡賤 提交于 2019-12-12 08:30:02
问题 Is it possible to allow comments in JSON file? I have a JSON file with comment lines marked with // on the beginning. The file is properly read by com.fasterxml.jackson.databind.ObjectMapper , but JSON editor marks it as error ( Expected value at row:column ) and whole project is marked with error. Is it possible to allow comments or disable validation for one file only? 回答1: Because the JSON format is very simple, Eclipse's built-in JSON validation doesn't provide any granular control over

Facebook FQL comment username = anonymous user

旧巷老猫 提交于 2019-12-12 05:38:57
问题 When quering the FQL comment table like this: SELECT post_fbid, fromid, username, time, text FROM comment WHERE post_id = id I am getting the results but username for every comment is "Anonymous User". Does anyone know why this is happening and has a solution maybe? Thanks 回答1: username The user name that a user entered when they posted a comment. In these cases, the fromid returned will be 0. Note that user names for valid users are not returned here. I honestly don't understand what this

Commenter should see only his comments in wordpress

匆匆过客 提交于 2019-12-12 04:48:59
问题 I'm building a site for a research and my participants will be all logged in to use the site. I would like to make these participants able to see only their own comments, so other users' comments will be hidden. I'm using the comments.php file with, among other things, this simple code: <?php if ( have_comments() ) : ?> <ol class="commentlist"> <?php wp_list_comments(); ?> </ol> <?php if ( ! comments_open() ) : ?> <p class="no-comments">Comments are closed</p> <?php endif; ?> <?php endif; ?>

Facebook comments box not showing

余生长醉 提交于 2019-12-12 04:47:24
问题 For some reason facebook comment box appears on my web articles only after I refresh the article page although it was working correctly few days ago: The website is: http://metallica-gr.net/ , each article contains facebook comments on the bottom of the page. Any ideas? SOLUTION: So I pasted the comments script right before closing instead of right after openning it like it was recommended by Facebook and now it's working again. Not sure why that happened though since it was working fine,

Comments toggle button open multiple comments

别等时光非礼了梦想. 提交于 2019-12-12 04:36:36
问题 I have this script for show/hide comments in the "main" page of my blog: albertosotophotography <script type= "text/javascript"> // Show/Hide Comments jQuery(document).ready(function() { // Get #comments div var uniqueAppend = 1; var tempName = 'comments'; while(jQuery("#comments").length > 0 ){ jQuery("#comments").attr('id',tempName + uniqueAppend++).addClass('commentContainer') } var commentsDiv = jQuery('.commentContainer'); // Only do this work if that div isn't empty if (commentsDiv

How to add a comment style to an emacs mode

倖福魔咒の 提交于 2019-12-12 04:19:58
问题 I am looking to add an additional single line style of comments !* to the Fortran mode on emacs, I'd add this to my init.el file. From what I can see this should be doable using the modify-syntax-entry command, but I am struggling to succeed and there doesn't seem to be a fortran-mode-syntax-table so I can't see how I'd hook it to the mode. My current effort (which causes an error). (modify-syntax-entry ?\!\* "< \n") (modify-syntax-entry ?\n "< \!\*") The error reads An error occurred while

What's the difference between “browser posting” and “program posting”?

混江龙づ霸主 提交于 2019-12-12 04:08:05
问题 I've asked one question about this a month ago, it's here: "post" method to communicate directly with a server. And I still didn't get the reason why sometimes I get 404 error and sometimes everything works fine, I mean I've tried those codes with several different wordpress blogs. Using firefox or IE, you can post the comment without any problem whatever wordpress blog it is, but using python and "post" method directly communicating with a server I got 404 with several blogs. And I've tried

Comments inside HTML/SGML/XML/DTD declarations

笑着哭i 提交于 2019-12-12 03:22:45
问题 In the W3C HTML 4.01 DTDs and earlier, inline comments are frequently used within declarations. For example, the HTML 2.0 Strict DTD has: <!ENTITY % HTML.Version "-//IETF//DTD HTML 2.0 Strict//EN" -- Typical usage: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN"> <html> ... </html> -- > where the HTML entity declaration contains a comment between two double hyphens -- . However, DTD validators seem to flat out reject these sorts of internal comments and throw an error. Are the validators