41
goffy
Re: wgGallery 1.10 ready for testing
  • 2020/3/15 8:32

  • goffy

  • Just can't stay away

  • Posts: 554

  • Since: 2010/12/27


Hi Michael

I will have a look into it

@Pino: give me some time, then you get it :)

42
Lupin
Re: wgGallery 1.10 ready for testing
  • 2020/3/16 12:46

  • Lupin

  • Just popping in

  • Posts: 92

  • Since: 2007/6/1 2


Noprob ... in Italy now we have enough time ...
Anyway you are doing a great job with wggallery module

andalways viva XOOPS !

Pino

43
goffy
Re: wgGallery 1.10 ready for testing
  • 2020/3/25 21:40

  • goffy

  • Just can't stay away

  • Posts: 554

  • Since: 2010/12/27


Hi

is there somewhere a documentation how to implement this feature "get notification for each comment"

44
Mamba
Re: wgGallery 1.10 ready for testing
  • 2020/3/25 21:54

  • Mamba

  • Moderator

  • Posts: 11521

  • Since: 2004/4/23


I'm not sure about the documentation, but it seems like SmartFAQ had it implemented, as they point out in this Q&A
And if you look there - they have an option to subscribe to new comments, so check out the code in SmartFAQ

If you figure that out, please share your solution....
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

45
Mamba
Re: wgGallery 1.10 ready for testing
  • 2020/3/25 22:07

  • Mamba

  • Moderator

  • Posts: 11521

  • Since: 2004/4/23


I just checked - so the code itself is in the /include/notifications_functions.php around line 192:

le="color: #000000"><?php if ($module->getVar('hascomments')) { $com_config = $module->getInfo('comments'); if (!empty($category['item_name']) && $category['item_name'] == $com_config['itemName']) { if (!is_dir($dir = XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/mail_template/')) { $dir = XOOPS_ROOT_PATH . '/language/english/mail_template/'; } $mail_template_dir = $dir; include_once $GLOBALS['xoops']->path('include/comment_constants.php'); $config_handler = xoops_getHandler('config'); $com_config = $config_handler->getConfigsByCat(0, $module_id); if (!$enabled_only) { $insert_comment = true; $insert_submit = true; } else { $insert_comment = false; $insert_submit = false; switch ($com_config['com_rule']) { case XOOPS_COMMENT_APPROVENONE: // comments disabled, no comment events break; case XOOPS_COMMENT_APPROVEALL: // all comments are automatically approved, no 'submit' if (!$override_comment) { $insert_comment = true; } break; case XOOPS_COMMENT_APPROVEUSER: case XOOPS_COMMENT_APPROVEADMIN: // comments first submitted, require later approval if (!$override_comment) { $insert_comment = true; } if (!$override_commentsubmit) { $insert_submit = true; } break; } } if ($insert_comment) { $event = array( 'name' => 'comment', 'category' => $category['name'], 'title' => _NOT_COMMENT_NOTIFY, 'caption' => _NOT_COMMENT_NOTIFYCAP, 'description' => _NOT_COMMENT_NOTIFYDSC, 'mail_template_dir' => $mail_template_dir, 'mail_template' => 'comment_notify', 'mail_subject' => _NOT_COMMENT_NOTIFYSBJ); if (!$enabled_only || notificationEventEnabled($category, $event, $module)) { $event_array[] = $event; } } if ($insert_submit) { $event = array( 'name' => 'comment_submit', 'category' => $category['name'], 'title' => _NOT_COMMENTSUBMIT_NOTIFY, 'caption' => _NOT_COMMENTSUBMIT_NOTIFYCAP, 'description' => _NOT_COMMENTSUBMIT_NOTIFYDSC, 'mail_template_dir' => $mail_template_dir, 'mail_template' => 'commentsubmit_notify', 'mail_subject' => _NOT_COMMENTSUBMIT_NOTIFYSBJ, 'admin_only' => 1); if (!$enabled_only || notificationEventEnabled($category, $event, $module)) { $event_array[] = $event; } } } }
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

46
Mamba
Re: wgGallery 1.10 ready for testing
  • 2020/3/25 22:30

  • Mamba

  • Moderator

  • Posts: 11521

  • Since: 2004/4/23


In SmartFAQ in xoops_version.php you have this code:

le="color: #000000"><?php // Comments $modversion['hasComments'] = 1; $modversion['comments']['itemName'] = 'faqid'; $modversion['comments']['pageName'] = 'faq.php'; // Comment callback functions $modversion['comments']['callbackFile'] = 'include/comment_functions.php'; $modversion['comments']['callback']['approve'] = 'smartfaq_com_approve'; $modversion['comments']['callback']['update'] = 'smartfaq_com_update'; // Notification $modversion['hasNotification'] = 1; $modversion['notification']['lookup_file'] = 'include/notification.inc.php'; $modversion['notification']['lookup_func'] = 'smartfaq_notify_iteminfo'; $modversion['notification']['category'][] = [ 'name' => 'global_faq', 'title' => _MI_SF_GLOBAL_FAQ_NOTIFY, 'description' => _MI_SF_GLOBAL_FAQ_NOTIFY_DSC, 'subscribe_from' => ['index.php', 'category.php', 'faq.php'], ];


I think, that's the way to implement it....
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

47
goffy
Re: wgGallery 1.10 ready for testing
  • 2020/3/26 6:44

  • goffy

  • Just can't stay away

  • Posts: 554

  • Since: 2010/12/27


Hi Michael

thank you
I will check it

48
goffy
Re: wgGallery 1.10 ready for testing
  • 2020/3/27 20:50

  • goffy

  • Just can't stay away

  • Posts: 554

  • Since: 2010/12/27


Hi Pino

can you please test last version from github?

Dont forget to adapt .\wggallery\language\italian\mail_template\global_img_comment_notify.tpl

49
Mamba
Re: wgGallery 1.10 ready for testing
  • 2020/3/27 22:45

  • Mamba

  • Moderator

  • Posts: 11521

  • Since: 2004/4/23


The new comment notifications work! Nice job, Goffy!

Congratulations!
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

50
Lupin
Re: wgGallery 1.10 ready for testing
  • 2020/3/28 11:06

  • Lupin

  • Just popping in

  • Posts: 92

  • Since: 2007/6/1 2


Running to test it

Login

Donat-O-Meter

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

Latest GitHub Commits