1
novlang1984
Extgallery 1.09 : how to use html for album description ?

I would like to use CKEditor to describe albums made with extgallery 1.09.

To do that, I have to do a little hack (class/xoopsform/formdhtmltextarea.php)
//var $htmlEditor = array();
    
var $htmlEditor = array( 'XoopsFormCkeditor''/class/xoopseditor/ckeditor/ckeditor.php' );


Now I can see CKEditor in administration part but... on front side, html tags are displayed :'(

my album description



I try to find a way to transform textarea code. I believe this is the good line (modules/extgallery/admin/public-category.php)
$form->addElement(new XoopsFormDhtmlTextArea(_AM_EXTGALLERY_DESC'cat_desc'$cat->getVar('cat_desc','e')), false);


Is there an easy way to solve my issue ?
Thanks in advance :)

2
novlang1984
Re: Extgallery 1.09 : how to use html for album description ?

ok, I've get something ;)

Two files to modify :

1. modules/extgallery/admin/public-category.php

After
Quote:
include '../../../class/xoopsformloader.php';
include 'function.php';

Paste :
include XOOPS_ROOT_PATH.'/modules/extgallery/include/functions.php';


After
Quote:
$form->addElement(new XoopsFormText(_AM_EXTGALLERY_WEIGHT, 'cat_weight', '4', '4', $cat->getVar('cat_weight')),false);

Paste :
$editor gal_getWysiwygForm(_AM_EXTGALLERY_DESC,'cat_desc'$cat->getVar('cat_desc','e'), '100%''400px''cat_desc_hidden');
if(
$editor) {
    
$form->addElement($editorfalse);
}


After (again)
Quote:
$form->addElement(new XoopsFormText(_AM_EXTGALLERY_WEIGHT, 'cat_weight', '4', '4', $cat->getVar('cat_weight')),false);

Paste :
$editor gal_getWysiwygForm(_AM_EXTGALLERY_DESC,'cat_desc'''1560'cat_desc_hidden');
if(
$editor) {
    
$form->addElement($editorfalse);
}



2. modules/extgallery/class/catHandler.php

After
Quote:
$this->externalKey['photo_id'] = array('className'=>'publicphoto', 'getMethodeName'=>'getPhoto', 'keyName'=>'photo', 'core'=>false);

Paste :
$this->initVar('dohtml'XOBJ_DTYPE_INT1false);

3
novlang1984
Re: Extgallery 1.09 : how to use html for album description ?

grrrrr... so CKEditor & Html ouput work fine, but I can not create albums anymore

Nothing new stored in database anymore !

Any clue ?


[edit]
After uninstall / install, blank page when I try to create an album with debug warning
Quote:
Missing argument 7 for gal_getWysiwygForm(), called in /modules/extgallery/admin/public-category.php on line 223 and defined dans le fichier /modules/extgallery/include/functions.php - line 47

4
novlang1984
Re: Extgallery 1.09 : how to use html for album description ?

A bit more simple : just the second hack (2. modules/extgallery/class/catHandler.php) is request

So :
- first : create albums
- then add $this->initVar("dohtml", XOBJ_DTYPE_INT, 1, false);

And if you want to upadte albums
- comment //$this->initVar("dohtml", XOBJ_DTYPE_INT, 1, false);
- modify albums
- uncomment

Not easy


----

Sorry for unusefull posts


(how to loose 2 hours when you are full of job...))))

5
voltan
Re: Extgallery 1.09 : how to use html for album description ?
  • 2011/3/22 6:31

  • voltan

  • Theme Designer

  • Posts: 724

  • Since: 2006/12/5


Thank you for your codes . In version 1.09 we just add support html codes for photos . in next version we can use your codes and support html codes in albums

thanks

6
novlang1984
Re: Extgallery 1.09 : how to use html for album description ?

There is also a textarea to modify (called extra field if I well remember)...

Thanks to you, that's a great news

7
novlang1984
Re: Extgallery 1.09 : how to use html for album description ?

Sorry to bump it... but I'm still looking for a little fix.

The issue :
- I can use rich editors (CKEditor, TinyMCE, ...) to describe albums
- but on the front side html tags are displayed
- if I add $this->initVar("dohtml", XOBJ_DTYPE_INT, 1, false); into catHandler.php html format is well displayed but I can't edit my descriptions anymore

... I'm lost, I don't know where to looking for :(

8
novlang1984
Re: Extgallery 1.09 : how to use html for album description ?

I promise, last attempt

Why if I add $this->initVar("dohtml", XOBJ_DTYPE_INT, 1, false); into catHandler.php I can not edit album descriptions anymore ?

Thanks

Login

Who's Online

328 user(s) are online (189 user(s) are browsing Support Forums)


Members: 0


Guests: 328


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits