1
Pakaj
Re: adslight module
  • 2012/9/5 13:21

  • Pakaj

  • Friend of XOOPS

  • Posts: 34

  • Since: 2004/5/5 6


What you did, changes only how records are written in database. This is only affected to database, when you install the module. But I think, with this solution you might get some errors when module would try to save the record into database, because author had some different idea at module creation.

But you would probably like to change the outcome in screen. Therefore you have to search in templates of that module.You have to change only the output to the screen. There you can make changes which will satisfy your needs and will not mix with code.




2
Pakaj
Re: sanitizing wysiwyg editor input output
  • 2012/5/15 21:33

  • Pakaj

  • Friend of XOOPS

  • Posts: 34

  • Since: 2004/5/5 6


solved



3
Pakaj
Re: sanitizing wysiwyg editor input output
  • 2012/5/15 21:32

  • Pakaj

  • Friend of XOOPS

  • Posts: 34

  • Since: 2004/5/5 6


Thank you, thank you,.......,thank you very much. It worked! Man, am I happy.

It worked even without function toArray, so thats mean that

$this->initVar("opis"XOBJ_DTYPE_OTHER);


did that trick. Before that I tried all possible combination with class myts, but with no success.

Thank again for your time and detailed description of solution. It helped me a lot and I have learned something.



4
Pakaj
sanitizing wysiwyg editor input output
  • 2012/5/9 22:01

  • Pakaj

  • Friend of XOOPS

  • Posts: 34

  • Since: 2004/5/5 6


So I'm playing with a developing of a module. One of the data field is also "description", which I would like to be entered as wysiwyg editor.

in mysql I defined the field desciption as
....
desc text NOT NULL
....


then in myclass.php i defined
function __construct() 

... 
$this->initVar("desc"XOBJ_DTYPE_TXTAREA);
 ... 
}


Then in my admin project_admin.php when I am building admin form
I have declared field "desc" as:
$editor_configs=array(); 
$editor_configs["name"] ="desc"
$editor_configs["value"] = $myts->makeTboxData4Edit($objArray['desc']); $editor_configs["rows"] = 20;
 
$editor_configs["cols"] = 100
$editor_configs["width"] = "100%"
$editor_configs["height"] = "400px"
$editor_configs["editor"] = xoops_getModuleOption('general_editor''system'); 
$form->addElement(new XoopsFormEditor(_AM_MYMODULE_PROJECT_DESC"desc"$editor_configs), false);

The filed is propely displayed.

My BIG problem is, that if I entered smiley or image into text and then save the "desciption" field into DB and reedit that record, Iam getting images and smiley in bad HTML format.

For example: IF i enter in desc filed only (HTMLsource)
<p>this is smiley&nbsp;<img alt="Smile" border="0" src="http://localhost/xoops001/uploads/smilies/smil3dbd4d6422f04.gif" title="Smile" />p>


after saving the record and rediting it I have got (HTML SOURCE)
<p>this is smiley&nbsp;<img alt="Smile" border="0" src="title="http://localhost/xoops001/uploads/smilies/smil3dbd4d6422f04.gif" />http://localhost/xoops001/uploads/smi ... 4d6422f04.gif"" title="http://localhost/xoops001/uploads/smi ... 4d6422f04.gif"" rel="external">http://localhost/xoops001/uploads/smi ... il3dbd4d6422f04.gif" title="Smile" />


I know it got something to do with myts class and sanytizing, but I couldn't figure it out, how to properly use it.

So here are my questions :
1. what function of class myts should I Use in my edit/add function
$obj $this_handler->get($id);
 
$obj->setVars($_POST); 
$obj->setVar('desc'$myts->addSlashes$obj->getVar('desc')));
$this_handler->insert($obj)


2. what function of class myts should I Use when I building a admin form
$editor_configs["value"] = $myts->makeTboxData4Edit($objArray['desc']);


3.what function of class myts should I Use when I send to template?

I hope, Its not too hard to answer. It would make me very happy to get a solution, because this is occupying me for last 3 days.

I will post a solution how to upload multi files at once (tomorow), if anyone is interested.



5
Pakaj
Re: TDMCreate v1.38 alpha 5
  • 2011/11/23 12:53

  • Pakaj

  • Friend of XOOPS

  • Posts: 34

  • Since: 2004/5/5 6


maybe I have found a bug

After generating a modul and installation in the admin area. When I tried to add new entry

Quote:
Warning: include_once(include/mimetypes.inc.php) [function.include-once]: failed to open stream: No such file or directory in file /modules/abUpravljanje/xoops_version.php
line 179
Warning: include_once() [function.include]: Failed opening 'include/mimetypes.inc.php' for inclusion (include_path='.;C:/php/pear') in file /modules/abUpravljanje/xoops_version.php line 179
Warning: include_once(include/mimetypes.inc.php) [function.include-once]: failed to open stream: No such file or directory in file /modules/abUpravljanje/xoops_version.php line 179
Warning: include_once() [function.include]: Failed opening 'include/mimetypes.inc.php' for inclusion (include_path='.;C:/php/pear') in file /modules/abUpravljanje/xoops_version.php line 179


where in line 179 in xoops_version file stands
Quote:
$modversion["config"][$i]["options"] = include_once XOOPS_ROOT_PATH."include/mimetypes.inc.php";


One of the field is for uploading a file.
Quote:

//Uploads : mimetypes tbpriloge_datoteka
$modversion["config"][$i]["name"] = "tbpriloge_datoteka_mimetypes";
$modversion["config"][$i]["title"] = "_MI_ABUPRAVLJANJE_MIMETYPES"; $modversion["config"][$i]["description"] = "";
$modversion["config"][$i]["formtype"] = "select_multi";
$modversion["config"][$i]["valuetype"] = "array";
$modversion["config"][$i]["default"] = array("image/gif", "image/jpeg", "image/png");
$modversion["config"][$i]["options"] = include_once XOOPS_ROOT_PATH."include/mimetypes.inc.php";





6
Pakaj
Re: Bug error in Smartsection 2.14 on Xoops 2.5.4
  • 2011/11/23 10:42

  • Pakaj

  • Friend of XOOPS

  • Posts: 34

  • Since: 2004/5/5 6


convert file into UTF-8.



7
Pakaj
Re: Captcha
  • 2009/9/21 12:28

  • Pakaj

  • Friend of XOOPS

  • Posts: 34

  • Since: 2004/5/5 6


Sorry for small image ( wrong url)
Resized Image


Quote:
Was the generated html code (view source in the browser) the same for the captcha form elements in both languages?

Yes.

Quote:
Was the image present in the uploads directory?

No. ( only for English mode)

Where are these *en.* files? in html/language directory?



8
Pakaj
Re: Xoops Lib and Xoops Data
  • 2009/9/21 12:19

  • Pakaj

  • Friend of XOOPS

  • Posts: 34

  • Since: 2004/5/5 6


You should put all(xoops_data and xoops_lib) in
C:/AppServ/www/myTrusted/ map(for example)

I even recommend you, that if you are planing to have more installation of XOOPS on your local server to organinize files like
C:/AppServ/www/xoops01/html ( for all system files)
C:/AppServ/www/xoops01/mytrusted ( here put xoops_data and xoops_lib, then protector module...)

C:/AppServ/www/xoop02/html ( for all system files)
C:/AppServ/www/xoop02/mytrusted ( here put xoops_data and xoops_lib, then protector module...)

.
.
etc

Hope it helps



9
Pakaj
Re: Captcha
  • 2009/9/21 9:56

  • Pakaj

  • Friend of XOOPS

  • Posts: 34

  • Since: 2004/5/5 6


For better impression how it looks like, here is the picture.

Resized Image


* _ Required is still in ENGLISH?? I couldn't find it in User profile module or in captha.php



10
Pakaj
Re: Captcha
  • 2009/9/21 9:31

  • Pakaj

  • Friend of XOOPS

  • Posts: 34

  • Since: 2004/5/5 6


I added captcha in Framework to see if that could solve the problem, but was not the case. capcha.php (local lang file) was OK (because it showes all necessary text around capcha "picture". As I sad before, when in English mode capcha is shown, otherwise not.

on my local Wamp server I tried new 2.4 version with same local language files and it was same outcome(no capcha picture - with user profile module installed).

I was playing with Firebug(FF addon) and have discovered that output code in both (English and Slovenian) was same, only output text was different (EN,SI). In EN mode the picture is for captcha is created, but in SI mode the picture for captcha is not created, because is was size 0x0 (width x height).




TopTop
(1) 2 »



Login

Who's Online

184 user(s) are online (117 user(s) are browsing Support Forums)


Members: 0


Guests: 184


more...

Donat-O-Meter

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

Latest GitHub Commits