RSS feed

Comment system for any module

Resized Image

One day I was making a module that would benefit from having comments. I started to look into it but every road seemed a dead end. I started ask around but nobody thought it was possible since the module didn't use SQL.

I almost gave up and started looking into flat file comments, but then Culex took the case and wrote a code that lifted the spirit... So after a few weeks of a lots of testing, failing, testing, and modification it finally works!

A comment hack intended for my module is now available to XOOPS community. It is in a form of a module NoComments, that has been modified so it's has a Comments system included.

The hack is very easy to add to your module. Just follow the instructions in the module and you should be good to go!

As a matter of fact we think this hack is so cool that we included a zip file in the module itself, so if you install it on a live site, you can offer it as a download from your own site.

Most kudos go to Culex as he is the genius behind this... I was more of the the 'nagger'..

Viva XOOPS!

Demo: here

Download: here

Read more... | 10 comments

„Browse in alphabetical order“ in the lexicon and national characters

If you want the module "Lexicon" show national characters in the block „Browse in alphabetical order“, you have a problem. The solution is simple:

In file INCLUDE/FUNCTION.PHP search:

function lx_alphaArray ()
    {
    global 
$xoopsUser$xoopsDB$xoopsModule;
    
$alpha = array();
    for (
$a 65$a < (65+26); $a++ )
        {
        
$letterlinks = array();
        
$initial chr($a);
        
$sql $xoopsDB -> query "SELECT * FROM " $xoopsDB -> prefix "lxentries") . " WHERE init = '$initial' " );
        
$howmany $xoopsDB -> getRowsNum$sql );
        
$letterlinks['total'] = $howmany;
        
$letterlinks['id'] = chr($a);
        
$letterlinks['linktext'] = chr($a);

        
$alpha['initial'][] = $letterlinks;
        }
    return 
$alpha;
    }


And replace:

function lx_alphaArray (){

        global 
$xoopsUser$xoopsDB$xoopsModule;
        
$pismenka = array("A","B","C","D","E","F","G","H","CH","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");
        
$alpha = array();

    for (
$a 0$a count($pismenka); $a++ )
       {
                                                                     
        
$letterlinks = array();
        
$initial =  $pismenka[$a];
        
$sql $xoopsDB -> query "SELECT * FROM " $xoopsDB -> prefix "lxentries") . " WHERE init = '$initial' " );
        
$howmany $xoopsDB -> getRowsNum$sql );
        
$letterlinks['total'] = $howmany;
        
$letterlinks['id'] =  $pismenka[$a];
        
$letterlinks['linktext'] =  $pismenka[$a];

        
$alpha['initial'][] = $letterlinks;
        }


    return 
$alpha;
    }



Array $pismenka[] include list of characters, who module use, simply use your national characters.

Hack is tested in Xoops 2.4.2 and 2.4.2 in UTF-8.

That’s all, Happy Xoopsing
Read more... | 11 comments

Let it snow on your XOOPS website!

Hello guys!

To get your site a bit more in the christmas/holidays mood, I've added some snow on my websites, and since everyone likes some snow this time of the year, here is how to do it yourself

This way doesn't require any module or hack and gives a nice effect (similar effect can be seen on my blog www.vampiretrix.com - same script but other config)

Download the files from http://www.nightquest.me/snow/snow.zip . Extract them and upload them to your site. (I uploaded them into root/snow).

Open /script/snowstorm.js and search for the line
var imagePath 'image/snow/'// relative path to snow images (including trailing slash)

and type in front of the image/snow the location of the files in your XOOPS installation (so, http://www.my.site/snow/image/snow in my case).
Save this and upload it to your site. (you can also modify general settings in this script, like if the snow should follow the mouse).

Then, go to your site, log in to the admin and open your blocks (http://www.my.site/modules/system/admin.php?fct=blocksadmin) and scroll down to "Add a new block". Change visible in to "All Pages", give it a random name (I named it Snow). Add this to the content:
<script type="text/javascript" src="http://www.my.site/snow/script/snowstorm.js"></script>


Change the http://www.my.site/snow/script/snowstorm.js to your site and change the group access and select all groups. Then press submit.

Go check your homepage, you should see the snow falling now

If you want to let the snow stop falling (eg for people with slower pc's, add this line somewhere to your site:
<a href="#" onclick="snowStorm.stop();return false">Stop the snow</a>
. If people click that link, the snow will stop falling.

I hope you like this

Kevin :)
PS: Happy holidays!
Read more... | 15 comments

Language problem with comments

The Websites are quite often criticized that the authors of programs or other systems do not consider a different language than their own. So different numbers are displayed correctly in the original language, but in other languages they appear strange.

For example, if the original module is able to distinguish only one or more comments, it's a problem, as the translation results in: "Pocet komentaru: 3" instead of the correct "3 komentare" (Examples are given for the Czech language).

For my server, I adjusted the News module as follows:

File language/YOUR_LANGUAGE/main.php:

define("_NW_NUMCOMMENTS","%s komentare");


change to:

define("_NW_NUMCOMMENTS2","%s komentare"); // 2 - 4 comments
define("_NW_NUMCOMMENTS5","%s komentaru"); // more than 4 comments


File class/class.newsstory.php:

if (XOOPS_COMMENT_APPROVENONE != $xoopsModuleConfig['com_rule'])
{
$ccount $this->comments();
$morelink .= '<a
href="'
.XOOPS_URL.'/modules/news/article.php?storyid='.$this->storyid().'';
$morelink2 '<a
href="'
.XOOPS_URL.'/modules/news/article.php?storyid='.$this->storyid().'';

if ( 
$ccount == )
{
$morelink .= '">'._NW_COMMENTS.'</a>';
}
else
{
if ( 
$fullcount )
{
if ( 
$ccount == )
{
$morelink .= '">'._NW_READMORE.'</a> | '.$morelink2.'">'._NW_ONECOMMENT.'</a>';
}
else
{
$morelink .= '">'._NW_READMORE.'</a> | '.$morelink2.'">';
$morelink .= sprintf(_NW_NUMCOMMENTS$ccount);
$morelink .= '</a>';
}
}
else
{
if ( 
$ccount == )
{
$morelink .= '">'._NW_ONECOMMENT.'</a>';
}
else
{
$morelink .= '">';
$morelink .= sprintf(_NW_NUMCOMMENTS$ccount);
$morelink .= '</a>';
}
}
}
}


change to:

if (XOOPS_COMMENT_APPROVENONE != $xoopsModuleConfig['com_rule'])
{
$ccount $this->comments();
$morelink .= '<a
href="'
.XOOPS_URL.'/modules/news/article.php?storyid='.$this->storyid().'';
$morelink2 '<a
href="'
.XOOPS_URL.'/modules/news/article.php?storyid='.$this->storyid().'';

if ( 
$ccount == )
{
$morelink .= '">'._NW_COMMENTS.'</a>';
}
else
{
if ( 
$fullcount )
{
if ( 
$ccount == )
{
$morelink .= '">'._NW_READMORE.'</a> | '.$morelink2.'">'._NW_ONECOMMENT.'</a>';
}
else
{
if (( 
$ccount >) && ( $ccount <5))
{
$morelink .= '">';
$morelink .= sprintf(_NW_NUMCOMMENTS2$ccount);
$morelink .= '</a>';
}
else
{
$morelink .= '">';
$morelink .= sprintf(_NW_NUMCOMMENTS5$ccount);
$morelink .= '</a>';
}
}
}
else
{
if ( 
$ccount == ) {
$morelink .= '">'._NW_ONECOMMENT.'</a>';
}
else
{
if (( 
$ccount >) && ( $ccount <5))
{
$morelink .= '">';
$morelink .= sprintf(_NW_NUMCOMMENTS2$ccount);
$morelink .= '</a>';
}
else
{
$morelink .= '">';
$morelink .= sprintf(_NW_NUMCOMMENTS5$ccount);
$morelink .= '</a>';
}
}
}
}
}


Modification work will begin immediately, but if you have enabled the cache, it needs to first be erased, otherwise the change will take effect after the flush.

This hack is tested on Xoops 2.4.1 with News module version 1.63

And as always, finally talk about modifying the system: before any treatment can make backup copies of the original files. You never know what can go wrong where.

And that's all
Read more... | 4 comments

Revolution Xoops Banner System!

I have finally created 2 functions to place your BANNERS everywhere you want and to choose which BANNER to show!!!
Is very very simple. You have 3 options to place your BANNERS in blocks:

1. No banners preference: view random banner
2. Banner preference: view specific banner
3. Client preference: view specific client banner

LET'S DO THIS:
Read more... | 30453 bytes more | 15 comments

Watermark Hack for Xoops Core Imagemanager

This is a hack to xoops 2.3.3 which gives you the ability to add a watermark to images that you upload through the image manager.

The name of your watermark should be watermark.png and it should be located under uploads… /uploads/watermark.png. Replace the files located in the zip file with the files in your Xoops installation.

Thanks to Mowaffaq Ali at www.arabxoops.com for making a donation to this project. Please post your suggestions and feedback Xoops Forums or at my website

Download it from here

Resized Image
Read more... | 13 comments

Ajax block for the News module

Hi All,

I recently integrated jquery with the news module to create a new block. The new block makes a Ajax calls using jquery to refresh the news by filtering on the topics available. The block is based on the existing "recent news" block, so I have been able to utilize the code for that block to make development quicker.

This is my first stab at jquery integration so I am sure that there will be future releases with more polished code. Feedback will be appreciated.

Also pecial thanks to Kaotik for his support in developing this.

Files can be downloaded here: Evucan Module hacks

Evucan Web Solutions
Read more... | 5 comments

Xurl XOOPSeditor QRCode

[thumb]http://designburo.nl/ett2/modules/Xurl/images/xurl.png[/thumb]Resized Image
Xurl QRCode enhancement for the XOOPS editor.




Resized Image
The Xurl module already adds QRCode creation to your website. Yesterday a Wordpress Plugin has been released for allowing users to create QRcode within the texteditor for posting news/forumposts etc.

Today, Designburo.nl is happy to announce the same functionallity for the XOOPS community.

For more info and download go here : http://2lk.nl/k4
This is also the place for questions and feedback. Enjoy!
Read more... | 1 comment

Delete your temporary files in a easy way

From Hispaxoops & Celseven, we launch a little hack to help users with cache files deletion.

It´s a code implementation over Xoops called xDelCache, it deletes smarty_compile folder content & create an index.html file again.

If you need a fast way to delete it, we think this one more right way to do.

Many thanks to Celseven & hope all community could find useful this hack (maybe will be implemented on a future versions of Xoops?).
Read more... | 10 comments

Hack "splash screen"

Hello everybody,

This is a hack to display a splash home page "html". It is displayed one time by session or parametrable a during time.

With this page your site is preloaded in backgroung, and it's Quickly display, and keep the initial destination.

The installation is very simple:

1)copy the folder "splash" to your site root.

2)paste this code just before the head balise in your theme.html

<!-- Page d'accueil Splash, home Splash page-->
<script type="text/javascript" src="<{xoAppUrl /splash/splashpage.js}>"></SCRIPT>
<!-- FIN Page d'
accueil Splashend of home Splash page -->


3)go to your website, the splash page is ok.

all parameters is on /splash/splashpage.js.

DEMO : http://www.edrfco.fr/modules/extgallery/

DOWNLOAD : http://www.marcetmaud.fr/modules/mydownloads/viewcat.php?cid=2


This script is tested and compatible with ie7 & firefox

A(dishatz)+

Ps : excuse me but my english is very bad.
Read more... | 4 comments
« 1 2 3 (4) 5 6 7 ... 16 »


Login

Username:
Password:

Lost Password? Register now!

Who's Online

71 user(s) are online (3 user(s) are browsing XOOPS News)


Members: 0


Guests: 71


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits

Archives

News archives