File_Exists()
< Functions should always be written lowercasePHP/Html Mix in One File
< Should have phpbb3 PHP/Template-Syntax** (*.php > *.html)$_GET
< Should be request_var()
(if possible)mysql_select_db
< Use always phpBB3 dbal
(if possible), Yes... true... I have the bad habit to use the uppercase for functions too... ... but now I fixed the code.4_seven wrote:File_Exists() < Functions should always be written lowercase
These 3 comments are related to the file sposta_allegati_nelle_subdir.php that I wrote outside of PHPBB3 because I know nothing of PHPBB3 core. I don't know to write an embedded file from scratch, so this was the shortest and easiest way for me.4_seven wrote:PHP/Html Mix in One File < Should have phpbb3 PHP/Template-Syntax** (*.php > *.html)
$_GET < Should be request_var() (if possible)
mysql_select_db < Use always phpBB3 dbal (if possible),
** so there is also no need, to add db_name, db_password etc to your main php
$_GET
or $_SERVER
* (if possible anyway).function current_page_url()
Code: Select all
/**
* Generate board url (example: http://www.example.com/phpBB)
* @param bool $without_script_path if set to true the script path gets not appended (example: http://www.example.com)
*/
function generate_board_url($without_script_path = false)
I've tried to avoid the use of4_seven wrote:In all cases avoid the using of $_GET or $_SERVER * (if possible anyway).
$_SERVER
, but I didn't found any other option ... but now I think I can avoid the use of the server variables because I can use the function you've suggested to me: generate_board_url
.generate_board_url()
instead of my function current_page_url()
.files/user_id/date/*.*
like in jQuery [img] Upload.Thank you to you for all comments and suggestions you gave to me.4_seven wrote:@ a first glance it looks good now, so await more user-feedback.
Congrats for working out this awesome mod