Coder Social home page Coder Social logo

xoopsmodules25x / news Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 11.0 1.23 MB

With this XOOPS module, you can create an unlimited number of news on your site. You can create all the articles you want and attach them to topics.

PHP 91.19% CSS 0.47% HTML 0.01% Smarty 8.33%

news's People

Contributors

andrew-staves-activ avatar imgbotapp avatar jorgenqv avatar mambax7 avatar montuy337513 avatar orwah avatar zyspec avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

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

news's Issues

date problem

Hi
if date format are changed for xoops (which is usual for some language)
in xoops/language/global.php:
define('_DATESTRING', 'Y/m/d G:i:s');
define('_MEDIUMDATESTRING', 'Y/m/d G:i');
define('_SHORTDATESTRING', 'y/n/j');

if we edit a news item ,then it's publish_date go back to 1/1/1970 !

reason:
in submit.php
line 338
$publish_date = $_POST['publish_date'];
$pubdate = strtotime($publish_date['date']) + $publish_date['time'];

the date is saved in db in formated y/n/j mode , so when strtotime try to decode it , it fails and return default 1/1/1970

maybe something like
$publish_date = date_create_from_format($dateformat,$_POST['publish_date']);
or whatever

the only formate string work is m/d/Y
because
we show date fields as formated date string, but when we save it in db we must specify format string before saving it or use strtotime. or it will try to decode it using m/d/Y

tiny repair

In the file news/class/class.newsstory.php, in line 848
tiny repair:
$ret = '<a titls='
change to
$ret = '<a title='

xoops.gif image missing and wrong path

When I want to create a topic on admin side (news/admin/index.php?op=topicsmanager),

image xoops.gif doesn't show and its path is wrong because it's:
http://mywebsiteurl**//**uploads/news/image/xoops.gif
instead of:
http://mywebsiteurl**/**uploads/news/image/xoops.gif

Precision: my xoops is present in an unusual way, it is perhaps what created the bug.

Its path is:
http://mywebsiteurl/en/259b1/

Whereas, when installing a xoops, it is usually in:

http://mywebsiteurl/


My config:

PHP: 7.0.13-0ubuntu0.16.10.1
MYSQL: 5.7.17-0ubuntu0.16.10.1
XOOPS: 2.5.9-Beta1 english version

expand the size of the "image" column

to allow the use of SEO Picture, during the next update, the width of the "picture" column should be increased
picture VARCHAR (50) ---> picture VARCHAR (255)

Bug error 404 : the server sends a 404 error and the page is working correctly

A funny bug, with the News module. Maybe with other modules too.

On any page of the site (front / back), the server returns me a 404 error header.
The pages are displayed correctly. Some JS functionality is disrupted. Example: Activate / deactivate a module in the "Module manager". For the changes to show, I have to reload the page. Another example: the notification bubble that appears with a late page.

Here is the screenshot of my console
image

The fault is the /preloads/index.php file
If I delete it, I find my headers 200

I think the Core loads all the PHP files present in / preloads. Including the index.php which asks the server to send a 404 header.
The page is displayed correctly, if we did not work with an open console next to it. We can miss the problem.

Recommendations:

  • delete the file /preloads/index.php
    Where
  • Modify the function of the Core which manages the / preloads. To exclude index.php files (provided that no dev has created a /preloads/index.php file with important functions)
    And check in all modules that have a / preloads directory for the presence and content of the /preloads/index.php file

Error on main page from news 1.7beta 2

Error: Error: Call to undefined function news_getmoduleoption() in file /modules/news/index.php line 227

News 1.7Beta2

XOOPS Version XOOPS 2.5.9
PHP Version 7.0.3
mySQL Version 5.7.11
Server API apache2handler
OS WINNT
fsockopen On
post_max_size 8M
max_input_time 60
output_buffering 4096
max_execution_time 30
memory_limit 128M
file_uploads On
upload_max_filesize 2M

Internal server error on Admin About tab

XOOPS Version | XOOPS 2.5.11-Beta2 from Master latest update sept 28, 2022
PHP Version | 8.0.24
MySQL Version | 10.3.36-MariaDB-1:10.3.36+maria~ubu2004
Server API | cgi-fcgi
OS | Linux
fsockopen | On
post_max_size | 256M
max_input_time | 60
output_buffering |
max_execution_time | 300
memory_limit | 2147483648
file_uploads | On
upload_max_filesize | 256M

Default theme

News module version 1.72.0

When going to Admin in the News Admin backend and clicking on About tab I get

A problem has occurred on our server!
Page is currently unavailable
We are working on a fix
Please come back soon ...

Error : TypeError: mktime(): Argument #4 ($month) must be of type ?int, string given
Backtrace:

Errors
Warning: Undefined array key 2 in file /Frameworks/moduleclasses/moduleadmin/moduleadmin.php line 506
Error: TypeError: mktime(): Argument #4 ($month) must be of type ?int, string given in file /Frameworks/moduleclasses/moduleadmin/moduleadmin.php line 506

hostname column not intended for IPv6

I have this message when I want to insert an article. IPv6 does not pass.

0,002242 - INSERT INTO news_stories (storyid, uid, title, created, published, expired, hostname, nohtml, nosmiley, hometext, bodytext, counter, topicid, ihome, notifypub, story_type, topicdisplay, topicalign, comments, rating, votes, description, keywords, picture, pictureinfo, subtitle) VALUES (0, 1, 'qsfqsfqsfqsf', 1638386484, 1638386483, 0, '2a02:8440:6240:803:1cb1:301e:9428:1278', 0, 0, '

qsfqsfqsf

', '

qsfqsfqsf

', 0, 2, 0, 1, 'admin', 0, 'R', 0, 0, 0, '', '', '', '', '')
Error number: 1406
Error message: Data too long for column 'hostname' at row 1

I manually enlarged the size of my column by putting a varchar (65)
But for the next version, we will have to think about enlarging the hostname column in upgrade.php

Article picture in the block

In the block I really missing Article picture (Image attached to article).
Although I can see it in the list of articles and in the article, but not in the block.
Very please to supplement missing.

Lost pagenav css in latest version

XOOPS Version | XOOPS 2.5.11-Beta2 from Master latest update sept 28, 2022
PHP Version | 8.0.24
MySQL Version | 10.3.36-MariaDB-1:10.3.36+maria~ubu2004
Server API | cgi-fcgi
OS | Linux
fsockopen | On
post_max_size | 256M
max_input_time | 60
output_buffering |
max_execution_time | 300
memory_limit | 2147483648
file_uploads | On
upload_max_filesize | 256M

Default theme

News module version 1.72.0 Beta.6

The index top and bottom navigation styles like class xo-pagact, xo-pagenav etc is not used.

Debug smarty tpl warnings in PHP 8.0.24

XOOPS Version | XOOPS 2.5.11-Beta2 from Master latest update sept 28, 2022
PHP Version | 8.0.24
MySQL Version | 10.3.36-MariaDB-1:10.3.36+maria~ubu2004
Server API | cgi-fcgi
OS | Linux
fsockopen | On
post_max_size | 256M
max_input_time | 60
output_buffering | ย 
max_execution_time | 300
memory_limit | 2147483648
file_uploads | On
upload_max_filesize | 256M

Default theme

News module version 1.72.0

Getting debug warnings bellow, works fine otherwise

Warning: Undefined array key "topic_rssfeed_link" in file /path/to/my/private_xoops_data/caches/smarty_compile/e897619a-news-default-default^%%54^543^54315394%%db%3Anews_index.tpl.php line 4
Warning: Undefined array key "topic_description" in file /path/to/my/private_xoops_data/caches/smarty_compile/e897619a-news-default-default^%%54^543^54315394%%db%3Anews_index.tpl.php line 22
Warning: Undefined array key "subtitle" in file /path/to/my/private_xoops_data/caches/smarty_compile/e897619a-news-default-default^%%27^27C^27CCF40B%%db%3Anews_item.tpl.php line 11
Warning: Undefined array key "news_by_the_same_author_link" in file /path/to/my/private_xoops_data/caches/smarty_compile/e897619a-news-default-default^%%27^27C^27CCF40B%%db%3Anews_item.tpl.php line 26
Warning: Undefined array key "lang_topic" in file /path/to/my/private_xoops_data/caches/smarty_compile/e897619a-news-default-default^%%27^27C^27CCF40B%%db%3Anews_item.tpl.php line 28
Warning: Undefined array key "subtitle" in file /path/to/my/private_xoops_data/caches/smarty_compile/e897619a-news-default-default^%%27^27C^27CCF40B%%db%3Anews_item.tpl.php line 11
Warning: Undefined array key "news_by_the_same_author_link" in file /path/to/my/private_xoops_data/caches/smarty_compile/e897619a-news-default-default^%%27^27C^27CCF40B%%db%3Anews_item.tpl.php line 26
Warning: Undefined array key "lang_topic" in file /path/to/my/private_xoops_data/caches/smarty_compile/e897619a-news-default-default^%%27^27C^27CCF40B%%db%3Anews_item.tpl.php line 28
Warning: Undefined array key "subtitle" in file /path/to/my/private_xoops_data/caches/smarty_compile/e897619a-news-default-default^%%27^27C^27CCF40B%%db%3Anews_item.tpl.php line 11
Warning: Undefined array key "news_by_the_same_author_link" in file /path/to/my/private_xoops_data/caches/smarty_compile/e897619a-news-default-default^%%27^27C^27CCF40B%%db%3Anews_item.tpl.php line 26
Warning: Undefined array key "lang_topic" in file /path/to/my/private_xoops_data/caches/smarty_compile/e897619a-news-default-default^%%27^27C^27CCF40B%%db%3Anews_item.tpl.php line 28
Warning: Undefined array key "subtitle" in file /path/to/my/private_xoops_data/caches/smarty_compile/e897619a-news-default-default^%%27^27C^27CCF40B%%db%3Anews_item.tpl.php line 11
Warning: Undefined array key "news_by_the_same_author_link" in file /path/to/my/private_xoops_data/caches/smarty_compile/e897619a-news-default-default^%%27^27C^27CCF40B%%db%3Anews_item.tpl.php line 26
Warning: Undefined array key "lang_topic" in file /path/to/my/private_xoops_data/caches/smarty_compile/e897619a-news-default-default^%%27^27C^27CCF40B%%db%3Anews_item.tpl.php line 28
Warning: Undefined array key "subtitle" in file /path/to/my/private_xoops_data/caches/smarty_compile/e897619a-news-default-default^%%27^27C^27CCF40B%%db%3Anews_item.tpl.php line 11
Warning: Undefined array key "news_by_the_same_author_link" in file /path/to/my/private_xoops_data/caches/smarty_compile/e897619a-news-default-default^%%27^27C^27CCF40B%%db%3Anews_item.tpl.php line 26
Warning: Undefined array key "lang_topic" in file /path/to/my/private_xoops_data/caches/smarty_compile/e897619a-news-default-default^%%27^27C^27CCF40B%%db%3Anews_item.tpl.php line 28

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.