Kotomi - Generic script bridge

Kotomi - Generic script bridge 0.0.1

No permission to download
Yes, sorry, here goes.

Code:
<?php
 
$startTime = microtime(true);
$kotomi_indexFile = "./";
$kotomi_container = true;
$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";

/www/communehost.com/library/Dark/Kotomi

Xenforo is in the root directory while I'm trying to get this script to work in the Commune Host directory. I understand there is a path issue somewhere and have been looking were to change it. But I'm not sure where and what too exactly. Again, thanks. I appreciate the help. :)
 
Also, web.php is were the script is now on communehost.com. I'm using the default one as I wanted to get it working before I worked on the file more. I'm basically trying to setup a page while initializing Xenforo in another directory (communehost) so it will display an external page that I can build a website with. In either case, I'm still new to this so I'm not sure which path needs to be changed. I appreciate your help guys. :)
 
It's working in my main directory, just not the communehost.com directory guys. It's the same sort of setup. I just cannot seem to find a config file or something so that kotomi will recognize communehost.com in it's own directory as standard with Xenforo in the other directory and interchange the links.

When you go to http://communehost.com/web.php for example the links refer back to the other domain and so the images directory is not loading either. I know it's possible to do this as the script developer said so himself just executing it out of the directory is the challenge right now.
 
I got it to work guys! It's awesome, going to donate some money to the creator soon as I'm paid. I will also do a documentation for beginners like me who want to use this script with their installation on the site when it's up and running this summer. :D
 
Is there a xenFroro user method I can use in my custom PHP file to get the user ID or anything or do I need to do manual database calls?
 
Say I use this to create a home page: {my-site}/index.php; Xenforo is in its own directory. Is there an easy way to pass something to the add-on in order to tell Xenforo that the "Home" tab in the navigation should be displayed as selected?

Thanks.
 
We're currently using Kotomi as a basis for a MediaWiki skin, and after some initial struggles we have everything regarding base tags, JS and CSS resolved.
However the tab bar at the top doesn't display anything other than "Forums, Members, Help" even though we have XenPorta installed (which makes a Home tab) and Nodes as Tabs for an extra Wiki tab. I'm guessing this has something to do with registering a route/node from Kotomi but I'm currently a bit stumped.
 
Just wondering whether the bridge fetches alerts as well?
Yes, here is my MediaWiki skin built using Kotomi generating an alert:
kotomialert.png
 
I just installed this fantastic add-on. It is just what I have been looking for to make custom pages within the scope of XenForo!

I have two issues that I cannot seem to resolve. Can anyone here be of assistance?

1) Special characters (like á, ï etc.) are displayed wrong (like a diamond with a ? in it). It is probably a character-encoding setting, but I have not been able to find a way to change it.

2) CSS does not work 100%. Some things seem to work fine, while others (for instance border-radius) do not seem to work at all (I want the layout to be similar to the XenForo one) - the corners are just left square. Any idea?

Here is the plain page: http://forum.norwegianforestcat.eu/external/links/
Here is the page incorporated into the Kotomi add-on: http://forum.norwegianforestcat.eu/external/kotomi.php

I hope someone can assist in solving my two little mysteries.

Thanks,

Flemming
 
Darkimortal

Is it possible to use this code within a sidebar template? I have created a new base sidebar addon with template hook and I want to run some php code within the template.

I have gotten the code to work as as an external page as designed but if I try to use it within a sidebar template it does not parse the php code and dumps the template code in to the sidebar box or breaks the complete site.

Thanks.
 
2) CSS does not work 100%. Some things seem to work fine, while others (for instance border-radius) do not seem to work at all (I want the layout to be similar to the XenForo one) - the corners are just left square. Any idea?

I found this too - bullet pointed lists don't work. I didn't find a solution though, sorry.
 
I still have the NavTabs problem described above, but in the meantime I've managed to get some other stuff working at least. I've set up an array $kotomi which contains such things as title, container, breadcrumb, and made Kotomi's ControllerPublic pass it on to the template. That made this possible:
kotominavigation.png


However, I have XenPorta installed which *should* replace "Forums" in the breadcrumb with "Home", except it isn't doing that. Are listeners not called for Kotomi pages? Might that also be why the NavTabs are so bare? How do I fix that?
 
I'm having issues with CORS errors. The page loads correctly, I can see that I'm logged in to XF, and that I have a an unread alert. If I hover over the alerts notice to list them Chrome's console shows an error: XMLHttpRequest cannot load http://example.com/index.php?accoun...xfNoRedir…1,xxx,xxxxxxxx&_xfResponseType=json. Origin http://feature.example.com is not allowed by Access-Control-Allow-Origin

example.com and feature.example.com are virtualhosts in an apache server, with identical configurations save for their server sames.

Is this an expected behavior? Is there any way around this?

Thanks,
mikenon
 
1.2 Beta 1 seems to break this..

What ive noticed is that if the kotomi file "index.php" (example-index.php as found in the package) is placed in the xf install dir or directories from the install everything is fine... However if the file is dumped in a dir like this:

mysite.com/ <-- example-index.php is placed here then issues occur.. the header and footer / stylesheets are not loaded.
mysite.com/community/ <-- XF installed here.

The issues start occuring.. Any asistance on this matter would be greatly appreciated.

Regards, Darren
 
This bridge extends the XenForo_FrontController. Take a look at the Kotomi extension FrontController.php file and compare it to the new XF 1.2 FrontController.

To speed things up look in the error logs to find the exact line(s).

Sorry - I'm out until after work tomorrow (14 hours from now) but am just starting to look at XF 1.2 changes and am not enough specific help for you.

As a guess .. start around line 549 .. in the renderView ...
 
@LPH if you were able to work this issue out it would be a huge load off my shoulders as I have a clients site that i either need to make this work for or completely re-design a WP theme from the ground up to match the Custom XF Style I am designing for them.

Regards, Darren

EDIT: After a very quick look it's over my head :( I spent hours in that file in the Kotomi script trying to work out if it were a simple ' or " that may of changed.. just seemed very strange the timing of it and I must admit i was relying heavily on this for my own project and was cut as a snake when i went to set it up on 1.2 to find it was now broken.. All I can do is offer a MASSIVE thank you if you were able to identify the issue.
 
No because due to the script not working when say like this:

mysite.com <-- This is where Kotomi is broken / breaking now
mysite.com/forum/ <-- XF installed here with addons

mysite.com/forum/custom-page-using-kotomi/ <-- This still works fine.

So as it's not causing issues, it's just not working there are no errors / issues being noted by XF.

Darren
 
Top Bottom