https://www.icyphoenix.com/viewtopic.php?f=27&t=193 ----------------------------------- KugeLSichA Sun 27 Aug, 2006 16:15 058-007 - FIXED - Mark Post As Read Error ----------------------------------- Hi, i tried to fix this with that tpl file. but the only problem is with the checkbox, that doesn´t apear if i add the switch in the tpl file. [code linenumbers=false filename=search_results_topics.tpl]

{L_HOME}{NAV_SEP}{L_INDEX}{NAV_SEP}{L_SEARCH}{NAV_SEP}{L_SEARCH_MATCHES}

{CURRENT_TIME}
 
{L_SEARCH_MATCHES}
  {L_FORUM} {L_TOPICS} {L_REPLIES} {L_AUTHOR} {L_VIEWS} {L_LASTPOST} {L_MAR}
{searchresults.U_MARK_ALWAYS_READ} {searchresults.FORUM_NAME} {searchresults.NEWEST_POST_IMG}{searchresults.TOPIC_TYPE}{searchresults.TOPIC_TITLE}{searchresults.GOTO_PAGE} {searchresults.REPLIES} {searchresults.TOPIC_AUTHOR} {searchresults.VIEWS} {searchresults.LAST_POST_TIME}
{searchresults.LAST_POST_AUTHOR} {searchresults.LAST_POST_IMG}
{L_MARK_ALL} | {L_UNMARK_ALL}
{PAGE_NUMBER} {PAGINATION}
{S_TIMEZONE}
{JUMPBOX}
[/code] i thought this is an easy fix, but it seems that i missed something :cry: ----------------------------------- Mighty Gorgon Sun 27 Aug, 2006 16:21 Re: Mark Post As Read Error ----------------------------------- He he he... adding a switch sometimes it's not so easy as you may think! :wink: You should consider that nested switches must be defined as nested... and recall them as nested... Example: [list][*]You have a cycle of switches... for example POSTROW [*]If you want to add a switch in POSTROW, you have to define it as POSTROW.SWITCH [*]Then you have to recall it as POSTROW.SWITCH even in the template [*]All the vars must have the nested prefix: POSTROW.SWITCH.VAR[/list] I hope that it helps you... :wink: Try again KugeL, your training is going on... :mrb: ----------------------------------- KugeLSichA Sun 27 Aug, 2006 17:02 Re: Mark Post As Read Error ----------------------------------- ok i got it working :D use the tpl file in my first post. apply this OPEN [b]search.php[/b] FIND [codeblock] // 'U_MARK_ALWAYS_READ' => $mark_always_read, // 'U_VIEW_FORUM' => $forum_url, 'U_VIEW_TOPIC' => $topic_url) ); [/codeblock] AFTER ADD [codeblock] // if( $userdata['upi2db_access'] ) { $template->assign_block_vars('searchresults.switch_upi2db_on', array()); } // [/codeblock] not really sure if there is an easier way. but it works =) ----------------------------------- Mighty Gorgon Sun 27 Aug, 2006 17:18 Re: Mark Post As Read Error ----------------------------------- Can you post a zip file with the modified files please? Thanks! :wink: ----------------------------------- KugeLSichA Sun 27 Aug, 2006 17:26 Re: Mark Post As Read Error ----------------------------------- here we go ;-)