Просмотр исходного кода

Merge pull request #1186 from Alkarex/api_help

More links for API help
Alexandre Alapetite 9 лет назад
Родитель
Сommit
df27e435f2
2 измененных файлов с 11 добавлено и 1 удалено
  1. 1 0
      app/views/user/profile.phtml
  2. 10 1
      p/api/index.php

+ 1 - 0
app/views/user/profile.phtml

@@ -37,6 +37,7 @@
 					<input type="password" id="apiPasswordPlain" name="apiPasswordPlain" autocomplete="off" pattern=".{7,}" <?php echo cryptAvailable() ? '' : 'disabled="disabled" '; ?>/>
 					<a class="btn toggle-password" data-toggle="apiPasswordPlain"><?php echo _i('key'); ?></a>
 				</div>
+				<?php echo _i('help'); ?> <kbd><a href="../api/"><?php echo Minz_Url::display('/api/greader.php', 'html', true); ?></a></kbd>
 			</div>
 		</div>
 		<?php } ?>

+ 10 - 1
p/api/index.html → p/api/index.php

@@ -11,8 +11,17 @@
 <h1>FreshRSS API</h1>
 
 <h2>Google Reader compatible API</h2>
+<dl>
+<dt>Your API address:</dt>
+<dd><?php
+require('../../constants.php');
+require(LIB_PATH . '/lib_rss.php');	//Includes class autoloader
+Minz_Configuration::register('system', DATA_PATH . '/config.php', DATA_PATH . '/config.default.php');
+echo Minz_Url::display('/api/greader.php', 'html', true);
+?></dd>
+</dl>
 <ul>
-<li><a href="greader.php/check%2Fcompatibility" rel="nofollow">Check full server configuration (with <code>%2F</code> support)</a></li>
+<li><a href="greader.php/check%2Fcompatibility" rel="nofollow">Check full server configuration</a></li>
 <li><a href="greader.php/check/compatibility" rel="nofollow">Check partial server configuration (without <code>%2F</code> support)</a></li>
 </ul>