Hacks

Acronym - new XoopsCode

Zirafka  24-Jun-2010 09:58  4834 reads  1
Do you want to have new XoopsCode? My Little hack add new XoopsCode like HTML < acronym > tag. Add new functionality is easy

First we need to create a directory in CLASS/TEXTSANITIZER new folder and call it "acr". In it are two files:

The first is "index.html" which serves as a basic protection against such intrusions. You can find it in virtually all other directories and it is sufficient merely to copy the new directory.

The second is called "acr.php" and have this content:

<?php
/*
 You may not change or alter any portion of this comment or credits
 of supporting developers from this source code or any supporting source code
 which is considered copyrighted (c) material of the original comment or credit authors.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

/**
 * TextSanitizer extension
 *
 * @copyright       The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license         http://www.fsf.org/copyleft/gpl.html& ...  public license
 * @package         class
 * @subpackage      textsanitizer
 * @since           2.3.0
 * @author          Wishcraft <simon@xoops.org>
 * @version         $Id: li.php 3575 2009-09-05 19:35:11Z trabis $
 */
defined('XOOPS_ROOT_PATH') or die('Restricted access');

class 
MytsAcr extends MyTextSanitizerExtension
{
    function 
load(&$ts)
    {

        
$ts->patterns[] = "/[acr](.*)[/acr]/sU";
        
$ts->replacements[] = '<acronym title="Unknown acronym">\1</acronym>';
    
        
$ts->patterns[] = "/[acr=(.*)](.*)[/acr]/sU";
        
$ts->replacements[] = '<acronym title="\1">\2</acronym>';
        return 
true;
    }
}

?>


In it, he set his own recognition of the new Xoopscode and its treatment, or switch to HTML tags. You may notice that contains two options:

[acr]Xoops[/acr]


This code creates the text, which completes the acronym, but is not assigned any meaning, because it also writes the label.

[acr=eXtensible Object Oriented Portal System]Xoops[/acr]


This code creates a shortcut again in the sense of HTML, but given the importance of this symbol and therefore it forward.

Everything worked so well, you need to edit another file, and that is the file "config.php" which is located in the directory CLASS/TEXTSANITIZER.

You need to find this part:

return $config = array(
    
"extensions" => array(
        
"iframe" => 0,
        
"image" => 1,
        
"flash" => 1,
        
"youtube" => 1,
        
"mp3" => 0,
        
"wmp" => 0,
        
// If other module is used, please modify the following detection and 'link' in /wiki/config.php
        
"wiki" => is_dir(XOOPS_ROOT_PATH '/modules/mediawiki/'),
        
"mms" => 0,
        
"rtsp" => 0,
        
"ul" => 1,
        
"li" => 1),


and add only one line:

return $config = array(
    
"extensions" => array(
        
"iframe" => 0,
        
"image" => 1,
        
"flash" => 1,
        
"youtube" => 1,
        
"mp3" => 0,
        
"wmp" => 0,
        
// If other module is used, please modify the following detection and 'link' in /wiki/config.php
        
"wiki" => is_dir(XOOPS_ROOT_PATH '/modules/mediawiki/'),
        
"mms" => 0,
        
"rtsp" => 0,
        
"ul" => 1,
        
"li" => 1,
        
"acr" => 1),


That´s all, happy Xoopsing

Demo: see my web page: www.zirafoviny.cz
Print article
Hacks

Little hack of Runeher's "Lorem Ipsum ...

Zirafka  23-Jun-2010 07:11  5165 reads  1
Hi, "Lorem Ipsum Generator" from Runeher is useful module for all web designers. But now more useful

I translate module to Czech language (module don't use language files) and added "nicer style" to option menu.

Why hack? Because this module don't use Language files but all text are "hard" in source code.

In to the Czech version I added Czech version of Lorem Ipsum, with diacritic and Czech like words. On English version are only original languages, but English speaking people don't need Czech like texts

Download Czech version

Download English version

Happy Xoopsing
Print article
Hacks

x_movie 3 now plays videos on explorer 8

heyula  16-Jun-2010 23:09  5479 reads  8
Hi

We have edit jquery-1.4.2.js and change name to jquery.js and replace to x_movie/js/jquery.js

we've changed code is ==> name = name.replace(rdashAlpha, fcamelCase); <<= to:==> // name = name.replace(rdashAlpha, fcamelCase); <<=

and now xmovie 3 is working with All browsers.


If you want download from Xoops-Tr.com download link below:

http://www.xoops-tr.com/modules/TDMDo ... glefile.php?cid=12&lid=60
Print article
Hacks

Comment system for any module

Runeher  30-May-2010 04:17  8783 reads  10
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

Print article
Hacks
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
Print article
Hacks

Let it snow on your XOOPS website!

vamptrix  16-Dec-2009 17:37  6207 reads  15
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!
Print article
Hacks

Language problem with comments

Zirafka  22-Nov-2009 17:36  4324 reads  4
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
Print article
Hacks

Revolution Xoops Banner System!

slyss  11-Nov-2009 08:11  12480 reads  15
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:
Print article
Hacks

Watermark Hack for Xoops Core Imagemanager

optikool  07-Oct-2009 22:09  5984 reads  11
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
Print article
Hacks

Ajax block for the News module

Shiva  26-Sep-2009 10:56  6888 reads  5
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
Print article
Hacks

Xurl XOOPSeditor QRCode

chco2  20-Sep-2009 18:24  6021 reads  1
[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!
Print article
Hacks

Delete your temporary files in a easy way

DonCurioso  08-Aug-2009 16:35  10783 reads  10
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?).
Print article
Hacks

Hack "splash screen"

marcetmaud  23-Feb-2009 19:15  7118 reads  4
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.
Print article
Hacks

News 1.63 + Latestnews 1.72 - SEO optimization

laguna  19-Feb-2009 16:13  8351 reads  13
We all know the benefits of using friendly url on our websites. This increases the number of visits to our website being better indexed by search engines.

[img]http://www.esxoops.com/image.php?id=32[/img]

The user ElSanto webmaster of GuiaSexo offers the community the improvements made in two modules: News 1.63 and lastestnews 1.72.

The modules were tested on versions 2.0.18.2 and 2.3.2 of XOOPS, without any problem, offering friendly url for the news category, the printable version and create PDF files.

Url examples
/Noticias.cat.3/actualidad.html
/Noticias.item.5/una-iniciativa-para-crear-conciencia.html
/Noticias.print.5/version-imprimible.html
/Noticias.pdf.10/una-iniciativa-para-crear-conciencia.pdf

The instructions for the upgrade/installation, are in the folder SEO/seo.rtf

These are sites that are already operating on the hack:

http://aclomas.org.ar/noticias/ (also include xoModuleRewrite of DuGris)
http://cumbiadeperu.com/modules/news/
EDIT: link removed because of content: http://removed .com.ar/modules/news/

The hack requires that the server has enabled rewriting.

In local monde, uncomment httpd.conf file in the Apache server (#LoadModule rewrite_module modules / mod_rewrite.so). Finally, restart the server for the changes to take effect

Download

News 1.63 SEO + Lastestnews 1.72 SEO
Print article
Hacks

Xoops News SEO application

baro28  14-Dec-2008 13:22  9676 reads  15
Hi, Now news 1.56 seo aplication

1- xoops module news 1.56 to set up site
2- .htaccess your index upload
3- and xoops news Module Settings - Enable meta datas (keywords and description) to be entered ? ( turn YES )
4 - Add news, make sure to enter Meta keywords

Now sample news add

Resized Image


http://www.sitename.com/news/exapmle-aricles-1/ good url ok :)

Download
password : www.barisdemir.net

Demos:
?ebinkarahisar Kozlucakoyu
Kelkit Vadisi

Posted by Bar?? Demir


Print article
« 1 2 (3) 4 5 6 ... 11 »


Login

Username:
Password:

Lost Password? Register now!

Who's Online

52 user(s) are online (1 user(s) are browsing Publisher)


Members: 0


Guests: 52


more...

Donat-O-Meter

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

Latest GitHub Commits

Categories