Welcome, Guest. Please Login or Register.
November 22, 2017, 02:23:31 AM
Home Help Search Login Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

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



WWW
Re:Notification of New Threads
« Reply #15 on: March 20, 2003, 08:07:31 PM »
Reply with quote

I checked the mod! It works absolutly great!

The only 2 things i found:

1. In the funktion notifyBoards()

you have
Code: [Select]
$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

Code: [Select]
$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:
Code: [Select]
$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 20, 2003, 08:17:42 PM »
Reply with quote

Correct [unknown]!

My bad  :-[

but better is

Code: [Select]
$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 20, 2003, 08:45:55 PM by mediman » Logged

mainComm Dev Team
Pages: 1 [2] Reply Ignore Print 
YaBB SE Community  |  English User Help  |  English Help  |  Topic: 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.0.12 | SMF © 2016, Simple Machines
Valid XHTML 1.0! Valid CSS!
Page created in 0.08 seconds with 19 queries.