41
geekwright
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());



42
geekwright
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!



43
geekwright
Re: Login not working except from user.php

That is great news! Thanks for the update.



44
geekwright
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.



45
geekwright
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"/>
...



46
geekwright
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">



47
geekwright
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



48
geekwright
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.



49
geekwright
Re: Warning with xoInboxCount

Here is a quick review of the problem Goffy experienced for anyone following along. This will NOT work and triggers the warning:
<{if xoInboxCount}> ... <{/if}>
This will work:
<{xoInboxCount assign="unreadCount"}> <{if $unreadCount}> ... <{/if}>
The output of xoInboxCount goes straight to the page output. Using the assign parameter assigns the count to variable that can be used with the "if" function.



50
geekwright
Re: Warning with xoInboxCount

I've not seen this. Can you email me the nav-menu.tpl template file and the nav-menu.tpl.php compiled version so I can look at what it is doing?




TopTop
« 1 2 3 4 (5) 6 7 8 ... 22 »



Login

Who's Online

239 user(s) are online (156 user(s) are browsing Support Forums)


Members: 0


Guests: 239


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