Customizing SMF > Tips and Tricks

Admin notepad

<< < (4/4)

[Unknown]:
Yep, that looks fine.  And, for the package-info.xml, etc... all I should note is two things:

1. The id should have your name in it (e.g. ryanb:adminpad)...
2. The id should not have a version number in it, except maybe major.

-[Unknown]

ryanbsoftware:
yah i got that much, i tried the add_settings.php file out and got this error


--- Quote ---Warning: Missing argument 2 for db_query() in /home/chf/public_html/forums/Sources/Subs.php on line 216

Warning: Missing argument 3 for db_query() in /home/chf/public_html/forums/Sources/Subs.php on line 216
--- End quote ---

line 216 of subs.php reads


--- Code: ---function db_query($db_string, $file, $line)
--- End code ---

[Unknown]:
Sorry, that's an older version I think.  Just add:

, __FILE__, __LINE__

To the lines that look like this:


--- Code: --- $result = db_query("
" . ($overwrite_old_settings ? 'REPLACE' : 'INSERT IGNORE') . " INTO {$db_prefix}settings
(variable, value)
VALUES" . substr($string, 0, -1));
--- End code ---

Like so:


--- Code: --- $result = db_query("
" . ($overwrite_old_settings ? 'REPLACE' : 'INSERT IGNORE') . " INTO {$db_prefix}settings
(variable, value)
VALUES" . substr($string, 0, -1), __FILE__, __LINE__);
--- End code ---

-[Unknown]

ryanbsoftware:
ok thanks i tested it and it worked, thanks for all your help

as for this being moved this is NOT a tip or trick its a mod, i was going to delete it cause i am not quite ready to release it but now the code is here, so if you were going to do this, why did i spend an hour or two packaging it up?

Navigation

[0] Message Index

[*] Previous page

Go to full version