Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Nedeľa, 29. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  TinyMCE configuration - Please Help !

phpMyEdit Configuration     TinyMCE configuration - Please Help !
Odoslať novú tému   Odpovedať na tému    
 
cbek     Založený: 25.10.2008   Príspevky: 27  
Príspevok Zaslal: 2008-10-26 17:16
Návrat hore  Odpovedať s citátom     

I am begining with PME and I'd like to configure TinyMCE but it doesn't work.

I put in the <head>... </head>

Kód:
<!-- tinyMCE -->
<script language="javascript" type="text/javascript" src="./js/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
  editor_selector : "mceEditor",
  auto_reset_designmode : true
});
</script>
<!-- /tinyMCE -->

Then, on the field section;
Kód:

$opts['fdd']['lDesc'] = array(
  'name'     => 'Desc. longue',
  'options'  => 'AVCPD',
  'select'   => 'T',
  'maxlen'   => -1,
  'textarea' => array(
    'html' => true,
    'rows' => 30,
    'cols' => 135),
  'sort'     => true
);


But it doesn't work !!!
Did I forget something?

Thanks,
Cyril.


Naposledy upravil cbek dňa 2008-11-09 21:25, celkom upravené 1 krát

 
cbek     Založený: 25.10.2008   Príspevky: 27  
Príspevok Zaslal: 2008-10-27 13:47
Návrat hore  Odpovedať s citátom     

I have tested the TinyMCE installation by creating a simple web page :
Kód:
<?php
<script type="text/javascript" src="./js/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
   // General options
   mode : "textareas",
   theme : "advanced",
   plugins : "safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,imagemanager,filemanager"
});
</script>

<form method="post" action="somepage">
   <textarea name="content" style="width:100%">
   </textarea>
</form>

This is working very well, so MCE is well installed !

Then, I tested this with phpMyEdit :
Kód:
<?php
<script type="text/javascript" src="./js/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
   // General options
   mode : "textareas",
        auto_reset_designmode : true,
        width: "800",
        height: "200"
});
</script>

It is working for ALL textareas...
So my problem is liked to
Kód:
editor_selector : "mceEditor",


Did you ever have this issue?
Thanks,
Cyril.

 
cbek     Založený: 25.10.2008   Príspevky: 27  
Príspevok Zaslal: 2008-10-27 21:35
Návrat hore  Odpovedať s citátom     

I am using the following version :

- TinyMCE v 3.2.0.2
- phpMyEdit-mce-cal.class.php v 1.10
- phpMyEdit.class.php,v 1.211

No idea ????

 
ajh     Založený: 17.12.2003   Príspevky: 236  
Príspevok Zaslal: 2008-10-28 18:36
Návrat hore  Odpovedať s citátom     

It certainly does work, so there will be something strange about your configuration I think. Can you give me access to your page?

 
cbek     Založený: 25.10.2008   Príspevky: 27  
Príspevok Zaslal: 2008-10-28 20:59
Návrat hore  Odpovedať s citátom     

ajh Napísal:
It certainly does work, so there will be something strange about your configuration I think. Can you give me access to your page?


The page is http://www.telethon95.fr/index.php?page=Membres_Manifs_PME-Edit
You will need a login & a pwd : cbek / bebek

Thanks for your help !

Here is the code used :
Kód:
<!-- tinyMCE -->
<script type="text/javascript" src="./js/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
editor_selector : "mceEditor",
auto_reset_designmode : true,
width: "700",
height: "200"
});
</script>
<!-- /tinyMCE -->

<?php
// Récupération des variables Globales
Global $Droits;
Global $PageDroits;
Global $PageNom;
Global $connexion;
Global $IdMembre;

  GetPage ("7_Menu_Gauche", true, false);

echo '<div class="colonne_droite_large">';
echo '<div class="block" align="center">';
echo '<div class="titre-interne"><h2 class="color-56">Vos Manifestations</h2></div>';

/*
* IMPORTANT NOTE: This generated file contains only a subset of huge amount
* of options that can be used with phpMyEdit. To get information about all
* features offered by phpMyEdit, check official documentation. It is available
* online and also for download on phpMyEdit project management page:
*
* http://platon.sk/projects/main_page.php?project_id=5
*
* This file was generated by:
*
*                    phpMyEdit version: 5.7.1
*       phpMyEdit.class.php core class: 1.204
*            phpMyEditSetup.php script: 1.50
*              generating setup script: 1.50
*/

// MySQL host name, user name, password, database, and table
$opts['dbh'] = $connexion;
$opts['tb'] = 'Telethon_Manifs';

$opts['page_name'] = 'index.php';
$opts['cgi']['persist']['page'] = $PageNom;
$opts['url'] = array('images' => './php/pme/images/');

// Name of field which is the unique key
$opts['key'] = 'ID';
// Type of key field (int/real/string/date etc.)
$opts['key_type'] = 'int';

// Sorting field(s)
$opts['sort_field'] = array('ID');

// Number of records to display on the screen
// Value of -1 lists all records in a table
$opts['inc'] = 15;

// Options you wish to give the users
// A - add,  C - change, P - copy, V - view, D - delete,
// F - filter, I - initial sort suppressed
switch($Droits)
    {
    case '10':
        $opts['options'] = 'ACPVDF';
        break;
    case '8':
        $opts['options'] = 'ACVDF';
        break;
    case '6':
        $opts['options'] = 'VCFL';
        break;
    case '2':
        $opts['options'] = 'VCFL';
        break;
    default:
        $opts['options'] = 'VFL';
    }

// Number of lines to display on multiple selection filters
$opts['multiple'] = '4';

// Navigation style: B - buttons (default), T - text links, G - graphic links
// Buttons position: U - up, D - down (default)
$opts['navigation'] = 'UDG';
$opts['buttons']['L']['down'] = array('<<','<','add','>','>>');
$opts['buttons']['L']['up'] = array();
$opts['buttons']['F']['down'] = array('<<','<','add','>','>>');
$opts['buttons']['F']['up'] = array();
$opts['buttons']['V']['up'] = array('');

$opts['buttons']['C']['down'] = array('save','more','cancel');
$opts['buttons']['C']['up'] = array('');
$opts['buttons']['A']['down'] = $opts['buttons']['C']['down'];
$opts['buttons']['A']['up'] = $opts['buttons']['C']['up'];


// Display special page elements
$opts['display'] = array(
   'form'  => true,
   'query' => true,
   'sort'  => true,
   'time'  => false,
   'tabs'  => true
);

// Set default prefixes for variables
$opts['js']['prefix']               = 'PME_js_';
$opts['dhtml']['prefix']            = 'PME_dhtml_';
$opts['cgi']['prefix']['operation'] = 'PME_op_';
$opts['cgi']['prefix']['sys']       = 'PME_sys_';
$opts['cgi']['prefix']['data']      = 'PME_data_';

/* Get the user's default language and use it if possible or you can
   specify particular one you want to use. Refer to official documentation
   for list of available languages. */
// $opts['language'] = $_SERVER['HTTP_ACCEPT_LANGUAGE'] . '-UTF8';
$opts['language'] = 'FR';

/* Table-level filter capability. If set, it is included in the WHERE clause
   of any generated SELECT statement in SQL query. This gives you ability to
   work only with subset of data from table.

$opts['filters'] = "column1 like '%11%' AND column2<17";
$opts['filters'] = "section_id = 9";
$opts['filters'] = "PMEtable0.sessions_count > 200";
*/
switch($Droits)
    {
    case '10':
        break;
    case '8':
        break;
    default:
        $opts['filters'] = "Id_Membres=".$IdMembre;
    }


/* Field definitions
   
Fields will be displayed left to right on the screen in the order in which they
appear in generated list. Here are some most used field options documented.

['name'] is the title used for column headings, etc.;
['maxlen'] maximum length to display add/edit/search input boxes
['trimlen'] maximum length of string content to display in row listing
['width'] is an optional display width specification for the column
          e.g.  ['width'] = '100px';
['mask'] a string that is used by sprintf() to format field output
['sort'] true or false; means the users may sort the display on this column
['strip_tags'] true or false; whether to strip tags from content
['nowrap'] true or false; whether this field should get a NOWRAP
['select'] T - text, N - numeric, D - drop-down, M - multiple selection
['options'] optional parameter to control whether a field is displayed
  L - list, F - filter, A - add, C - change, P - copy, D - delete, V - view
            Another flags are:
            R - indicates that a field is read only
            W - indicates that a field is a password field
            H - indicates that a field is to be hidden and marked as hidden
['URL'] is used to make a field 'clickable' in the display
        e.g.: 'mailto:$value', 'http://$value' or '$page?stuff';
['URLtarget']  HTML target link specification (for example: _blank)
['textarea']['rows'] and/or ['textarea']['cols']
  specifies a textarea is to be used to give multi-line input
  e.g. ['textarea']['rows'] = 5; ['textarea']['cols'] = 10
['values'] restricts user input to the specified constants,
           e.g. ['values'] = array('A','B','C') or ['values'] = range(1,99)
['values']['table'] and ['values']['column'] restricts user input
  to the values found in the specified column of another table
['values']['description'] = 'desc_column'
  The optional ['values']['description'] field allows the value(s) displayed
  to the user to be different to those in the ['values']['column'] field.
  This is useful for giving more meaning to column values. Multiple
  descriptions fields are also possible. Check documentation for this.
*/

$opts['fdd']['ID'] = array(
  'name'     => 'ID',
  'options'  => 'AVCPDLR', // auto increment
  'select'   => 'T',
  'maxlen'   => 1,
  'default'  => '0',
  'tab'      => 'Informations',
  'sort'     => true
);
$opts['fdd']['Actif'] = array(
  'name'     => 'Actif',
  'select'   => 'O',
  'values'   => array(
                  "0",
                  "1"),
  'maxlen'   => 4,
  'default'  => '0',
  'sort'     => true
);
If ($Droits < 6) $opts['fdd']['Actif']['options']  = 'AVCLR';

$opts['fdd']['Annee'] = array(
  'name'     => 'Année',
  'select'   => 'T',
  'maxlen'   => 4,
  'default'  => '2008',
  'sort'     => true
);
$opts['fdd']['Zone'] = array(
  'name'     => 'Zone',
  'select'   => 'O',
  'maxlen'   => 5,
  'values'   => array(
                  "Est",
                  "Ouest"),
  'default'  => 'Est',
  'colattrs' => 'align="left"',
  'sort'     => true
);
$opts['fdd']['Type'] = array(
  'name'     => 'Type',
  'select'   => 'M',
  'maxlen'   => 15,
  'colattrs' => 'align="left"',
  'values'   => array("Défi sportif", "Musique/Concert", "Théâtre", "Danse", "Repas", "Vente divers", "Loto", "Jeux", "Divers"),
  'sort'     => true
);
$opts['fdd']['Nom'] = array(
  'name'     => 'Nom de la Manifestation',
  'select'   => 'T',
  'maxlen'   => 100,
  'colattrs' => 'align="left"',
  'sort'     => true
);
$opts['fdd']['Adresse'] = array(
  'name'     => 'Adresse de la Manifestation',
  'options'  => 'AVCPD',
  'select'   => 'T',
  'maxlen'   => 500,
  'textarea' => array(
    'rows' => 2,
    'cols' => 135),
  'sort'     => true
);
$opts['fdd']['CodePostal'] = array(
  'name'     => 'Code Postal de la Manifestation',
  'select'   => 'T',
  'maxlen'   => 5,
  'sort'     => true
);
$opts['fdd']['Ville'] = array(
  'name'     => 'Ville de la Manifestation',
  'select'   => 'T',
  'maxlen'   => 30,
  'colattrs' => 'align="left"',
  'sort'     => true
);
$opts['fdd']['DateDebut'] = array(
  'name'     => 'Date de Début',
  'options'  => 'AVCPD',
  'select'   => 'T',
  'maxlen'   => 10,
  'sort'     => true
);
$opts['fdd']['HeureDebut'] = array(
  'name'     => 'Heure de Début',
  'options'  => 'AVCPD',
  'select'   => 'T',
  'maxlen'   => 8,
  'sort'     => true
);
$opts['fdd']['DateFin'] = array(
  'name'     => 'Date de Fin',
  'options'  => 'AVCPD',
  'select'   => 'T',
  'maxlen'   => 10,
  'sort'     => true
);
$opts['fdd']['HeureFin'] = array(
  'name'     => 'Heure de Fin',
  'options'  => 'AVCPD',
  'select'   => 'T',
  'maxlen'   => 8,
  'sort'     => true
);
$opts['fdd']['Id_Membres'] = array(
  'name'     => 'Membres',
  'select'   => 'T',
  'maxlen'   => 11,
  'colattrs' => 'align="left"',
  'sort'     => true
);
// Clé étrangere
//quel table en liaison
$opts['fdd']['Id_Membres']['values']['table'] = 'Telethon_Membres';
//quel champ identifiant
$opts['fdd']['Id_Membres']['values']['column'] = 'Id';
//quel champ afficher pour le libelle (ce qu'il y aura dans la liste Déroulante)
$opts['fdd']['Id_Membres']['values']['description']['columns'][0] = 'Prenom';
$opts['fdd']['Id_Membres']['values']['description']['columns'][1] = 'Nom';
$opts['fdd']['Id_Membres']['values']['description']['divs'][0] = ' ';  //Sep.
$opts['fdd']['Id_Membres']['values']['filters'] = 'Droits !=0';
$opts['fdd']['Id_Membres']['values']['orderby'] = 'Prenom, Nom';
If ($Droits < 6) $opts['fdd']['Id_Membres']['options']  = 'AVCR';

If ($Droits >= 6) {
$opts['fdd']['Orga_Nom'] = array(
  'name'     => 'Organisateur',
  'select'   => 'T',
  'maxlen'   => 50,
  'colattrs' => 'align="left"',
  'sort'     => true
);
$opts['fdd']['Orga_eMail'] = array(
  'name'     => 'Orga eMail',
  'options'  => 'AVCPD',
  'select'   => 'T',
  'maxlen'   => 100,
  'sort'     => true
);
}
$opts['fdd']['URL'] = array(
  'name'     => 'URL',
  'options'  => 'AVCPD',
  'select'   => 'T',
  'maxlen'   => 150,
  'sort'     => true
);
$opts['fdd']['Vignette'] = array(
  'name'     => 'Vignette',
  'options'  => 'AVCPD',
  'select'   => 'T',
  'maxlen'   => 50,
  'sort'     => true
);
$opts['fdd']['Photo'] = array(
  'name'     => 'Photo',
  'options'  => 'AVCPD',
  'select'   => 'T',
  'maxlen'   => 50,
  'sort'     => true
);
$opts['fdd']['sDesc'] = array(
  'name'     => 'Desc. courte',
  'options'  => 'AVCPD',
  'select'   => 'T',
  'maxlen'   => 500,
  'textarea' => array(
    'rows' => 6,
    'cols' => 135),
  'tab'      => 'Description',
  'sort'     => true,
  'escape'   => false
);
$opts['fdd']['lDesc'] = array(
  'name'     => 'Desc. longue',
  'options'  => 'AVCPD',
  'select'   => 'T',
  'maxlen'   => -1,
  'textarea' => array(
    'html' => true,
    'rows' => 25,
    'cols' => 135),
  'sort'     => true,
  'escape'   => false
);

// Now important call to phpMyEdit
require_once './php/pme/extensions/phpMyEdit-mce-cal.class.php';
new phpMyEdit_mce_cal($opts);
?>
    </div>
  </div>


 
cbek     Založený: 25.10.2008   Príspevky: 27  
Príspevok Zaslal: 2008-10-31 17:11
Návrat hore  Odpovedať s citátom     

ajh Napísal:
It certainly does work, so there will be something strange about your configuration I think. Can you give me access to your page?

Did you test my page?
What did you think about?

Thanks,
Cyril.

 
ajh     Založený: 17.12.2003   Príspevky: 236  
Príspevok Zaslal: 2008-11-03 10:26
Návrat hore  Odpovedať s citátom     

Sorry - been away, haven't had a chance yet.

 
cbek     Založený: 25.10.2008   Príspevky: 27  
Príspevok Zaslal: 2008-11-07 18:18
Návrat hore  Odpovedať s citátom     

ajh Napísal:
Sorry - been away, haven't had a chance yet.


I am working for the French Téléthon and will need this asap now because the Téléthon 2008 will take place in less than one month...

Can you help me?

Many thanks by advance !!!

Cyril.

 
cbek     Založený: 25.10.2008   Príspevky: 27  
Príspevok Zaslal: 2008-11-07 18:23
Návrat hore  Odpovedať s citátom     

For you information, the following HTML output is strange for me :

Kód:

<textarea class="pme-input-1 mceFormat1 " name="PME_data_lDesc" rows="25" cols="135" wrap="virtual" mce_mceFormat1=true >


My concern is about the Class name, what do you think about?

Thanks,
Cyril.

 
guppy     Založený: 17.03.2009   Príspevky: 9  
Príspevok Zaslal: 2009-03-17 02:49
Návrat hore  Odpovedať s citátom     

Did you ever find a solution?
I can't make TinyMCE work "inside" phpMyEdit either. (whereas a test in independant file work ok and shows me that the path is ok.).
I have this ind the head section:
Kód:
<!-- tinyMCE -->
<script type="text/javascript" src="/tinymce_3_2_2/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
              editor_selector : "mceEditor",
               auto_reset_designmode : true

});
</script>
        <!-- /tinyMCE -->

I have added 'html' => true to the relevant fields.
When I look at the source from the browser (edit mode) it seems as if the editor should be showing:
Kód:
<textarea class="pme-input-0 mceEditor " name="PME_data_comments" rows="5" cols="50" wrap="virtual" mce_editable=true >


Any hints about how to make it work - can it have to do with the path (although it works "outside") as I see you have .js/ before the path.

 
cbek     Založený: 25.10.2008   Príspevky: 27  
Príspevok Zaslal: 2009-03-17 08:17
Návrat hore  Odpovedať s citátom     

guppy Napísal:
Did you ever find a solution?

Unfortunatly NO !!!
I will need to find another solution...

Cyril.

 
guppy     Založený: 17.03.2009   Príspevky: 9  
Príspevok Zaslal: 2009-03-17 09:41
Návrat hore  Odpovedať s citátom     

I try again, I added the following this morning but it doesn't show up in the posts:
I managed to make it work using this:
Kód:
tinyMCE.init({
              editor_selector : "mceEditor",
              mode : "textareas",
              theme : "advanced",
   theme_advanced_buttons1 : "table,bold,italic,underline,separator,strikethrough,justifyleft,justifycenter,justifyright, justifyfull,bullist,numlist,undo,redo,link,unlink"

Apparently things were already working but simply not showing any buttons. Seems also I can leave out the theme_advanced_buttons1 as theme : "advancd" does the job.

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov