<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
    <channel>
        <title>Web-Site-Scripts.com - Publishing &#x26; Publications</title>
        <link>https://www.web-site-scripts.com/knowledge-base/category/65</link>
        <description><![CDATA[Root / KnowledgeBase Manager Pro / Integration & Customization / Publishing & Publications]]></description>
        <language>en-us</language>
        <generator>KnowlageBase RSS Generator</generator>

         
                <item>
                        <title>How to reindex the page with Auto Related Widget</title>
                                    <link>https://www.web-site-scripts.com/knowledge-base/article/AA-00729</link>
                                    <description><![CDATA[<p>If Auto Related Widget doesn't suggest any articles, try these steps:</p><p><ol><li>Go to Administration &gt; General Settings &gt; Auto Related Articles and make sure that the Auto Related option is enabled.</li><li>If cron is not setup, run it manually. For example by clicking the "Launch cron job now" link on that page.</li><li>Go to General Settings &gt; Publishing &gt; Publications and click "Reindex" against the auto related widget publication.</li></ol><div>By doing this you make KMP reindex the page with the widget and if there are any articles in the knowledge base which could be related with the page, they will be added to the&nbsp;Related&nbsp;Articles box.</div></p>]]></description>
                                    <pubDate>Fri, 03 Aug 2012 16:50:54 +0000</pubDate>
                                    <guid>https://www.web-site-scripts.com/knowledge-base/article/AA-00729</guid>
                    </item>
                <item>
                        <title>How to publish content to a remote website</title>
                                    <link>https://www.web-site-scripts.com/knowledge-base/article/AA-00547</link>
                                    <description><![CDATA[<p>KMP has a built-in&nbsp;publication&nbsp;feature. It allows you to post certain parts of your KB to other web pages, for example on your website. The posted (published) content gets updated automatically, i.e. if you have published an article to a remote web page, and this article has been changed in KMP, it will be also changed on the remote web page.</p>
<p>You can include parts of the knowledge base (<a href="http://www.web-site-scripts.com/knowledge-management/feature-tour/publish-single-article.html" target="" style="padding: 0px; margin: 0px; text-decoration: underline; color: rgb(51, 102, 153) ! important; cursor: pointer;">separate articles</a>,&nbsp;<a href="http://www.web-site-scripts.com/knowledge-management/feature-tour/category-publication.html" target="" style="padding: 0px; margin: 0px; text-decoration: underline; color: rgb(51, 102, 153) ! important; cursor: pointer;">categories</a>,&nbsp;<a href="http://www.web-site-scripts.com/knowledge-management/feature-tour/publish-knowledgebase.html" target="" style="padding: 0px; margin: 0px; text-decoration: underline; color: rgb(51, 102, 153) ! important; cursor: pointer;">the whole knowledge base</a>, or&nbsp;<a href="http://www.web-site-scripts.com/knowledge-management/feature-tour/auto-related-widget.html" target="" style="padding: 0px; margin: 0px; text-decoration: underline; color: rgb(51, 102, 153) ! important; cursor: pointer;">auto related widget</a>) to your existing website (they work without iframes).</p>
<p>You may want to use publications, if:</p>
<p></p>
<ul><li><span style="line-height: 16px;">You have a&nbsp;multilingual&nbsp;website and you want to put an FAQ or KB on each version o the&nbsp;website. Each KB must have articles and user interface in certain language.</span></li><li><span style="line-height: 16px;">You have several websites with information about different products or services. You want to put different parts of the knowledge base on different websites.</span></li></ul><div>
<p>Please note that publications have several limitations:</p>
<p></p>
<ul><li><span style="line-height: 16px;">Active Response feature doesn't work for publications. When you type a question in to the Ask a Question box, you will not see suggestions below. However, this feature can be added to a separate contact form on one of your website pages with the help of the API.</span></li><li><span style="line-height: 16px;">Customization of the published parts of KB is limited. You can change CSS styles, but you cannot edit layouts and blocks.</span></li><li><span style="line-height: 16px;">There is no category tree in publications</span></li><li><span style="line-height: 16px;">It is not possible to login to a publication, and thus you cannot edit content right at the published website where it is published.</span></li><li><span style="line-height: 16px;">SEO-friendly URLs are not supported in publications</span></li></ul><div>
<p>If you are fine with these limitations, follow the guide below to publish parts of your KB. If these limitations are not acceptable for you, try a more complicated, but more flexible way to get content from the knowledge base and put it to a remote web page - consider using <a href="ARTICLE_URL#469##AA-00508#" target="">API</a>.</p>
<p></p>
<div class="info">
<div class="infoHeader">Destination Website Requirements<br></div>
<div class="infoContent">
<p><b>Site</b>, where you publish content to, <b>must have PHP with cURL support</b>. <br><br>Also <a target="" href="ARTICLE_URL#479##AA-00518#">if PHP is not available, there is an option to use ASP</a>.<br></p>
</div>
</div>
<p></p>
</div></div>
<h2>Publication&nbsp;Guide</h2>
<p></p>
<ol><li>To start creating a publication, go to Administration &gt; General Settings &gt; Publishing &gt; Publications.<br><img src="http://www.web-site-scripts.com/knowledge-base/admin/media_store/2/AA-00547/create-publication.png" alt="" title="" style="margin: 0px; border-width: 0px;" align="" border="0" height="364" hspace="0" vspace="0" width="755"><br></li><li>Click "Publish Knowledgebase" and walk through the simple wizard to specify what you want to publish and customize the look and feel.</li><li><b>Step 1: General<br></b>On the first step you can enter a name for the publication. It won't be shown to end users, it will just identify this publication in KMP admin interface. Also you can pick language, date, and time format for publication and select a time zone of the target web site.<br>Next, you need to select what type of publication you&nbsp;would&nbsp;like to create.<br><br>Knowledgebase - publish full knowledge base with all public articles and categories.<br>Single Article - publish one article by your choice.<br>Auto Related Widget - this profile analyzes a content of a page on your website, where you will put generated code, and displays a list of related articles from the knowledgebase.<br>Category - publish one category (with or without&nbsp;subcategories, you can select this on the next step) and its child articles.<br><br><img src="http://www.web-site-scripts.com/knowledge-base/admin/media_store/2/AA-00547/publication-step1.png" alt="" title="" style="margin: 0px; border-width: 0px;" align="" border="0" height="330" hspace="0" vspace="0" width="560"></li><li>On the next step you can select what items (search bar, captcha, quick jump menu) you want to show on published page. Note that this page may have several tabs, for example Article View (it allows you to change look of the page with an article), and Categories View (it allows you to change a category page look).<br><br><img src="http://www.web-site-scripts.com/knowledge-base/admin/media_store/2/AA-00547/publication-step2.png" alt="" title="" style="margin: 0px; border-width: 0px;" align="" border="0" height="438" hspace="0" vspace="0" width="521"><br></li><li>On the next step you can select on of the existing styles, or create your own style.<br><br><img src="http://www.web-site-scripts.com/knowledge-base/admin/media_store/2/AA-00547/publication-step3.png" alt="" title="" style="margin: 0px; border-width: 0px;" align="" border="0" height="264" hspace="0" vspace="0" width="462"><br></li><li>After saving of the new publication profile, click the&nbsp;respective&nbsp;"Get Code" button.<br><br><img src="http://www.web-site-scripts.com/knowledge-base/admin/media_store/2/AA-00547/my-publication.png" alt="" title="" style="margin: 0px; border-width: 0px;" align="" border="0" height="154" hspace="0" vspace="0" width="662"><br></li><li>Here you can see five parts of code that you need to insert to the target web page to publish this profile.<br><br><img src="http://www.web-site-scripts.com/knowledge-base/admin/media_store/2/AA-00547/get-code.png" alt="" title="" style="margin: 0px; border-width: 0px;" align="" border="0" height="566" hspace="0" vspace="0" width="662"><br></li><li>Here is a sample of basic HTML page for better understanding of where these parts must be inserted.<br><br><div class="preformatted">
<div class="preformattedContent"><div class="preformattedContent"><span style="background-color: rgb(255, 255, 0);">&lt;?php if(get_magic_quotes_gpc()){function stripslashes_deep($value){$value = is_array($value)?array_map('stripslashes_deep', $value) :stripslashes($value);return $value;}$_POST = array_map('stripslashes_deep',$_POST);$_GET = array_map('stripslashes_deep',$_GET);$_COOKIE=array_map('stripslashes_deep',$_COOKIE);$_REQUEST = array_map('stripslashes_deep',$_REQUEST);} $post_data = array('gatewayAddr' =&gt; "http://".$_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']);$action = (empty($_GET['action']) ? "index" : $_GET['action']);$getData = (empty($_GET['data']) ? "" : $_GET['data']);$url = "http://demo/ed-kmp-pack-531/admin/index.php?/gateway_main/$action/3/133e82ff47fbc3bcce818d3af67d6710/$getData";$cookies = "";if (!empty($_COOKIE)) {foreach ($_COOKIE as $k=&gt;$cook) {$cookies .= "$k=$cook;";}}$ch = curl_init($url); if (is_resource($ch)) {curl_setopt($ch, CURLOPT_POST, 1);curl_setopt($ch, CURLOPT_HEADER, 1);curl_setopt($ch, CURLOPT_HTTPHEADER,array("Expect:"));curl_setopt($ch, CURLOPT_NOBODY, 0);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_POSTFIELDS, array('data' =&gt; base64_encode(serialize(array_merge((array)$post_data, @$_POST)))));curl_setopt($ch, CURLOPT_COOKIE, $cookies);$kmp_result = curl_exec($ch);curl_close($ch);} else {curl_close($ch);}$kmp_result = explode("&lt;!--__KMP_content_separator__--&gt;", $kmp_result);if (!empty($kmp_result[0])) {$kmp_result[0] = explode("\n", $kmp_result[0]);foreach ($kmp_result[0] as $res) {if (!empty($res)) {if ((strpos($res, "Set-Cookie:") === 0) || (strpos($res, "Location:") === 0) || (strpos($res, "Content-Type:") === 0)) {header($res);if (strpos($res, "image/jpeg")) {echo $kmp_result[2]; exit();}}}}} &nbsp;if (!empty($kmp_result[1])) {$kmp_arr = explode("\n", $kmp_result[1]);$kmp_meta_data = array();foreach ($kmp_arr as $kmp_arr_row) {$kmp_tmp_key = substr($kmp_arr_row, 0, 9);$kmp_tmp_value = substr($kmp_arr_row, 10);$kmp_meta_data[$kmp_tmp_key] = $kmp_tmp_value;}$kmp_title = @$kmp_meta_data['art_title'];} ?&gt;</span></div><div class="preformattedContent">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;</div><div class="preformattedContent">&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;</div><div class="preformattedContent">&lt;head&gt;</div><div class="preformattedContent">&lt;title&gt;<span style="background-color: rgb(255, 192, 0);">&lt;?php echo @$kmp_title;?&gt;</span>&lt;/title&gt;</div><div class="preformattedContent"><span style="background-color: rgb(217, 150, 148);">&lt;meta name='keywords' content='&lt;?php echo @$kmp_meta_data['meta_kwds'];?&gt;' /&gt;</span></div><div class="preformattedContent"><span style="background-color: rgb(250, 192, 143);">&lt;meta name='Description' content='&lt;?php echo @$kmp_meta_data['meta_dscr'];?&gt;' /&gt;</span></div><div class="preformattedContent">&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;</div><div class="preformattedContent">&lt;/head&gt;</div><div class="preformattedContent">&lt;body&gt;</div><div class="preformattedContent"><span style="background-color: rgb(195, 214, 155);">&lt;?php if (!empty($kmp_result[2])) {echo $kmp_result[2];} ?&gt;</span></div><div class="preformattedContent">&lt;/body&gt;</div><div class="preformattedContent">&lt;/html&gt;</div></div>
</div>
<p>&nbsp;</p><p><div class="attention">
<div class="attentionHeader">UTF without BOM<br></div>
<div class="attentionContent">
<p>If you're creating the publication page in a text editor in UTF encoding, make sure that it is "UTF without BOM" encoding option rather than just "UTF". Otherwise you might get "Cannot modify header information - headers already sent" error.</p></div></div><br></p><div class="attention">
<div class="attentionHeader">What if publication doesn't work?<br></div>
<div class="attentionContent">
<p>It may happen that you would <a target="" href="ARTICLE_URL#338##AA-00377#">get a page with source code junk instead of published content</a>.<br></p>
</div>
</div> <br><p></p>
<div class="attention">
<div class="attentionHeader">Publishing to CMS<br></div>
<div class="attentionContent">
<p>If you're publishing content on a CMS or any other website which is not static, you still need to put the first long part of the code at the very beginning of the page. That usually is done by editing page templates.<br>
</p>
</div>
</div>
<p><br></p>
<br>
<p></p>
<br></li></ol><div><br></div>
<p></p>]]></description>
                                    <pubDate>Thu, 12 Aug 2010 14:18:12 +0000</pubDate>
                                    <guid>https://www.web-site-scripts.com/knowledge-base/article/AA-00547</guid>
                    </item>
                <item>
                        <title>Publish content to a site with ASP.NET (without PHP support)</title>
                                    <link>https://www.web-site-scripts.com/knowledge-base/article/AA-00518</link>
                                    <description><![CDATA[<p>Usually you need PHP installed on both websites:</p><p></p><ul><li><span style="line-height: 16px;">Website with Knowledgebase Manager Pro instance</span></li><li><span style="line-height: 16px;">Target website, where you want to publish some part of your KB</span></li></ul><div><p>However, if target website doesn't support PHP, you can use ASP publication instead.</p><p>This guide assumes that you have some knowledge of ASP and C# technologies.</p><p></p><ol><li>Login to KMP and go to Administration &gt; Publishing &gt; Publications and click the "Get Code" button for your publication. It you do not have a publication yet, you can create it right now.</li><li>Find the place where we assign some value to the $url variable.<br><br><img src="http://www.web-site-scripts.com/knowledge-base/admin/media_store/2/AA-00518/get-code.png" alt="" title="" width="898" height="290" border="0" hspace="0" vspace="0" align="" style="margin-right: 0px; margin-left: 0px; margin-bottom: 0px; margin-top: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; "><br><br></li><li>Copy that URL (everything between quotation marks). We will need it later.</li><li>Download WSS.KMP.zip file below.</li><li>Extract the WSS.KMP.dll from the downloaded file.</li><li>Put this library to the appropriate directory of your ASP project (e.g. "Bin" directory).</li><li>Add a reference for the uploaded library in your ASP project (for example <i>publication.aspx.cs</i> file).<br><br><div class="preformatted">
<div class="preformattedContent"><p>using System;</p><p>
using WSS.KMP;</p><p></p><p>public partial class publication : WSS.KMP.KmpPage</p><p>{</p><p>&nbsp;&nbsp;protected void Page_Load(object sender, EventArgs e)</p><p>&nbsp;&nbsp;{</p><p>&nbsp;&nbsp; &nbsp; KnowledgeBase = new KnowledgeBaseManager(this,</p><p>&nbsp;&nbsp;"http://www.yourwebsite.com/kmp/admin/gateway_main/<span style="background-color: rgb(255, 255, 0);">{0}</span>/3/f449b7cad9f012f4397a5fb2ac8efec2/<span style="background-color: rgb(255, 255, 0);">{1}</span>");</p><p>&nbsp;&nbsp; &nbsp; KnowledgeBase.Load();</p><p>&nbsp;&nbsp;}</p><p>}</p><p></p></div></div>Look at the highlighted {0} and {1} above. You need to copy-paste the URL that you got from Get Page window and insert it instead of URL in this example. <br>The "$action" part of URL must be replaced with "{0}" and the "$getData" part must be replaced with {1}<br><br></li><li>Now we can actually publish KB content to our web page.<br><div class="preformatted">
<div class="preformattedContent"><div class="preformattedContent"><span style="background-color: rgb(255, 255, 0);">&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="publication.aspx.cs" Inherits="publication" %&gt;</span></div><div class="preformattedContent"><br></div><div class="preformattedContent">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;</div><div class="preformattedContent">&lt;html xmlns="http://www.w3.org/1999/xhtml" &gt;</div><div class="preformattedContent">&lt;head&gt;</div><div class="preformattedContent">&nbsp;&nbsp; &lt;title&gt;<span style="background-color: rgb(255, 255, 0);">&lt;%=KnowledgeBase.Title%&gt;</span>&lt;/title&gt;</div><div class="preformattedContent">&nbsp;&nbsp; <span style="background-color: rgb(255, 255, 0);">&lt;%=KnowledgeBase.Keywords%&gt;</span></div><div class="preformattedContent">&nbsp;&nbsp; <span style="background-color: rgb(255, 255, 0);">&lt;%=KnowledgeBase.MetaDescription%&gt;</span></div><div class="preformattedContent">&lt;/head&gt;</div><div class="preformattedContent">&lt;body&gt;</div><div class="preformattedContent">&nbsp;&nbsp; <span style="background-color: rgb(255, 255, 0);">&lt;%=KnowledgeBase.Content%&gt;</span></div><div class="preformattedContent">&lt;/body&gt;</div><div class="preformattedContent">&lt;/html&gt;</div></div>
</div>
<p>This is a basic ASPX page layout. Parts that we added to the page to publish KB content are highlighted.</p></li></ol><p></p></div><p></p>]]></description>
                                    <pubDate>Tue, 20 Apr 2010 17:49:24 +0000</pubDate>
                                    <guid>https://www.web-site-scripts.com/knowledge-base/article/AA-00518</guid>
                    </item>
                <item>
                        <title>I get a page with source code junk instead of published content</title>
                                    <link>https://www.web-site-scripts.com/knowledge-base/article/AA-00377</link>
                                    <description><![CDATA[<p>Q: I'm trying to test-publish a single article through Administration&gt;Publishing&gt;Publications. When I hit Preview, it
looks all right, however, when I attempt to get the code and paste it
where suggested I get a page with source code like this:</p>
<p><img style="border-width: 0px; margin: 0px;" title="" alt="Source code when publish to html page" src="http://www.web-site-scripts.com/knowledge-base/admin/media_store/2//Shared/KMP/Publications/html-publication.png" align="" border="0" height="394" hspace="0" vspace="0" width="660"><br></p>
<p>Any ideas?</p>
<p><br></p>
<p>A: When a web page is accessed, the server checks the extension to know
how to handle the page. Generally speaking if it sees a .htm or .html
file, it sends it right to the browser because it doesn't have anything
to process on the server. If server sees a .php extension, it knows that it needs to execute the appropriate code
before passing it along to the browser. There are two solutions for this problem:<br></p>
<ol>
<li>Simply rename your .html or .htm page in order to set .php file name extension (e.g.: page.html -&gt; page.php).</li>
<li>Modify the .htaccess file (or create it if there is no .htaccess file yet) in the folder with publication and tell it to execute PHP code in .html pages by adding following line:<br>
<div class="preformatted">
<div class="preformattedContent">
AddType application/x-httpd-php .html
</div>
</div>

If you're going to use one publication page only, it is better to do it this way:<br>

<div class="preformatted">
<div class="preformattedContent">
&lt;Files <span style="background-color: rgb(255, 255, 0);">page.html</span>&gt;<br>
AddType application/x-httpd-php .html<br>
&lt;/Files&gt;</div></div>Do not forget to replace "page.html" with your web page name.
</li>
</ol>

<div class="info">
<div class="infoHeader">
Note
</div>
<div class="infoContent">
Second solution with .htaccess file editing is supported by Apache servers only since they work with .htaccess files and is not supported by IIS servers.
</div>

</div>]]></description>
                                    <pubDate>Sat, 25 Jul 2009 14:00:00 +0000</pubDate>
                                    <guid>https://www.web-site-scripts.com/knowledge-base/article/AA-00377</guid>
                    </item>
                
    </channel>
</rss>