11
hyperpod
Re: HTTP GET request (i think thats what it is...)
  • 2005/8/11 8:29

  • hyperpod

  • Quite a regular

  • Posts: 359

  • Since: 2004/10/4


Quote:

...i want comments for the downloads and articles etc, so i guess i would have to add some condition so that it allows comments on any module and request, but if param requests come, to only allow comments if it has numbers after the -

am i making sense?

would u have any idea how i could start? (php is dutch to me!)


completely... the whole value of the XOOPS comments system is that its already used for news, articles, downloads and many other modules.. and its best to keep comments in one unified system rather than having each module have its own comments in several different places.

What you mentioned would be the thing to do... it needs to support regular numeric IDs lke it already does, so that it works with all other modules, but then, as you mentioned, detect if the com_itemid is called 'param' and if so, require it to contain a - or set it to 0.

would be something like: (after previous mentioned hack)

if ($com_itemName == "param" && !preg_match("/\-/",$com_itemid)) $com_itemid = 0;

something like that...
Daniel Hall / XOOPS Module Development & Theme Design
Free XOOPS Support > My Wish List

12
coops
Re: HTTP GET request (i think thats what it is...)
  • 2005/8/11 8:56

  • coops

  • Just popping in

  • Posts: 82

  • Since: 2005/6/15


so all i have to do is add your hack, and then add that line? or is there more?

sorry im starting to get confused already!

13
hyperpod
Re: HTTP GET request (i think thats what it is...)
  • 2005/8/11 9:21

  • hyperpod

  • Quite a regular

  • Posts: 359

  • Since: 2004/10/4


almost... the only thing that might halt you is I mentioned there needs to be some sanitizing on the GET and POST of $com_itemid, for security.

I only mentioned this in words, the code is up to you... It was already being secured in XOOPS using intval, but you would have to take off the intval()s to get the - to work.


For your specific purpose, its suggested that you only allow numbers and -



honestly, If I were you, I wouldnt try this hack without backing up the site files.

Its not exactly straight forward... you really need to be a programmer. I dont reccommend it unless you are brave.


The main point is that it IS possible.


take it easy,
Daniel Hall / XOOPS Module Development & Theme Design
Free XOOPS Support > My Wish List

14
coops
Re: HTTP GET request (i think thats what it is...)
  • 2005/8/11 9:31

  • coops

  • Just popping in

  • Posts: 82

  • Since: 2005/6/15


yeah its just a test site so im not fussed at all, i might give it a shot... if i do, i'll post the results in this thread, but seeing as i know no php i dunno if im going to have much luck

thanks for ur help!

Login

Who's Online

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


Members: 0


Guests: 268


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