From 1a9d858e7064e9b6435d033c790c9658c3be25d2 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sun, 2 Mar 2025 09:40:12 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20source=20link?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bl-kernel/admin/views/edit-content.php | 9 +++++++++ bl-kernel/admin/views/new-content.php | 9 +++++++++ bl-kernel/pages.class.php | 1 + bl-kernel/pagex.class.php | 5 +++++ 4 files changed, 24 insertions(+) diff --git a/bl-kernel/admin/views/edit-content.php b/bl-kernel/admin/views/edit-content.php index 272ac0d8..a9e3fff7 100644 --- a/bl-kernel/admin/views/edit-content.php +++ b/bl-kernel/admin/views/edit-content.php @@ -156,6 +156,15 @@ echo Bootstrap::formInputHidden(array( 'rows' => 5, 'placeholder' => $L->get('this-field-can-help-describe-the-content') )); + + // Source Link + echo Bootstrap::formInputTextBlock(array( + 'name' => 'sourceLink', + 'label' => $L->g('Source Link'), + 'placeholder' => '', + 'tip' => $L->g('The external link you refer to in the post'), + 'value' => $page->sourceLink() + )); ?> diff --git a/bl-kernel/admin/views/new-content.php b/bl-kernel/admin/views/new-content.php index 9f2ea280..99e94438 100644 --- a/bl-kernel/admin/views/new-content.php +++ b/bl-kernel/admin/views/new-content.php @@ -145,6 +145,15 @@ echo Bootstrap::formInputHidden(array( 'rows' => 5, 'placeholder' => $L->get('this-field-can-help-describe-the-content') )); + + // Source Link + echo Bootstrap::formInputTextBlock(array( + 'name' => 'sourceLink', + 'label' => $L->g('Source Link'), + 'placeholder' => '', + 'tip' => $L->g('The external link you refer to in the post'), + 'value' => '' + )); ?> diff --git a/bl-kernel/pages.class.php b/bl-kernel/pages.class.php index bac2e2fb..598ca732 100644 --- a/bl-kernel/pages.class.php +++ b/bl-kernel/pages.class.php @@ -22,6 +22,7 @@ class Pages extends dbJSON 'noindex' => false, 'nofollow' => false, 'noarchive' => false, + 'sourceLink'=>'', 'custom' => array() ); diff --git a/bl-kernel/pagex.class.php b/bl-kernel/pagex.class.php index 81bee954..0575de02 100644 --- a/bl-kernel/pagex.class.php +++ b/bl-kernel/pagex.class.php @@ -435,6 +435,11 @@ class Page return $this->getValue('noarchive'); } + // retour the source link + public function sourceLink() { + return $this->getValue('sourceLink'); + } + // Returns the page slug public function slug() {