/trunk/plugins/frdl/publicPages/1276945_rdap/OIDplusPagePublicRdap.class.php |
---|
42,8 → 42,10 |
* @throws \ViaThinkSoft\OIDplus\OIDplusException |
*/ |
public function modifyContent(string $id, string &$title, string &$icon, string &$text) { |
$text .= '<br /> <a href="'.OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE) |
$payload = '<br /> <a href="'.OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE) |
.'rdap/rdap.php?query='.urlencode($id).'" class="gray_footer_font" target="_blank">'._L('RDAP').'</a>'; |
$text = str_replace('<!-- MARKER 6 -->', '<!-- MARKER 6 -->'.$payload, $text); |
} |
/** |
/trunk/plugins/frdl/publicPages/1276945_rdap/manifest.xml |
---|
10,7 → 10,7 |
<name>RDAP</name> |
<author>Frdlweb</author> |
<license>MIT</license> |
<version>0.3.2+viathinksoft20230412</version> |
<version>0.3.2+viathinksoft20230515</version> |
<descriptionHTML> |
<![CDATA[ |
<a href="https://github.com/frdl/oidplus-frdlweb-rdap" target="_blank">RDAP plugin for OIDplus 2.0</a> |
/trunk/plugins/viathinksoft/publicPages/000_objects/OIDplusPagePublicObjects.class.php |
---|
69,10 → 69,11 |
* @throws \ViaThinkSoft\OIDplus\OIDplusException |
*/ |
public function modifyContent(string $id, string &$title, string &$icon, string &$text) { |
// TODO: How can we achieve that RDAP, REST, WHOIS links are grouped together? |
$text .= '<br /> <a href="'.OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE) |
$payload = '<br /> <a href="'.OIDplus::webpath(null,OIDplus::PATH_ABSOLUTE) |
.'rest/v1/objects/'.htmlentities($id).'" class="gray_footer_font" target="_blank">'._L('REST API').'</a> ' |
.'(<a '.OIDplus::gui()->link('oidplus:rest_api_information_admin$endpoints:1.3.6.1.4.1.37476.2.5.2.4.1.0').' class="gray_footer_font">'._L('Documentation').'</a>)'; |
$text = str_replace('<!-- MARKER 6 -->', '<!-- MARKER 6 -->'.$payload, $text); |
} |
/** |
111,8 → 112,9 |
$output['iris'][] = $row_iri['name']; |
} |
$output['status'] = 0/*OK*/; |
$output['status_bits'] = []; |
$output_prepend['status'] = 0/*OK*/; |
$output_prepend['status_bits'] = []; |
$output = array_merge($output_prepend, $output); |
http_response_code(200); |
return $output; |
891,6 → 893,8 |
// --- |
$out['text'] = '<!-- MARKER 1 -->' . $out['text']; // use this to better control modifyContent! |
if ($objParent) { |
if ($objParent->isRoot()) { |
$parent_link_text = $objParent->objectTypeTitle(); |
916,8 → 920,12 |
$out['text'] = '<p><a '.OIDplus::gui()->link('oidplus:system').'><img src="img/arrow_back.png" width="16" alt="'._L('Go back').'"> '.htmlentities($parent_link_text).'</a></p>' . $out['text']; |
} |
$out['text'] = '<!-- MARKER 0 -->' . $out['text']; // use this to better control modifyContent! |
// --- |
$out['text'] .= '<!-- MARKER 2 -->'; // use this to better control modifyContent! |
if ($obj) { |
$title = $obj->getTitle() ?? ''; |
$description = $obj->getDescription() ?? ''; |
950,13 → 958,19 |
// --- |
if (strpos($out['text'], '%%DESC%%') !== false) |
if (strpos($out['text'], '%%DESC%%') !== false) { |
$out['text'] = str_replace('%%DESC%%', $desc, $out['text']); |
if (strpos($out['text'], '%%CRUD%%') !== false) |
} |
if (strpos($out['text'], '%%CRUD%%') !== false) { |
$out['text'] = str_replace('%%CRUD%%', self::showCrud($obj->nodeId()), $out['text']); |
if (strpos($out['text'], '%%RA_INFO%%') !== false) |
} |
if (strpos($out['text'], '%%RA_INFO%%') !== false) { |
$out['text'] = str_replace('%%RA_INFO%%', OIDplusPagePublicRaInfo::showRaInfo($obj->getRaMail()), $out['text']); |
} |
$out['text'] .= '<!-- MARKER 3 -->'; // use this to better control modifyContent! |
$out['text'] .= '<!-- MARKER 4 -->'; // use this to better control modifyContent! |
$out['text'] .= '<!-- MARKER 5 -->'; // use this to better control modifyContent! |
$alt_ids = $obj->getAltIds(); |
if (count($alt_ids) > 0) { |
$out['text'] .= '<h2>'._L('Alternative Identifiers').'</h2>'; |
992,11 → 1006,18 |
$out['text'] .= '</div></div>'; |
} |
$out['text'] .= '<!-- MARKER 6 -->'; // use this to better control modifyContent! |
$out['text'] .= '<!-- MARKER 7 -->'; // use this to better control modifyContent! |
$out['text'] .= '<!-- MARKER 8 -->'; // use this to better control modifyContent! |
$out['text'] .= '<!-- MARKER 9 -->'; // use this to better control modifyContent! |
foreach (OIDplus::getAllPlugins() as $plugin) { |
if ($plugin instanceof INTF_OID_1_3_6_1_4_1_37476_2_5_2_3_2) { |
$plugin->modifyContent($obj->nodeId(), $out['title'], $out['icon'], $out['text']); |
} |
} |
for ($i=0; $i<=9; $i++) $out['text'] = str_replace("<!-- MARKER $i -->", '', $out['text']); |
} |
} |
/trunk/plugins/viathinksoft/publicPages/095_attachments/OIDplusPagePublicAttachments.class.php |
---|
490,8 → 490,10 |
'<div class="container box">' . |
$output . |
'</div>'; |
if ($doshow) $text .= $output; |
if ($doshow) { |
$text = str_replace('<!-- MARKER 5 -->', '<!-- MARKER 5 -->'.$output, $text); |
} |
} |
/** |
* Implements interface INTF_OID_1_3_6_1_4_1_37476_2_5_2_3_3 |
/trunk/plugins/viathinksoft/publicPages/100_whois/OIDplusPagePublicWhois.class.php |
---|
209,14 → 209,14 |
* @throws OIDplusException |
*/ |
public function modifyContent(string $id, string &$title, string &$icon, string &$text) { |
$text .= '<br><img src="'.OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/page_pictogram.png" height="15" alt=""> <a href="'.OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'whois/webwhois.php?query='.urlencode($id).'" class="gray_footer_font" target="_blank">'._L('Whois').'</a>'; |
$payload = '<br><img src="'.OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'img/page_pictogram.png" height="15" alt=""> <a href="'.OIDplus::webpath(__DIR__,OIDplus::PATH_RELATIVE).'whois/webwhois.php?query='.urlencode($id).'" class="gray_footer_font" target="_blank">'._L('Whois').'</a>'; |
$obj = OIDplusObject::parse($id); |
if ($obj && $obj->userHasParentalWriteRights()) { |
$text .= '<br><span class="gray_footer_font">'._L('OID-WHOIS Auth Token for displaying full object information: %1 (only applies if the this or superior objects are marked confidential)','<b>'.self::genWhoisAuthToken($id).'</b>').'</span>'; |
$text .= '<br><span class="gray_footer_font">'._L('OID-WHOIS Auth Token for displaying full RA information: %1 (only applies if the RA has set the privacy-flag)','<b>'.self::genWhoisAuthToken('ra:'.$obj->getRaMail()).'</b>').'</span>'; |
$payload .= '<br><span class="gray_footer_font">'._L('OID-WHOIS Auth Token for displaying full object information: %1 (only applies if the this or superior objects are marked confidential)','<b>'.self::genWhoisAuthToken($id).'</b>').'</span>'; |
$payload .= '<br><span class="gray_footer_font">'._L('OID-WHOIS Auth Token for displaying full RA information: %1 (only applies if the RA has set the privacy-flag)','<b>'.self::genWhoisAuthToken('ra:'.$obj->getRaMail()).'</b>').'</span>'; |
} |
$text = str_replace('<!-- MARKER 6 -->', '<!-- MARKER 6 -->'.$payload, $text); |
} |
/** |
/trunk/plugins/viathinksoft/raPages/099_object_log/OIDplusPageRaObjectLog.class.php |
---|
71,8 → 71,6 |
if (!$obj) return; |
if (!$obj->userHasWriteRights()) return; |
// TODO: I want that this content comes before the WHOIS modifyContent. |
// The problem is that first all public and then all RA plugins get loaded, not mixed by their priority |
$res = OIDplus::db()->query("select lo.id, lo.unix_ts, lo.addr, lo.event, lu.severity from ###log lo ". |
"left join ###log_object lu on lu.log_id = lo.id ". |
"where lu.object = ? " . |