Moderator: Integra Moderator
Okay here we go.....
1) In IM 1.40 the Style change block was patched out as it was a security issue. Has that issue now been fixed in 1.41 as the style change block is back?
2) Prior to the style block patches in IM 1.40 one could pass the s=XX parameter to a page to change the style, this was disabled by the patch. It seems that this functionality is still missing in IM 1.41.
What I want to do is to add a link in QBAR which a user can click on to change from one theme to another. Is this possible?
3) Is it possible to change the style automatically based on data read back from a web browser, that is of the user is using a mobile device then to get the forum to auto-select a different style?
4) The layout file used by the portal, is there any way of tying this to a theme, so that if a user does get the theme changed (manually or automatically) then the portal layout can change.
Hope some kind soul can help with these questions!
<php>sql_query($sql)) && ($row = $db->sql_fetchrow($result)) ) { $style = $row['themes_id']; } else { message_die(GENERAL_ERROR, "Could not find style name $style."Wink; } } } else { $style = $board_config['default_style']; } // End of Conitional Selector for $style // // Style details // $sql = "SELECT t.themes_id, tdi.* FROM ( " . THEMES_TABLE . " t LEFT JOIN " . THEMES_SELECT_INFO_TABLE . " tdi ON t.themes_id = tdi.themes_id ) WHERE t.themes_id = " . $style; if( ($result = $db->sql_query($sql)) && ($row = $db->sql_fetchrow($result)) ) { $style_author = $row['style_author']; $style_version = $row['style_version']; $style_website = $row['style_website']; //$style_views = ( !empty($row['style_views']) ) ? $row['style_views'] : '0 '; $style_dlurl = $row['style_dlurl']; $style_dls = ( !empty($row['style_dls']) ) ? $row['style_dls'] : '0'; $style_loaclurl = $row['style_loaclurl']; $style_ludls = $row['style_ludls']; } else { // $s tyle_views = ' '; // $style_dls = ' '; } if(!empty($style_website)) { $style_author = '<a>' . $style_author . '<a>'; } if ($style_loaclurl) { if ($style_loaclurl == "included"Wink { $select_style_localu rl = $lang['Style_select_loaclurl_included']; } els e { $select_style_localurl = "<a>".$lang['Style_select_loaclurl']." </a>"; } } // // Update the view counter // //$sql = "UPDATE " . THEMES_SELECT_INFO_TABLE . " // SET style_views = style_views + 1 // WHERE themes_id = $style"; //if( !$db->sql_query($sql) ) //{ // message_die(GENERAL_ERROR, "Could not update style views.", '', __LINE__, __FILE__, $sql); //} //if( $db->sql_affectedrows() == 0 ) //{ // // Update the view counter // // $sql = "INSERT INTO " . THEMES_SELECT_INFO_TABLE . " (themes_id, style_views) // VALUES ($style, 1)"; // if( !$db->sql_query($sql) ) // { // message_die(GENERAL_ERROR, "Could not insert style views.", '', __LINE__, __FILE__, $sql); // } //} // // Styles list // $sql = "SELECT themes_id, style_name FROM " . THEMES_TABLE . " ORDER BY style_name"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, "Could not get list of styles!", "", __LINE__, __FILE__, $sql); } $select_theme = "<select>n"; while( $row = $db->sql_fetchrow($result) ) { $selected = ($row['themes_id'] == $style) ? " selected="selected"" : ""; $select_theme .= "<option>" . $row['style_name'] . "</option>"; } $select_theme .= "</select>n"; $template->assign_vars(array( 'L_STYLE_SITENAME' => $board_config['sitename'], 'S_SELECT_STYLE' => $select_theme) ); //$template->assign_vars(array('S_SE LECT_STYLE' => $select_theme)); if ( $style_author ) { $template->assign_block_vars('switch_style_aut hor', array()); $template->assign_vars(array('L_STYLE_AUTHOR' => $lang['Style_select_author'] . $style_author)); } if ( $style_dlurl ) { $template->assign_block_vars('switch_style_dlu rl', array()); $template->assign_vars(array('L_STYLE_DLURL' => "<a>".$lang['Style_select_dlurl']."</a>: ".$style_dls)); } if ( $style_loaclurl ) { $template->assign_block_vars('switch_style_loa clurl', array()); $template->assign_vars(array('L_STYLE_LOCALURL' => $select_style_localurl)); } if ( $style_version ) { $template->assign_block_vars('switch_style_ver sion', array()); $template->assign_vars(array('L_STYLE_VERSION' => $lang['Style_select_version'] . $style_version)); } if ( $style_views ) { $template->assign_block_vars('switch_style_vie ws', array()); $template->assign_vars(array('L_STYLE_VIEWINGS' => $lang['Style_select_viewings'] . $style_views)); } // END Style Select MOD }} auto_style_select_block_func();?>
</a>
Registered users: App360MonitorBot, Bing [Bot], Google [Bot]