Customizing SMF > Now Available

[TIP/TRICK] Redirect To Announcement On Login

<< < (3/4) > >>

John12339:
Will it from on SMF 2.0 RC3?

Kcmartz:

--- Quote from: John12339 on July 30, 2010, 06:38:49 AM ---Will it from on SMF 2.0 RC3?

--- End quote ---

DoctorMalboro:
Try changing this:


--- Code: --- // The board to look for.
$board = 1453;

// Get the last topic.
$request = db_query("
SELECT ID_TOPIC
FROM {$db_prefix}topics
WHERE ID_BOARD = $board
ORDER BY ID_TOPIC DESC
LIMIT 1", __FILE__, __LINE__);
list ($topic) = mysql_fetch_row($request);
mysql_free_result($request);
--- End code ---

with this:

--- Code: --- // The board to look for.
$board = 1453;

global $modSettings;

// Get the last topic
       $sql = $smcFunc['db_query']('', '
SELECT ID_TOPIC
                            FROM {$db_prefix}topics
                            WHERE ID_BOARD = $board
                            ORDER BY ID_TOPIC DESC
                            LIMIT 1",__FILE__, __LINE__);
                     $topic = $smcFunc['db_fetch_assoc']($sql);
         $smcFunc['db_free_result']($sql);
);
--- End code ---

and tomorrow morning i'll check the other one if i can...

MsAdvantageous:
can't wait for this to work on 2.0 RC3 and 4 :)

CrocWeb:
Nice, thank you.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version