Skip to content

Commit

Permalink
Add new plugin: kunena stopforumspam to check user on registration
Browse files Browse the repository at this point in the history
  • Loading branch information
xillibit committed Sep 18, 2022
1 parent 6c544c4 commit f34dd66
Show file tree
Hide file tree
Showing 12 changed files with 657 additions and 45 deletions.
2 changes: 1 addition & 1 deletion plugins/content/kunenadiscuss/build/build.config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ cfg.buildprefix=b
cfg.adddate=true

# Date Format (http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html)
cfg.datefmt=%Y-%m-%d
cfg.datefmt=yyyy-MM-dd

# Date locale
cfg.dateloc=en,UK
Expand Down
58 changes: 14 additions & 44 deletions plugins/content/kunenadiscuss/build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<property name="kunena.directory" value="${project_dir}/"/>
<property name="kunena.directory.list" value=""/>

<target name="dist" depends="archive,mkdir,copy,init,package,replace,tar,zip,gzip,bz2,info,cleanup"/>
<target name="dist" depends="mkdir,archive,copy,init,package,tar,zip,gzip,bz2,info,cleanup"/>

<target name="mkdir">
<mkdir dir="${tmp_dir}"/>
Expand Down Expand Up @@ -96,62 +96,32 @@
<condition property="version.date" value="${str.datefmt}" else="">
<istrue value="${cfg.adddate}"/>
</condition>

<copy file="${project_dir}/kunenadiscuss.xml" todir="${tmp_dir}" overwrite="true" />
<copy file="${project_dir}/README.md" todir="${tmp_dir}" overwrite="true" />
<filter token="kunenaversion" value="${xml.version}"/>
<filter token="kunenaversiondate" value="${version.date}"/>
<filter token="kunenaversionbuild" value="${build.number}"/>
<filter token="kunenaversionname" value="${xml.versionname}"/>
<copy file="${project_dir}/kunenadiscuss.xml" todir="${tmp_dir}" overwrite="true" filtering="true"/>
<copy file="${project_dir}/README.md" todir="${tmp_dir}" overwrite="true" filtering="true"/>
</target>

<target name="replace" depends="package">
<reflexive>
<fileset dir="${tmp_dir}">
<include pattern="**/**" />
</fileset>
<filterchain>
<replacetokens>
<token key="kunenaversion" value="${xml.version}"/>
<token key="kunenaversiondate" value="${version.date}" />
<token key="kunenaversionname" value="${xml.versionname}" />
<token key="kunenaversionbuild" value="${xml.version}"/>
<token key="kunenacopyright" value="${xml.copyright}"/>
</replacetokens>
</filterchain>
</reflexive>
</target>

<target name="tar" depends="package" if="do.tar">
<zip destfile="${str.destfile}.tar">
<fileset dir="${tmp_dir}">
<include name="**/**" />
</fileset>
</zip>

<target name="tar" depends="package" if="do.tar">
<tar destfile="${str.destfile}.tar" basedir="${tmp_dir}"/>
</target>

<target name="zip" depends="package" if="do.zip">
<zip destfile="${str.destfile}.zip">
<fileset dir="${tmp_dir}">
<include name="**/**" />
</fileset>
</zip>
<zip destfile="${str.destfile}.zip" basedir="${tmp_dir}"/>
</target>

<target name="gzip" depends="package" if="do.gzip">
<zip destfile="${str.destfile}.gzip">
<fileset dir="${tmp_dir}">
<include name="**/**" />
</fileset>
</zip>
<tar destfile="${str.destfile}.tar.gz" basedir="${tmp_dir}" compression="gzip"/>
</target>

<target name="bz2" depends="package" if="do.bz2">
<zip destfile="${str.destfile}.bz2">
<fileset dir="${tmp_dir}">
<include name="**/**" />
</fileset>
</zip>
<tar destfile="${str.destfile}.tar.bz2" basedir="${tmp_dir}" compression="bzip2"/>
</target>

<target name="info" depends="package">
<echo message="Phing Version: ${phing.version}"/>
<echo message="Ant Version: ${ant.version}"/>
<echo message="Project: ${cfg.name}"/>
<echo message="XML Name: ${xml.name}"/>
<echo message="XML Version: ${xml.version}"/>
Expand Down
11 changes: 11 additions & 0 deletions plugins/user/kunena/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Kunena Stopforumspam Plugin README

PLEASE READ THIS ENTIRE FILE BEFORE INSTALLING Kunena Search @kunenaversion@!

## INTRODUCTION

Kunena Stopforumsapm plugin ckecks the user credentials on stopforumspam database when user register on Joomla! to avoid spammers.

Requirements: Joomla! 4.0, Kunena Forum 4.0


49 changes: 49 additions & 0 deletions plugins/user/kunena/build/build.config.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
###################################################################
# KunenaStopforumspam Package Build Configuration
#
# @version $Id$
# @package Kunena
# @subpackage plg_kunenastopforumspam
# @copyright Copyright (C) 2008 - 2022 Kunena Team. All rights reserved.#
# @license GNU General Public License <http://www.gnu.org/copyleft/gpl.html>
# @link https://www.kunena.com
#################################################################################

# The name of your extension's main XML file
cfg.name = kunena

# Prefix, eg com, bot, mod, or a brand name (or empty)
cfg.prefix = plg_stopforumspam_

# Make a ZIP archive [true|false]
cfg.zip = true

# Make a TAR archive [true|false]
cfg.tar = false

# Make a GZIP archive [true|false]
cfg.gzip = false

# Make a BZIP2 archive [true|false]
cfg.bz2 = false

# Add version number to filename [true|false]
cfg.addversion = true

# Version prefix
cfg.versionprefix = v

# Add build number to filename [true|false]
cfg.addbuild = true

# Build number prefix (build|b|_b|... or empty)
cfg.buildprefix = b

# Add date to filename [true|false]
cfg.adddate = true

# Date Format (http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html)
cfg.datefmt = yyyy-MM-dd

# Date locale
cfg.dateloc = en,UK
137 changes: 137 additions & 0 deletions plugins/user/kunena/build/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE project>
<!--
Kunena ant build file
KunenaStopforumspam Plugin
@package Kunena Stopforumspam
@copyright Copyright (C) 2008 - 2022 Kunena Team. All rights reserved.
@license GNU General Public License <http://www.gnu.org/copyleft/gpl.html>
@link https://www.kunena.com
The following parameters can be defined inside the Eclipse build task as Arguments. They
allow the build file to be platform independent as not path information resides within
any of the build files.
Parameters: (with default values - adjust the directories in Eclispe to your individual setup)
-Dproject_dir=.. (= workspace/mod_kunenasts)
-Dpackage_dir=../../packages (= workspace/packages)
-Dtmp_dir=tmp (= workspace/mod_kunenalatest/build/tmp)
-->
<project name="KunenaSearch" default="dist" basedir=".">
<description>Ant Build File for Kunena Stopforumspam plugin</description>
<condition property="project_dir" value="..">
<not>
<isset property="project_dir"/>
</not>
</condition>
<condition property="package_dir" value="../../../../packages">
<not>
<isset property="package_dir"/>
</not>
</condition>
<condition property="tmp_dir" value="tmp">
<not>
<isset property="tmp_dir"/>
</not>
</condition>
<property file="build.config.ini"/>
<property name="kunena.directory" value="${project_dir}/"/>
<property name="kunena.directory.list" value=""/>

<target name="dist" depends="mkdir,archive,copy,init,package,tar,zip,gzip,bz2,info,cleanup"/>

<target name="mkdir">
<mkdir dir="${tmp_dir}"/>
<mkdir dir="${package_dir}"/>
<mkdir dir="${package_dir}/archive"/>
</target>

<target name="archive">
<move todir="${package_dir}/archive" preservelastmodified="yes" includeEmptyDirs="no">
<fileset dir="${package_dir}">
<exclude name="archive/"/>
</fileset>
</move>
</target>

<target name="copy" depends="mkdir">
<copy todir="${tmp_dir}">
<fileset dir="${kunena.directory}">
<exclude name="build/"/>
</fileset>
</copy>
</target>

<target name="init" depends="copy">
<xmlproperty file="${kunena.directory}/kunena.xml" collapseAttributes="true" prefix="xml" keepRoot="false"/>
<tstamp>
<format property="str.datefmt" pattern="${cfg.datefmt}" locale="${cfg.dateloc}"/>
</tstamp>

<condition property="str.version" value="_${cfg.versionprefix}${xml.version}" else="">
<istrue value="${cfg.addversion}"/>
</condition>
<condition property="str.date" value="_${str.datefmt}" else="">
<istrue value="${cfg.adddate}"/>
</condition>
<property name="str.destfile" value="${package_dir}/${cfg.prefix}${cfg.name}${str.version}${str.date}"/>

<condition property="do.tar">
<istrue value="${cfg.tar}"/>
</condition>
<condition property="do.zip">
<istrue value="${cfg.zip}"/>
</condition>
<condition property="do.gzip">
<istrue value="${cfg.gzip}"/>
</condition>
<condition property="do.bz2">
<istrue value="${cfg.bz2}"/>
</condition>
</target>

<target name="package" depends="init">
<!-- Copy files that conatin version tags again and perform token replacement -->
<condition property="version.date" value="${str.datefmt}" else="">
<istrue value="${cfg.adddate}"/>
</condition>
<filter token="kunenaversion" value="${xml.version}"/>
<filter token="kunenaversiondate" value="${version.date}"/>
<filter token="kunenaversionname" value="${xml.versionname}"/>
<copy file="${project_dir}/kunena.xml" todir="${tmp_dir}" overwrite="true" filtering="true"/>
<copy file="${project_dir}/README.md" todir="${tmp_dir}" overwrite="true" filtering="true"/>
</target>

<target name="tar" depends="package" if="do.tar">
<tar destfile="${str.destfile}.tar" basedir="${tmp_dir}"/>
</target>

<target name="zip" depends="package" if="do.zip">
<zip destfile="${str.destfile}.zip" basedir="${tmp_dir}"/>
</target>

<target name="gzip" depends="package" if="do.gzip">
<tar destfile="${str.destfile}.tar.gz" basedir="${tmp_dir}" compression="gzip"/>
</target>

<target name="bz2" depends="package" if="do.bz2">
<tar destfile="${str.destfile}.tar.bz2" basedir="${tmp_dir}" compression="bzip2"/>
</target>

<target name="info" depends="package">
<echo message="Ant Version: ${ant.version}"/>
<echo message="Project: ${cfg.name}"/>
<echo message="XML Name: ${xml.name}"/>
<echo message="XML Version: ${xml.version}"/>
<echo message="XML Author: ${xml.author}"/>
<echo message="XML Copyright: ${xml.copyright}"/>
<echo message="XML License: ${xml.license}"/>
<echo message="XML Description: ${xml.description}"/>
<echo message="Date: ${TODAY}"/>
</target>

<target name="cleanup" depends="info">
<delete dir="${tmp_dir}"/>
</target>
</project>
41 changes: 41 additions & 0 deletions plugins/user/kunena/build/phing/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
###################################################################
# Kunena Package Build Configuration
#
# @copyright Copyright (C) 2008 - 2022 Kunena Team. All rights reserved.
# portions 2007 MjazTools. All rights reserved.
# @license GNU/GPL
# @link http://www.bestofjoomla.com
###################################################################

# The name of your extension's main XML file
cfg.name=kunenasearch

# Prefix, eg com, bot, mod, or a brand name (or empty)
cfg.prefix=plg_

# Make a TAR archive [true|false]
cfg.tar=false

# Make a ZIP archive [true|false]
cfg.zip=true

# Make a GZIP archive [true|false]
cfg.gzip=false

# Make a BZIP2 archive [true|false]
cfg.bz2=false

# Add version number to filename [true|false]
cfg.addversion=true

# Version prefix
cfg.versionprefix=v

# Add date to filename [true|false]
cfg.adddate=true

# Date Format (http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html)
cfg.datefmt=%Y-%m-%d

# Date locale
cfg.dateloc=en,UK
Loading

0 comments on commit f34dd66

Please sign in to comment.