xoops forums

Forum Index


Board index » All Posts (geekwright)




geekwright

Quite a regular
Posted on: Yesterday 3:47
geekwright
geekwright (Show more)
Quite a regular
Posts: 274
Since: 2010/10/15
#1

Re: XOOPS 2.5.9 Notes for Theme Creators

The $xoops_page variable only gives the module and script. It was intended to allow adding menus or style variations for a specific function, not specific content.

If I needed the content_id exposed as well, I would probably ask Mage to add it to the smarty variables that xmcontent assigns.


geekwright

Quite a regular
Posted on: 11/7 22:30
geekwright
geekwright (Show more)
Quite a regular
Posts: 274
Since: 2010/10/15
#2

Re: The Protector module is blocking my IP address.

Protector keeps its list of bad IP addresses in a file names "badips" followed by 6 hex characters unique to your system.

If you are using XOOPS 2.5.9, the "badips" file is found in the "xoops_data/protector/" directory.

In earlier XOOPS versions, the file will be in the "xoops_lib/modules/protector/configs" directory.

Deleting that file, or editing it to remove the line with you IP address should end the ban.


geekwright

Quite a regular
Posted on: 11/2 17:20
geekwright
geekwright (Show more)
Quite a regular
Posts: 274
Since: 2010/10/15
#3

Re: XOOPS 2.5.9 Notes for Theme Creators

There is a XoopsFormRendererBootstrap4 that will be included in 2.5.11

To use it now, either use the 2.5.11 alpha version, and the code looks like this:
<?php
xoops_load
('XoopsFormRendererBootstrap4');
XoopsFormRenderer::getInstance()->set(new XoopsFormRendererBootstrap4());


or

you can copy the file XoopsFormRendererBootstrap4.php into your theme's directory and use:
<?php
include_once 'XoopsFormRendererBootstrap4.php';
XoopsFormRenderer::getInstance()->set(new XoopsFormRendererBootstrap4());


geekwright

Quite a regular
Posted on: 11/2 2:22
geekwright
geekwright (Show more)
Quite a regular
Posts: 274
Since: 2010/10/15
#4

Re: xswatch

Glad you like it!

My favorite aspect of open source is that when you put some thing out to the world, there is always a chance that someone will do something wonderful with it. I hope it serves you well!


geekwright

Quite a regular
Posted on: 10/17 0:37
geekwright
geekwright (Show more)
Quite a regular
Posts: 274
Since: 2010/10/15
#5

Re: Login not working except from user.php

That is great news! Thanks for the update.


geekwright

Quite a regular
Posted on: 10/14 17:08
geekwright
geekwright (Show more)
Quite a regular
Posts: 274
Since: 2010/10/15
#6

Re: Login not working except from user.php

I took the code from your login form, transported it to a test site, and it works.

When I try on your site (with a dummy name,) I can see it go through the expected steps.
- post to user.php
- redirect from user.php to modules/profile/user.php
- load modules/profile/user.php (due to login failing)

(Just for reference, the network section of Google Chrome's developer tools was my tool of choice for watching what was happening.)

That all looks correct. What is missing is a message.

The default message mechanism is a interstitial message box with a "click here if it doesn't reload" message. It is possible that your theme is interfering with that.

The more commonly used message delivery is a temporary overlay bubble. This can be enabled in admin under:
preferences -> system options -> general settings -> Use jGrowl redirect

With that option enabled you should be able to see the message that is redirecting to the final user.php page.


geekwright

Quite a regular
Posted on: 10/13 18:02
geekwright
geekwright (Show more)
Quite a regular
Posts: 274
Since: 2010/10/15
#7

Re: Login not working except from user.php

Sorry I wasn't clear. Looks like the only change needed should be to add the form tag back:
<{if !$xoops_isuser}>
        <
form method="post" action="<{xoAppUrl /user.php}>">
        <
input type="hidden" name="op" value="login"/>
...


geekwright

Quite a regular
Posted on: 10/13 2:07
geekwright
geekwright (Show more)
Quite a regular
Posts: 274
Since: 2010/10/15
#8

Re: Login not working except from user.php

The query string of 'op=login' should not be part of the action URL. For security reasons, the GET input will be ignored in the POST method form submission.

The form should include this instead:
<input type="hidden" name="op" value="login">


geekwright

Quite a regular
Posted on: 9/29 3:35
geekwright
geekwright (Show more)
Quite a regular
Posts: 274
Since: 2010/10/15
#9

Re: How is IP filtering/ban done in XOOPS protector?

The IP used by protector is resolved in \Xmf\IPAddress::fromRequest(). Unfortunately, it is not using X-Forwarded-For at the moment.

RFC 7239 looks promising, but XFF seems to still be the defacto standard. It should be supported here. I will add a ticket to add support for it, and it will be part of 2.5.11 - coming soon.

Edit: ticket is here: https://github.com/XOOPS/xmf/issues/64


geekwright

Quite a regular
Posted on: 9/12 2:44
geekwright
geekwright (Show more)
Quite a regular
Posts: 274
Since: 2010/10/15
#10

Re: xoopsClone issues

There are not a lot of examples for xoopsClone() that I can find.

Assuming $existingObject is a child of XoopsObject
$newObject $existingObject->xoopsClone();

will create a cloned copy of $existingObject.

It is probably wise to instead use PHP's clone like this:
$newObject = clone $existingObject;


It is possible that an object with custom properties might not produce a proper clone with xoopsClone(), while the PHP clone would clone any custom properties.

The clone, in either case, has all the vars copied, and is set as a new object.

One potential problem is that the XoopsObject has no internal knowledge of it's primary key, so while the object is marked new, it still has any auto-increment PK set. You can work around this issue by doing a $newObject->destroyVars('key-variable-name'); to clean up after a clone.

It probably would have made more sense for a xoopsClone() method to be in the handler rather than the object, but this choice was made a long time ago.



TopTop
(1) 2 3 4 ... 18 »