The NP_LMFancierURL plugin provides the possibility to use search engine optimized URLs for a Nucleus CMS blog site.
General plugin info | |
---|---|
Author: | Leo |
Current version: | 3.0.2 |
Download: | NP_LMFancierURL_v302.zip |
Support: | Plugin comments or forum thread |
Compability: | Nucleus CMS 3.50, NP_LMURLParts 1.1.1 |
The NP_LMFancierURL plugin provides the posibility to use search engine optimized URLs for a Nucleus CMS blog site. A URL friendly version of each blog name, member name, item title, category name and extra skin name is generated by the plugin. These URL friendly values are then used when the URL for blogs, members, categories, items and extra skin is parsed or generated. These values can be edited by the blog administrator or the site super administrator.
This plugin was originally made to replace the NP_FancierURL2 plugin that have several bugs and problems. Version 2 of the NP_LMFancierURL plugin was rewritten from scratch to be able to include the new version 2 features.
The plugin offers 3 different URL schemes. What URL scheme to use can be configured globaly for the site or for each blog.
Available URL schemes are:
In addition to the 3 URL schemes is it possible to use freeform item URL parts. With freeform item URL parts can you enter the URL part that you want to use to identify an item in a blog. Unlike normal URL parts can a freeform item URL part consist of one or more / character. With this you can simulate directory structures more freely with freeform item URL than with normal URL parts. Templates can be used to automatically generate freeform item URL parts from the item data.
In version 3 of the plugin was custom base URLs introduced. With this functionality can you make the different blogs in a Nucleus installation has different domains and/or Nucleus directories. It is also possible to set the custom base URL for a blog to also identify the blog. With this option set will not a blog URL part be needed in the URL to any pages in the blog.
The NP_LMFancierURL plugin uses a helper plugin for handling the URL part values. This plugin is called NP_LMURLParts and is used to store and edit the URL part values to be used in the generated URLs. This plugin must be installed before the NP_LMFancierURL plugin can be installed. The NP_LMURLParts plugin can be downloaded from the NP_LMURLParts plugin page.
.htaccess
file to the root directory of your Nucleus CMS installation with the following contents:
<IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?virtualpath=$1 [L,QSA] </IfModule>
index.php
, xml-rss2.php
and atom.php
files which you can find in your Nucleus installation directory.
Change the value of the $CONF['Self']
variable from the default value (the name of the php-file) to the URL that points
to your Nucleus installation directory (without the ending slash), for example:
$CONF['Self'] = 'http://yourdomain.com/yourNucleusDirectory';
If you upgrade from a V1 version of the NP_LMFancierURL plugin or from NP_FancierURL2 you have to uninstall the old plugin before you can install this version of NP_LMFancierURL using the normal install procedure.
If you upgrade from a V2 or later version of the NP_LMFancierURL plugin, use the following upgrade procedure:
Since the URLs generated by V2 or later versions of NP_FancierURL is not guarantied to be equal to the URLs generated in earlier versions, or the URLs generated by NPFancierURL, you may want to use the NP_LMRedirectToItem plugin to be able to keep old item URLs valid. You must install the NP_LMRedirectToItem plugin and generate the redirects before you uninstall the old fancier URL plugin.
The NP_LMFancierURL plugin has the following options on the global level:
/%cat%/%itemid5%/%yy%-%mm%-%dd%/%title%
. The variables that can be used is:
%title%
: Title of the item.%itemid%
: Item id of the item. Use %itemid3%
, %itemid4%
, %itemid5%
or %itemid6%
to show the item id as a zero prefixed string of 3, 4, 5 or 6 digits.%cat%
: Name of the category the item belongs to.%yy%
: Year the item was posted as a 2 digit number.%yyyy%
: Year the item was posted as a 4 digit number.%mm%
: Month the item was posted as a 2 digit number.%dd%
: Day of the month the item was posted as a 2 digit number.yes
if you want only 1 valid URL for the index page of the default blog.
This option is only valid when Hide /blog/name for default blog option is set to no
.
Example: If this option is set to yes
will the http://yourdomain.com/directory
URL be redirected to the http://yourdomain.com/directory/blog/name
URL.
If the option is set to no
will both URLs show the index page of the default blog, and you will have 2 different URLs that shows the same content.
The NP_LMFancierURL plugin has also options on the blog level. The default value for most blog options is to use the value of the globally defined options. See the global options description for a description of the options values. Available blog options are:
yes
if you have blogs with the same base URL (default or custom), but with different skins.
This ensures that any member page linked from this blog will be shown in the skin of this blog.
Custom base URLs is set up on the plugin admin page. The custom base URL options for a blog are:
index.php
file.
The custom base URL must be a valid URL that points to the same Nucleus installation directory as the default base URL.
As the default base URL, must the custom base URL be registered without the ending slash.
Example of a custom base URL: http://yourotherdomain.com/yourNucleusDirectory
yes
is no blog urlpart used in links to pages on this blog.
No other blogs on the Nucleus site can use the same custom base URL as this blog.
After you have installed the NP_LMFancierURL plugin and set the options you are all set, and don't need to do anything unless you want to customize keywords or URL parts.
If you change an item title or name of any other blog object will also the URL part for this object be changed to reflect the new title or name. If you want to use a custom URL part for a blog object or lock the URL part so any changes to the blog object doesn't update the URL part you can use the NP_LMURLParts plugin admin page. See the NP_LMURLPart plugin help page for more information on using the NP_LMURLParts plugin admin page. You can also use the NP_LMURLParts plugin admin page to edit the URL part keywords that NP_LMFancierURL should use.
Because of a shortcoming in the Nuclues core can the NP_LMFancierURL plugin not automatically catch special skin parts that are added to or removed from a skin after the plugin is installed. After you have added or removed a special skin part must you use the "Update special skin part URL parts" function on the NP_LMFancierURL admin page to update the URL parts stored in the NP_LMURLParts plugin.
When you change URL scheme, will old URLs to blog objects not be valid anymore. If you want to keep the old item URLs valid you can use the NP_LMRedirectToItem plugin to redirect the old URLs to the new ones.
When there is more than one URL that points to one blog item is it a chance that this blog item get duplicate entries in search engines. To avoid this can a <link> tag with rel="canonical" in the <head> section of the item page be used to point to the unique URL to use for the blog item. The NP_LMFancierURL plugin has a skin variable to help you add a canonical URL for blog items. Add the following to the <head> section of the item skin to set the canonical URL for the blog item:
<link rel="canonical" href="<%LMFancierURL(canonicalitemlink)%>" />
When you change URL scheme or change the URL part for an item will the item get a new canonical URL. If you want to notify search engines of the URL change you can use the NP_LMRedirectToItem plugin to set up a redirect for the old item URL.
With freeform item URL parts you can freely specify the content of the item URL. The freeform item URL part must always start with a / character and is relative to the blog URL. Freeform item URL parts are independently of the configured URL scheme.
When a freeform item URL part is registered for an item, will the freeform item URL part always be used to generate the URL for the item. If a freeform item URL part is used to generate an item URL will not urlparts for other blog objects besides the item be added to the URL. URL parts for other blog object can be added manually to the freeform item URL part, but they can not be parsed. Freeform item URL parts is by default disabled.
The main purpose of the custom base URL functionality is to be able to set up blogs with different domians on the same Nucleus installation.
Each custom base URL must point to the same directory on the web-server as the default base URL.
The default base URL is the URL you assigned to the $CONF['Self']
variable in the index.php
file.
For additional support and/or bug reports please use the Nucleus forum plugin announce thread or the plugin page comment section.
Some plugins adds their own parts to generated URLs. These plugins must either use NP_LMURLParts to register the values used, or support for these plugins must be added to the NP_LMFancierURL plugin. If not will the NP_LMFancierURL plugin return a 404 HTML error when the URL includes parts it don't know. If you use plugins that adds their own parts to the URL that are not supported, please report about these plugins in the Nucleus forum plugin announce thread or in the plugin page comment section.
The NP_ShowBlogs plugin can be used together with the NP_LMFancierURL plugin without extra set up.
If you want to use the NP_LMFancierURL plugin together with the NP_TechnoratiTags plugin you have to do the following:
$CONF['Self']
variable as described in the NP_LMFancierURL Installation documentation.tags.php
file as described in the NP_TechnoratiTags documentation.tags
as described in the NP_TechnoratiTags documentation where the main index includes the <%TechnoratiTags(tagsearch)%>
skin variable.This version of the NP_LMFancierURL is tested against version 3.64 of Nucleus CMS. The minimum version of Nucleus CMS needed for using this plugin is 3.50 and the minimum version of the NP_LMURLParts plugin needed by this plugin is version 1.1.1. The mod_rewrite module must be enabled on the web server.
Download NP_LMFancierURL v3.0.2. The latest version of the NP_LMFancierURL plugin can be downloaded from the NP_LMFancierURL plugin page.
The latest version of the NP_LMURLParts plugin can be downloaded from the NP_LMURLParts plugin page.
Posted by Tim Harrison on 14/02-14 22:44.
Posted by Leo on 15/02-14 18:08.
Posted by Lord Matt on 17/09-14 17:48.
example.com/myblog/my-item == example.com/index.php?catid=1&itemid=2&blogid=3
Posted by Leo on 17/09-14 23:26.
Lord Matt: Is it possible to have the URL parser set the category ID without passing the category in the URL and without the category being added to the URL at any time.No, but I have added this to my ToDo list.
Posted by Tim on 19/12-14 07:40.
Posted by Tim on 19/12-14 11:37.
Posted by Tim on 20/12-14 11:31.
Spam and off topic comments will be deleted.
Any thoughts on how to fix?