1
goffy
Xoops Comment system
  • 2019/11/13 21:01

  • goffy

  • Just can't stay away

  • Posts: 543

  • Since: 2010/12/27


Hi to all

I have a problem in my wggallery:
If I use xoops comment system then I can add for each image a comment. I have to click on "show image" to get ot single image, then I click on "Add comment". Modal with form for submitting comment appears. After clicking on submit xoops redirect to the image index site (list with all image of current album), but it should go back to single image.

how can I control where it will be redirected after submitting comment?

2
Lupin
Re: Xoops Comment system
  • 2019/11/27 9:58

  • Lupin

  • Just popping in

  • Posts: 92

  • Since: 2007/6/1 2


Confirmed , I have the same prob ... very strange : problem appears ONLY at firs cooment added ... then the redirect bring correctly at the image page ...

Pino

3
goffy
Re: Xoops Comment system
  • 2019/11/27 21:01

  • goffy

  • Just can't stay away

  • Posts: 543

  • Since: 2010/12/27


hi

by debugging the xoops core code step by step I found the solution:
it is necessary to adapt xoops_version.php
$modversion['hasComments']             = 1;
$modversion['comments']['pageName']    = 'images.php';
$modversion['comments']['itemName']    = 'img_id';
$modversion['comments']['extraParams'] = ['op''alb_id''start''limit''img_submitter'];


the interesting line is
$modversion['comments']['extraParams'] = ['op''alb_id''start''limit''img_submitter'];


here you have to repeat all parameters, which should be used for redirect after posting the comment.

Important: this parameters must be in the $_POST of the site, where the comments are called from.
example:
I call my site by:
http://localhost/wggallery/htdocs/modules/wggallery/images.php?op=show&redir=list&img_id=22&alb_id=1&start=0&limit=10&img_submitter=0

I post a comment. now comment system takes 'op', 'alb_id', 'start', 'limit', 'img_submitter' from the $_POST and create the redirect url based on these parameters
after succesful posting of the comment you will be redirected to site from "$modversion['comments']['pageName'] = 'images.php';" by using the param from "$modversion['comments']['extraParams']"

Login

Who's Online

363 user(s) are online (231 user(s) are browsing Support Forums)


Members: 0


Guests: 363


more...

Donat-O-Meter

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

Latest GitHub Commits