21
Derya
Re: 2.0.5 Install
  • 2003/10/9 9:50

  • Derya

  • Module Developer

  • Posts: 40

  • Since: 2003/5/12


My update works fine, too. But, there are so many Notices, now. They make it hard to find errors while module developing and theme designing.
So I fixed them for me.
Here are my changes:

class/smarty/plugins/resource.db.php:
line 17:
if ($GLOBALS['xoopsConfig']['default_theme'] != 'default') {

replace with:
if (isset($GLOBALS['xoopsConfig']['default_theme']) && $GLOBALS['xoopsConfig']['default_theme'] != 'default'){


line 71:
if ($GLOBALS['xoopsConfig']['default_theme'] != 'default') {

replace with:
if (isset($GLOBALS['xoopsConfig']['default_theme']) && $GLOBALS['xoopsConfig']['default_theme'] != 'default') {


line 96:
if ($file_path != "" && file_exists($filepath)) {

replace with:
if (isset($file_path) && $file_path != "" && file_exists($filepath)) {


class/smarty/Smarty.class.php:
line 626:
if(!@is_array($this->_tpl_vars[$tpl_var])) {

replace with:
if( !(array_key_exists($tpl_var$this->_tpl_vars)) || !@is_array($this->_tpl_vars[$tpl_var])) {



greetz
derya



22
Derya
Re: bug in xoopscodes.php
  • 2003/10/6 14:18

  • Derya

  • Module Developer

  • Posts: 40

  • Since: 2003/5/12


I have test it only with IE, but it should work with other browsers, too. Because these aren't changes in bb-code, only call of the missing js. For example, if inserting bb-code at the right cusor position works well on news-submitting with other browsers, then this changes will work with these browsers,too. The news-submitting and comments aren't effected by this changes, because they work with the xoopsform class and they have these calls. They're only missing in xoopscodes.php.

greetz
derya



23
Derya
Re: bug in xoopscodes.php
  • 2003/10/6 11:38

  • Derya

  • Module Developer

  • Posts: 40

  • Since: 2003/5/12


I have tested this with XOOPS 2.0.3 and 2.0.4 and it works. Are you sure that you have placed it right(all in one line)?
The changed parts are the js-calls in the textarea.
onselect="xoopsSavePosition('{$textarea_id}');" onclick="xoopsSavePosition('{$textarea_id}');" onkeyup="xoopsSavePosition('{$textarea_id}');"

Don't forget spaces between " and onclick/onkeyup.

greetz
derya



24
Derya
bug in xoopscodes.php
  • 2003/10/5 12:06

  • Derya

  • Module Developer

  • Posts: 40

  • Since: 2003/5/12


Hi,

If you insert bb-code and smilies on some textareas (Download submitting e.g.) they aren't inserted at the current cursorpostion.
This is a bug in include/xoopscodes.php on line 72 (missing some js calls).
Replace:
echo "<img src='".XOOPS_URL."/images/bold.gif' alt='bold' onmouseover='style.cursor="hand"' onclick='setVisible("".$hiddentext."");makeBold("".$hiddentext."");' />&nbsp;<img src='".XOOPS_URL."/images/italic.gif' alt='italic' onmouseover='style.cursor="hand"' onclick='setVisible("".$hiddentext."");makeItalic("".$hiddentext."");' />&nbsp;<img src='".XOOPS_URL."/images/underline.gif' alt='underline' onmouseover='style.cursor="hand"' onclick='setVisible("".$hiddentext."");makeUnderline("".$hiddentext."");'/>&nbsp;<img src='".XOOPS_URL."/images/linethrough.gif' alt='linethrough' onmouseover='style.cursor="hand"' onclick='setVisible("".$hiddentext."");makeLineThrough("".$hiddentext."");' /></a>&nbsp;<input type='text' id='".$textarea_id."Addtext' size='20' />&nbsp;<input type='button' onclick='xoopsCodeText("$textarea_id", "".$hiddentext."")' value='"._ADD."' /><br /><br /><textarea id='".$textarea_id."'  name='".$textarea_id."' cols='$cols' rows='$rows'>".$GLOBALS[$textarea_id]."</textarea><br />n";

(all in one line)

with:
echo "<img src='".XOOPS_URL."/images/bold.gif' alt='bold' onmouseover='style.cursor="hand"' onclick='setVisible("".$hiddentext."");makeBold("".$hiddentext."");' />&nbsp;<img src='".XOOPS_URL."/images/italic.gif' alt='italic' onmouseover='style.cursor="hand"' onclick='setVisible("".$hiddentext."");makeItalic("".$hiddentext."");' />&nbsp;<img src='".XOOPS_URL."/images/underline.gif' alt='underline' onmouseover='style.cursor="hand"' onclick='setVisible("".$hiddentext."");makeUnderline("".$hiddentext."");'/>&nbsp;<img src='".XOOPS_URL."/images/linethrough.gif' alt='linethrough' onmouseover='style.cursor="hand"' onclick='setVisible("".$hiddentext."");makeLineThrough("".$hiddentext."");' /></a>&nbsp;<input type='text' id='".$textarea_id."Addtext' size='20' />&nbsp;<input type='button' onclick='xoopsCodeText("$textarea_id", "".$hiddentext."")' value='"._ADD."' /><br /><br /><textarea id='".$textarea_id."' onselect="xoopsSavePosition('{$textarea_id}');" onclick="xoopsSavePosition('{$textarea_id}');" onkeyup="xoopsSavePosition('{$textarea_id}');" name='".$textarea_id."' cols='$cols' rows='$rows'>".$GLOBALS[$textarea_id]."</textarea><br />n";

(all in one line)

greetz
derya



25
Derya
Re: dictionary modules
  • 2003/9/15 21:31

  • Derya

  • Module Developer

  • Posts: 40

  • Since: 2003/5/12


If you want to have your own glossary module, than I have a quick &dirty integration of the great glossword script. you only need to make this changes:
Move glossword dir from zip into your XOOPS module dir.
Open "db_config.php" and make your database changes. Select "xoops_gw_" as table-prefix.
Install like glossword install guide.

open index.php in your glossword dir:
add "include "../../mainfile.php";" to line 490
and "include XOOPS_ROOT_PATH."/header.php";" to line 491
uncomment "$oHdr->add('Content-Type: text/html; charset='.$L->languagelist("2"));" maybe line 492
and add "include XOOPS_ROOT_PATH."/footer.php";" bevor ?>

Create a xoops_version.php like this
<?php
$modversion
['name'] = 'Glossword';
$modversion['version'] = 1.00;
$modversion['description'] = '';
$modversion['credits'] = "";
$modversion['author'] = "";
$modversion['help'] = "";
$modversion['license'] = "GPL see LICENSE";
$modversion['official'] = 1;
$modversion['image'] = "logo.gif";
$modversion['dirname'] = "glossword";

//Admin things
$modversion['hasAdmin'] = 0;
$modversion['adminmenu'] = "";

// Menu
$modversion['hasMain'] = 1;
?>

Now, you need to install it in your module admin.And it must work, now.

Glossword needs utf-8 encoding, that means you need to change the encoding of your language files. Open them with notepad.exe and save them in utf-8, change the XOOPS encoding in your languages global.php file and set mulitbyte encoding.

The difficult think is to change the encoding of your content. If your site doesn't use special charecters, maybe you don't have to change somethink. But if you use special characters, you need to change it...how? don't ask me...

Now, you can make changes to glossword templates to fit it into your site and if you want you can try to create some blocks

This is only a quick&dirty integration, this means the Admin section of glossword is standalone, it's not inluded in xoops. You and your glossary editors need an glossword accout to manage the glossaries.
But on userside it looks like every oother XOOPS module.

Here you can download glossword:
Sourceforge project page
Homepage is not everytime up...but the versions are newer than on the project page and you can finde here all language packs.




TopTop
« 1 2 (3)



Login

Who's Online

246 user(s) are online (156 user(s) are browsing Support Forums)


Members: 0


Guests: 246


more...

Donat-O-Meter

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

Latest GitHub Commits