Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2009-11-02 21:05:50

struggle
Xinha Community Member
Registered: 2009-11-02
Posts: 14

Looks like a common problem

My thumbs are not showing in the exendedfilemanager. I have searched the forums and the solutions don't weem to help. Thumbs are being created in the indicated directory and permissions are proerly set. Heres the lines from config_inc.php

$IMConfig['thumbnail_prefix'] = 't_';
$IMConfig['thumbnail_dir'] = '.thumbs';

Oh, and when I select the image to put it in my edit box, the image does not appear
Any Ideas?

xinha 0.95 opensuse 11.0 using firefox

Last edited by struggle (2009-11-02 21:09:19)

Offline

#2 2009-11-03 05:11:57

ray
Xinha Administrator
From: Germany
Registered: 2005-03-23
Posts: 521
Website

Re: Looks like a common problem

Have you correctly set

$IMConfig['images_url'] = '<images url>';

?

Offline

#3 2009-11-04 20:35:24

struggle
Xinha Community Member
Registered: 2009-11-02
Posts: 14

Re: Looks like a common problem

I have this sorted for imagemanager but not file manager. I have all the urls and paths set pretty much the same in both plugins. I'll keep looking at it

Offline

#4 2010-07-08 20:10:30

campusano
New member
Registered: 2010-07-08
Posts: 2

Re: Looks like a common problem

I've been using xinha since 3 weeks ago and i found it nice.
I've setup the thumbs dir and thumbs prefix by a config file.

Use this file and include it into the src attribute in the line where you input your external javascripts:

My file looks like these...

    <?php header("Content-type: text/javascript"); ?>
    <?php
     function getParentDir($url)
            {
            return dirname(dirname($url));
            }
   
    ?>
  xinha_editors = null;
  xinha_init    = null;
  xinha_config  = null;
  xinha_plugins = null;
 

  xinha_init = xinha_init ? xinha_init : function()
  {

 
      xinha_plugins = xinha_plugins ? xinha_plugins :
      [
      'DoubleClick',
      'ImageManager',
      'Linker',
      ];
           // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING  smile
           if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return;
      
      
      xinha_editors = xinha_editors ? xinha_editors :
      [
      'myTextArea'
      ];
      
      xinha_config = xinha_config ? xinha_config : new Xinha.Config();
      
   
      xinha_config.toolbar =
      [
          ["popupeditor","separator","formatblock","bold","italic","separator","insertimage"]
      ];
      
      xinha_config.formatblock =
      {
          "&mdash; format &mdash;"  : "",
          "Heading 2": "h2",
          "Normal"   : "p"
      };
   
      
      xinha_config.showLoading = false;
      xinha_config.statusBar = false;
      xinha_config.stripBaseHref = true;
      xinha_config.baseHref = "<?php print 'http://'. $_SERVER['SERVER_NAME']; ?>";

       with(xinha_config.ImageManager)
       {
        <?php
          require_once('contrib/php-xinha.php');
          
        
          
          xinha_pass_to_php_backend(
            array(
              'images_dir' => str_replace("\\","/",dirname(getParentDir(__FILE__))).'/uploads/',
              'images_url' => getParentDir(dirname($_SERVER['PHP_SELF'])).'/uploads',
              'allow_upload' => true,
              'thumbnail_dir'=> 'mythumbs',
              'thumbnail_prefix'=>'thumb_'
            )
          );
        ?>
       }
     

      xinha_editors   = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins);
      
      Xinha.startEditors(xinha_editors);
    }
     Xinha._addEvent(window,"load",xinha_init);

//Note the function getParentDir(); this function gets 2 levels of the current file...

Hope this bit of code can help to you...

If any question, contact me!
smile

Offline

#5 2010-08-19 06:15:07

sektor51
New member
Registered: 2010-03-23
Posts: 5

Re: Looks like a common problem

Hi! Nice work, looks fine. But can you explain how to import this file? It is javasctipt mixed with php and I do not now how to import it. Thank you!

Offline

#6 2010-08-19 06:24:18

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Looks like a common problem

Just name the file something.php
then

<script type="text/javascript" src="something.php"></script>

will do the job.


James Sleeman

Offline

Board footer

Powered by FluxBB