81
goffy
Re: extCal 2.40 RC-1 Released for Testing and Contributions
  • 2021/2/26 8:01

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


hi

maybe there is a problem with date format definition.
do you have the same results if you are switching your XOOPS to english?



82
goffy
xmdoc
  • 2021/2/19 8:40

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


Hello together
Mage has submitted his xmDoc on phpclasses.org:
https://www.phpclasses.org/package/11931-PHP-XOOPS-CMS-module-to-manage-files-attached-to-posts.html
If you want help to support XOOPS, then vote for xmDoc, and all can realize, what is possible with XOOPS :)



83
goffy
Re: Adding a LIke Feature to NEWBB
  • 2021/2/7 8:11

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


looks great BigKev73

many thanks for sharing



84
goffy
Re: xmnews 1.5 Final Released
  • 2021/2/7 8:09

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


great work Mage, thank you



85
goffy
Re: The Protector module is blocking my IP address.
  • 2021/1/27 6:15

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


hi

ok, then maybe another method crowbar ;)
loggin in via another network (e.g. via your handy) in order to get a new IP
or ask a good friend to log in with your account from another computer/ip and to deactivate protector.
After that you can deinstall protector (hopefully badip file is also deleted) and reinstall it

And it is strongly recommended to update your XOOPS to last version



86
goffy
Re: The Protector module is blocking my IP address.
  • 2021/1/26 16:55

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


hi
please check also \xoops_data\protector\ and delete file badips....

if still not working, quick and dirty: go into database table modules and change value "isactive" from Protector from 1 to 0



87
goffy
Re: XOOPS INDUSTRY THEME
  • 2020/12/31 10:27

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


looks great.
thank you for sharing



88
goffy
Re: xmdoc 1.1 Final Released
  • 2020/12/31 10:21

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


good news :)



89
goffy
Re: All about M.A.S.K. runs XOOPS 2.5.11.
  • 2020/12/28 8:59

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


yes, congratultaions, looks great



90
goffy
Combine AND/OR in a CriteriaCompo
  • 2020/12/25 15:01

  • goffy

  • Just can't stay away

  • Posts: 535

  • Since: 2010/12/27


Sometime maybe you have the problem to combine AND and OR in a CriteriaCompo, but for this you should know how to to this.

Explanation of problem:
I want to filter my data from table 'Repositories' by following params:

'repo_user' is equal to my variable $dirName
'repo_status' should be 2 or should be 3
'repo_prerelease' should be 1 or 'repo_release' should be 1


From perspective of the query it must be solve like this:
('repo_user' $dirName) AND ('repo_status' OR 'repo_status' 3) AND ('repo_prerelease' OR 'repo_release' 1)


If you are using CriteriaCompo and combine all criterias in this way:

$crRepositories = new CriteriaCompo();
$crRepositories->add(new Criteria('repo_user'$dirName));
$crRepositories->add(new Criteria('repo_status'2));
$crRepositories->add(new Criteria('repo_status'3), 'OR');
$crRepositories->add(new Criteria('repo_prerelease'1) );
$crRepositories->add(new Criteria('repo_release'1), 'OR');
$repositoriesAll $repositoriesHandler->getAll($crRepositories);


then XOOPS creates following query:
SELECT FROM `wggithub_repositoriesWHERE (`repo_user` = 'XoopsModulesArchive' AND `repo_status` = '2' OR `repo_status` = '3' AND `repo_prerelease` = '1' OR `repo_release` = '1')


but as the parentheses are missing this query will not give the result you want.

Therefore the question is, how can we force XOOPS to add the necessary parentheses?

The solution is to create a separate CriteriaCompo for each block and combine them in a new CriteriaCompo
//first block/parentheses
$crRepo1 = new CriteriaCompo();
$crRepo1->add(new Criteria('repo_user'$dirName));

//second
$crRepo2 = new CriteriaCompo();
$crRepo2->add(new Criteria('repo_status'Constants::STATUS_UPDATED));
$crRepo2->add(new Criteria('repo_status'Constants::STATUS_UPTODATE), 'OR');

//third
$crRepo3 = new CriteriaCompo();
$crRepo3->add(new Criteria('repo_prerelease'1) );
$crRepo3->add(new Criteria('repo_release'1), 'OR');

//final combination
$crRepoFinal = new CriteriaCompo();
$crRepoFinal->add($crRepo1);
$crRepoFinal->add($crRepo2);
$crRepoFinal->add($crRepo3);

//get data
$repositoriesAll $repositoriesHandler->getAll($crRepoFinal);
unset(
$crRepo1$crRepo2$crRepo3$crRepoFinal);


Now XOOPS creates following query:
SELECT CFROM `wggithub_repositoriesWHERE ((`repo_user` = 'XoopsModules25x') AND (`repo_status` = '2' OR `repo_status` = '3') AND (`repo_prerelease` = '1' OR `repo_release` = '1'))


and now we get expected results :)

If someone have another solution you are welcome to share :)




TopTop
« 1 ... 6 7 8 (9) 10 11 12 ... 43 »



Login

Who's Online

237 user(s) are online (134 user(s) are browsing Support Forums)


Members: 0


Guests: 237


more...

Donat-O-Meter

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

Latest GitHub Commits