1381
Mamba
Re: xoops preferences "site close" override
  • 2020/4/27 20:16

  • Mamba

  • Moderator

  • Posts: 11373

  • Since: 2004/4/23


Hmm, interesting question.

You probably would need to hack it, i.e. with each new XOOPS upgrade, you would have to do it again.

One way would be:

1) add to the Config table a new entry:
closesite2 with the value of 1

2) in your website2 change in the files that check for closesite:

if ($xoopsConfig['closesite'] == 1) {


to

if ($xoopsConfig['closesite2'] == 1) {


It seems that there are three files that do that:

login.php
include/checklogin.php
include/common.php

This is not tested, so I don't know if it will cause any other problems as side effects, therefore you can do it on your own risk.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs



1382
kakos
xoops preferences "site close" override
  • 2020/4/27 11:16

  • kakos

  • Friend of XOOPS

  • Posts: 78

  • Since: 2002/6/6 2


Hi from Greece, hope you are all well and healthy

I need to have 2 xoops installations in my server http://www.myserver.com/xoops1 and http://www.myserver.com/xoops2 with one common db for both but the 1st need to be open so users can see the public stuff and the 2nd need to be closed so users need first to login.

Is it possible to override "site close" from Preferences --> general option --> general settings in a way?
Due to the common database any change applies to both.

The 2 sites have exactly the same content, theme, users, groups etc.



1383
ON2AT
Re: countdown module for XOOPS 2.5.9 ?
  • 2020/4/24 14:42

  • ON2AT

  • Just popping in

  • Posts: 6

  • Since: 2014/10/24


Bonjour, pouvez-vous me dire quel est le thème sur la capture d'image. merci



1384
Lupin
Re: Datetime problems with Publisher 1.07 Final and Xoops 2.5.10
  • 2020/4/23 11:47

  • Lupin

  • Just popping in

  • Posts: 92

  • Since: 2007/6/1 2


OK Lucio & Mamba,

it seems that the modification also works with the d/m/Y format ... I think you can use this mod.

However, there are a couple of aspects to review:

the first concerns the date that the system proposes in the date field of the item modification form; in fact this proposes today's date instead of proposing the one that had previously been inserted. In addition to the problem of having to always check this data with each modification of other parts of the article, there is the danger that clicking "back" on the web bar, wrong data will be sent and you will find yourself with the article with today's date. The system should be able to interpret whether it is a new sending request or an article change request.

The second problem is always that of the time ... although the time zone is set to GMT + 1 both in the general preferences and in the user account data, there are two hours of difference in the time displayed. In practice, if the sending time is set at 13.00, the 11.00 time is then displayed.

Cya

Pino

Update :

about the first problem , I saw if I set :

define('_DATESTRING''d-m-Y H:i:s'); 
define('_MEDIUMDATESTRING''d-m-Y H:i'); 
define('_SHORTDATESTRING''d-m-Y');


The form propones the correct stored data

if I set :

define('_DATESTRING''d/m/Y H:i:s'); 
define('_MEDIUMDATESTRING''d/m/Y H:i'); 
define('_SHORTDATESTRING''d/m/Y');


The form propones the today's data ... it is possible?



1385
luciorota
Re: Datetime problems with Publisher 1.07 Final and Xoops 2.5.10
  • 2020/4/22 19:56

  • luciorota

  • Module Developer

  • Posts: 216

  • Since: 2007/4/20


Try again ... Xoops using "\DateTime" and not "DateTime"
Quote:

luciorota wrote:
The bug is the result of an incorrect use of the function strtotime(), it must have a format in English to work...

BUGFIX

file: publisher\class\item.php, line 1061
replace
$localTimestamp strtotime($resDate['date']) + $resTime['time'];


with
$dateTimeObj \DateTime::createFromFormat(_SHORTDATESTRING$resDate['date']);
$dateTimeObj->setTime(000);
$localTimestamp $dateTimeObj->getTimestamp() + $resTime['time'];


file: publisher\class\item.php, line 1088

replace
$localTimestamp strtotime($resExDate['date']) + $resExTime['time'];


with
$dateTimeObj \DateTime::createFromFormat(_SHORTDATESTRING$resExDate['date']);
$dateTimeObj->setTime(000);
$localTimestamp $dateTimeObj->getTimestamp() + $resExTime['time'];


Good job! / Buon lavoro!



1386
Lupin
Re: Datetime problems with Publisher 1.07 Final and Xoops 2.5.10
  • 2020/4/22 15:40

  • Lupin

  • Just popping in

  • Posts: 92

  • Since: 2007/6/1 2


@Mamba about Yogurt:

Since in Yogurt module there are no datetime settings, with correct timezone both in System preferences and in user preferences , time is perfect.

Dates seemed to have different formats depending from which modules they were taken , of course "american style" ( Y/m/d or ) , then I modified global.php with

define('_DATESTRING''d/m/Y H:i:s');
define('_MEDIUMDATESTRING''d/m/Y H:i');
define('_SHORTDATESTRING''d/m/Y');


and in IMO everything works well in "european style".

This was a quick look, but if you want I can see more ...



1387
Lupin
Re: Datetime problems with Publisher 1.07 Final and Xoops 2.5.10
  • 2020/4/22 13:28

  • Lupin

  • Just popping in

  • Posts: 92

  • Since: 2007/6/1 2


I see this :

None All Errors (2) Deprecated (0) Queries (18) Blocks (0) Extra (3) Timers(3)
Errors
Notice: Array to string conversion in file /class/libraries/vendor/xoops/xmf/src/FilterInput.php line 251
Error: Error: Class 'XoopsModules/Publisher/DateTime' not found in file /modules/publisher/class/Item.php line 1061

Anyway it seems with the format d-m-Y instead of d/m/Y it works better. ( done before your hack )



1388
luciorota
Re: Datetime problems with Publisher 1.07 Final and Xoops 2.5.10
  • 2020/4/22 12:23

  • luciorota

  • Module Developer

  • Posts: 216

  • Since: 2007/4/20


I know



1389
Lupin
Re: Datetime problems with Publisher 1.07 Final and Xoops 2.5.10
  • 2020/4/22 11:48

  • Lupin

  • Just popping in

  • Posts: 92

  • Since: 2007/6/1 2


@ Lucio & Mamba : of course I will test this solution.

@Mamba : if you give me some little time , I will install Yogurt in my "parallel" installation and I will report you

@Lucio : ... no way to see xoops.it coming back ?



1390
Mamba
Re: Datetime problems with Publisher 1.07 Final and Xoops 2.5.10
  • 2020/4/22 10:08

  • Mamba

  • Moderator

  • Posts: 11373

  • Since: 2004/4/23


Lucio, I think, this is the same issue that Mage was talking about in the Core post. See Richard's response:

https://github.com/XOOPS/XoopsCore25/issues/807#issuecomment-614837189
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs




TopTop
« 1 ... 136 137 138 (139) 140 141 142 ... 29425 »



Login

Who's Online

509 user(s) are online (290 user(s) are browsing Support Forums)


Members: 0


Guests: 509


more...

Donat-O-Meter

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

Latest GitHub Commits