From 71fba2fb5993f5891f0a05eb482861bf0376ee7f Mon Sep 17 00:00:00 2001 From: Marco Villegas Date: Sat, 25 Dec 2010 13:47:03 -0500 Subject: [PATCH] #981670: Add documentation for robots.txt and custom place for node widget. --- README.txt | 34 ++++++++++++++++++++++++++++++++++ 1 files changed, 34 insertions(+), 0 deletions(-) diff --git README.txt README.txt index 69428ce..8576060 100644 --- README.txt +++ README.txt @@ -156,6 +156,40 @@ Where '' is 'widget' or 'votes'. This templates can be located on the root of your theme folder or inside your widget folder(not really recommended). +== Frequently Asked Questions == + +[qanda] + +How to display voting widget by API for nodes?:: +If you want to custom how and where to show the widget, you need to +render manually each part of the standard node `$content` variable +(fields, body, etc). ++ +[source,php] +---- +content['vud_node_widget_display']['#value']; +// avoid show it twice +unset($node->content['vud_node_widget_display']); + +// render each value inside $content +print $node->content['body']['#value']; + +// print vud widget, here is the place where we want to show it +print $vud_widget; + +// render more values inside $content +---- + +How can I prevent bots to vote when anonymous voting is enabled?:: +When anonymous voting is enabled, you need to modify your 'robots.txt' +file to prevent bots to vote. ++ +---- +Disallow: /vote/ +Disallow: /?q=vote/ +---- == Credits == -- 1.7.2.3