Xoops Content

 

Overview

ARTICLES & STATIC CONTENT

Many article or content modules are available for download which are not provided with the standard installation. Each content module has its own specific range of features. Webmasters normally choose the content module which suits their preferences.

Most of these article or content "wrapping" modules come with a "what you see is what you get" (wysiwyg ) editor. Text can be copied and pasted from text editors like MS Word; or, existing HTML code can be pasted from applications like DreamWeaver or FrontPage if desired

How to wrap static HTML content in Xoops

The following applies If you wish to have a page of HTML content wrapped inside Xoops without using a content module. This example works if you want the HTML content files to be located in the root of your Xoops installation. First create a PHP file with the following content using your favorite text editor. Notepad for windows is suitable for example.

<?php
include("mainfile.php");
include("header.php");
$xoopsOption['show_rblock'] = 1; //0 for no right block
?>

Your HTML Code here (Note: Do not include head and body tags)

<?php
include("footer.php");

?>

Then name this file anything you wish and save it with a .php extension, and upload to the root folder of your Xoops site. The php extension is important, do not save the file with an HTML extension.

To call the file in Xoops you will need to add a link to it, say in a custom block like this.

<a href="http://www.yoursite.com/content.php">My Content Link</a>

Save the block in HTML format making sure it is set to be visible and in the position required. Remember to go to System Admin-> Groups and add access permissions for the block.


One Page Module

You can also use a one-page module setup which will give you the advantage of having the link to your page appear in the main menu. Using a one-page module will also allow you to use the blocks visibility settings for the module because it appears as an option when selecting which modules the page should be visible in.

Once one module is created multitudes of duplicates can be made, this only involves tweaking about two lines.

To download a useable example click Here

To setup a one page module first create a folder and name it anything. You only need two main files inside the folder and a module image file which appears in the Xoops modules admin.

So, you need a content file for your HTML called index.php, and a php file called xoops_version.php. The other image file only appears in the Xoops modules admin

In this instance your content file (index.php) will look like this

<?php
include("../../mainfile.php");
include(XOOPS_ROOT_PATH."/header.php");
$xoopsOption['show_rblock'] = 0;
?>

Your HTML Content Here (No Head and Body Tags)

<?php
include(XOOPS_ROOT_PATH."/footer.php");

?>

Save this file as index.php

To turn this into a module you will also need to create the file called xoops_version.php with the following content

<?php
$modversion['name'] = "mypage";//name of module
$modversion['version'] = 1.01;
$modversion['description'] = "My Module";
$modversion['author'] = "";
$modversion['credits'] = "";
$modversion['help'] = "";
$modversion['license'] = "GPL see LICENSE";
$modversion['official'] = 0;
$modversion['image'] = "blackhat.gif";
$modversion['dirname'] = "mypage";//same name as directory folder

// Admin things
$modversion['hasAdmin'] = 0;
$modversion['adminpath'] = "";


// Menu you can add submenus as links to other content files or modules

$modversion['hasMain'] = 1;//0 to remove link from main menu
//$modversion['sub'][1]['name'] = _MI_MYPAGE_SMNAME1;//define in language/english/global.php
//$modversion['sub'][1]['url'] = "../../modules/ipboard/";
//$modversion['sub'][2]['name'] = _MI_MYPAGE_SMNAME2;//define in language/english/global.php
//$modversion['sub'][2]['url'] = "../../modules/weblog/";

?>

I have commented out the sub-menu links so they will not appear in the module, these can also be deleted if no sub-menu required.

Notice this line from the code above::

$modversion['dirname'] = "mypage";//name of directory

The name must match the name of the folder you created

Include an image file for your Module:

$modversion['image'] = "blackhat.gif";//image for your module appears in admin

Inside your module  folder you should now have

index.php (content file)
xoops_version.php (module file)
the image file that appears in the Xoops modules admin

Add your HTML content to the content file (index.php) and upload it to your modules folder on your server i.e.

www.yoursite.com/modules

Then go to System Admin-> Modules and install the module. This module name will appear as a link to the HTML content in your Main Menu. Remember to add access permissions in System Admin-> Groups


How to include a standalone app in Xoops

Sometimes you may wish not just to wrap a page inside Xoops, but another website, or a folder containing files, or indeed an external application. For example, you may want to include a stand alone music application like Zina inside Xoops which will allow you to present music or sound files for your users.

I have a stripped down version of Framebrowser  for download Here

This module wraps external pages or applications in Xoops. I use it to wrap the Zina media streamer in my website. Some instructions are included.

To wrap external content in a block:

Firstly create a custom block by going  to System Admin -> Blocks

Then copy and paste the script below, and adjust the sizes to suit your theme.

<iframe src="http://www.mysite.com" height=450 width=450 frameborder=0></iframe>

Now position the block center-center or whatever is required.


How to Find a content module

A number of content wrapping modules are available for download, each has its own style and features. Content modules normally come with blocks include for navigation links etc. Another advantage of using a content module is the fact that the pages are included in  the Xoops global search. Some content modules like Wfsection, Soapbox and Articles allow the creation of categories and sub-categories I have listed some here with a short overview of their features.

Tiny Content

A very popular content wrapping module with a wysiwyg editor called "spaw". Spaw does not work in Netscape, if Netscape is used the Xoops editor automatically kicks in. No categories can be set up in this module.

- comments can be activated/deactivated for single contents
- submenu item for single contents
- extra navigation block for tinycontent
- upload, delete or include html files

Tiny Content

Soapbox

Soapbox is a module that allows a webmaster to create signed columns that will appear in their sites in a magazine-style format. Articles can be submitted by the authors, and users can utilize the XOOPS notification, rating and commenting systems.

This has a very good layout and attractive appearance.

SoapBox

C-Jay Content

The main features are:
Wrap HTML pages into xoops
Wrap PHP pages into xoops
Upload files through the module (no need of ftp)
create new HTML pages with the included wyswyg editor
create new PHP pages with the included code editor
wrapped HTML and PHP pages are searchable within xoops
edit wrapped HTML pages with the wyswyg editor
edit wrapped PHP pages with the code editor
create links to wrapped pages either inside it's own block or inside the main menu
Organize you links inside the block with headlines

C-Jay

Wfsection

Wfsection is probably the big brother of all content modules with a wealth of features, including categories and sub-categories and a spaw wysiwyg editor. For those who need sophisticated article management features which include group management, article versioning, attaching files to articles, user submit, and everything you would expect from a major article management system--this is the one. In my view this is the most feature rich open source article manager on the Internet today. At the time of writing a new beta release was underway. (June 10, 2004)

Wfsection

I also have an older stable version available at my site which is a bug fix version for V 1.1. Many of these bugs were only backend issues which did not affect the stability of the module. I applied bug fixes from around and about.

Wfsectionbugfix V1.1

Xfsection

This is a clone or duplicate of Wfsection, with more interesting features added. A number of bug fixes were added, and also the ability for users to edit their own articles. See the download for a full description.

Xfsection

Articles

Articles, Xoops V2xx article management module.

This is the only description available on the download, I have never used it so I don't know what features it has.

Articles

FreeContent

The following taken from the Download description:

Display your own html or php pages integrated to Xoops.
Smarty cache, Search and Xoops native comments.
Tutorial included.
New XHTML compliant wrapping method

Beginning from version v2.9 Freecontent implements a URL Rewriting function allowing subsequent local urls to be also showed in Xoops

With WebDigest capability FreeContent becomes the first Knowledge oriented content tool for Xoops.

FreeContent allows you not only to present easily a variety of contents but also to make concept/topic oriented Web Intelligence, to organize community discussion with always up to date and fresh content and information.

Freecontent WebDigest uses advanced and powerful Text Retrieving Techniques to automatically generate relevant contents for your website.

FreeContent

These are some of the well known content modules in Xoops. I am sure there is some others, doing a search in the Xoops site will bring up other choice


jackj macambridge.com