Code: Select all
<img src="' . $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/imageset/' . $user->data['user_lang'] . '/button_blog_new.gif">
Code: Select all
<img src="' . $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/imageset/' . $user->data['user_lang'] . '/button_blog_new.gif">
EXreaction wrote: I would like to know as well. I would guess it is something like the permissions where you can simply upload a file and it will automatically be included and display what it needs.
I believe there is no need for code modification with a plugin/hooks system.
quick5pnt0 wrote:EXreaction wrote: I would like to know as well. I would guess it is something like the permissions where you can simply upload a file and it will automatically be included and display what it needs.
I believe there is no need for code modification with a plugin/hooks system.
Yea with a plugin that uses hooks you don't need to modify any of the phpbb files. Instead all you would do is upload the mod in a plugins folder, and enable it in the ACP. Or at least that's the way it works with Coppermine.
EXreaction wrote: It probably is just easier to do this in the php files to call the image:replace button_blog_new.gif with the name of your image.Code: Select all
<img src="' . $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/imageset/' . $user->data['user_lang'] . '/button_blog_new.gif">
Always use $db->sql_escape() if you need to check for a string within an SQL statement (even if you are sure the variable can not contain single quotes - never trust your input), for example:
If you need to UPDATE or INSERT data, make use of the $db->sql_build_array() function. This function already escapes strings and checks other types, so there is no need to do this here.
Code: Select all
<?php
$sql_ary = array(
'message' => utf8_normalize_nfc(request_var('message', '', true)),
);
$sql = 'INSERT INTO ' . YOUR_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
$db->sql_query($sql);
Code: Select all
<?php
$sql_ary = array(
'message' => utf8_normalize_nfc(request_var('message', '', true)),
'field2' => $number,
);
$sql = 'UPDATE ' . YOUR_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " WHERE user_id = $user_id";
$db->sql_query($sql);
Code: Select all
$foo = $db->sql_escape($bar);
$sql = "SELECT some_stuff
FROM table_name
WHERE foo = '" . $foo . "'";
$db->sql_query($sql);
Code: Select all
$sql = "SELECT some_stuff
FROM table_name
WHERE foo = '" . $db->sql_escape($foo) . "'";
$db->sql_query($sql);
$db->sql_query('INSERT INTO table_name ' . $db->sql_build_array('INSERT', array('foo' => $foo)));