• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.

Login URL?

LPH

Flight Director
Flight Instructor
This is something needing to be addressed. There should be an option in the XenWord panel to build the link using Friendly URLs or default.

This thread has been moved to the XW 3.0 Suggestions Forum.
 

dougdirac

Tween Bird
I would think that XenWord should just always use the default URLs since those should work in either case.

Even if the XenForo installation is using "Full Friendly URLs" the default URLs should still work.
 

LPH

Flight Director
Flight Instructor
It used to be that way in the first several releases (2 years ago) but there were way too many issues.
 

dougdirac

Tween Bird
Hmm... so what can I do for the moment since I don't use Full Friendly URLs? Is there a file edit I can do on the test version? Thank you! :)
 
Last edited:

LPH

Flight Director
Flight Instructor
the trial version is a very old version (before I understood DRY).

Open class-xenword-redirects.php and you'll see this line in many places.

PHP:
XenForo_Application::get('options')->boardUrl;

Simply make the changes.


This is the code in newer versions:

PHP:
    /**
    * @return mixed
    * @throws Zend_Exception
    */
    public static function getBoardUrl() {
        return XenForo_Application::get('options')->boardUrl;
    }

So rather than changing just all the locations in the class-xenword-redirects.php file ... it's just the one location in the /XenForo/index.php file.

Hope that is clear.
 

dougdirac

Tween Bird
FYI, my team has moved on to a developer's license. The 3.0 alpha gave an error so I'm trying to work with version 2.5.

So what edit do you suggest making so I can solve this problem on version 2.5.

Thanks!
 

Gracie

Dogs Times Writer
FYI, my team has moved on to a developer's license. The 3.0 alpha gave an error so I'm trying to work with version 2.5.

So what edit do you suggest making so I can solve this problem on version 2.5.

Thanks!

Please be more specific -- but open up a new thread so that @LPH and @RLL can see it.
 

LPH

Flight Director
Flight Instructor
The 3.0 alpha gave an error so I'm trying to work with version 2.5.

I'd stick with 3.x and move forward. The error you received was due to a wrong file included in the zip. I will upload a new version today. In the meantime, Gracie provided the fix.
 

dougdirac

Tween Bird
Ok, so did the fix for the 3.0 alpha to activate, but what is the solution to get standard XF URLs to work on this version. You seem to be suggesting I should be doing a different edit than I did for the test version.
 

LPH

Flight Director
Flight Instructor
Ok, so did the fix for the 3.0 alpha to activate, but what is the solution to get standard XF URLs to work on this version. You seem to be suggesting I should be doing a different edit than I did for the test version.

OK. I'm sorry. The code for the alpha is written above. I don't test default and always move to the friendly so I'd have to look at what is happening. But this is how the code works:

This is in the redirect file:
PHP:
$login_url= esc_url( XenWord::getBoardUrl() . '/login' );

Therefore, getBoardUrl is from xenword-3.0.0.07/XenForo/index.php

PHP:
/**
* @return mixed
* @throws Zend_Exception
*/
public static function getBoardUrl() {
   return XenForo_Application::get('options')->boardUrl;
}

As you can see, the boardUrl is pulled from XenForo and should work.
 

LPH

Flight Director
Flight Instructor
We seem to be talking in circles.

Please PM me and I will send you a zip with 3.0.0.08 files. These have the only fix at this point -- a fix for the action-links so that the plugin activates on all servers (an earlier version worked on some but not all).

Next, we can discuss the login-URLs. Because the code for getBoardUrl is exactly what is used in the XenForo files. So no editing should be necessary.
 

dougdirac

Tween Bird
We seem to be talking in circles.

Please PM me and I will send you a zip with 3.0.0.08 files. These have the only fix at this point -- a fix for the action-links so that the plugin activates on all servers (an earlier version worked on some but not all).
So I was able to fix this by updating with the code Gracie provided. Seemed to be only one line different. I assume that's the same as 3.0.0.0.8.
Next, we can discuss the login-URLs. Because the code for getBoardUrl is exactly what is used in the XenForo files. So no editing should be necessary.
I guess this is why we're talking in circles. It didn't work for me.

When attempting to log in from wordpress I'm sent to the URL myxenforosite.com/login rather than myxenforosite.com/index.php?login
 

Gracie

Dogs Times Writer
What is the structure of your site?

The plugin is tested using

index.php
-- wp-content
-- wp-includes
-- wp-admin
-- community

This appears that you have XenForo in the root. Is this correct?
 

dougdirac

Tween Bird
Actually on our test site, vBulletin is in root (we're going to be migrating to xenforo)
Xenforo is in a subdirectory /xf
Wordpress is in a subdirectory /marketplace
 

LPH

Flight Director
Flight Instructor
This is a structure not in my development environment. Guess I'll have to setup one. I think there is another site using XF and WP in subdirectories.
 

dougdirac

Tween Bird
So I'm still having this problem on the latest version. WP multisite in root, XF in mysite.com/community .

Keeps trying to go to mysite.com/community/login instead of mysite.com/community/index.php?login
 

LPH

Flight Director
Flight Instructor
So I'm still having this problem on the latest version. WP multisite in root, XF in mysite.com/community .

I haven't made any changes to the code, and haven't even looked at the redirects. Sorry -- the avatar code and a few other bugs were more prominent.

I'm assuming you are not running friendly URLs in XenForo. If this is the case then there would need to be some sort of conditional that doesn't exist in the current code.

It would be something like this....

PHP:
        if ( useFriendlyUrls == '1' ) {
            return urlDir . '/' . $link;
        } else {
            return urlDir . '/index.php?' . $link;
        }
 
Top