about us | contact | sitemap

         Is the domain available?
  www. 

How to add comments-function to any XOOPS module


This module demonstrates how this hack works and have description how you can add it to your own module. It doesn't matter if your module use sql or not, you can now build a simple module with an index.php containing for example only a javascript, and still get comments to the module.

There are a few things you have to do to get it to work:

First copy the following files and folders in the module folder of this module, to your module folder:
  • comment_delete.php
  • comment_edit.php
  • comment_new.php
  • comment_post.php
  • comment_reply.php
  • comment_view.php
  • commentform.php
  • display_comments.php
  • extra_functions.php
  • Folder js (or add the files to your existing js folder).
  • Folder language (or add language/english/noitemcomments_lang.php to your existing language folder).

Next you have to connect the comments to your module by adding 3 includes as described in bottom of index.php in this module. Look for the commented lines and copy it to your module. Remember to change module name.

Then do the following:
  • Open the file xoop_version.php of this module and copy the commented code to your module's xoops_version.php
  • Open the file display_comments.php and do as described in the commented line (Line 38).
  • Open the file preloads/core.php and do as described in the commented lines.

Note! Only the first module with the comments hack, needs the preloads folder, so if you for example have this module installed, drop the included preloads folder for the rest of the modules you want to add the hack to!

Finally: UPDATE YOUR MODULE!

NOTE! This hack requires at least XOOPS version 2.4.0, so you better UPGRADE if you want to use it!



Register or login to post comment  |  See all comments

Written by Runeher
Posted : 28-05-2010 07:59:29  Edited: 28-05-2010 07:59:29
Webmaster
Member since: 22-01-2009
Location:
Posts: 2
Online

Add it to your own module!

Cool hack for XOOPS CMS to add comments to any module...
Translate site to:
 

Share on Facebook  Share on Facebook

Join us on Facebook


Language selection

Modules A - F


Modules G - M


Modules N - S


Modules T - Z



Terms Of Service  | Affiliates |  Report Spam