Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
jojobarjo32 wrote:
IMO, the sql_escape method should be call only IN sql queries.
Thanks, that's the right advice. That way, in every single sql, you can check to see if there is any variable that is a string inputted from outside and if there is you can make sure that you use either sql_build_array or sql_escape.
There is a "new" user variable in phpBB3 : username_clean. If you simply want to display an username, then use $user->data['username']. But if you want to check if a given username exists, you must do as this :
Maybe this is already said (I've not read all posts ), but it is important ! When you use request_var, you must think about the content you want in the variable (I mainly talk about strings here, for integers or whatever else, there is no such a problem). If the string doesn't need to contain UTF8 data, so simply use request_var('foo', ''). If you don't specify the third argument, all non-ASCII characters from the string will be removed. Else, if this is a text which must contain unicode characters (topic subject, post message, username, password...), then set the third argument to true. This will simply ALLOW unicode chars (and check if they're well-formed) but not check if this is a "valid" utf8 string (I don't know very much about utf8 so I can't tell more ). If this is a string which doesn't need to be displayed (like passwords) or who are validated by other means (like usernames), this is all you have to worry about. Else, use the utf8_normalize_nfc function on the string (this is the only time you have to use this function as far as I know).
In any cases, read attentively the coding guidelines and ALL the code documentation (directly from the code or here) before modifying anything
So, how do I add a custom localized image now, when imegeset localization nave been changed?
I upload an image to imageset/en, add image info to phpbb_styles_imageset_data table and imageset/en/imageset.cfg, add appropriate styles to button.css and colours.css and variables to language files, then refresh the imageset. Then I try to put an image to template like this
Do the images show up in the imageset in the ACP? If my memory is correct and do not shoot me if I am wrong you also need to edit the following .. includes/acp/acp_styles.php, language/en/acp/styles.php
Use a tool like web developer bar to make sure the CSS values for height & width and source are getting correctly passed to the CSS side.