PageRenderTime 40ms CodeModel.GetById 7ms RepoModel.GetById 0ms app.codeStats 1ms

/blog/wp-content/plugins/wp-gravatar/gravatars.php

https://bitbucket.org/chileagil/website
PHP | 1389 lines | 1232 code | 102 blank | 55 comment | 437 complexity | 7b6eac6fc9df52d8de177a65ceedb5b3 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.1

Large files files are truncated, but you can click here to view the full file

  1. <?php
  2. /*
  3. Plugin Name: Wordpress Gravatars
  4. Plugin URI: http://wordpress.org/extend/plugins/wp-gravatar/
  5. Description: Makes use of Gravatars and MyBlogLog Avatars, places Gravatars, OpenAvatar, Wavatar, Identicon, monsterID or MyBlogLog Avatars in the comments section. Uses the comment authors email to display their Gravatar. It also gives the user an Author Profile picture, based on his or hers <strong>Gravatar</strong>. Developer blog at <a href="http://shuttlex.blogdns.net">this site</a>.
  6. Version: 2.7.1
  7. Author: Rune Gulbrandsøy
  8. Author URI: http://gravatar.bloggs.be
  9. */
  10. /*
  11. Copyright 2007 - 2008 Rune (http://bloggs.be/rune/)
  12. This program is free software; you can redistribute it and/or modify
  13. it under the terms of the GNU General Public License as published by
  14. the Free Software Foundation; either version 2 of the License, or
  15. (at your option) any later version.
  16. This program is distributed in the hope that it will be useful,
  17. but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. GNU General Public License for more details.
  20. You should have received a copy of the GNU General Public License
  21. along with this program; if not, write to the Free Software
  22. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  23. */
  24. /*
  25. The idea for the Favicon parts come from the plugin favatars by Jeff Minard (http://thecodepro.com/). I have used some of his codem and rewritten some of the parts i have used.
  26. Thanks to Petter (http://neppe.no) for the tips about a nofollow option!
  27. */
  28. function gravatar_admin_menu(){
  29. if (function_exists('add_meta_box')) {
  30. add_menu_page('Gravatar', 'Gravatar', 8, 'gravatar', 'gravatar_admin');
  31. } else {
  32. add_submenu_page('themes.php', 'Gravatar', 'Gravatar', 8, 'gravatar', 'gravatar_admin');
  33. }
  34. }
  35. function show_openid(){
  36. echo "This site is using <a href='http://openvatar.com/' target='_blank'>OpenAvatar</a> based on <a href='http://openid.net' target='_blank'><img src='http://shuttlex.blogdns.net/openid.gif'/></a>";
  37. }
  38. function show_gravatar($s) {
  39. $gravatar = get_option('bruk_gravatar');
  40. $openavatar = get_option('bruk_openavatar');
  41. $gravatar_align = get_option('bruk_gravatar_align');
  42. $default = get_option('default_gravatar');
  43. $default_pingback = get_option('default_gravatar_pingback');
  44. $gravatar_use_url = get_option('bruk_gravatar_url');
  45. $gravatar_use_url_follow = get_option('bruk_gravatar_url_follow');
  46. $home_url = get_option('bruk_gravatar_home_url');
  47. $use_favico = get_option('bruk_gravatar_favico');
  48. $use_mbl = get_option('bruk_mbl_ikon');
  49. $gravatar_no_page = get_option('bruk_gravatar_pages');
  50. $gravatar_size = get_option('bruk_gravatar_size');
  51. $gravatar_rating = get_option('bruk_gravatar_rating');
  52. $gravatar_css = get_option('bruk_gravatar_css');
  53. if($gravatar == true && get_option('stylesheet') != 'prologue'){
  54. if (is_page() && $gravatar_no_page == true && !is_single()){
  55. }else{
  56. global $comment, $type;
  57. $comment_tekst = $comment->get_comment_text;
  58. $kommentar_type = $comment->get_comment_type;
  59. if ( !empty( $comment->comment_author_email ) ) {
  60. $lowercase = strtolower($comment->comment_author_email);
  61. $md5 = md5( $lowercase );
  62. //$default == $default_gravatar;
  63. $comment_name = $comment->comment_author;
  64. if ( $comment->comment_author_url == 'http://' || $comment->comment_author_url == '') {
  65. $comment_link = get_option('home');
  66. }else{
  67. $comment_link = $comment->comment_author_url;
  68. if ($use_favico == true){
  69. $favicon_url = getFavicon($comment_link);
  70. $default = $favicon_url;
  71. if ($default == '')
  72. $default = get_option('default_gravatar');
  73. }
  74. }
  75. //OpenAvatar section
  76. if ( $default = get_option('default_gravatar') && $openavatar == true) {
  77. if ( $comment->comment_author_url == 'http://' || $comment->comment_author_url == '') {
  78. $comment_url = '';
  79. }else{
  80. $comment_url = $comment->comment_author_url;
  81. }
  82. if (parse_url($comment_url, PHP_URL_PATH)=='')
  83. {
  84. if ( $comment->comment_author_url == 'http://' || $comment->comment_author_url == '') {
  85. $default = get_option('default_gravatar');
  86. }else{
  87. $com_url = $comment->comment_author_url;
  88. if (stristr($com_url, 'myopenid') == true) {
  89. $default = "http://www.openvatar.com/avatar.php?openvatar_id=".md5($comment->comment_author_url);
  90. }else {
  91. $default = get_option('default_gravatar');
  92. }}}
  93. else
  94. {
  95. if ( $comment->comment_author_url == 'http://' || $comment->comment_author_url == '') {
  96. $default = get_option('default_gravatar');
  97. }else{
  98. $com_url = $comment->comment_author_url;
  99. if (stristr($com_url, 'myopenid') == true) {
  100. $default = "http://www.openvatar.com/avatar.php?openvatar_id=".md5($comment->comment_author_url);
  101. }else {
  102. $default = get_option('default_gravatar');
  103. }}}
  104. if ($use_mbl == true && $default == get_option('default_gravatar')){
  105. $default = "http://pub.mybloglog.com/coiserv.php?href=mailto:" . $lowercase . "&amp;n=". $lowercase;
  106. }
  107. }
  108. // End of OpenAvatar Section
  109. //edit the style to what you want, the standard style looks good on most themes.
  110. if($gravatar_use_url_follow == true){
  111. $follow_links = "rel='external nofollow'";
  112. } else {
  113. $follow_links = "rel='external'";
  114. }
  115. if ($gravatar_size == '' || $gravatar_size == ' ') {
  116. $gravatar_size = "40";
  117. }else{
  118. $gravatar_size = $gravatar_size;
  119. }
  120. if ($gravatar_rating == '' || $gravatar_rating == ' ') {
  121. $gravatar_rating = "X";
  122. }else{
  123. $gravatar_rating = $gravatar_rating;
  124. }
  125. if ($gravatar_css == '' || $gravatar_css == ' '){
  126. $gravatar_css_temp = "style='float: left; margin-right: 10px; border: none; display:inline;'";
  127. }else{
  128. $gravatar_css_temp = "style='";
  129. $gravatar_css_temp .= $gravatar_css;
  130. $gravatar_css_temp .= "'";
  131. }
  132. if ($default ==' ' || $default ==''){
  133. $default = get_option('default_gravatar');
  134. }
  135. if (get_option('bruk_wavatar_default') == true && $default == get_option('default_gravatar')){
  136. $default = 'wavatar';
  137. }
  138. if (get_option('bruk_identicon_default') == true && $default == get_option('default_gravatar')){
  139. $default = 'identicon';
  140. }
  141. if (get_option('bruk_monsterid_default') == true && $default == get_option('default_gravatar')){
  142. $default = 'monsterid';
  143. }
  144. if (get_option('bruk_own_default') == true){
  145. if (stristr($com_url, 'myopenid') == true) {
  146. $default = "http://www.openvatar.com/avatar.php?openvatar_id=".md5($comment->comment_author_url);
  147. }else {
  148. $default = get_option('default_gravatar');
  149. }}
  150. if($home_url == true && $comment_link != get_option('home')){
  151. $s = "<a href='$comment_link' $follow_links>$comment_name</a><a href='$comment_link' $follow_links><img $gravatar_css_temp src='http://www.gravatar.com/avatar/$md5?rating=$gravatar_rating&amp;default=$default' alt='No Gravatar' width=$gravatar_size height=$gravatar_size/></a>";
  152. } else {
  153. if ($gravatar_use_url == true){
  154. $s = "<a href='$comment_link' $follow_links>$comment_name</a><a href='$comment_link' $follow_links><img $gravatar_css_temp' src='http://www.gravatar.com/avatar/$md5?rating=$gravatar_rating&amp;default=$default' alt='No Gravatar' width=$gravatar_size height=$gravatar_size/></a>";
  155. }else{
  156. $s = "$comment_name<img $gravatar_css_temp src='http://www.gravatar.com/avatar/$md5?rating=$gravatar_rating&amp;default=$default' alt='No Gravatar' width=$gravatar_size height=$gravatar_size/>";
  157. }}
  158. }}
  159. return $s;
  160. }
  161. return $s;
  162. }
  163. function show_gravatar_post($s) {
  164. $gravatar = get_option('bruk_gravatar');
  165. $gravatar_align = get_option('bruk_gravatar_align');
  166. $default = get_option('default_gravatar');
  167. $post_gravatar = get_option('bruk_gravatar_post');
  168. $gravatar_size = get_option('bruk_gravatar_size');
  169. if($post_gravatar == true && get_option('bruk_gravatar_single_post') == false){
  170. global $post;
  171. if ($gravatar_size == '' || $gravatar_size == ' ') {
  172. $gravatar_size = "20";
  173. }else{
  174. $gravatar_size = $gravatar_size;
  175. }
  176. $epost = get_the_author_email();
  177. $lowercase = strtolower($epost);
  178. $md5 = md5($lowercase);
  179. $content=$s;
  180. $s= "<img style='float: left; margin-right: 10px; border: none;' src='http://www.gravatar.com/avatar.php?gravatar_id=$md5&amp;default=$default' alt='No Gravatar' width=$gravatar_size height=$gravatar_size/>";
  181. $s=$s."$content";
  182. }
  183. return $s;
  184. }
  185. function prologue_show_gravatar_post($id) {
  186. global $post,$wpdb,$user;
  187. $default = get_option('default_gravatar');
  188. $gravatar_size = get_option('bruk_gravatar_size');
  189. $epost = $wpdb->get_var("SELECT user_email FROM $wpdb->users WHERE ID=".$id."");
  190. $lowercase = strtolower($epost);
  191. $md5 = md5($lowercase);
  192. if ($gravatar_size == '' || $gravatar_size == ' ') {
  193. $gravatar_size = "48";
  194. }else{
  195. $gravatar_size = $gravatar_size;
  196. }
  197. return "<img style='float: left; margin-right: 10px; border: none;' src='http://www.gravatar.com/avatar.php?gravatar_id=$md5&amp;size=48&amp;default=$default' width=$gravatar_size height=$gravatar_size alt='No Gravatar'/>";
  198. }
  199. function gravatar_footer() {
  200. $side = get_option('blogname');
  201. echo "<p><small><strong>$side</strong>&nbsp;is using <a href='http://gravatar.bloggs.be'>WP-Gravatar</a></small></p>";
  202. }
  203. function show_gravatar_edit($s) {
  204. global $comment;
  205. $gravatar = get_option('bruk_gravatar');
  206. $default = get_option('default_gravatar');
  207. $use_mbl = get_option('bruk_mbl_ikon');
  208. $openavatar = get_option('bruk_openavatar');
  209. $comment_tekst = $comment->comment_text;
  210. if ( !empty( $comment->comment_author_email ) ) {
  211. $lowercase = strtolower($comment->comment_author_email);
  212. $md5 = md5( $lowercase );
  213. if ($use_mbl == true && $default == get_option('default_gravatar')){
  214. $default = "http://pub.mybloglog.com/coiserv.php?href=mailto:" . $lowercase . "&amp;n=". $lowercase;
  215. }
  216. //OpenAvatar section
  217. if ( $default = get_option('default_gravatar') && $openavatar == true) {
  218. if ( $comment->comment_author_url == 'http://' || $comment->comment_author_url == '') {
  219. $comment_url = '';
  220. }else{
  221. $comment_url = $comment->comment_author_url;
  222. }
  223. if (parse_url($comment_url, PHP_URL_PATH)=='')
  224. {
  225. if ( $comment->comment_author_url == 'http://' || $comment->comment_author_url == '') {
  226. $default = get_option('default_gravatar');
  227. }else{
  228. $default = "http://www.openvatar.com/avatar.php?openvatar_id=".md5($comment->comment_author_url.'/');
  229. }}
  230. else
  231. {
  232. if ( $comment->comment_author_url == 'http://' || $comment->comment_author_url == '') {
  233. $default = get_option('default_gravatar');
  234. }else{
  235. $default = "http://www.openvatar.com/avatar.php?openvatar_id=".md5($comment->comment_author_url);
  236. }}
  237. if ($use_mbl == true && $default == get_option('default_gravatar')){
  238. $default = "http://pub.mybloglog.com/coiserv.php?href=mailto:" . $lowercase . "&amp;n=". $lowercase;
  239. }
  240. }
  241. // End of OpenAvatar Section
  242. if ($openavatar == false) {
  243. $default = get_option('default_gravatar');
  244. }
  245. if (get_option('bruk_wavatar_default') == true && $default == get_option('default_gravatar')){
  246. $default = 'wavatar';
  247. }
  248. if (get_option('bruk_identicon_default') == true && $default == get_option('default_gravatar')){
  249. $default = 'identicon';
  250. }
  251. if (get_option('bruk_monsterid_default') == true && $default == get_option('default_gravatar')){
  252. $default = 'monsterid';
  253. }
  254. if (get_option('bruk_own_default') == true){
  255. $default = get_option('default_gravatar');
  256. }
  257. $s = "<img style='float: left; margin-right: 10px; border: none;' src='http://www.gravatar.com/avatar/$md5?size=48&amp;default=$default' alt='' />$comment->comment_content";
  258. }
  259. return $s;
  260. }
  261. function gravatar_admin(){
  262. global $userdata;
  263. get_currentuserinfo();
  264. $current_user = $userdata->ID;
  265. $home_link = get_option('home');
  266. $default_gravatar = get_option('default_gravatar');
  267. if ($default_gravatar != '') {
  268. $default_gravatar_temp = $default_gravatar;
  269. }else{
  270. $default_gravatar_temp = "http://use.perl.org/images/pix.gif";
  271. }
  272. $default_profilepage = get_option('default_profilepage');
  273. if ($default_profilepage != '') {
  274. $default_profilepage_temp = $default_profilepage;
  275. }else{
  276. $default_profilepage_temp = "about";
  277. }
  278. $default_gravatar_size = get_option('bruk_gravatar_size');
  279. if ($default_gravatar_size != '') {
  280. $default_gravatar_size_temp = $default_gravatar_size;
  281. }else{
  282. $default_gravatar_size_temp = "40";
  283. }
  284. $default_gravatar_rating = get_option('bruk_gravatar_rating');
  285. if ($default_gravatar_rating == '' || $default_gravatar_rating == ' ') {
  286. $default_gravatar_rating_temp = "X";
  287. }else{
  288. $default_gravatar_rating_temp = $default_gravatar_rating;
  289. }
  290. $default_gravatar_single_post_pre = get_option('bruk_gravatar_single_post_pre');
  291. if ($default_gravatar_single_post_pre != '') {
  292. $default_gravatar_single_post_pre_temp = $default_gravatar_single_post_pre;
  293. }else{
  294. $default_gravatar_single_post_pre_temp = "This is some text prior to the author information. You can change this text from the admin section of WP-Gravatar";
  295. }
  296. $bruk_gravatar_single_post_color = get_option('bruk_gravatar_single_post_color');
  297. if ($bruk_gravatar_single_post_color != '') {
  298. $bruk_gravatar_single_post_color_temp = $bruk_gravatar_single_post_color;
  299. }else{
  300. $bruk_gravatar_single_post_color_temp = "c3c5c3";
  301. }
  302. $bruk_gravatar_single_img_size = get_option('bruk_gravatar_single_img_size');
  303. if ($bruk_gravatar_single_img_size == '' || $bruk_gravatar_single_img_size == ' ') {
  304. $bruk_gravatar_single_img_size_temp = "30";
  305. }else{
  306. $bruk_gravatar_single_img_size_temp = $bruk_gravatar_single_img_size;
  307. }
  308. $bruk_gravatar_single_img_size_author = get_option('bruk_gravatar_single_img_size_author');
  309. if ($bruk_gravatar_single_img_size_author == '' || $bruk_gravatar_single_img_size_author == ' ') {
  310. $bruk_gravatar_single_img_size_author_temp = "20";
  311. }else{
  312. $bruk_gravatar_single_img_size_author_temp = $bruk_gravatar_single_img_size_author;
  313. }
  314. $bruk_gravatar_single_box_css = get_option('bruk_gravatar_single_box_css');
  315. if ($bruk_gravatar_single_box_css == '' || $bruk_gravatar_single_box_css == ' ') {
  316. $bruk_gravatar_single_post_box_css_temp = "font-size:9px; text-align: left;";
  317. }else{
  318. $bruk_gravatar_single_post_box_css_temp = $bruk_gravatar_single_box_css;
  319. }
  320. $bruk_gravatar_single_img_css = get_option('bruk_gravatar_single_img_css');
  321. if ($bruk_gravatar_single_img_css == '' || $bruk_gravatar_single_img_css == ' ') {
  322. $bruk_gravatar_single_post_img_css_temp = "float: right; border: none;";
  323. }else{
  324. $bruk_gravatar_single_post_img_css_temp = $bruk_gravatar_single_img_css;
  325. }
  326. $bruk_gravatar_author_archive_link = get_option('bruk_gravatar_author_archive_link');
  327. if ($bruk_gravatar_author_archive_link == '' || $bruk_gravatar_author_archive_link == ' ') {
  328. $bruk_gravatar_author_archive_link_temp = "Read more from this author";
  329. }else{
  330. $bruk_gravatar_author_archive_link_temp = $bruk_gravatar_author_archive_link;
  331. }
  332. $bruk_gravatar_css = get_option('bruk_gravatar_css');
  333. if ($bruk_gravatar_css == '' || $bruk_gravatar_css == ' ') {
  334. $bruk_gravatar_css_temp = "float: left; margin-right: 10px; border: none; display:inline;";
  335. }else{
  336. $bruk_gravatar_css_temp = $bruk_gravatar_css;
  337. }
  338. $gravatar = get_option('bruk_gravatar');
  339. $openavatar = get_option('bruk_openavatar');
  340. $openavatar_show = get_option('bruk_openavatar_show');
  341. $gravatar_align = get_option('bruk_gravatar_align');
  342. $gravatar_kudos = get_option('bruk_gravatar_kudos');
  343. $gravatar_profil = get_option('bruk_gravatar_profil');
  344. $gravatar_url = get_option('bruk_gravatar_url');
  345. $gravatar_url_follow = get_option('bruk_gravatar_url_follow');
  346. $gravatar_home_url = get_option('bruk_gravatar_home_url');
  347. $gravatar_favico = get_option('bruk_gravatar_favico');
  348. $gravatar_uid = get_option('bruk_gravatar_uid');
  349. $gravatar_post = get_option('bruk_gravatar_post');
  350. $gravatar_single_post = get_option('bruk_gravatar_single_post');
  351. $gravatar_single_post_top = get_option('bruk_gravatar_single_post_top');
  352. $gravatar_author_archive = get_option('bruk_gravatar_author_archive');
  353. $use_mbl = get_option('bruk_mbl_ikon');
  354. $gravatar_no_page = get_option('bruk_gravatar_pages');
  355. $gravatar_admin_page = get_option('bruk_gravatar_admin');
  356. $use_own = get_option('bruk_own_default');
  357. $use_wavatar = get_option('bruk_wavatar_default');
  358. $use_identicon = get_option('bruk_identicon_default');
  359. $use_monsterid = get_option('bruk_monsterid_default');
  360. if ($gravatar_uid == ' ' || $gravatar_uid == ''){
  361. $temp_uid = '1';
  362. }else{
  363. $temp_uid = $gravatar_uid;
  364. }
  365. $version = "2.7.1";
  366. if ($_POST['updatinggravatar']) {
  367. $temp_grav = $_POST['defaultgravataroption'];
  368. if ($_POST['bruke_gravatar']) {
  369. $gravatar = true;
  370. } else {
  371. $gravatar = false;
  372. }
  373. if ($_POST['bruke_openavatar']) {
  374. $openavatar = true;
  375. } else {
  376. $openavatar = false;
  377. }
  378. if ($_POST['bruke_openavatar_show']) {
  379. $openavatar_show = true;
  380. } else {
  381. $openavatar_show = false;
  382. }
  383. if ($_POST['bruke_gravatar_align']){
  384. $gravatar_align = true;
  385. } else {
  386. $gravatar_align = false;
  387. }
  388. if ($_POST['bruk_gravatar_pages']){
  389. $gravatar_no_page = true;
  390. } else {
  391. $gravatar_no_page = false;
  392. }
  393. if ($_POST['bruk_gravatar_admin']){
  394. $gravatar_admin_page = true;
  395. } else {
  396. $gravatar_admin_page = false;
  397. }
  398. if ($_POST['bruke_gravatar_profil']){
  399. $gravatar_profil = true;
  400. } else {
  401. $gravatar_profil = false;
  402. }
  403. if ($_POST['bruk_gravatar_post']){
  404. $gravatar_post = true;
  405. } else {
  406. $gravatar_post = false;
  407. }
  408. if ($_POST['bruk_gravatar_single_post']){
  409. $gravatar_single_post = true;
  410. } else {
  411. $gravatar_single_post = false;
  412. }
  413. if ($_POST['bruk_gravatar_url']){
  414. $gravatar_url = true;
  415. } else {
  416. $gravatar_url = false;
  417. }
  418. if ($_POST['bruk_gravatar_url_follow']){
  419. $gravatar_url_follow = true;
  420. } else {
  421. $gravatar_url_follow = false;
  422. }
  423. if ($_POST['bruk_gravatar_home_url']){
  424. $gravatar_home_url = true;
  425. } else {
  426. $gravatar_home_url = false;
  427. }
  428. if ($_POST['bruk_gravatar_favico']){
  429. $gravatar_favico = true;
  430. } else {
  431. $gravatar_favico = false;
  432. }
  433. if ($_POST['bruk_gravatar_kudos']){
  434. $gravatar_kudos = true;
  435. } else {
  436. $gravatar_kudos = false;
  437. }
  438. if ($_POST['bruk_own_default']){
  439. $own_default = true;
  440. } else {
  441. $own_default = false;
  442. }
  443. if ($_POST['bruk_wavatar_default']){
  444. $wavatar_default = true;
  445. } else {
  446. $wavatar_default = false;
  447. }
  448. if ($_POST['bruk_identicon_default']){
  449. $identicon_default = true;
  450. } else {
  451. $identicon_default = false;
  452. }
  453. if ($_POST['bruk_monsterid_default']){
  454. $monsterid_default = true;
  455. } else {
  456. $monsterid_default = false;
  457. }
  458. if ($_POST['bruk_mbl_ikon']){
  459. $use_mbl = true;
  460. } else {
  461. $use_mbl = false;
  462. }
  463. if ($_POST['bruk_gravatar_single_post_top']){
  464. $gravatar_single_post_top = true;
  465. } else {
  466. $gravatar_single_post_top = false;
  467. }
  468. if ($_POST['bruk_gravatar_author_archive']){
  469. $gravatar_author_archive = true;
  470. } else {
  471. $gravatar_author_archive = false;
  472. }
  473. if ($_POST['default_gravatar']){
  474. $default_gravatar = $_POST['default_gravatar'];
  475. }
  476. if ($_POST['default_profilepage']){
  477. $default_profilepage = $_POST['default_profilepage'];
  478. }
  479. if ($_POST['gravatar_size']){
  480. $gravatar_size = $_POST['gravatar_size'];
  481. }
  482. if ($_POST['gravatar_rating']){
  483. $gravatar_rating = $_POST['gravatar_rating'];
  484. }
  485. if ($_POST['bruk_gravatar_uid']){
  486. $gravatar_uid = $_POST['bruk_gravatar_uid'];
  487. }
  488. if ($_POST['bruk_gravatar_single_post_pre']){
  489. $gravatar_single_post_pre = $_POST['bruk_gravatar_single_post_pre'];
  490. }
  491. if ($_POST['bruk_gravatar_css']){
  492. $gravatar_css = $_POST['bruk_gravatar_css'];
  493. }
  494. if ($_POST['bruk_gravatar_single_post_color']){
  495. $gravatar_single_post_color = $_POST['bruk_gravatar_single_post_color'];
  496. }
  497. if ($_POST['bruk_gravatar_single_box_css']){
  498. $gravatar_single_box_css = $_POST['bruk_gravatar_single_box_css'];
  499. }
  500. if ($_POST['bruk_gravatar_single_img_css']){
  501. $gravatar_single_img_css = $_POST['bruk_gravatar_single_img_css'];
  502. }
  503. if ($_POST['bruk_gravatar_single_img_size']){
  504. $gravatar_single_img_size = $_POST['bruk_gravatar_single_img_size'];
  505. }
  506. if ($_POST['bruk_gravatar_single_img_size_author']){
  507. $gravatar_single_img_size_author = $_POST['bruk_gravatar_single_img_size_author'];
  508. }
  509. if ($_POST['bruk_gravatar_author_archive_link']){
  510. $gravatar_author_archive_link = $_POST['bruk_gravatar_author_archive_link'];
  511. }
  512. update_option('bruk_gravatar', $gravatar);
  513. update_option('bruk_openavatar', $openavatar);
  514. update_option('bruk_openavatar_show', $openavatar_show);
  515. update_option('bruk_gravatar_align', $gravatar_align);
  516. update_option('bruk_gravatar_profil', $gravatar_profil);
  517. update_option('bruk_gravatar_post', $gravatar_post);
  518. update_option('bruk_gravatar_single_post', $gravatar_single_post);
  519. update_option('bruk_gravatar_single_post_top', $gravatar_single_post_top);
  520. update_option('bruk_gravatar_author_archive', $gravatar_author_archive);
  521. update_option('bruk_gravatar_single_post_pre', $gravatar_single_post_pre);
  522. update_option('bruk_gravatar_single_post_color', $gravatar_single_post_color);
  523. update_option('bruk_gravatar_single_box_css', $gravatar_single_box_css);
  524. update_option('bruk_gravatar_single_img_css', $gravatar_single_img_css);
  525. update_option('bruk_gravatar_single_img_size', $gravatar_single_img_size);
  526. update_option('bruk_gravatar_single_img_size_author', $gravatar_single_img_size_author);
  527. update_option('bruk_gravatar_author_archive_link', $gravatar_author_archive_link);
  528. update_option('bruk_gravatar_url', $gravatar_url);
  529. update_option('bruk_gravatar_css', $gravatar_css);
  530. update_option('bruk_gravatar_url_follow', $gravatar_url_follow);
  531. update_option('bruk_gravatar_home_url', $gravatar_home_url);
  532. update_option('bruk_gravatar_favico', $gravatar_favico);
  533. update_option('default_gravatar', $default_gravatar);
  534. update_option('default_profilepage', $default_profilepage);
  535. update_option('bruk_gravatar_uid', $gravatar_uid);
  536. update_option('bruk_mbl_ikon', $use_mbl);
  537. update_option('bruk_own_default', $own_default);
  538. update_option('bruk_wavatar_default', $wavatar_default);
  539. update_option('bruk_identicon_default', $identicon_default);
  540. update_option('bruk_monsterid_default', $monsterid_default);
  541. update_option('bruk_gravatar_pages', $gravatar_no_page);
  542. update_option('bruk_gravatar_admin', $gravatar_admin_page);
  543. update_option('bruk_gravatar_size', $gravatar_size);
  544. update_option('bruk_gravatar_rating', $gravatar_rating);
  545. update_option('bruk_gravatar_kudos', $gravatar_kudos);
  546. if (function_exists('add_meta_box')) {
  547. echo '<div id="message" class="updated fade"><p>Your choices has been updated - please press <a href="admin.php?page=gravatar">here</a> to see the changes!</p></div>';
  548. }else{
  549. echo '<div id="message" class="updated fade"><p>Your choices has been updated - please press <a href="themes.php?page=gravatar">here</a> to see the changes!</p></div>';
  550. }
  551. }
  552. ?>
  553. <div class="wrap">
  554. <h2><?php _e('Gravatars')?></h2>
  555. <form action="" method="post">
  556. <p class="submit">
  557. <input value="Update Gravatars &raquo;" type="submit" />
  558. <input name="updatinggravatar" value="true" type="hidden" />
  559. <input type="hidden" name="action" value="update" /></p>
  560. <div class="wrap">
  561. <?php if (function_exists('add_meta_box')) { ?>
  562. <?php
  563. if (get_option('stylesheet') == 'prologue'){ ?>
  564. <table class="form-table">
  565.  <tr>
  566.   <th valign="top" scope="row">Gravatars?</th>
  567.   <td>
  568. <p><label><input name="bruke_gravatar" value="gravatar" type="checkbox" <?php if ($gravatar) { ?> checked="checked" <?php } ?> /> Use Gravatars with your comments.</label></p>
  569. <p><label>You're using the Prologue theme, and that means that your settings here will have no effect on the showing of Gravatars with your comments. If you like to use the other functions of this plugin, you have to leave this option <strong>on</strong>, as this is what makes the rest of the functions to work!</label></p>
  570. </td>
  571.  </tr>
  572. </table>
  573. <?php }?>
  574. <?php if (get_option('stylesheet') != 'prologue'){ ?>
  575. <table class="form-table">
  576.  <tr>
  577.   <th valign="top" scope="row">Gravatars - MyBlogLog - OpenAvatar (<span class="givemesometips" title="Here you choose what you want to show!">?</span>)</th>
  578.   <td>
  579. <p><label><input name="bruke_gravatar" value="gravatar" type="checkbox" <?php if ($gravatar) { ?> checked="checked" <?php } ?> /> Use <strong><span class="givemesometips" title="Use Gravatars with your comments">Gravatars</span></strong> with your comments.</label> </p>
  580. <p><label><input name="bruke_openavatar" value="openavatar" type="checkbox" <?php if ($openavatar) { ?> checked="checked" <?php } ?> /> Use <a href="http://www.openvatar.com">OpenAvatar</a> with your comments.</label></p>
  581. <p><label><input name="bruke_openavatar_show" value="openavatar_show" type="checkbox" <?php if ($openavatar_show) { ?> checked="checked" <?php } ?> /> Tell your visitors you are using OpenAvatar below the write comment field.</label></p>
  582. <p><label><input name="bruk_mbl_ikon" value="use_mbl" type="checkbox" <?php if ($use_mbl) { ?> checked="checked" <?php } ?> /> Use MyBlogLog avatars with your comments. <small>This will override your sites default Gravatar with MyBlogLog's default Avatar.</small></label></p>
  583. <p><label><input name="bruk_gravatar_favico" value="gravatar_favico" type="checkbox" <?php if ($gravatar_favico) { ?> checked="checked" <?php } ?> /> Replace the sites standard Gravatar with the users websites <em>favico.ico</em> image. If the site does not have a <em>favico.ico</em> file, the sites standard Gravatar will be used. <br/> <small>The use of this option <em><strong>WILL</strong></em> slow down the loading of single pages/posts and the front page and is not recommended.</small></label></p>
  584. <br/>
  585. <p><label><?php _e('Default Gravatar to use (complete URI (eg <em>' . $home_link . '/default.jpg</em>)&nbsp;<input type="text" name="default_gravatar" value="' . $default_gravatar_temp . '" size="50"/>')?><br/>
  586. <?php _e('<small>Current default Gravatar : ' . $default_gravatar_temp . ' <img src="' . $default_gravatar_temp . '" width="30px" height="30px"/></small>')?></label></p>
  587. <?php } ?>
  588. <h3>Choose your sites default Gravatar</h3>
  589. <p><small>Choose only one of the options - if more than one is checked <?php _e(' <img src="' . $default_gravatar_temp . '" width="15px" height="15px"/>')?> will be used.</small></p>
  590. <p><label><input name="bruk_own_default" value="use_own" type="checkbox" <?php if ($use_own) { ?> checked="checked" <?php } ?> /> Use your own default Gravatar for users without Gravatars. As you see above!</label></p>
  591. <p><label><input name="bruk_wavatar_default" value="use_wavatar" type="checkbox" <?php if ($use_wavatar) { ?> checked="checked" <?php } ?> /> Use a <a href="http://www.shamusyoung.com/twentysidedtale/?p=1462">Wavatar</a> as default Gravatar for users without Gravatars.</label></p>
  592. <p><label><input name="bruk_identicon_default" value="use_identicon" type="checkbox" <?php if ($use_identicon) { ?> checked="checked" <?php } ?> /> Use a <a href="http://scott.sherrillmix.com/blog/blogger/wp_identicon/">Identicon</a> as default Gravatar for users without Gravatars.</label></p>
  593. <p><label><input name="bruk_monsterid_default" value="use_monsterid" type="checkbox" <?php if ($use_monsterid) { ?> checked="checked" <?php } ?> /> Use a <a href="http://scott.sherrillmix.com/blog/blogger/wp_monsterid/">MonsterID</a> as default Gravatar for users without Gravatars.</label></p>
  594. </td>
  595.  </tr>
  596. </table>
  597. <table class="form-table">
  598.  <tr>
  599.   <th valign="top" scope="row">Links</th>
  600.   <td>
  601. <?php
  602. if (get_option('stylesheet') == 'prologue'){ ?>
  603. <div class="wrap">
  604. <h4><?php _e('Automattics Prologue theme');?></h4>
  605. <p><label>Your using Automattics Prologue theme, and the options usually found here has no effect on this theme! When you change your theme, they will come back!</label></p>
  606. </td>
  607.  </tr>
  608. </table>
  609. <?php } ?>
  610. <?php if (get_option('stylesheet') != 'prologue'){ ?>
  611. <p><label><input name="bruk_gravatar_home_url" value="gravatar_home_url" type="checkbox" <?php if ($gravatar_home_url) { ?> checked="checked" <?php } ?> /> Gravatars and name will link back to commenters site</em></label></p>
  612. <p><label><input name="bruk_gravatar_url" value="gravatar_url" type="checkbox" <?php if ($gravatar_url) { ?> checked="checked" <?php } ?> /> Gravatars and name for users with no given blog/url link will be linked back to: <em><?php echo get_option('home'); ?></em></label></p>
  613. <p><label><input name="bruk_gravatar_url_follow" value="gravatar_url_follow" type="checkbox" <?php if ($gravatar_url_follow) { ?> checked="checked" <?php } ?> /> Use &lt;<em>rel=external nofollow</em>&gt; with links to commenters sites.</label></p>
  614. <?php } ?>
  615. </td>
  616.  </tr>
  617. </table>
  618. <table class="form-table">
  619.  <tr>
  620.   <th valign="top" scope="row">Alignment/Placement and Size</th>
  621.   <td>
  622. <?php if (get_option('stylesheet') != 'prologue'){
  623. ?>
  624. <p><label><input name="bruk_gravatar_post" value="gravatar_post" type="checkbox" <?php if ($gravatar_post) { ?> checked="checked" <?php } ?> /> Use your Gravatar with your blog posts. This will always be on the left side, before your content.</label></p>
  625. <?php }
  626. if (get_option('bruk_gravatar_post') == true && get_option('stylesheet') == 'prologue') { ?>
  627. <h4><?php _e('Automattic Prologue theme');?></h4>
  628. <p><label>You are using Automattic's Prologue Theme. And you've chosen to use Gravatrs with each post. To get your theme to work as it should, turn this off...</label></p>
  629. <p><label><input name="bruk_gravatar_post" value="gravatar_post" type="checkbox" <?php if ($gravatar_post) { ?> checked="checked" <?php } ?> /> Use your Gravatar with your blog posts. This will always be on the left side, before your content.</label></p>
  630. </td>
  631.  </tr>
  632. </table>
  633. <?php }
  634. ?>
  635. <?php
  636. if (get_option('stylesheet') == 'prologue'){ ?>
  637. <h4><?php _e('Automattics Prologue theme');?></h4>
  638. <p><label>Your using Automattics Prologue theme, and the options usually found here has no effect on this theme! When you change your theme, they will come back!</label></p>
  639. <?php } ?>
  640. <?php if (get_option('stylesheet') != 'prologue'){ ?>
  641. <p><label><?php _e('Gravatar CSS <input type="text" name="bruk_gravatar_css" value="' . $bruk_gravatar_css_temp . '" size="80"/>&nbsp;<small>(used as typed, does only affect the comment section)</small>')?></label></p>
  642. <p><label><input name="bruk_gravatar_pages" value="gravatar_no_page" type="checkbox" <?php if ($gravatar_no_page) { ?> checked="checked" <?php } ?> /> Exclude Gravatars, OpenAvatar, MyBlogLog and Favico from <a href="http://codex.wordpress.org/Pages" target="_blank"><em>Pages</em></a>&nbsp;&nbsp;<small>(Link opens a new window)</small>.</label></p>
  643. <p><label><?php _e('<input type="text" name="gravatar_size" value="' . $default_gravatar_size_temp . '" size="2"/>&nbsp;Size of Gravatars, OpenAvatar, MyBlogLog and Favico in Comments&nbsp;')?></label></p>
  644. <p><label><?php _e('Show Gravatars with this rating or lower') ?>&nbsp;&nbsp;
  645. <select name="gravatar_rating" id="gravatar_rating">
  646. <?php
  647. $ratings = array( 'G' => _c('G|rating'), 'PG' => _c('PG|Rating'), 'R' => _c('R|Rating'), 'X' => _c('X|Rating'));
  648. foreach ($ratings as $key => $rating) :
  649. $selected = ($default_gravatar_rating_temp == $key) ? 'selected="selected"' : '';
  650. echo "\n\t<option value='$key' $selected>$rating</option>";
  651. endforeach;
  652. ?>
  653. </select></p>
  654. <?php } ?>
  655. <p><label><input name="bruk_gravatar_admin" value="gravatar_admin_page" type="checkbox" <?php if ($gravatar_admin_page) { ?> checked="checked" <?php } ?> /> Show Gravatars, OpenAvatar and MyBlogLog avatars in the <a href="edit-comments.php" target="_self"><em>Edit Comments</em></a> section.</label></p>
  656. </td>
  657.  </tr>
  658. </table>
  659. <table class="form-table">
  660.  <tr>
  661.   <th valign="top" scope="row">Author Profile Box</th>
  662.   <td>
  663. <p><label><input name="bruk_gravatar_single_post" value="gravatar_single_post" type="checkbox" <?php if ($gravatar_single_post) { ?> checked="checked" <?php } ?> /> Place an <em>about</em> (the author) box with every post when viewed as a single page.<small>(this will override the <em>use of gravatars with your blog post option</em>)</small></label></p>
  664. <p><label><input name="bruk_gravatar_single_post_top" value="gravatar_single_post_top" type="checkbox" <?php if ($gravatar_single_post_top) { ?> checked="checked" <?php } ?> /> Places the <em>about</em> box before the post (default is after the post).</label></p>
  665. <p><label><?php _e('Text to display before author profile.<br/><textarea name="bruk_gravatar_single_post_pre" id="bruk_gravatar_single_post_pre" cols="50%" rows="5">' . $default_gravatar_single_post_pre_temp . ' </textarea>&nbsp;<br/>&nbsp;')?></label></p>
  666. <p><label><input name="bruk_gravatar_author_archive" value="gravatar_author_archive" type="checkbox" <?php if ($gravatar_author_archive) { ?> checked="checked" <?php } ?> /> Link to author archive. &nbsp;</label><label><?php _e('Link text to use <input type="text" name="bruk_gravatar_author_archive_link" value="' . $bruk_gravatar_author_archive_link_temp . '" size="50"/>&nbsp;<small>(used as typed)</small>')?></label></p>
  667. <p><label><?php _e('Textcolor to use (in hex) #<input type="text" name="bruk_gravatar_single_post_color" value="' . $bruk_gravatar_single_post_color_temp . '" size="6"/>&nbsp;&nbsp;')?></label></p>
  668. <p><label><?php _e('Size of image <input type="text" name="bruk_gravatar_single_img_size" value="' . $bruk_gravatar_single_img_size_temp . '" size="2"/>&nbsp;&nbsp;')?></label></p>
  669. <p><label><?php _e('CSS box tag <input type="text" name="bruk_gravatar_single_box_css" value="' . $bruk_gravatar_single_post_box_css_temp . '" size="80"/>&nbsp;&nbsp;')?></label></p>
  670. <p><label><?php _e('CSS img tag <input type="text" name="bruk_gravatar_single_img_css" value="' . $bruk_gravatar_single_post_img_css_temp . '" size="80"/>&nbsp;&nbsp;')?></label></p>
  671. </td>
  672.  </tr>
  673. </table>
  674. <table class="form-table">
  675.  <tr>
  676.   <th valign="top" scope="row">Widgets</th>
  677.   <td>
  678. <p><label><input name="bruke_gravatar_profil" value="gravatar_profil" type="checkbox" <?php if ($gravatar_profil) { ?> checked="checked" <?php } ?> /> Use the <strong>Author Profile</strong> widget (you have to activate the widget from the widget page).</label>
  679. <label><?php _e('User ID for show with profile widget (eg <em>1</em>)&nbsp;<input type="text" name="bruk_gravatar_uid" value="' . $temp_uid . '" size="2"/>&nbsp;(<small>Your user ID is <strong><em>' . $current_user . '</em></strong></small>)')?></label></p>
  680. <p><label><?php _e('Size of profile picture <input type="text" name="bruk_gravatar_single_img_size_author" value="' . $bruk_gravatar_single_img_size_author_temp . '" size="2"/>&nbsp;&nbsp;')?></label></p>
  681. <p><label><?php _e('Page that profilepicture links to &nbsp;<input type="text" name="default_profilepage" value="' . $default_profilepage_temp . '" size="30"/>&nbsp;<small>(eg <em>' . $home_link . '/about/</em>)</small>')?><br/>
  682. <?php _e('<small>Current page : ' . $home_link . '/' . $default_profilepage_temp . '/</small>')?></label></p>
  683. <p><label>If your theme does not support widgets, you can place <em>&lt;?php ShowGravatar(x);?&gt;</em> in to your <em>sidebar.php</em>. Replace the <em><strong>x</strong></em> with the author number to show. You can place as many <em>&lt;?php ShowGravatar(x);?&gt;</em> as you want.</label></p>
  684. </td>
  685.  </tr>
  686. </table>
  687. <table class="form-table">
  688.  <tr>
  689.   <th valign="top" scope="row">Support</th>
  690.   <td>
  691. <p><label><input name="bruk_gravatar_kudos" value="gravatar_kudos" type="checkbox" <?php if ($gravatar_kudos) { ?> checked="checked" <?php } ?> /> Give WP-Gravatars some kudos by showing of that you're using it in your footer.</label></p>
  692. <p><?php _e('If you do not have a Gravatar, you can get your very own over at the <a href="http://site.gravatar.com/signup">Gravatar</a> site.')?></p>
  693. <p><label>If you need to revert to standard CSS settings and standard TEXT, just delete the text in the <strong>CSS</strong> and/or <strong>TEXT</strong> fields and press <em>Update</em></label></p>
  694. <p><label>For support, please visit <a href="http://gravatar.bloggs.be/">The WP-Gravatar support forum</a>.</label></p>
  695. <p><?php _e('<small>&copy; <a href="http://gravatar.bloggs.be">Rune G</a> You are using version :<strong>' . $version . '</strong> of WP-Gravatar</small>')?></p>
  696. <p> <a href="http://www.amazon.com/gp/registry/wishlist/1K51U8VX047NY/ref=wl_web"><img src="http://g-ecx.images-amazon.com/images/G/01/gifts/registries/wishlist/v2/web/wl-btn-129-b._V46776269_.gif" width="129" alt="My Amazon.com Wish List" height="42" border="0" /></a></p>
  697. <? if (get_option('stylesheet') == 'prologue') { ?>
  698. <h4><?php _e('Automattic Prologue theme');?></h4>
  699. <p><label>You are using Automattic's Prologue Theme. Some of the options on this page will have no effect on this theme, like the size of the Gravatar can not be changed unless you change it in the <em>functions.php</em> file in the themes directory. The same goes for the default Gravatar to show.</label></p>
  700. </td>
  701.  </tr>
  702. </table>
  703. <?php }
  704. ?>
  705. </td>
  706.  </tr>
  707. </table>
  708. <?php } else { //Not using WP25 - okay heres the version for pre 2.5 ?>
  709. <h4><?php _e('Gravatars - OpenAvatar - MyBlogLog - Favico?');?></h4>
  710. <?php
  711. if (get_option('stylesheet') == 'prologue'){ ?>
  712. <div class="wrap">
  713. <h4><?php _e('Automattics Prologue theme');?></h4>
  714. <p><label><input name="bruke_gravatar" value="gravatar" type="checkbox" <?php if ($gravatar) { ?> checked="checked" <?php } ?> /> Use Gravatars with your comments.</label></p>
  715. <p><label>You're using the Prologue theme, and that means that your settings here will have no effect on the showing of Gravatars with your comments. If you like to use the other functions of this plugin, you have to leave this option <strong>on</strong>, as this is what makes the rest of the functions to work!</label></p>
  716. </div>
  717. <?php }?>
  718. <?php if (get_option('stylesheet') != 'prologue'){ ?>
  719. <p><label><input name="bruke_gravatar" value="gravatar" type="checkbox" <?php if ($gravatar) { ?> checked="checked" <?php } ?> /> Use Gravatars with your comments.</label></p>
  720. <p><label><input name="bruke_openavatar" value="openavatar" type="checkbox" <?php if ($openavatar) { ?> checked="checked" <?php } ?> /> Use <a href="http://www.openvatar.com">OpenAvatar</a> with your comments.</label></p>
  721. <p><label><input name="bruke_openavatar_show" value="openavatar_show" type="checkbox" <?php if ($openavatar_show) { ?> checked="checked" <?php } ?> /> Tell your visitors you are using OpenAvatar below the write comment field.</label></p>
  722. <p><label><input name="bruk_mbl_ikon" value="use_mbl" type="checkbox" <?php if ($use_mbl) { ?> checked="checked" <?php } ?> /> Use MyBlogLog avatars with your comments. <small>This will override your sites default Gravatar with MyBlogLog's default Avatar.</small></label></p>
  723. <p><label><input name="bruk_gravatar_favico" value="gravatar_favico" type="checkbox" <?php if ($gravatar_favico) { ?> checked="checked" <?php } ?> /> Replace the sites standard Gravatar with the users websites <em>favico.ico</em> image. If the site does not have a <em>favico.ico</em> file, the sites standard Gravatar will be used. <br/> <small>The use of this option <em><strong>WILL</strong></em> slow down the loading of single pages/posts and the front page and is not recommended.</small></label></p>
  724. <br/>
  725. <p><label><?php _e('Default Gravatar to use (complete URI (eg <em>' . $home_link . '/default.jpg</em>)&nbsp;<input type="text" name="default_gravatar" value="' . $default_gravatar_temp . '" size="50"/>')?><br/>
  726. <?php _e('<small>Current default Gravatar : ' . $default_gravatar_temp . ' <img src="' . $default_gravatar_temp . '" width="30px" height="30px"/></small>')?></label></p>
  727. <?php } ?>
  728. <h3>Choose your sites default Gravatar</h3>
  729. <p><small>Choose only one of the options - if more than one is checked <?php _e(' <img src="' . $default_gravatar_temp . '" width="15px" height="15px"/>')?> will be used.</small></p>
  730. <p><label><input name="bruk_own_default" value="use_own" type="checkbox" <?php if ($use_own) { ?> checked="checked" <?php } ?> /> Use your own default Gravatar for users without Gravatars. As you see above!</label></p>
  731. <p><label><input name="bruk_wavatar_default" value="use_wavatar" type="checkbox" <?php if ($use_wavatar) { ?> checked="checked" <?php } ?> /> Use a <a href="http://www.shamusyoung.com/twentysidedtale/?p=1462">Wavatar</a> as default Gravatar for users without Gravatars.</label></p>
  732. <p><label><input name="bruk_identicon_default" value="use_identicon" type="checkbox" <?php if ($use_identicon) { ?> checked="checked" <?php } ?> /> Use a <a href="http://scott.sherrillmix.com/blog/blogger/wp_identicon/">Identicon</a> as default Gravatar for users without Gravatars.</label></p>
  733. <p><label><input name="bruk_monsterid_default" value="use_monsterid" type="checkbox" <?php if ($use_monsterid) { ?> checked="checked" <?php } ?> /> Use a <a href="http://scott.sherrillmix.com/blog/blogger/wp_monsterid/">MonsterID</a> as default Gravatar for users without Gravatars.</label></p>
  734. </div>
  735. <div class="wrap">
  736. <h4><?php _e('Links');?></h4>
  737. <?php
  738. if (get_option('stylesheet') == 'prologue'){ ?>
  739. <div class="wrap">
  740. <h4><?php _e('Automattics Prologue theme');?></h4>
  741. <p><label>Your using Automattics Prologue theme, and the options usually found here has no effect on this theme! When you change your theme, they will come back!</label></p>
  742. </div>
  743. <?php } ?>
  744. <?php if (get_option('stylesheet') != 'prologue'){ ?>
  745. <p><label><input name="bruk_gravatar_home_url" value="gravatar_home_url" type="checkbox" <?php if ($gravatar_home_url) { ?> checked="checked" <?php } ?> /> Gravatars and name will link back to commenters site</em></label></p>
  746. <p><label><input name="bruk_gravatar_url" value="gravatar_url" type="checkbox" <?php if ($gravatar_url) { ?> checked="checked" <?php } ?> /> Gravatars and name for users with no given blog/url link will be linked back to: <em><?php echo get_option('home'); ?></em></label></p>
  747. <p><label><input name="bruk_gravatar_url_follow" value="gravatar_url_follow" type="checkbox" <?php if ($gravatar_url_follow) { ?> checked="checked" <?php } ?> /> Use &lt;<em>rel=external nofollow</em>&gt; with links to commenters sites.</label></p>
  748. <?php } ?>
  749. </div>
  750. <div class="wrap">
  751. <h4><?php _e('Alignment/Placement and Size');?></h4>
  752. <?php if (get_option('stylesheet') != 'prologue'){
  753. ?>
  754. <p><label><input name="bruk_gravatar_post" value="gravatar_post" type="checkbox" <?php if ($gravatar_post) { ?> checked="checked" <?php } ?> /> Use your Gravatar with your blog posts. This will always be on the left side, before your content.</label></p>
  755. <?php }
  756. if (get_option('bruk_gravatar_post') == true && get_option('stylesheet') == 'prologue') { ?>
  757. <div class="wrap">
  758. <h4><?php _e('Automattic Prologue theme');?></h4>
  759. <p><label>You are using Automattic's Prologue Theme. And you've chosen to use Gravatrs with each post. To get your theme to work as it should, turn this off...</label></p>
  760. <p><label><input name="bruk_gravatar_post" value="gravatar_post" type="checkbox" <?php if ($gravatar_post) { ?> checked="checked" <?php } ?> /> Use your Gravatar with your blog posts. This will always be on the left side, before your content.</label></p>
  761. </div>
  762. <?php }
  763. ?>
  764. <?php
  765. if (get_option('stylesheet') == 'prologue'){ ?>
  766. <div class="wrap">
  767. <h4><?php _e('Automattics Prologue theme');?></h4>
  768. <p><label>Your using Automattics Prologue theme, and the options usually found here has no effect on this theme! When you change your theme, they will come back!</label></p>
  769. </div>
  770. <?php } ?>
  771. <?php if (get_option('stylesheet') != 'prologue'){ ?>
  772. <p><label><?php _e('Gravatar CSS <input type="text" name="bruk_gravatar_css" value="' . $bruk_gravatar_css_temp . '" size="80"/>&nbsp;<small>(used as typed, does only affect the comment section)</small>')?></label></p>
  773. <p><label><input name="bruk_gravatar_pages" value="gravatar_no_page" type="checkbox" <?php if ($gravatar_no_page) { ?> checked="checked" <?php } ?> /> Exclude Gravatars, OpenAvatar, MyBlogLog and Favico from <a href="http://codex.wordpress.org/Pages" target="_blank"><em>Pages</em></a>&nbsp;&nbsp;<small>(Link opens a new window)</small>.</label></p>
  774. <p><label><?php _e('<input type="text" name="gravatar_size" value="' . $default_gravatar_size_temp . '" size="2"/>&nbsp;Size of Gravatars, Favico and MyBlogLog in Comments&nbsp;')?></label></p>
  775. <p><label><?php _e('Show Gravatars with this rating or lower') ?>&nbsp;&nbsp;
  776. <select name="gravatar_rating" id="gravatar_rating">
  777. <?php
  778. $ratings = array( 'G' => _c('G|rating'), 'PG' => _c('PG|Rating'), 'R' => _c('R|Rating'), 'X' => _c('X|Rating'));
  779. foreach ($ratings as $key => $rating) :
  780. $selected = ($default_gravatar_rating_temp == $key) ? 'selected="selected"' : '';
  781. echo "\n\t<option value='$key' $selected>$rating</option>";
  782. endforeach;
  783. ?>
  784. </select></p>
  785. <?php } ?>
  786. <p><label><input name="bruk_gravatar_admin" value="gravatar_admin_page" type="checkbox" <?php if ($gravatar_admin_page) { ?> checked="checked" <?php } ?> /> Show Gravatar, OpenAvatar and MyBlogLog avatars in the <a href="edit-comments.php" target="_self"><em>Edit Comments</em></a> section.</label></p>
  787. </div>
  788. <div class="wrap">
  789. <h4><?php _e('Author Profile Box');?></h4>
  790. <p><label><input name="bruk_gravatar_single_post" value="gravatar_single_post" type="checkbox" <?php if ($gravatar_single_post) { ?> checked="checked" <?php } ?> /> Place an <em>about</em> (the author) box with every post when viewed as a single page.<small>(this will override the <em>use of gravatars with your blog post option</em>)</small></label></p>
  791. <p><label><input name="bruk_gravatar_single_post_top" value="gravatar_single_post_top" type="checkbox" <?php if ($gravatar_single_post_top) { ?> checked="checked" <?php } ?> /> Places the <em>about</em> box before the post (default is after the post).</label></p>
  792. <p><label><?php _e('Text to display before author profile.<br/><textarea name="bruk_gravatar_single_post_pre" id="bruk_gravatar_single_post_pre" cols="50%" rows="5">' . $default_gravatar_single_post_pre_temp . ' </textarea>&nbsp;<br/>&nbsp;')?></label></p>
  793. <p><label><input name="bruk_gravatar_author_archive" value="gravatar_author_archive" type="checkbox" <?php if ($gravatar_author_archive) { ?> checked="checked" <?php } ?> /> Link to author archive. &nbsp;</label><label><?php _e('Link text to use <input type="text" name="bruk_gravatar_author_archive_link" value="' . $bruk_gravatar_author_archive_link_temp . '" size="50"/>&nbsp;<small>(used as typed)</small>')?></label></p>
  794. <p><label><?php _e('Textcolor to use (in hex) #<input type="text" name="bruk_gravatar_single_post_color" value="' . $bruk_gravatar_single_post_color_temp . '" size="6"/>&nbsp;&nbsp;')?></label></p>
  795. <p><label><?php _e('Size of image <input type="text" name="bruk_gravatar_single_img_size" value="' . $bruk_gravatar_single_img_size_temp . '" size="2"/>&nbsp;&nbsp;')?></label></p>
  796. <p><label><?php _e('CSS box tag <input type="text" name="bruk_gravatar_single_box_css" value="' . $bruk_gravatar_single_post_box_css_temp . '" size="80"/>&nbsp;&nbsp;')?></label></p>
  797. <p><label><?php _e('CSS img tag <input type="text" name="bruk_gravatar_single_img_css" value="' . $bruk_gravatar_single_post_img_css_temp . '" size="80"/>&nbsp;&nbsp;')?></label></p>
  798. </div>
  799. <div class="wrap">
  800. <h4><?php _e('Widgets');?></h4>
  801. <p><label><input name="bruke_gravatar_profil" value="gravatar_profil" type="checkbox" <?php if ($gravatar_profil) { ?> checked="checked" <?php } ?> /> Use the <strong>Author Profile</strong> widget (you have to activate the widget from the widget page).</label>
  802. <label><?php _e('User ID for show with profile widget (eg <em>1</em>)&nbsp;<input type="text" name="bruk_gravatar_uid" value="' . $temp_uid . '" size="2"/>&nbsp;(<small>Your user ID is <strong><em>' . $current_user . '</em></strong></small>)')?></label></p>
  803. <p><label><?php _e('Size of profile picture <input type="text" name="bruk_gravatar_single_img_size_author" value="' . $bruk_gravatar_single_img_size_author_temp . '" size="2"/>&nbsp;&nbsp;')?></label></p>
  804. <p><label><?php _e('Page that profilepicture links to &nbsp;<input type="text" name="default_profilepage" value="' . $default_profilepage_temp . '" size="30"/>&nbsp;<small>(eg <em>' . $home_link . '/about/</em>)</small>')?><br/>
  805. <?php _e('<small>Current page : ' . $home_link . '/' . $default_profilepage_temp . '/</small>')?></label></p>
  806. <p><label>If your theme does not support widgets, you can place <em>&lt;?php ShowGravatar(x);?&gt;</em> in to your <em>sidebar.php</em>. Replace the <em><strong>x</strong></em> with the author number to show. You can place as many <em>&lt;?php ShowGravatar(x);?&gt;</em> as you want.</label></p>
  807. </div>
  808. <div class="wrap">
  809. <h4><?php _e('Support');?></h4>
  810. <p><label><input name="bruk_gravatar_kudos" value="gravatar_kudos" type="checkbox" <?php if ($gravatar_kudos) { ?> checked="checked" <?php } ?> /> Give WP-Gravatars some kudos by showing of that you're using it in your footer.</label></p>
  811. <p><?php _e('If you do not have a Gravatar, you can get your very own over at the <a href="http://site.gravatar.com/signup">Gravatar</a> site.')?></p>
  812. <p><label>If you need to revert to standard CSS settings and standard TEXT, just delete the text in the <strong>CSS</st…

Large files files are truncated, but you can click here to view the full file