293901
Boobtoob
Please read before using these hacks !!
  • 2002/7/16 21:09

  • Boobtoob

  • Friend of XOOPS

  • Posts: 202

  • Since: 2001/12/22


Please feel free to share you hacks with the rest of the XOOPS community. Please be advised that if you use these hacks that it could break forward comapatibility with future XOOPS versions. We only recommend using hacks from this forum if your an experienced PHP/XOOPS hacker.

Please give a good explination of the hack so that everyone can understand what the hack is for/about.

Thanks,
XOOPS Team



293902
danyblue
Re: HTML problem in XOOPS and Other CMS?
  • 2002/7/16 12:47

  • danyblue

  • Just popping in

  • Posts: 48

  • Since: 2002/4/15


Hi jackt,

you are module is working fine, i have been able to post my content the way i wanted.
Does your module support [pagebreak]?

Regards,
Danyblue



293903
jackt
Re: HTML problem in XOOPS and Other CMS?
  • 2002/7/16 10:48

  • jackt

  • Just popping in

  • Posts: 31

  • Since: 2002/6/2 2


Well.. this line..

$text =preg_replace("/(\015\012)|(\015)|(\012)/","
", $text);

on display, text sanitizer will not replace all line breaks with
tags. So if you say post a news article it wont output any line breaks submit.

The line you added removes all
tags. So there will never be any line breaks in anything you post. At least none will be output. Basically text sanitizer converts line breaks into
and then your line deletes that
and all others. By default
isn't in the "allowed html" anyways, but I added it to my XOOPS config.

I'm not sure what you are trying to do. I'll assume you're posting html into the textarea and it's coming out with a lot of
tags ruining your formatting. Well what you did will prevent ANY line breaks from being displayed that goes thru text sanitizer, which accounts for just about (if not) all XOOPS modules that come packaged with xoops.

I've hacked up Haruki's wfsection module to include a switch to Enable Line Break Filtering on display. So when you check it, the script will filter out any line breaks in your code before it runs thru text sanitizer. This may solve your line break problem, but text sanitizer will still check for "allowed html". So if you're using any weird tags it still might cause you problems.. I'll add a checkbox to disable html, smilies and forum codes a little later. You can try this hacked up wfsections module here:

http://www.dailabs.com/wfsection_hack-612.zip

I'd suggest you try it out before using it in production environment.. I'll take no responsibility if anything blows up tho it shouldn't.



293904
danyblue
Re: HTML problem in XOOPS and Other CMS?
  • 2002/7/16 9:27

  • danyblue

  • Just popping in

  • Posts: 48

  • Since: 2002/4/15


Hi,
I have found the function textsanitizer, which for me a non programmer was quite difficult.
I have been trying, from the explainations above, where could the problem be, in order to see if I could do something.
I have found the function where the problem might be,
function oopsNl2Br($text) {

$text =preg_replace("/(\015\012)|(\015)|(\012)/","
", $text);

And i have tried several things that i have search on the net.
the first one was

$text = str_replace("
", "","$text");
Which i think is replacing every
by a space character, which would be the same thing than having nothing.
SO i commented the function also to see what happen, and it's work.
SO i would like to know what would be the implication of leting it that way, since it is working for me, will I be seing problems in other places?

Regards,
Danyblue



293905
Anonymous
Re: Polls allowing mulitple selections does not work!
  • 2002/7/15 21:17

  • Anonymous

  • Posts: 0

  • Since:


Cool
been in bed all day..sick as a dog...

btw all those intval() you use, if those are just to define the type the value are, then you can use typecasting todo that too:

(int)$val
(bool)$val
etc..



293906
onokazu
Re: Polls allowing mulitple selections does not work!
  • 2002/7/15 19:09

  • onokazu

  • XOOPS Founder

  • Posts: 617

  • Since: 2001/12/13


Fixed now.

modules/xoopspoll/index.php

line 80
$voted_polls = (!empty($HTTP_COOKIE_VARS['voted_polls'])) ? $HTTP_COOKIE_VARS['voted_polls'] : array();

line 90
$poll->vote($HTTP_POST_VARS['option_id'], $REMOTE_ADDR, $xoopsUser->getVar("uid"));

line 100
$poll->vote($HTTP_POST_VARS['option_id'], $REMOTE_ADDR, $xoopsUser->getVar("uid"));




293907
Pitiless
Re: Polls allowing mulitple selections does not work!
  • 2002/7/15 18:10

  • Pitiless

  • Just popping in

  • Posts: 14

  • Since: 2002/5/16


It was happened after the update to 3.0.3

All another files are OK, only index.php occures this problems (my experiences)

Leave the updated files from fix 3.0.3 but take the index.php from fix 3.0.1

it means index.php in xoopspoll



293908
danyblue
Re: HTML problem in XOOPS and Other CMS?
  • 2002/7/15 14:42

  • danyblue

  • Just popping in

  • Posts: 48

  • Since: 2002/4/15


Hi,
thank you for the suggestion, but it doesn't work.
The problem that i am having is just focused on the first lines. It is why i Would like to investigate a little bit the code.
I tried to search for textsanitizer, but the amount of references are so huge that i have problems finding it. Can any one point met to the correct function/module, where i could take a look?

Regards,
Danyblue



293909
Neon
Re: Polls allowing mulitple selections does not work!
  • 2002/7/15 11:53

  • Neon

  • Not too shy to talk

  • Posts: 138

  • Since: 2002/2/8 6


Just tried the Polls on this site too and found they don't seem to be working either!!



293910
Anonymous
Re: Polls allowing mulitple selections does not work!
  • 2002/7/15 10:01

  • Anonymous

  • Posts: 0

  • Since:


Tnx :o) Had probs myself but thought it was my ip or a cookie that was logged(since i posted it). For now i told the others, and will give it a look later on if noboby else does so before.

Tnx







Login

Who's Online

456 user(s) are online (327 user(s) are browsing Support Forums)


Members: 0


Guests: 456


more...

Donat-O-Meter

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

Latest GitHub Commits