Skip to content

Instantly share code, notes, and snippets.

View pH-7's full-sized avatar
:octocat:
💡Creative Engineer 🚀 Enjoying Learning New Exciting Things! 😋 =>My Way of Life 🏝

♚ PH⑦ de Soria™♛ pH-7

:octocat:
💡Creative Engineer 🚀 Enjoying Learning New Exciting Things! 😋 =>My Way of Life 🏝
View GitHub Profile
@pH-7
pH-7 / Utf8.class.php
Created April 24, 2012 16:17
UTF-8 friendly PHP class
<?php
/**
* @desc This program was amended by Pierre-Henry.
* @author SORIA Pierre-Henry <pierrehs@hotmail.com>
* @version 2.1.4 (Last update 2012/06/21).
*
*
* UTF-8 friendly replacement functions - v0.2
* Copyright (C) 2004-2006 Niels Leenheer & Andy Matsubara
*
@pH-7
pH-7 / upgrade-ph7cms-1.3.9-to-1.4.*.sql
Last active August 13, 2016 17:34
Update SQL file for the new IM payment integration & Two-Factor authentication feature
--
-- Author: Pierre-Henry Soria <hello@ph7cms.com>
-- Copyright: (c) 2016, Pierre-Henry Soria. All Rights Reserved.
-- License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
--
----- Update Two-Factor authentication feature
ALTER TABLE pH7_Admins ADD COLUMN isTwoFactorAuth enum('1','0') DEFAULT '0';
ALTER TABLE pH7_Admins ADD COLUMN twoFactorAuthSecret varchar(40) DEFAULT NULL;
@pH-7
pH-7 / _constants.php
Last active October 17, 2016 18:33
Script to update pH7CMS from 1.4.2 to 2.0.4
<?php
/*
YOUR PERSONAL CONSTANTS ARE BELOW
...
...
...
*/
// Add it in the end of the file
@pH-7
pH-7 / upgrade-ph7cms-2.0.4-TO-3.1.*.sql
Last active October 17, 2016 18:33
SQL script to update pH7CMS from 2.0.4 to 3.1.*
--
-- Author: Pierre-Henry Soria <ph7software@gmail.com>
-- Copyright: (c) 2016, Pierre-Henry Soria. All Rights Reserved.
-- License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
--
--- Replace 'PH7_' by your prefix set in "~/_protected/app/configs/config.ini" [database] prefix var
INSERT INTO PH7_Settings (`name`, value, `desc`, `group`) VALUES
('numberProfileSplashPage', 44, 'Number of profiles to display on the splash homepage', 'general');
@pH-7
pH-7 / cleanup-php-code.sh
Created January 29, 2017 19:44
Cleanup the indentation of your php, css, html, readme, and other files
#!/bin/bash
##
# Author: Pierre-Henry Soria <ph7software@gmail.com>
# Copyright: (c) 2012-2017, Pierre-Henry Soria. All Rights Reserved.
# License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
##
accepted_ext="-name '*.php' -or -name '*.css' -or -name '*.js' -or -name '*.html' -or -name '*.xml' -or -name '*.xsl' -or -name '*.xslt' -or -name '*.json' -or -name '*.yml' -or -name '*.tpl' -or -name '*.phs' -or -name '*.ph7' -or -name '*.sh' -or -name '*.sql' -or -name '*.ini' -or -name '*.md' -or -name '*.markdown' -or -name '.htaccess'"
exec="find . -type f \( $accepted_ext \) -print0 | xargs -0 perl -wi -pe"
@pH-7
pH-7 / upgrade-ph7cms-5.0.0-to-6.0.0.sql
Last active March 7, 2017 22:32
SQL script to update pH7CMS from version 5.0.0 to 6.0.0
--
-- Author: Pierre-Henry Soria <hello@ph7cms.com>
-- Copyright: (c) 2016, Pierre-Henry Soria. All Rights Reserved.
-- License: GNU General Public License; https://www.gnu.org/licenses/gpl-3.0.en.html
--
--- Replace 'PH7_' by your prefix set in "~/_protected/app/configs/config.ini" [database] prefix
INSERT INTO PH7_Settings (`name`, value, `desc`, `group`) VALUES
('usersBlock', 1, '0 to disable or 1 to enable the profile photos on the homepage', 'homepage'),
@pH-7
pH-7 / upgrade-ph7cms-3.1.0-to-5.0.0.sql
Last active June 25, 2017 15:53
SQL script to update pH7CMS from version 3.1.0 to 5.0.0
--
-- Author: Pierre-Henry Soria <hello@ph7cms.com>
-- Copyright: (c) 2016, Pierre-Henry Soria. All Rights Reserved.
-- License: GNU General Public License; https://www.gnu.org/licenses/gpl-3.0.en.html
--
--- Replace 'PH7_' by your prefix set in "~/_protected/app/configs/config.ini" [database] prefix
ALTER TABLE PH7_SysModsEnabled ADD COLUMN moduleTitle varchar(50) NOT NULL;
@pH-7
pH-7 / upgrade-from-ph7cms-1.3.6-to-1.3.7.sql
Last active June 25, 2017 15:56
Update SQL DB from pH7CMS 1.3.6 to pH7CMS 1.3.7
--
-- Author: Pierre-Henry Soria <ph7software@gmail.com>
-- Copyright: (c) 2013-2016, Pierre-Henry Soria. All Rights Reserved.
-- License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
--
--- Replace 'PH7_' by your prefix set in "~/_protected/app/configs/config.ini" [database] prefix var
UPDATE PH7_Settings SET `name` = 'bgProfileManualApproval' WHERE `name` = 'profileBackgroundManualApproval';
@pH-7
pH-7 / upgrade-ph7cms-5.*-to-7.1.3.sql
Last active July 1, 2017 22:09
SQL script to update pH7CMS from version 5.* to 7.1.3
--
-- Author: Pierre-Henry Soria <hello@ph7cms.com>
-- Copyright: (c) 2017, Pierre-Henry Soria. All Rights Reserved.
-- License: GNU General Public License; https://www.gnu.org/licenses/gpl-3.0.en.html
--
--- Replace 'PH7_' by your prefix set in "~/_protected/app/configs/config.ini" [database] prefix
INSERT INTO PH7_Settings (`name`, value, `desc`, `group`) VALUES
@pH-7
pH-7 / upgrade-ph7cms-7.1.3-to-8.0.*.sql
Last active July 6, 2017 11:08
SQL script to update pH7CMS, from version 7.1.3 to 8.0.*
--
-- Author: Pierre-Henry Soria <hello@ph7cms.com>
-- Copyright: (c) 2017, Pierre-Henry Soria. All Rights Reserved.
-- License: GNU General Public License; https://www.gnu.org/licenses/gpl-3.0.en.html
--
--- Replace 'PH7_' by your prefix set in "~/_protected/app/configs/config.ini" [database] prefix
INSERT INTO PH7_Settings (`name`, value, `desc`, `group`) VALUES