<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">
  <channel>
    <title>Nucleus FAQ</title>
    <link>http://faq.nucleuscms.org/</link>
    <description></description>
    <!-- optional tags -->
    <language>en-us</language>           <!-- valid langugae goes here -->
    <generator>Nucleus CMS v3.40</generator>
    <copyright>©</copyright>             <!-- Copyright notice -->
    <category>Weblog</category>
    <docs>http://backend.userland.com/rss</docs>
    <image>
      <url>http://faq.nucleuscms.org//nucleus/nucleus2.gif</url>
      <title>Nucleus FAQ</title>
      <link>http://faq.nucleuscms.org/</link>
    </image>
    <item>
 <title><![CDATA[How can I show more than 10 items in the media list?]]></title>
 <link>http://faq.nucleuscms.org/index.php?itemid=225</link>
<description><![CDATA[<p><b>Scenario:</b><br />
<i>"I've noticed that only 10 items are displayed when I click the "Add Media" button, but I have uploaded much more than 10 files. Is there some way of viewing all of the files in my media folder?"</i></p>
<p><b>Solution:</b><br />
This requires a small core hack. Open <code>/nucleus/media.php</code> and find this bit of code:</p>
<pre class="code"><span class="co1">// defines how much media items will be shown per page. You can override this</span>
<span class="co1">// in config.php if you like. (changing it in config.php instead of here will</span>
<span class="co1">// allow your settings to be kept even after a Nucleus upgrade)</span>
<span class="re0">$CONF</span><span class="br0">&#91;</span><span class="st0">'MediaPerPage'</span><span class="br0">&#93;</span> = <span class="nu0">10</span>;</pre>
<br />
Change "10" to however many you would like to display.</p>
<p>A simpler solution as per the comments in <code>media.php</code> is to simply add this line to your <code>config.php</code> file:</p>
<pre class="code"><span class="re0">$CONF</span><span class="br0">&#91;</span><span class="st0">'MediaPerPage'</span><span class="br0">&#93;</span> = X;</pre>
<br />
and change <code>X</code> to the number of items you want to display at a time.</p>
<p><b>Original forum thread:</b><br />
<a href="http://forum.nucleuscms.org/viewtopic.php?t=18728">http://forum.nucleuscms.org/viewtopic.php?t=18728</a>
</p>
]]></description>
 <category>Plugins & Hacks</category>
<comments>http://faq.nucleuscms.org/index.php?itemid=225</comments>
 <pubDate>Thu, 14 May 2009 16:01:59 +0200</pubDate>
</item><item>
 <title><![CDATA[I'm getting an error in creating a new weblog but no error message appears!]]></title>
 <link>http://faq.nucleuscms.org/index.php?itemid=222</link>
<description><![CDATA[<p><b>Scenario:</b><br />
<i>"I'm trying to <a href="http://docs.nucleuscms.org/blog/9#newblog">create a new weblog</a> but after creating my copy of <code>index.php</code> and uploading it to my server, when I try to access it from the new blog url, it is just shows an empty page without any error message."</i></p>
<p><b>Solution:</b><br />
Make sure your copy of <code>index.php</code> has its file permissions set correctly on your server to <code>644</code>.</p>
<p><b>Original forum thread (thanks, ftruscot!):</b><br />
<a href="http://forum.nucleuscms.org/viewtopic.php?t=18242">http://forum.nucleuscms.org/viewtopic.php?t=18242</a>
</p>
]]></description>
 <category>Troubleshooting</category>
<comments>http://faq.nucleuscms.org/index.php?itemid=222</comments>
 <pubDate>Thu, 14 May 2009 15:39:53 +0200</pubDate>
</item><item>
 <title><![CDATA[Plugin NP_PluginName was not loaded (Class not found in file, possible parse error)]]></title>
 <link>http://faq.nucleuscms.org/index.php?itemid=220</link>
<description><![CDATA[<p><b>Scenario:</b><br />
<i>"I just tried to <a href="http://faq.nucleuscms.org/item/35">install a plugin</a> but Nucleus keeps giving me this error:</p>
<pre>Plugin NP_PluginName was not loaded (Class not found in file, possible parse error)</pre>
<br />
How do I fix this?"</i></p>
<p><b>Solution:</b><br />
Please check the following:</p>
<ul>
<li>The file name of the plugin must have the same case as the actual plugin code.  For example, if the plugin code says:</p>
<pre class="code"><span class="kw2">class</span> NP_PluginName extends NucleusPlugin <span class="br0">&#123;</span></pre>
<br />
you need to make sure your plugin file is called <code>NP_PluginName.php</code>.</li>
</p>
<li>The permissions of your plugin file are set to <code>644</code> so your web server can read the file correctly.</li>
</ul>
<p><b>Original forum thread (thanks, ftruscot!):</b><br />
<a href="http://forum.nucleuscms.org/viewtopic.php?t=18237">http://forum.nucleuscms.org/viewtopic.php?t=18237</a>
</p>
]]></description>
 <category>Troubleshooting</category>
<comments>http://faq.nucleuscms.org/index.php?itemid=220</comments>
 <pubDate>Thu, 14 May 2009 15:34:01 +0200</pubDate>
</item><item>
 <title><![CDATA[Why can't I see the plugins I've uploaded in the "Install New Plugins..." list?]]></title>
 <link>http://faq.nucleuscms.org/index.php?itemid=218</link>
<description><![CDATA[<p><b>Scenario:</b><br />
<i>"I've downloaded a few plugins from the <a href="http://wiki.nucleuscms.org/plugin">Nucleus CMS Plugins Wiki</a>. I've extracted them and then uploaded them to my <code>/nucleus/plugins</code> directory on my server, however, none of the plugins are showing up in the "Install New Plugins" drop-down menu list in the Nucleus admin area.  Here's a screenshot of my plugins directory:</p>
<p><img src="http://img205.imageshack.us/img205/3103/plugins.png" /></p>
<p>How do I fix this?"</i></p>
<p><b>Solution:</b><br />
Double check and make sure you have done the following:</p>
<ul></p>
<li>All plugin files should be of the form (case matters): NP_PluginName.php and the corresponding folder (if it exists) should have a name of (again case matters): pluginname.</li>
</p>
<li>Make sure the file permissions for the <code>php</code> files are set to <code>644</code>.</li>
</p>
<li>Make sure the folder permissions are set to <code>755</code>.</li>

</ul>
<p><b>Original forum thread (thanks, ftruscot!):</b><br />
<a href="http://forum.nucleuscms.org/viewtopic.php?t=18602">http://forum.nucleuscms.org/viewtopic.php?t=18602</a>
</p>
]]></description>
 <category>Troubleshooting</category>
<comments>http://faq.nucleuscms.org/index.php?itemid=218</comments>
 <pubDate>Mon, 16 Mar 2009 10:35:40 +0100</pubDate>
</item><item>
 <title><![CDATA[Can I use the active category to generate a unique CSS class?]]></title>
 <link>http://faq.nucleuscms.org/index.php?itemid=216</link>
<description><![CDATA[<p><b>Scenario:</b><br />
<i>"I want to improve my site navigation by using CSS to style the link pointing to the current category differently (e.g. by having the link to the active category highlighted in a different color).  Is there an easy way to use Nucleus to generate a unique CSS class based on the currently active category?"</i></p>
<p><b>Solution:</b><br />
Use the new skin variable <code>&lt;%currentcat%&gt;</code> to generate your CSS class.  This variable will return either a "yes" value if the current category is active or a "no" value if the category is not the currently active category.</p>
<p>In the "Category List Item" section of your <a href="http://faq.nucleuscms.org/item/91">template</a>, put something like this in the <code>html</code> tag you are using to generate your category list (e.g. a <code>li</code> tag, etc):</p>
<pre class="code">class=&quot;currcat&lt;%currentcat%&gt;&quot;</pre>
<p>In your <code>.css</code> file, make sure you define the CSS classes <code>.currcatyes</code> (for the current active category) and <code>.currcatno</code> (for all other categories) as desired.</p>
<p><b>Original forum thread (thanks, ftruscot!):</b><br />
http://forum.nucleuscms.org/viewtopic.php?t=18549
</p>
]]></description>
 <category>Skins</category>
<comments>http://faq.nucleuscms.org/index.php?itemid=216</comments>
 <pubDate>Mon, 16 Mar 2009 10:27:16 +0100</pubDate>
</item><item>
 <title><![CDATA[Can I customise the "Introduction" text in the admin area login page?]]></title>
 <link>http://faq.nucleuscms.org/index.php?itemid=214</link>
<description><![CDATA[<p><b>Scenario:</b><br />
<i>When I go to the <a href="http://faq.nucleuscms.org/item/168">admin area login page</a> I see a text box in the top left hand corner of the screen saying:</p>
<blockquote><p>Introduction<br />
This is the logon screen for Nucleus CMS, the content management system that's being used to maintain this website.<br />
If you have an account, you can log on and start posting new items.</blockquote>
<br />
Can I customise this text?</i></p>
<p><b>Solution:</b><br />
Yes, you can!</p>
<ol></p>
<li>Find the language file for your language (e.g. <code>/nucleus/language/english.php</code>.  Make a backup of this file before you make any changes!</li>
</p>
<li>Look for the constants <code>_QMENU_INTRO</code> and <code>_QMENU_INTRO_TEXT</code>.</li>
</p>
<li>Change their values to whatever you want.</li>
</p>
<li>Remember to keep a backup of your modified language file, as it will be overwritten then next time you upgrade Nucleus.</li>

</ol>
<p><b>Original forum thread (thanks, ftruscot!):</b><br />
<a href="http://forum.nucleuscms.org/viewtopic.php?t=18578">http://forum.nucleuscms.org/viewtopic.php?t=18578</a>
</p>
]]></description>
 <category>Plugins & Hacks</category>
<comments>http://faq.nucleuscms.org/index.php?itemid=214</comments>
 <pubDate>Mon, 16 Mar 2009 10:17:25 +0100</pubDate>
</item><item>
 <title><![CDATA[How do I get around this "open_basedir" error?]]></title>
 <link>http://faq.nucleuscms.org/index.php?itemid=212</link>
<description><![CDATA[<p><b>Scenario:</b><br />
<i>"I'm trying to import some skins but Nucleus keeps giving me this weird error:</p>
<pre>PHP Warning: tmpfile() [function.tmpfile]: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/xxx) in xxx/nucleus/libs/skinie.php on line 143, referer: http://xxx/Nucleus/nucleus/index.php?action=skinieoverview</pre>
<p>How do I fix this?!"</i></p>
<p><b>Original forum thread (thanks, ftruscot!):</b><br />
<a href="http://forum.nucleuscms.org/viewtopic.php?t=18402">http://forum.nucleuscms.org/viewtopic.php?t=18402</a></p>
<p><b>Solution:</b><br />
This may be due to your host have PHP safe_mode turned on.  You can fix this by doing the following core hack:</p>
<ol></p>
<li>Using your host's file manager or your FTP browser, create a new folder somewhere in your public directory and call it <code>/tmp/</code>.</li>
</p>
<li>Open up <code>/nucleus/libs/skinie.php</code> and go line line 145 and find this code:<br />
<pre class="code">		<span class="re0">$temp</span> = <a target="_blank"  href="http://www.php.net/tmpfile"><span class="kw3">tmpfile</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span>;
		<a target="_blank"  href="http://www.php.net/fwrite"><span class="kw3">fwrite</span></a><span class="br0">&#40;</span><span class="re0">$temp</span>, <span class="re0">$tempbuffer</span><span class="br0">&#41;</span>;
		<a target="_blank"  href="http://www.php.net/rewind"><span class="kw3">rewind</span></a><span class="br0">&#40;</span><span class="re0">$temp</span><span class="br0">&#41;</span>;
&nbsp;
		<span class="kw1">while</span> <span class="br0">&#40;</span> <span class="br0">&#40;</span><span class="re0">$buffer</span> = <a target="_blank"  href="http://www.php.net/fread"><span class="kw3">fread</span></a><span class="br0">&#40;</span><span class="re0">$temp</span>, <span class="nu0">4096</span><span class="br0">&#41;</span> <span class="br0">&#41;</span> &amp;&amp; <span class="br0">&#40;</span>!<span class="re0">$metaOnly</span> || <span class="br0">&#40;</span><span class="re0">$metaOnly</span> &amp;&amp; !<span class="re0">$this</span>-&gt;<span class="me0">metaDataRead</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
			<span class="re0">$err</span> = <a target="_blank"  href="http://www.php.net/xml_parse"><span class="kw3">xml_parse</span></a><span class="br0">&#40;</span> <span class="re0">$this</span>-&gt;<span class="me0">parser</span>, <span class="re0">$buffer</span>, <a target="_blank"  href="http://www.php.net/feof"><span class="kw3">feof</span></a><span class="br0">&#40;</span><span class="re0">$temp</span><span class="br0">&#41;</span> <span class="br0">&#41;</span>;
			<span class="kw1">if</span> <span class="br0">&#40;</span>!<span class="re0">$err</span> &amp;&amp; <span class="re0">$this</span>-&gt;<span class="me0">debug</span><span class="br0">&#41;</span>
				<a target="_blank"  href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">'ERROR: '</span>, <a target="_blank"  href="http://www.php.net/xml_error_string"><span class="kw3">xml_error_string</span></a><span class="br0">&#40;</span><a target="_blank"  href="http://www.php.net/xml_get_error_code"><span class="kw3">xml_get_error_code</span></a><span class="br0">&#40;</span><span class="re0">$this</span>-&gt;<span class="me0">parser</span><span class="br0">&#41;</span><span class="br0">&#41;</span>, <span class="st0">''</span>;
		<span class="br0">&#125;</span>
&nbsp;
		<span class="co1">// all done</span>
		<span class="re0">$this</span>-&gt;<span class="me0">inXml</span> = <span class="nu0">0</span>;
		<a target="_blank"  href="http://www.php.net/fclose"><span class="kw3">fclose</span></a><span class="br0">&#40;</span><span class="re0">$temp</span><span class="br0">&#41;</span>;</pre>
</li>
</p>
<li>Replace with this code:<br />
<pre class="code">      <span class="re0">$tmpfile</span> = <a target="_blank"  href="http://www.php.net/tempnam"><span class="kw3">tempnam</span></a><span class="br0">&#40;</span> <span class="st0">'/path/to/writable/folder/'</span>, <span class="st0">'tmpfile'</span><span class="br0">&#41;</span> or <a target="_blank"  href="http://www.php.net/die"><span class="kw3">die</span></a><span class="br0">&#40;</span><span class="st0">'could not create file'</span><span class="br0">&#41;</span>;
      <span class="re0">$temp</span> = <a target="_blank"  href="http://www.php.net/fopen"><span class="kw3">fopen</span></a><span class="br0">&#40;</span><span class="re0">$tmpfile</span>,<span class="st0">'w+'</span><span class="br0">&#41;</span>;
      <a target="_blank"  href="http://www.php.net/fwrite"><span class="kw3">fwrite</span></a><span class="br0">&#40;</span><span class="re0">$temp</span>, <span class="re0">$tempbuffer</span><span class="br0">&#41;</span>;
      <a target="_blank"  href="http://www.php.net/rewind"><span class="kw3">rewind</span></a><span class="br0">&#40;</span><span class="re0">$temp</span><span class="br0">&#41;</span>;
&nbsp;
      <span class="kw1">while</span> <span class="br0">&#40;</span> <span class="br0">&#40;</span><span class="re0">$buffer</span> = <a target="_blank"  href="http://www.php.net/fread"><span class="kw3">fread</span></a><span class="br0">&#40;</span><span class="re0">$temp</span>, <span class="nu0">4096</span><span class="br0">&#41;</span> <span class="br0">&#41;</span> &amp;&amp; <span class="br0">&#40;</span>!<span class="re0">$metaOnly</span> || <span class="br0">&#40;</span><span class="re0">$metaOnly</span> &amp;&amp; !<span class="re0">$this</span>-&gt;<span class="me0">metaDataRead</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
         <span class="re0">$err</span> = <a target="_blank"  href="http://www.php.net/xml_parse"><span class="kw3">xml_parse</span></a><span class="br0">&#40;</span> <span class="re0">$this</span>-&gt;<span class="me0">parser</span>, <span class="re0">$buffer</span>, <a target="_blank"  href="http://www.php.net/feof"><span class="kw3">feof</span></a><span class="br0">&#40;</span><span class="re0">$temp</span><span class="br0">&#41;</span> <span class="br0">&#41;</span>;
         <span class="kw1">if</span> <span class="br0">&#40;</span>!<span class="re0">$err</span> &amp;&amp; <span class="re0">$this</span>-&gt;<span class="me0">debug</span><span class="br0">&#41;</span>
            <a target="_blank"  href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">'ERROR: '</span>, <a target="_blank"  href="http://www.php.net/xml_error_string"><span class="kw3">xml_error_string</span></a><span class="br0">&#40;</span><a target="_blank"  href="http://www.php.net/xml_get_error_code"><span class="kw3">xml_get_error_code</span></a><span class="br0">&#40;</span><span class="re0">$this</span>-&gt;<span class="me0">parser</span><span class="br0">&#41;</span><span class="br0">&#41;</span>, <span class="st0">''</span>;
      <span class="br0">&#125;</span>
&nbsp;
      <span class="co1">// all done</span>
      <span class="re0">$this</span>-&gt;<span class="me0">inXml</span> = <span class="nu0">0</span>;
      <a target="_blank"  href="http://www.php.net/fclose"><span class="kw3">fclose</span></a><span class="br0">&#40;</span><span class="re0">$temp</span><span class="br0">&#41;</span>;
      <a target="_blank"  href="http://www.php.net/unlink"><span class="kw3">unlink</span></a><span class="br0">&#40;</span><span class="re0">$tmpfile</span><span class="br0">&#41;</span>;</pre>
<p>You will need to make sure that you replace <code>/path/to/writable/folder/</code> with the path to the folder <code>/tmp/</code> you created above.  Save your changes and you should be done!</li>

</ol>
]]></description>
 <category>Troubleshooting</category>
<comments>http://faq.nucleuscms.org/index.php?itemid=212</comments>
 <pubDate>Sat, 14 Feb 2009 15:30:12 +0100</pubDate>
</item><item>
 <title><![CDATA[How do I fix the " _ERROR_COMMENT_LONGWORD" error?]]></title>
 <link>http://faq.nucleuscms.org/index.php?itemid=211</link>
<description><![CDATA[<p><b>Scenario:</b><br />
<i>"Some URLs are very long and if users post them in a comment on my blog, they sometimes get this "_ERROR_COMMENT_LONGWORD".  How do I fix this problem?"</i></p>
<p><b>Solution:</b><br />
This will require a small core hack.  Open <code>/nucleus/libs/COMMENTS.php</code> and find the following code:</p>
<pre class="code">   <span class="co1">// don't allow words that are too long</span>
        <span class="kw1">if</span> <span class="br0">&#40;</span><a target="_blank"  href="http://www.php.net/eregi"><span class="kw3">eregi</span></a><span class="br0">&#40;</span><span class="st0">'[a-zA-Z0-9|<span class="es0">\.</span>,;:!<span class="es0">\?</span>=<span class="es0">\/</span><span class="es0">\\</span>]{90,90}'</span>,<span class="re0">$comment</span><span class="br0">&#91;</span><span class="st0">'body'</span><span class="br0">&#93;</span><span class="br0">&#41;</span> != <span class="kw2">false</span><span class="br0">&#41;</span>
        <span class="kw1">return</span> _ERROR_COMMENT_LONGWORD;</pre>
<br />
Change the number <code>90</code> to the maximum number of characters you want to allow.</p>
<p>Similarly, open <code>/nucleus/libs/ADMIN.php</code> and find this code:</p>
<pre class="code">		<span class="co1">// intercept words that are too long</span>
		<span class="kw1">if</span> <span class="br0">&#40;</span><a target="_blank"  href="http://www.php.net/eregi"><span class="kw3">eregi</span></a><span class="br0">&#40;</span><span class="st0">"[a-zA-Z0-9|<span class="es0">\.</span>,;:!<span class="es0">\?</span>=<span class="es0">\/</span><span class="es0">\\</span>]{90,90}"</span>,<span class="re0">$body</span><span class="br0">&#41;</span> != <span class="kw2">false</span><span class="br0">&#41;</span>
			<span class="re0">$this</span>-&gt;<span class="me0">error</span><span class="br0">&#40;</span>_ERROR_COMMENT_LONGWORD<span class="br0">&#41;</span>;</pre>
<br />
Again, change the number <code>90</code> to the maximum number of characters you want to allow.</p>
<p><b>Original forum thread (thanks, PakTrik & ftruscot!):</b><br />
<a href="http://forum.nucleuscms.org/viewtopic.php?t=17939">http://forum.nucleuscms.org/viewtopic.php?t=17939</a>
</p>
]]></description>
 <category>Troubleshooting</category>
<comments>http://faq.nucleuscms.org/index.php?itemid=211</comments>
 <pubDate>Sun, 16 Nov 2008 13:31:36 +0100</pubDate>
</item><item>
 <title><![CDATA[How do I permanently remove blog items from public access?]]></title>
 <link>http://faq.nucleuscms.org/index.php?itemid=209</link>
<description><![CDATA[<p><b>Scenario:</b><br />
<i>"I want to have my blog items automatically removed from public access after they are bumped off my index page.  Essentially, I'm just looking for some way to prevent anyone from accessing anything that is not on the main page by any method."</i></p>
<p><b>Solution:</b><br />
As of 16 November 2008, there is no plugin that automatically deletes blog items after a certain time. However, here is a manual solution:</p>
<ol></p>
<li>Open up your <code>index.php</code> in the root directory of your Nucleus installation and add following code:<br />
<pre class="code">selectBlog<span class="br0">&#40;</span><span class="st0">'shortblogname'</span><span class="br0">&#41;</span>;</pre>
 after this line:</p>
<pre class="code"><span class="kw1">include</span><span class="br0">&#40;</span><span class="st0">'./config.php'</span><span class="br0">&#41;</span>;</pre>
where <code>shortblogname</code> is the short name of your blog that contains the items on display. </li>
</p>
<li>Create a second blog called "Archive" through your Admin area in the "Create New Weblog" menu.  There is no need to create a copy of <code>index.php</code> for this though. This blog will just sit in your Admin area and hold your archived items.</li>
</p>
<li>Manually move each item from your blog to the new Archive blog as they get bumped off the page.</li>
<p><b>Original forum thread:</b><br />
<a href="http://forum.nucleuscms.org/viewtopic.php?t=17430">http://forum.nucleuscms.org/viewtopic.php?t=17430</a>
</p>
]]></description>
 <category>Plugins & Hacks</category>
<comments>http://faq.nucleuscms.org/index.php?itemid=209</comments>
 <pubDate>Sun, 16 Nov 2008 13:15:44 +0100</pubDate>
</item><item>
 <title><![CDATA[How secure is config.php?]]></title>
 <link>http://faq.nucleuscms.org/index.php?itemid=208</link>
<description><![CDATA[<p><i>Written and contributed by <a href="http://revcetera.com/">Frank Truscott</a>.</i></p>
<p>Any web agent that loads the <code>config.php</code> file will see a blank page. No bot can get around this since the server will render the <code>.php</code> file using a PHP parser and no text is output by the php in that file.</p>
<p>It is suspect only to those who have access to the server through other non-http ways (file or shell access to your directories). This would happen because you gave someone access to your hosting account (through control panel or ftp account), or because your hosting provider's server has been compromised through some kind of server-wide hack.</p>
<p>So, in principle, it is very secure on a secured server and this means of storing config info is common practice for most PHP-based applications.</p>
<p><b>Original forum thread (thanks, ftruscot!):</b><br />
<a href="http://forum.nucleuscms.org/viewtopic.php?t=17624">http://forum.nucleuscms.org/viewtopic.php?t=17624</a>
</p>
]]></description>
 <category>Miscellaneous</category>
<comments>http://faq.nucleuscms.org/index.php?itemid=208</comments>
 <pubDate>Mon, 6 Oct 2008 12:53:51 +0200</pubDate>
</item>
  </channel>
</rss>