Kotomi - Generic script bridge

Kotomi - Generic script bridge 0.0.1

No permission to download
I've used this with another Zend-platform app (aMember), and while I managed to get the XF header and footer wrapped around the page, all links now point use the page itself as a starting point.

I.e.

The forums are in the root folder.
The aMember app resides in /shop

My header now has "forums" pointing to "/shop/forums/"

Anything I clould possibly do to address that?

Thanks!

I am facing same issue, I am able to use Kotomi outside forum directory but now all links like menu link pointing like above
 
Hi All

Is it possible to add an own Route Controller in XF for Kotomi to get all Kotomi Scripts on the same Navbar?
If yes, which Route Class and which Addon should i set?
I think with this Option, there also needs some changed in the FrontController of Kotomi.

Or is this Option the wrong way?
I tried so much to get my Navbar Button active with Kotomi, but nothing worked.

If anyone can code something for me, i would pay for that.

Thanks for all Replies!
oNdsen
 
I can't seem to get this to work. After setting up the config it works without errors but it doesn't render the header, footer or anything else other than "Hello World!" I was hoping to wrap another script, such as Joomla, WP or other using the wrapper, starting just with the test file. O echoed fileDir to the screen and see an extra ./ added into the URL prior to the /library/ directory. Not sure if this causes the problem and can't seem to fix it. Just blank header/footer for now.
 
Last edited:
I'm curious whether this can be made to play nice with XenWord. Kotomi would literally just be serving up the XF header/footer and sidebar - but XenWord would handle the other bridge functions. Thoughts?
 
We already own XenWord. The question is just whether the two can coexist. Elements of the XF theme are called in the WordPress theme.

I'm mainly concerned about the redirects being performed by XenWord. I'm not having much success running both right now.
 
I was trying to understand your question and why you'd even want to run both. It would be better to extend one or the other. :)

IRT redirects, they are intentional and can be changed in the class-xenword-redirects.php file. I'll bow out from this thread so it isn't hijacked. Kotomi is a great bridge.
 
I can't seem to get this to work. After setting up the config it works without errors but it doesn't render the header, footer or anything else other than "Hello World!" I was hoping to wrap another script, such as Joomla, WP or other using the wrapper, starting just with the test file. O echoed fileDir to the screen and see an extra ./ added into the URL prior to the /library/ directory. Not sure if this causes the problem and can't seem to fix it. Just blank header/footer for now.
Code:
$kotomi_container = true;
 
I was trying to understand your question and why you'd even want to run both. It would be better to extend one or the other. :)

IRT redirects, they are intentional and can be changed in the class-xenword-redirects.php file. I'll bow out from this thread so it isn't hijacked. Kotomi is a great bridge.

@LPH and @Luke F - just wanted to let you know what ended up having to be done for the two to play nice, in case you want to build this in for future - I think the two make a great combination. In our case, we wanted to use the XF header/footer for our WP site, so Kotomi was needed. We needed XenWord's fantastic support for comments, user ID's and thread/article linking. So - the two can be made to work together, and the result is amazing. Many thanks to Audentio Design for figuring this out for us.

For Kotomi:

What ended up being required was to stop Kotomi from initializing XenForo since Xenword also runs the XenForo initialization. This was accomplished by changing /[xf install location]/library/Dark/Kotomi/KotomiHeader.php to be the following (just commenting out the three lines).

Code:
<?php

//require($fileDir . '/library/XenForo/Autoloader.php');
XenForo_Autoloader::getInstance()->setupAutoloader($fileDir . '/library');

//XenForo_Application::initialize($fileDir . '/library', $fileDir);
//XenForo_Application::set('page_start_time', $startTime);
$kotomi_fc = new Dark_Kotomi_FrontController(new XenForo_Dependencies_Public(), $htf_page_title, $htf_meta_desc, $htf_page, $wp_head);

ob_start();

This should just stop initializations from running twice and causing errors with XenForo but I don't believe it should impact functionality.

For XenWord:

wp-content/plugins/xenword-[currentVersion]/XenForo/library/XenWord/Comments.php
Code:
line 92 and 138

from public function to public static function
 
wp-content/plugins/xenword-[currentVersion]/XenForo/library/XenWord/Comments.php
Code:
line 92 and 138

from public function to public static function

Ah ! We just caught this bug last night. I wish this post was seen earlier :(

Glad the two are working well for you.
 
It is possible to create a page without breadcrumbs and title?
Show just header, navigation and footer.
 
quick question for those who are more experienced with kotomi and templates in general --

is there any way you can use a xenforo conditional statement in a template to show certain content _only_ if you're on a non-XF page? IE, if i'm on an external page that i've created that shows the XF header and breadcumbs, i'd like to add certain content to the breadcrumb that only shows up if i'm on those external pages.

So how would I add a conditional to the breadcrumb template to achieve this?
 
Can someone tell me why my code isn't working? forum is currently installed to domain.tld/xen

PHP:
<?php
 
$startTime = microtime(true);
$kotomi_indexFile = "./xen/";
$kotomi_container = false;
$fileDir = dirname(__FILE__)."/{$kotomi_indexFile}";
require "{$fileDir}/library/Dark/Kotomi/KotomiHeader.php";

echo "
<html>
<head>
<title>kotomi test</title>
</head>
<body>
HELLO WORLD!!!
</body>
</html>";

require "{$fileDir}/library/Dark/Kotomi/KotomiFooter.php";
 
Still unable to get this to work for anything beyond basic HTML echos, which is pointless since I don't need an addon to do that.

Can't get PHP scripts to work at all.

Doesn't matter what I do, the last require doesn't do anything, it just takes the last line, and pretty much echos it at the bottom of whatever I do.

Sucks that we can't add PHP to the design easily. This was a bit of a work around in VB, but at least it worked.
 
Have you seen the <xen:callback> tag? That allows you to call PHP scripts in a template and return an output. Depends exactly what you want to do, but it sounds like it'd help here.
 
Top Bottom