Giter Site home page Giter Site logo

xoops / xoopscore25 Goto Github PK

View Code? Open in Web Editor NEW
70.0 22.0 61.0 33.03 MB

XOOPS Core 2.5.x (current release is 2.5.11: https://github.com/XOOPS/XoopsCore25/releases)

License: GNU General Public License v2.0

PHP 57.94% HTML 1.91% JavaScript 14.90% CSS 11.19% Smarty 12.43% Hack 0.01% Less 1.51% SCSS 0.10%
xoops cms php javascript smarty jquery composer website-builder

xoopscore25's Introduction

alt XOOPS CMS

XOOPS Core 2.5.x

Build Status Software License Coverage Status Quality Score Latest Version

Note: This repository contains the core code of the XOOPS Core 2.5.x. Our next generation is currently under development on GitHub.

To install this version of XOOPS 2.5.x follow the instructions in The XOOPS Install & Upgrade Guide

For more information on building a web site using XOOPS, visit the main XOOPS Web Site.

Awesome contributors:

Contributing

Thank you for considering contributing to the XOOPS Project. See CONTRIBUTING file.

When your changes are complete and tested, send us a Pull Request on GitHub and we will take a look.

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]

A huge thank you to JetBrains for supporting the development of this project with complimentary PhpStorm licenses.

xoopscore25's People

Contributors

alain01 avatar andrew-staves-activ avatar bitcero avatar bleekk avatar cesagonchu avatar chccd avatar dejadingo avatar forxoops avatar g10082ts avatar geekwright avatar ggoffy avatar gregmage avatar ihackcode avatar imgbotapp avatar liomj avatar luciorota avatar mambax7 avatar montuy337513 avatar tad0616 avatar trabisdementia avatar txmodxoops avatar zyspec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xoopscore25's Issues

Installation Xoops 2.5.8 issue

Hi,

I managed to install Xoops 2.5.7.2 without any problem on my website (free.fr).
But I have an issue when I install Xoops 2.5.8 (RC1 or RC2).
Steps 1 to 8 : no problem
Step 9 (Initial settings) : I fill in the blanks and when I click on Next, it goes back to the step 6 (Databas configuration).

Thanks,
Regards,
Vincent Ulmer (France)

xbootstrap theme and slider

When a module is on the home page, the slider is not displayed.

`<{if $xoops_dirname == "system"}>

` it's that what you want to do?

Module update breadcrumb bug

When updating module the "status" window breadcrumb shows the module is being uninstalled when in fact it's being updated. (See attached image). This bug was introduced in 2.5.8 and did not exist in 2.5.7
258_update_bug

Bug in the Module system (formupload)

There is a problem in avatar, smiley and each time there is an upload form.
If the image is larger (size) than the limit, the image is not uploaded but the system does not indicate an error message. insertion into the db is made. This is not good.
I can fix the problem if necessary.

Submit Form In User Side

We have problems in submit.php file of modules with the form classes, having as admin language, user side even if I add xoops_loadLanguage('admin'); function It does not work anyway.

I know that there is no need to place the call to include_once $xoops->path('include/functions.php'); because in header.php file of modules, it's already called by include XOOPS_ROOT_PATH."/include/common.php"; in mainfile.php

What can it be?

I'm trying in every way to solve, without success.

xoops.js not detract

By admin I need this, but in frontend is not need for me

<script src="http://www.mysite.org/include/xoops.js" type="text/javascript"></script>

I commented on the row that contains it in the file class/theme.php

Then I did a search in the htdocs directory to search all the files this line, but I have not found.

Besides theme.php where I go to find this xoops.js line?

Thanks!

Image Resize

Why this code don't Work???

public function createThumbs( $pathToImages, $pathToThumbs, $thumbWidth )
    {
        // open the directory
        $dir = opendir( $pathToImages );
        // loop through it, looking for any/all JPG/PNG/BMP/GIF files:
        while (false !== ($fname = readdir( $dir ))) {
            // parse path for the extension
            $info = pathinfo($pathToImages . $fname);
            // continue only if this is a JPEG image
            if ( strtolower($info['extension']) == 'jpg' || strtolower($info['extension']) == 'png' || strtolower($info['extension']) == 'gif' || strtolower($info['extension']) == 'bmp' )
            {
                // echo "Creating thumbnail for {$fname} <br />";
                // load image and get image size
                switch (imagetypes()) {
                    case IMG_JPG:
                        $img = imagecreatefromjpeg( "{$pathToImages}/{$fname}" );
                        break;
                    case IMG_PNG:
                        $img = imagecreatefrompng( "{$pathToImages}/{$fname}" );
                        break;
                    case IMG_GIF:
                        $img = imagecreatefromgif( "{$pathToImages}/{$fname}" );
                        break;
                    case IMG_WBMP:
                        $img = imagecreatefromwbmp( "{$pathToImages}/{$fname}" );
                        break;
                    case IMG_XPM:
                        $img = imagecreatefromxpm( "{$pathToImages}/{$fname}" );
                        break;
                    default:
                        $img = imagecreatefromxbm( "{$pathToImages}/{$fname}" );
                        break;
                }

                $width = imagesx( $img );
                $height = imagesy( $img );
                // calculate thumbnail size
                $newWidth = $thumbWidth;
                $newHeight = floor( $height * ( $thumbWidth / $width ) );
                // create a new tempopary image
                $tmpImg = imagecreatetruecolor( $newWidth, $newHeight );
                // copy and resize old image into new image 
                imagecopyresized( $tmpImg, $img, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height );
                // save thumbnail into a file
                switch (imagetypes()) {
                    case IMG_JPG:
                        imagejpeg( $tmpImg, "{$pathToThumbs}/{$fname}" );
                        break;
                    case IMG_PNG:
                        imagepng( $tmpImg, "{$pathToThumbs}/{$fname}" );
                        break;
                    case IMG_GIF:
                        imagegif( $tmpImg, "{$pathToThumbs}/{$fname}" );
                        break;
                    case IMG_WBMP:
                        imagewbmp( $tmpImg, "{$pathToThumbs}/{$fname}" );
                        break;
                    case IMG_XPM:
                        imagegd( $tmpImg, "{$pathToThumbs}/{$fname}" );
                        break;
                    default:
                        imagegd2( $tmpImg, "{$pathToThumbs}/{$fname}" );
                        break;
                }
            }
        }
        // close the directory
        closedir( $dir );
    }

I think I've successfully created

If used only this:

$img = imagecreatefromjpeg( "{$pathToImages}/{$fname}" );

it Work

Profile module: Smarty Errors

Xoops 2.5.7.1, (perhaps 2.5.7.2)
Debug mode : On (to see errors)
Admin panel -> Permissions tab -> choose "visibility" in the dropdown list.
Errors:
Warning: Illegal string offset 'user_group' dans le fichier /var/www/data_xoops/caches/smarty_compile/4f4a4c99-profile-default-default^%%A0^A00^A0020D4E%%db%3Aprofile_admin_visibility.tpl.php ligne 35

Uploads File Video

Why, I can't upload video files in the upload directory with XoopsFormFile class?

On the browser bottom bar you see the load as a percentage and then back to the form page with the new video module.

If you use another module TDMDownloads for example, after a few seconds goes into servers below, page not found.

I set to maxsize 10000000000, for 250.000kb files should load them, instead it does not

Question Sitemap

Not all url of sitemap are created, both with the module xsitemap, both with a php script that I have, and with online tools, only some of those, type url news, are created only the last and then only the main url, type index.php or /

I thought it might be a problem to order the list of contents, but it seems a bit strange that.

What could it be?

FormatTimeStamp in DateSelect class

In class formtextdateselect.php

changed
$jstime = formatTimestamp($ele_value, _SHORTDATESTRING);

with
$jstime = formatTimestamp($ele_value, 's');

and in xoopslocal.php class

changed

 case 'mysql':
                $datestring = 'Y-m-d H:i:s';
                break;

with

 case 'mysql':
                $datestring = _DBTIMESTAMPSTRING;
                break;

XoopsFormSelect 'selected' syntax

In ./class/xoopsform/formselect.php setting the selected attribute uses selected="selected" however per HTML standard should just be selected...

in render() method change lines 214-216 from:

if (count($ele_value) > 0 && in_array($value, $ele_value)) {
    $ret .= ' selected="selected"';
}

to:

if (count($ele_value) > 0 && in_array($value, $ele_value)) {
    $ret .= ' selected';
}

This effects multiple XoopsForm Objects since several classes extend the XoopsFormSelect class. Similar issue exists in XOOPS 2.6.x series - a separate issue has been opened there too...

Root to invoke

What is the root to invoke the class Admin() for XOOPS 2.5.8?
I tried adding use Xmf\Modules\Admin; and then the same path for new Xmf\Modules\Admin(); but can't find the class

Profile Module Theme Selection

In htdocs/modules/profile/class/field.php there is a specific check for a "theme.html" when listing available themes. This no longer works with the themes included with XOOPS, those now use "theme.tpl"

Older themes, and possibly the current theme of a system being upgraded, may still use the old theme.html convention, so we need to support both .tpl and .html naming.

Profile should either recognize theme.tpl as valid, or trust the system configuration theme_set_allowed to be valid themes. I lean toward trusting theme_set_allowed, but either way is OK.

another sourceforge link....

Similar to Issue #56, found link to sourceforge in System module that should now point to github...

in ./modules/system/themes/default/language/english/admin.php line 50 there is a link to the XOOPS publisher module on sourceforge. While this technically still works the most recent updated version is now maintained on github at https://github.com/XoopsModules25x/publisher

Bug in about.php

Warning: Undefined offset: 1 in file /Frameworks/moduleclasses/moduleadmin/moduleadmin.php at the line 485
Warning: Undefined offset: 2 in file /Frameworks/moduleclasses/moduleadmin/moduleadmin.php at the line 485
Warning: A non well formed numeric value encountered in file /Frameworks/moduleclasses/moduleadmin/moduleadmin.php at the line 485

Remove 'flash' banners (& associated text)

Flash is no longer supported by the industry and a security risk if enabled. XOOPS includes 2 flash banners (banner.swf & xoops_flashbanner2.swf) that should be replaced with non-flash banners.

The System Help (in Admin Panel) should also remove references to flash banners at the same time.

Module Changelog in UTF-8

Currently we read the changelog as non-UTF8 file and encode it as UTF8 (in moduleadmin.php):

$ret .= utf8_encode(implode('<br>', file($file))) . "\n";

But that causes issues if the changelog is actually encoded as UTF8.

Since our standard is UTF-8 for all files, I would suggest to remove the "utf8_encode" and simply have it as:

$ret .= implode('<br>', file($file)) . "\n";

Unless we can check for encoding, but it seems to be way to complicated and worth the time. I think, it's easier to agree to have changelog in UTF-8 :)

XoopsModelJoint::getCountByLink bug

if the object and link table column names are the same (say item_id) then the SQL statement gives an 'ambiguous column' failure because the statement created doesn't specify which table the "item_id" is referencing...

Currently line 139 in ./model/joint.php is:
$sql = " SELECT COUNT(DISTINCT {$this->handler->keyName}) AS count" . " FROM {$this->handler->table} AS o" . " LEFT JOIN {$this->handler->table_link} AS l ON o.{$this->handler->field_object} = l.{$this->handler->field_link}";

but should be:
$sql = " SELECT COUNT(DISTINCT o.{$this->handler->keyName}) AS count" . " FROM {$this->handler->table} AS o" . " LEFT JOIN {$this->handler->table_link} AS l ON o.{$this->handler->field_object} = l.{$this->handler->field_link}";

xoopsMultiMailer (PHPMailer) vars not being set correctly by xoopsMailer

There were changes between 2.5.7 and 2.5.8 that cause some of the XoopsMultiMailer class vars not to be set correctly - which is different than in XOOPS 2.5.7.

It appears that there were some changes to 'fix' some vars by changing them to camelCase however it has created some issues between variable naming in xoopsMailer and xoopsMultiMailer (PHPMailer). For example in xoopsMailer the var is body ($this->body) but in PHPMailer it is Body ($this->Body) - this causes the body of the message to not be set correctly.

Other variables need to be checked too - for example: Subject, Charset, Encoding, Sender and FromName... There may be others but I wanted to flag this as quickly as possible so 2.5.8 doesn't go FINAL before someone can look at this.

See the xoopsMailer->sendMail() method for example where the variable case needs to evaluated.

(XMF) XoopsRequest class not found in StripSlashesRecursive method

htdocs/class/libraries/vendor/xoops/xmf/src/Xmf/Request.php

    protected static function stripSlashesRecursive($value)
    {
        $value = is_array($value)
            ? array_map(array('XoopsRequest', 'stripSlashesRecursive'), $value)
            : stripslashes($value);

        return $value;
    }

should be changed to:

    protected static function stripSlashesRecursive($value)
    {
        $value = is_array($value)
            ? array_map(array('Xmf\Request','stripSlashesRecursive'), $value)
            : stripslashes($value);

        return $value;
    }

without the change PHP gives the following error when trying to use \Xmf\Request::getArray():

Warning: array_map() expects parameter 1 to be a valid callback, class 'XoopsRequest' not found in file /class/libraries/vendor/xoops/xmf/src/Xmf/Request.php line 615

Template Manager Continuous Loading

Template manager does not load any documents / modules / scripts.
Left hand menu file explorer shows all files in file structure but none load. Error present in RC2 and RC3 and on PHP 5.6.1.3 and PHP 7.
Found when testing a module. Console error shown in second screenshot below.
hope that helps.

Jan

image

image

XoopsModelJoint::getCountsByLink keyName_link bug

I believe there's 2 instances where $this->handler->keyName_link is being used but is undefined. Believe it should be $this->handler->keyName instead.

This error causes an invalid SQL query to be generated.

Installation issue - latest files

Not sure if this is related to #139 but I've been setting up a clean install to test a module and thought I'd use the latest files as some of my previous issues have been mentioned in the work you're doing. I'm using PHP 7.06 MySql 5.5.49 on Mamp Pro and have never had an installation problem before.
Installation goes well until I try to add the admin user and password. When submitting that it times out with a fatal error:
Maximum execution time of 60 seconds exceeded in E:\vhosts\xxxxxxxxx\htdocs\class\database\mysqldatabase.php on line 66
Call Stack

# Time Memory Function Location

1 0.2009 376128 {main}( ) ...\page_tablesfill.php:0
2 7.3579 1622408 make_data( ) ...\page_tablesfill.php:70
3 59.6227 1787488 Db_manager->insert( ) ...\makedata.php:111
4 59.6227 1787488 XoopsMySQLDatabase->connect( ) ...\dbmanager.php:246

The database connection has been made as the tables have been created in the database.
Hope that's helpful
Jan

Incorrect charset in database correction

XOOPS user cadch recommended this in response to a charset issue.

To edit XoopsCore25-2.5.8\htdocs\class\database\mysqldatabase.php
after line 77
add
$this->conn->set_charset(XOOPS_DB_CHARSET);

On investigation, \MySQLDatabase::connect() is using the incorrect method when establishing the character set (a "SET NAMES" query as needed with the mysql extension.)

Problem with the search form

When I want do a search of users (/modules/profile/search.php):
image

the results are always zero:

image

Solution found by slider84:

replace the line 114 in the file /modules/profile/search.php

$searchform->addElement(new XoopsFormTextDateSelect(sprintf(_PROFILE_MA_LATERTHAN, $fields[$i]->getVar('field_title')), $fields[$i]->getVar('field_name') . "_larger", 15, 0));

with:

$searchform->addElement(new XoopsFormTextDateSelect(sprintf(_PROFILE_MA_LATERTHAN, $fields[$i]->getVar('field_title')), $fields[$i]->getVar('field_name') . "_larger", 15, 1));

XoopsFormDhtmlTextArea preview with UTF-8

The javascript preview button presented in XoopsFormDhtmlTextArea calls this script to get a rendered version of the text entered:

htdocs/include/formdhtmltextarea_preview.php

When presented with UTF-8 text in an environment where the _CHARSET definition is "UTF-8" the routine mangles some (not all) characters as shown in this image.

issue209

Latin diacritics are affected badly, CJK is seemingly randomly garbled, and some things come through fine. ๐Ÿ˜• Normal form submission using lower preview button works fine.

Also involved is form_instantPreview() in htdocs/include/formdhtmltextarea.js where there is a call to the broken obsolete escape().

This was fixed in 2.6, where UTF-8 is the only supported character set. There the 'mangle' code in formdhtmltextarea_preview.php was removed, and the escape() in formdhtmltextarea.js switched to encodeURIComponent().

In the 2.5 series we 'encourage' but don't require UTF-8, so that might be an additional concern.

xoopsmailerlocal.php

Hello,
Did a upgrade from 2.5.7.2 to 2.5.8 and got a blank page when posting forms from two different modules. No mails were sent. Running PHP 5.6.20. If I turned on debug I got this:

Fatal error: Call to undefined method XoopsMailerLocal::XoopsMailer() in /home/qwebb/public_html/jorgen/xoops/language/swedish/xoopsmailerlocal.php on line 40

The language file was quite old ($Id: xoopsmailerlocal.php 3152 2009-04-18 13:30:57Z catzwolf $) but was running fine in 2.5.7.2.

Solved by replacing the language file with the english xoopsmailerlocal.php version included in 2.5.8.

Hope this is helpful for anyone else having similar problems.

/Jorgen

Urgent Patch

Urgently needs a patch!

The burning problem persists in the database!

We are fighting with the server staff without finding solutions to any version of php and mysql.

I repeat that I have tested a fresh version of XOOPS 2.5.8 on Linux server in a subdomain of my website and I can't send any form.

With the 2.5.7.2 version still installed on my site all works perfectly.

There are no log errors or access log

Installation step 7 unable to go back

If wrights are not set properly on root directory or files of the server (for example: owner is not www-data on debian), an error occurs (that's well) but a blocking white page occurs when you want to go back and you must reinstall xoops from beginning.
258-install-step7

Fatal Backward Compatibility Error in XoopsForm

Issue reported on myalbum

Prior to 2.5.8 XoopsForm had a PHP 4 style constructor, and the myalbum code is calling it.

Ultimately, myAlbum needs to be brought up to current standards, but for the sake of BC, we should add a shim to XoopsForm, similar to the ones used in similar cases, for example XoopsObjectHandler(), so that old code continues to function, but the problem is logged so that it can be corrected.

Password Truncated

I tested locally for convenience to create a simple password for online tests.

Although creating the same password changes the encoding from xoops 2.5.7.2, to XOOPS 2.5.8

If I want to copy the same local encoding on the server, phpMyAdmin me a truncation error of the password, it is normal or is there some problem?

Type like this:

$2y$10$Xa/X9k8h0jkHPCFRmjVOW.rOR1CT8z.2hBpSbuCRxPZKp7I8UQMw2

It is truncated where is the point:

$2y$10$Xa/X9k8h0jkHPCFRmjVOW

Remove reference to News module in Admin Help Text

Help text on right side of Admin Control Panel - How can I create content with XOOPS?
"To create content, you must first install a content module, like the Publisher or the News module. To learn more about XOOPS modules click here..."

Should consider not referencing "News" module since it hasn't been updated in 3 yrs.

Adminmodule (\Xmf) AddInfoBoxLine method API changed

Attempting to use the \Xmf\Module\Admin class and methods to replace the previous (XOOPS 2.5.x) core methods isn't 'transparent'. The API for input for AddInfoBoxLine() changed so that the calling code has to be changed and the output isn't "identical".

While this may be the desired effect, it doesn't make writing code that can use Xmf if it's available and use the "old" core functions if not since the getVersion() method returns the same revision number (1.2).

Recommend adding a getVersion() method (and probably getReleaseDate() for completeness) in \Xmf\Module\Admin to 'overload' the ModuleAdmin class methods with a different version number.

This allows writing pseudo code something like:

if (XMF) {
  $moduleAdmin = \Xmf\Module\Admin::getInstance();
} else {
  include [moduleadmin file(s)...]
 $moduleAdmin = new ModuleAdmin;
}

and then later in the code...

$adminVer = $moduleAdmin->getVersion();
if ($adminVer > 1.2) {
    // execute if version is > 1.2
    $moduleAdmin->AddInfoBoxLine( new params list);
} elseif ($adminVer >= 1.1) {
  // execute if 1.1 <= version < 1.2
  $moduleAdmin->AddInfoBoxLine( params list);
} else {
  // [execute other specific methods for version < 1.1..]
}
[execute common code here]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.