xoops forums

Forum Index


Board index » All Posts (Pakaj)




Pakaj

Friend of XOOPS
Posted on: 2012/9/5 13:21
Pakaj
Pakaj (Show more)
Friend of XOOPS
Posts: 34
Since: 2004/5/5 6
#1

Re: adslight module

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.



Pakaj

Friend of XOOPS
Posted on: 2012/5/15 21:33
Pakaj
Pakaj (Show more)
Friend of XOOPS
Posts: 34
Since: 2004/5/5 6
#2

Re: sanitizing wysiwyg editor input output

solved


Pakaj

Friend of XOOPS
Posted on: 2012/5/15 21:32
Pakaj
Pakaj (Show more)
Friend of XOOPS
Posts: 34
Since: 2004/5/5 6
#3

Re: sanitizing wysiwyg editor input output

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.


Pakaj

Friend of XOOPS
Posted on: 2012/5/9 22:01
Pakaj
Pakaj (Show more)
Friend of XOOPS
Posts: 34
Since: 2004/5/5 6
#4

sanitizing wysiwyg editor input output

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="<a href=" title="http://localhost/xoops001/uploads/smilies/smil3dbd4d6422f04.gif" />http://localhost/xoops001/uploads/smi ... 4d6422f04.gif"" title="<a href="http://localhost/xoops001/uploads/smilies/smil3dbd4d6422f04.gif" rel="external" title="http://localhost/xoops001/uploads/smilies/smil3dbd4d6422f04.gif">http://localhost/xoops001/uploads/smi ... 4d6422f04.gif""</a> rel="external"><a href="http://localhost/xoops001/uploads/smi" rel="external" title="http://localhost/xoops001/uploads/smi">http://localhost/xoops001/uploads/smi ...  il3dbd4d6422f04.gif" title="Smile" /></p>

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.


Pakaj

Friend of XOOPS
Posted on: 2011/11/23 12:53
Pakaj
Pakaj (Show more)
Friend of XOOPS
Posts: 34
Since: 2004/5/5 6
#5

Re: TDMCreate v1.38 alpha 5

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";




Pakaj

Friend of XOOPS
Posted on: 2011/11/23 10:42
Pakaj
Pakaj (Show more)
Friend of XOOPS
Posts: 34
Since: 2004/5/5 6
#6

Re: Bug error in Smartsection 2.14 on Xoops 2.5.4

convert file into UTF-8.


Pakaj

Friend of XOOPS
Posted on: 2009/9/21 12:28
Pakaj
Pakaj (Show more)
Friend of XOOPS
Posts: 34
Since: 2004/5/5 6
#7

Re: Captcha

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?


Pakaj

Friend of XOOPS
Posted on: 2009/9/21 12:19
Pakaj
Pakaj (Show more)
Friend of XOOPS
Posts: 34
Since: 2004/5/5 6
#8

Re: Xoops Lib and Xoops Data

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


Pakaj

Friend of XOOPS
Posted on: 2009/9/21 9:56
Pakaj
Pakaj (Show more)
Friend of XOOPS
Posts: 34
Since: 2004/5/5 6
#9

Re: Captcha

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


Pakaj

Friend of XOOPS
Posted on: 2009/9/21 9:31
Pakaj
Pakaj (Show more)
Friend of XOOPS
Posts: 34
Since: 2004/5/5 6
#10

Re: Captcha

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 »