Changeset 325794
- Timestamp:
- 12/24/2010 12:23:20 AM (15 years ago)
- Location:
- postalicious/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
wp-postalicious.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
postalicious/trunk/readme.txt
r292852 r325794 5 5 Requires at least: 2.3 6 6 Tested up to: 3.0.1 7 Stable tag: 2.9. 17 Stable tag: 2.9.3 8 8 9 9 Postalicious is a WordPress plugin that automatically posts your delicious, ma.gnolia, Google Reader, Reddit, Yahoo Pipes, or Jumptags bookmarks to your blog. … … 71 71 72 72 == Changelog == 73 74 = Version 2.9.3 = 75 76 * Add `%author_name%` and `%source_link%` template variables (in Delicious.com service only). 77 * Minor formatting improvements on settings page. 73 78 74 79 = Version 2.9.2 = -
postalicious/trunk/wp-postalicious.php
r292852 r325794 4 4 Plugin URI: http://neop.gbtopia.com/?p=108 5 5 Description: Automatically create posts with your delicious bookmarks. 6 Version: 2.9. 26 Version: 2.9.3 7 7 Author: Pablo Gomez 8 8 Author URI: http://neop.gbtopia.com … … 616 616 <td> 617 617 <input name="nd_linktemplate" type="text" id="nd_linktemplate" value="<?php echo $nd_linktemplate; ?>" size="75" onchange="this.form.nd_settingschanged.value=1" /><br /> 618 <span id="nd_linktemplate_content" class="setting-description">The following will be replaced with the bookmark's info: %href% - url, %title% - description, %description% - extended description %date% - date added and %tag% - tags <?php if(MAGPIE_MOD_VERSION != 'neop' && $nd_service == 1) echo '( %tags% will always be "none" )' ?></span>618 <span id="nd_linktemplate_content" class="setting-description">The following will be replaced with the bookmark's info: <code>%href%</code> - url, <code>%title%</code> - description, <code>%description%</code> - extended description, <code>%date%</code> - date added and <code>%tag%</code> - tags <?php if(MAGPIE_MOD_VERSION != 'neop' && $nd_service == 1) echo '( %tags% will always be "none" )' ?><br />If using Delicious.com only: <code>%author_name%</code> - delicious username, <code>%source_link%</code> - permalink to bookmark on Delicious.com</span> 619 619 </td></tr> 620 620 <tr valign="top"> … … 998 998 999 999 foreach(array_reverse($feed->get_items()) as $item) { 1000 1001 $item_author = $item->get_author(); 1002 1000 1003 // Consolidate the info from the feed in a single array so that we can use that instead of the service specific ones. 1001 1004 switch($service) { // [SERVICE] … … 1005 1008 $bookmark['description'] = $item->get_description(); 1006 1009 $bookmark['date'] = $item->get_date('Y-m-d H:i:s T'); 1010 if (NULL !== $item_author) { 1011 $bookmark['author_name'] = $item_author->get_name(); 1012 $bookmark['author_link'] = $item_author->get_link(); 1013 } 1014 $bookmark['source_link'] = $item->get_id(); 1007 1015 1008 1016 $arr = $item->get_item_tags('', 'category'); … … 1016 1024 $bookmark['description'] = $item->get_description(); 1017 1025 $bookmark['date'] = $item->get_date('Y-m-d H:i:s T'); 1026 if (NULL !== $item_author) { 1027 $bookmark['author_name'] = $item_author->get_name(); 1028 $bookmark['author_link'] = $item_author->get_link(); 1029 } 1030 $bookmark['source_link'] = $item->get_id(); 1018 1031 1019 1032 $arr = $item->get_item_tags('', 'category'); … … 1027 1040 $bookmark['description'] = neop_pstlcs_arrelm($item->get_item_tags('http://www.google.com/schemas/reader/atom/', 'annotation'),0,'child','http://www.w3.org/2005/Atom','content',0,'data'); 1028 1041 $bookmark['date'] = $item->get_date('Y-m-d H:i:s T'); 1042 // No author_name, author_link, or source_link because Google Reader doesn't create individual pages from shared items. 1029 1043 $bookmark['tags'] = ''; 1030 1044 break; … … 1045 1059 $bookmark['description'] = $item->get_description(); 1046 1060 $bookmark['date'] = $item->get_date('Y-m-d H:i:s T'); 1061 // No author_name, author_link, or source_link because Reddit doesn't offer this info in its feeds. 1047 1062 $bookmark['tags'] = ''; 1048 1063 break; … … 1052 1067 $bookmark['description'] = $item->get_description(); 1053 1068 $bookmark['date'] = $item->get_date('Y-m-d H:i:s T'); 1069 if (NULL !== $item_author) { 1070 $bookmark['author_name'] = $item_author->get_name(); 1071 $bookmark['author_link'] = $item_author->get_link(); 1072 } 1073 $bookmark['source_link'] = $item->get_id(); 1054 1074 $bookmark['tags'] = ''; 1055 1075 break; … … 1059 1079 $bookmark['description'] = $item->get_description(); 1060 1080 $bookmark['date'] = $item->get_date('Y-m-d H:i:s T'); 1081 if (NULL !== $item_author) { 1082 $bookmark['author_name'] = $item_author->get_name(); 1083 $bookmark['author_link'] = $item_author->get_link(); 1084 } 1085 $bookmark['source_link'] = $item->get_id(); 1061 1086 1062 1087 $arr = $item->get_item_tags('', 'category'); … … 1119 1144 $bookmark['description'] = preg_replace($pattern,$replacement,htmlentities($bookmark['description'],ENT_QUOTES,"UTF-8",FALSE)); 1120 1145 $currentlink = str_replace("%description%",$bookmark['description'],$currentlink); 1146 // Add the author information to $currentlink 1147 $currentlink = str_replace("%author_name%",$bookmark['author_name'],$currentlink); 1148 $currentlink = str_replace("%author_link%",$bookmark['author_link'],$currentlink); 1149 $currentlink = str_replace("%source_link%",$bookmark['source_link'],$currentlink); 1121 1150 } else { 1122 1151 $bookmark['title'] = @html_entity_decode($bookmark['title'],ENT_QUOTES,"UTF-8"); … … 1127 1156 $bookmark['description'] = preg_replace($pattern,$replacement,$bookmark['description']); 1128 1157 $currentlink = str_replace("%description%",$bookmark['description'],$currentlink); 1158 $currentlink = str_replace("%author_name%",$bookmark['author_name'],$currentlink); 1159 $currentlink = str_replace("%author_link%",$bookmark['author_link'],$currentlink); 1160 $currentlink = str_replace("%source_link%",$bookmark['source_link'],$currentlink); 1129 1161 } 1130 1162 // Replace dates
Note: See TracChangeset
for help on using the changeset viewer.