FancyDining Posted November 14, 2005 Posted November 14, 2005 Ideally this mod would create a lofi version of the reply page. Instead it just adds a link to the lofi topic view that takes you to the reply page for the full version. This is my first mod, and I'm guessing I didn't do this in the best possible way. I would have figured that this mod would exist already, but I haven't found it, so I'm posting this for those who may be interested. I'd be happy to hear any suggestions for better ways to do this. The following instructions are for version 2.1.3 only (although it should be possible to make it work with any 2.x version). There are three files (all in the lofiversion directory) that require editing: index.php, lofi_skin.php, lofiscreen.css. Be sure to make back-up copies of these files before proceeding.In lofiversion/index.php Find line 621 containing: $output = str_replace( '<% PAGES %>' , $pages, $output ); and insert $output = str_replace( '<% REPLY %>' , $reply, $output ); after it. Find line 614 containing: $output = str_replace( '<% TITLE %>' , $title , $LOFISKIN['wrapper'] ); and insert if ( $action=='topic' ) { $reply = LOFISKIN_reply( '<a href="'.$ipsclass->vars['board_url'].'/index.php?act=post&do=reply_post&f='.$forumID.'&t='.$topicID.'">Reply</a>' ); } before it. Find line 607 containing: $pages = ""; and insert $reply = ""; after it. Replace lines 581-583 containing: function print_it($content, $title='') { global $ipsclass, $std, $DB, $forums, $LOFISKIN, $navarray, $print; with function print_it($content, $action, $title='') { global $ipsclass, $std, $DB, $forums, $LOFISKIN, $navarray, $print, $forumID, $topicID; Find line 572 containing: $navarray = _get_nav_array( $topic['forum_id'] ); and insert $forumID = $topic['forum_id']; $topicID = $id; after it. Replace line 473 containing: global $ipsclass, $std, $DB, $forums, $LOFISKIN, $navarray, $winpath; with global $ipsclass, $std, $DB, $forums, $LOFISKIN, $navarray, $winpath, $forumID, $topicID; Replace line 332 containing: print_it($output); with print_it($output, $action); In lofiversion/lofi_skin.php Find line 116 (last line of file) containing: ?> and insert function LOFISKIN_reply($reply="") { global $ipsclass; return <<<EOF <div class='ipbreplyspan'> $reply </div> EOF; } before it. Find line 29 containing: <% CONTENT %> and insert <% REPLY %> after it. In lofiversion/lofiscreen.css Find line 25 containing: .ipbpagespan and insert .ipbreplyspan { font-size: 18px; font-weight: bold; text-align: right; }before it.
FancyDining Posted November 14, 2005 Posted November 14, 2005 Hmm. Both parts for lofi_skin.php? Oops... The first set of changes should be made to index.php. I've corrected it above. Thanks.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.