Welcome, Guest. Please Login or Register.
May 03, 2024, 08:01:30 AM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  English User Help  |  English Help  |  Notification of New Threads « previous next »
Pages: 1 [2] Reply Ignore Print
Author Topic: Notification of New Threads  (Read 8796 times)
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Notification of New Threads
« Reply #15 on: March 21, 2003, 01:07:31 AM »
Reply with quote

Quote from: mediman on March 21, 2003, 12:48:27 AM
I checked the mod! It works absolutly great!

The only 2 things i found:

1. In the funktion notifyBoards()

you have
$condition = ($settings[7] == 'Administrator' || $settings[7] == 'Global Moderator' ? '1' : "(FIND_IN_SET('$settings[7]', c.memberGroups) != 0 || c.memberGroups='')");   
   $result_boards = @mysql_query ('
      SELECT DISTINCT c.ID_CAT, b.ID_BOARD
      FROM yabbse_categories AS c
         LEFT JOIN yabbse_boards AS b ON (b.ID_CAT=c.ID_CAT)
      WHERE '.$condition);


to replace with

$condition = ($settings[7] == 'Administrator' || $settings[7] == 'Global Moderator' ? '1' : "(FIND_IN_SET('$settings[7]', c.memberGroups) != 0 || c.memberGroups='')");   
   $result_boards = @mysql_query ('
      SELECT DISTINCT c.ID_CAT, b.ID_BOARD
      FROM {$db_prefix}categories AS c
         LEFT JOIN {$db_prefix}boards AS b ON (b.ID_CAT=c.ID_CAT)
      WHERE '.$condition);


and in the file nt_db_mod.php  you have to hardcode your prefix or you change the tablename after you used this file in phpmyadmin...

mediman


Not completely correct...

Why does no one notice that SINGLE QUOTES don't parse variables?  Take a second look...

It should be:
$condition = ($settings[7] == 'Administrator' || $settings[7] == 'Global Moderator' ? '1' : "(FIND_IN_SET('$settings[7]', c.memberGroups) != 0 || c.memberGroups='')");  
  $result_boards = @mysql_query ('
     SELECT DISTINCT c.ID_CAT, b.ID_BOARD
     FROM ' . $db_prefix . 'categories AS c
        LEFT JOIN {$db_prefix}boards AS b ON (b.ID_CAT=c.ID_CAT)
     WHERE '.$condition);


Just like Spaceman-Spiff said.  NOTICE THE SINGLE QUOTES!

-[Unknown]
Logged
mediman
Support Team
YaBB God
*****
Posts: 2858


WWW
Re:Notification of New Threads
« Reply #16 on: March 21, 2003, 01:17:42 AM »
Reply with quote

Correct [unknown]!

My bad  :-[

but better is

$condition = ($settings[7] == 'Administrator' || $settings[7] == 'Global Moderator' ? '1' : "(FIND_IN_SET('$settings[7]', c.memberGroups) != 0 || c.memberGroups='')");  
 $result_boards = @mysql_query ('
     SELECT DISTINCT c.ID_CAT, b.ID_BOARD
     FROM ' . $db_prefix . 'categories AS c
       LEFT JOIN ' . $db_prefix . 'boards AS b ON (b.ID_CAT=c.ID_CAT)
     WHERE '.$condition);


@david sorry i didn´t saw your post... you said exactly what i postet!

mediman
« Last Edit: March 21, 2003, 01:45:55 AM by mediman » Logged

mainComm Dev Team
Pages: 1 [2] Reply Ignore Print 
YaBB SE Community  |  English User Help  |  English Help  |  Notification of New Threads « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.038 seconds with 20 queries.