Hi all,
I've installed LAMP on my ubuntu, after I've install drupal 5.7 and knowledgetree 3.5.4 by stack installation.

Now I want to use knowledge tree integration module. I follow the instructions and all goes fine but at point 7:

7. Run the following SQL on the KnowledgeTree database

INSERT INTO interceptor_instances (id, name, interceptor_namespace)
VALUES (1, 'DrupalInterceptor', 'drupal.drupal.interceptor');

How can I access the knowledgetree bundled mysql server?

I hope my explanation is exaustive, if not tell me anything.

Thanks in Advance...

CommentFileSizeAuthor
#10 screen1.png98.71 KBt3ooo
#4 screee.png95.96 KBt3ooo

Comments

t3ooo’s picture

I've solved that problem by manually specifing of db socket.

Another question now...

I would like to see only the directory tree instead of all knowledgetree pages(dashboard etc etc...)
it's possible?

alexpott’s picture

Does Knowledge tree 3.5 come with a directory tree view? Old versions didn't... you needed quickbrowse part of VAO plugin for Knowledge Tree... and then in the kt config.ini you can specify the starting screen.

Regards,

Alex

t3ooo’s picture

maybe I didn't explain well... sorry but as you can read my english is not so good.

I try to explain better.

In my knowledgetree i've a public folder. I want to see only the content of that folder in drupal, without all other knowledgetree options etc etc...

Thank you so much...

t3ooo’s picture

Title: Problem during installation, how to insert into knowledge tree bundled database » How to show only folder content without all knowledgetree options...
StatusFileSize
new95.96 KB

news on it...

currently I'm working on a custom browse.php page (knowledgetree side) for showing only what I want...
Now I've to customize all the command but I think it could be a good solution for my problem.

Here a screenshot:

alexpott’s picture

You can achieve something very similar by changing knowledge tree's standard_page.smarty (in templates/kt3) and the related css file kt-framing.css (in resources/css)

In this way you won't have to customise all the commands... also with a bit of javascript magic you could show or hide KT's menu to allow admin of the knowledge tree system.

Alex

t3ooo’s picture

Ok, it's a better way but there's a way for keep both solutions?

In other words:

- access via drupal on public folder use a standard_page.smarty modified and maybe called nonstandard_page.smarty.

- access via knowledgetree remain the same as the original with original standard_page.smarty

Do you think it's possible?

Thanks!!!

t3ooo’s picture

maybe I've found a solution... I post here my solution soon...

t3ooo’s picture

by now I've a partial solution...

My idea is to send a variable via GET method in url like: someKnowledgetreeUrl/browse?public=true and get it back for use in standard_page.smarty:

{if $smarty.get.public != 'true'}
//STANDARD HEADER CODE
{/if}

this works fine but when I click on a folder showed obviously the link is someKnowledgetreeUrl/browse?ffolderID=XX where XX is the number of the folderID.

So now I've to find a way to add the same variable also in that links, like: someKnowledgetreeUrl/browse?ffolderID=XX&public=true...

I think there's another .smarty template... any idea?

alexpott’s picture

You could set a cookie or session variable instead of passing the variable on link... which would have a couple of advantages not least in giving more control and not allowing users to choose by changing the url.

Alex

t3ooo’s picture

StatusFileSize
new98.71 KB

Your solution is good but there's a new problem...the session is the same in drupal and in knowledgetree, so if you use at the same time drupal and knowledgetree (in the same session), the session variable is setted and unsetted...

This is a part of my code (standard_page.smarty):


{if $smarty.get.ispublic != ''}

	{if $smarty.get.ispublic == '1'}
		{assign var=public value=1}
		{php}
			session_start();
			$_SESSION['prova2'] = 2 ;
			//echo "Prova2 ".$_SESSION['prova2'];
		{/php}
	{/if}

{/if}


{if $smarty.get.ispublic == '' }
	{if $smarty.get.fFolderId!='' || $smarty.get.fDocumentId!=''}
		{if $smarty.session.prova2 == '2'}
			{assign var=public value=1}
			{php}
				session_start();
				$_SESSION['prova2'] = 2 ;
				//echo "Prova2 ".$_SESSION['prova2'];
			{/php}	
		{/if}
	{else}
		{assign var=public value=0}
		{php}
			session_start();
			$_SESSION['prova2'] = 0 ;
			//echo "Prova2 ".$_SESSION['prova2'];
		{/php}	

	{/if}
{/if}

{if $public != 1}
//DRAW STANDARD DESIGN
{/if}...DRAW ONLY WHAT I WANT.

Otherwise I've notice that the plugin is runned in a little iframe, see attachment... the height value in configuration form is set to 600px

t3ooo’s picture

that code works good...
if anybody want to use it, there's no matter...feel free.

But I've also the problem with the height of the iframe that you can see in the previous screenshot, I've set it in configuration at 600px.

t3ooo’s picture

Ok, problem solved, your code has a little error, when you set the height value you've lost to set $height...
your code:

  if ($width && $height) {
    $output .= ' style="width: '. $width .'; display:none;"';
  }

and how I fix it:

 if ($width && $height) {
    $output .= ' style="width: '. $width .'; height: '.$height.'; display:none;"';
  }

I hope this could be useful...

Regards,

Matteo