Sur ce sujet, vous trouverez les modifications nécessaires à effectuer pour rendre un style à base prosilver compatible à partir de la version 3.0.0 jusqu'à la dernière version de phpBB3.
<!-- IF SCRIPT_NAME == "search" and not S_BOARD_DISABLED and not S_NO_SEARCH --><p><a href="{U_SEARCH}" class="{S_CONTENT_FLOW_BEGIN}">{L_RETURN_TO_SEARCH_ADV}</a></p><!-- ENDIF -->
<!-- IF SCRIPT_NAME == "search" and not S_BOARD_DISABLED and not S_NO_SEARCH and L_RETURN_TO_SEARCH_ADV --><p><a href="{U_SEARCH}" class="{S_CONTENT_FLOW_BEGIN}">{L_RETURN_TO_SEARCH_ADV}</a></p><!-- ENDIF -->
<!-- ENDIF --> <!-- BEGIN memberrow --> <!-- IF S_SHOW_GROUP --> <!-- IF not memberrow.S_GROUP_LEADER and not $S_MEMBER_HEADER --> <!-- IF memberrow.S_FIRST_ROW --> <tr class="bg1">
<tbody> <!-- ENDIF --> <!-- BEGIN memberrow --> <!-- IF S_SHOW_GROUP --> <!-- IF not memberrow.S_GROUP_LEADER and not $S_MEMBER_HEADER --> <!-- IF S_LEADERS_SET and memberrow.S_FIRST_ROW --> <tr class="bg1">
<!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 150 --> <option value="150">{L_FONT_LARGE}</option> <!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 200 --> <option value="200">{L_FONT_HUGE}</option> <!-- ENDIF --> <!-- ENDIF -->
var jump_page = '{LA_JUMP_PAGE}:'; var on_page = '{ON_PAGE}'; var per_page = '{PER_PAGE}'; var base_url = '{A_BASE_URL}'; var style_cookie = 'phpBBstyle'; var onload_functions = new Array();
<div id="p{postrow.POST_ID}" class="post <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF postrow.S_UNREAD_POST --> unreadpost<!-- ENDIF --><!-- IF postrow.S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF postrow.S_ONLINE and not postrow.S_IGNORE_POST --> online<!-- ENDIF -->">
function split_lines(text) { var lines = text.split('\n'); var splitLines = new Array(); var j = 0; for(i = 0; i < lines.length; i++) { if (lines[i].length <= 80) { splitLines[j] = lines[i]; j++; } else { var line = lines[i]; do { var splitAt = line.indexOf(' ', 80);
/** * Check if the nodeName of elem is name * @author jQuery */ function is_node_name(elem, name) { return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); }
/** * Check if elem is in array, return position * @author jQuery */ function is_in_array(elem, array) { for (var i = 0, length = array.length; i < length; i++) // === is correct (IE) if (array[i] === elem) return i;
return -1; }
/** * Find Element, type and class in tree * Not used, but may come in handy for those not using JQuery * @author jQuery.find, Meik Sievertsen */ function find_in_tree(node, tag, type, class_name) { var result, element, i = 0, length = node.childNodes.length;
for (element = node.childNodes[0]; i < length; element = node.childNodes[++i]) { if (!element || element.nodeType != 1) continue;
if (element.childNodes.length) result = find_in_tree(element, tag, type, class_name);
if (result) return result; } }
var in_autocomplete = false; var last_key_entered = '';
/** * Check event key */ function phpbb_check_key(event) { // Keycode is array down or up? if (event.keyCode && (event.keyCode == 40 || event.keyCode == 38)) in_autocomplete = true;
// Make sure we are not within an "autocompletion" field if (in_autocomplete) { // If return pressed and key changed we reset the autocompletion if (!last_key_entered || last_key_entered == event.which) { in_autocompletion = false; return true; } }
// Keycode is not return, then return. ;) if (event.which != 13) { last_key_entered = event.which; return true; }
return false; }
/** * Usually used for onkeypress event, to submit a form on enter */ function submit_default_button(event, selector, class_name) { // Add which for key events if (!event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode)) event.which = event.charCode || event.keyCode;
if (phpbb_check_key(event)) return true;
var current = selector['parentNode'];
// Search parent form element while (current && (!current.nodeName || current.nodeType != 1 || !is_node_name(current, 'form')) && current != document) current = current['parentNode'];
// Find the input submit button with the class name //current = find_in_tree(current, 'input', 'submit', class_name); var input_tags = current.getElementsByTagName('input'); current = false;
for (var i = 0, element = input_tags[0]; i < input_tags.length; element = input_tags[++i]) { if (element.type == 'submit' && is_in_array(class_name, (element.className || element).toString().split(/\s+/)) > -1) current = element; }
if (!current) return true;
// Submit form current.focus(); current.click(); return false; }
/** * Apply onkeypress event for forcing default submit button on ENTER key press * The jQuery snippet used is based on http://greatwebguy.com/programming/dom/default-html-button-submit-on-enter-with-jquery/ * The non-jQuery code is a mimick of the jQuery code ;) */ function apply_onkeypress_event() { // jQuery code in case jQuery is used if (jquery_present) { $('form input').live('keypress', function (e) { var default_button = $(this).parents('form').find('input[type=submit].default-submit-action');
if (!default_button || default_button.length <= 0) return true;
var input_tags = document.getElementsByTagName('input');
for (var i = 0, element = input_tags[0]; i < input_tags.length ; element = input_tags[++i]) { if (element.type == 'hidden') continue;
// onkeydown is possible too element.onkeypress = function (evt) { submit_default_button((evt || window.event), this, 'default-submit-action'); }; } }
/** * Detect JQuery existance. We currently do not deliver it, but some styles do, so why not benefit from it. ;) */ var jquery_present = typeof jQuery == 'function';
<dd><strong>{USERNAME}</strong><!-- IF S_SEND_ICQ or S_SEND_AIM or S_SEND_MSNM --> [ {IM_CONTACT} ]<!-- ENDIF --><!-- IF PRESENCE_IMG --> {PRESENCE_IMG}<!-- ENDIF --></dd>
<dd><strong>{USERNAME}</strong><!-- IF S_SEND_ICQ or S_SEND_AIM or S_SEND_MSNM or S_NO_SEND_JABBER --> [ {IM_CONTACT} ]<!-- ENDIF --><!-- IF PRESENCE_IMG --> {PRESENCE_IMG}<!-- ENDIF --></dd>
<!-- IF not S_USER_LOGGED_IN and S_REGISTER_ENABLED and not (S_SHOW_COPPA or S_REGISTRATION) --><li class="icon-register"><a href="{U_REGISTER}">{L_REGISTER}</a></li><!-- ENDIF --> <li class="icon-logout"><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x">{L_LOGIN_LOGOUT}</a></li>
<p> <!-- NOTE: remove the style="display: none" when you want to have the forum description on the forum body --> <!-- IF FORUM_DESC --><span style="display: none">{FORUM_DESC}<br /></span><!-- ENDIF --> <!-- IF MODERATORS --><strong><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->:</strong> {MODERATORS}<!-- ENDIF --> </p>
<div> <!-- NOTE: remove the style="display: none" when you want to have the forum description on the forum body --> <!-- IF FORUM_DESC --><div style="display: none !important;">{FORUM_DESC}<br /></div><!-- ENDIF --> <!-- IF MODERATORS --><strong><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->:</strong> {MODERATORS}<!-- ENDIF --> </div>
var s1 = (txtarea.value).substring(0,selStart); var s2 = (txtarea.value).substring(selStart, selEnd) var s3 = (txtarea.value).substring(selEnd, selLength);
<dt><!-- IF S_DISPLAY_ACTIVE -->{L_ACTIVE_TOPICS}<!-- ELSEIF topicrow.S_TOPIC_TYPE_SWITCH and (topicrow.S_POST_ANNOUNCE or topicrow.S_POST_GLOBAL) -->{L_ANNOUNCEMENTS}<!-- ELSE -->{L_TOPICS}<!-- ENDIF --></dt>
/* MCP Post details ----------------------------------------*/ #post_details { /* This will only work in IE7+, plus the others */ overflow: auto; max-height: 300px; }
<!-- We request you retain the full copyright notice below including the link to www.phpbb.com. This not only gives respect to the large amount of time given freely by the developers but also helps build interest, traffic and use of phpBB3. If you (honestly) cannot retain the full copyright we ask you at least leave in place the "Powered by phpBB" line, with "phpBB" linked to www.phpbb.com. If you refuse to include even this then support on our forums may be affected.
<!-- IF S_USER_PM_POPUP and S_NEW_PM --> var url = '{UA_POPUP_PM}'; window.open(url.replace(/&/g, '&'), '_phpbbprivmsg', 'height=225,resizable=yes,scrollbars=yes, width=400');
<!-- We request you retain the full copyright notice below including the link to www.phpbb.com. This not only gives respect to the large amount of time given freely by the developers but also helps build interest, traffic and use of phpBB3. If you (honestly) cannot retain the full copyright we ask you at least leave in place the "Powered by phpBB" line, with "phpBB" linked to www.phpbb.com. If you refuse to include even this then support on our forums may be affected.
<hr width="85%" /> <!-- We request you retain the full copyright notice below including the link to www.phpbb.com. This not only gives respect to the large amount of time given freely by the developers but also helps build interest, traffic and use of phpBB3. If you (honestly) cannot retain the full copyright we ask you at least leave in place the "Powered by phpBB" line, with "phpBB" linked to www.phpbb.com. If you refuse to include even this then support on our forums may be affected.
<!-- We request you retain the full copyright notice below including the link to www.phpbb.com. This not only gives respect to the large amount of time given freely by the developers but also helps build interest, traffic and use of phpBB3. If you (honestly) cannot retain the full copyright we ask you at least leave in place the "Powered by phpBB" line, with "phpBB" linked to www.phpbb.com. If you refuse to include even this then support on our forums may be affected.
The phpBB Group : 2006 //--> <div id="page-footer">