@@ -95,6 +95,36 @@ public function getTemplateUserFooterFacebookShareButton()
9595 return "<li class='fb-share-button' data-href='<{ \$xoops_mpageurl}>' data-layout='button_count'></li> " ;
9696 }
9797
98+ /**
99+ * @public function render
100+ * @param null
101+ * @return bool|string
102+ */
103+ private function getTemplateUserFooterContent ($ moduleDirname , $ language )
104+ {
105+ $ hc = Tdmcreate \Files \CreateHtmlCode::getInstance ();
106+ $ sc = Tdmcreate \Files \CreateSmartyCode::getInstance ();
107+ $ ret = $ hc ->getHtmlDiv ('<{$copyright}> ' , 'pull-left ' , '' , "\n" , false );
108+ $ ret .= $ hc ->getHtmlEmpty ("\n" );
109+ $ contIf = $ hc ->getHtmlDiv ('<{$pagenav}> ' , 'pull-right ' , "\t" , "\n" , false );
110+ $ ret .= $ sc ->getSmartyConditions ('pagenav ' , ' != ' , "'' " , $ contIf );
111+ $ ret .= $ hc ->getHtmlEmpty ("<br> \n" );
112+ $ contIf = $ hc ->getHtmlDiv ("<a href='<{ \$admin}>'><{ \$smarty.const. {$ language }ADMIN}></a> " , 'text-center bold ' , "\t" , "\n" , false );
113+ $ ret .= $ sc ->getSmartyConditions ('xoops_isadmin ' , ' != ' , "'' " , $ contIf );
114+ $ ret .= $ hc ->getHtmlEmpty ("\n" );
115+ $ contIf = $ sc ->getSmartyIncludeFile ('system_comments ' ,'flat ' ,false , false ,"\t\t\t" );
116+ $ contIf .= $ this ->getSimpleString ('<{elseif $comment_mode == "thread"}> ' ,"\t\t" );
117+ $ contIf .= $ sc ->getSmartyIncludeFile ('system_comments ' ,'thread ' ,false , false ,"\t\t\t" );
118+ $ contIf .= $ this ->getSimpleString ('<{elseif $comment_mode == "nest"}> ' ,"\t\t" );
119+ $ contIf .= $ sc ->getSmartyIncludeFile ('system_comments ' ,'nest ' ,false , false ,"\t\t\t" );
120+ $ contDiv = $ sc ->getSmartyConditions ('comment_mode ' , ' == ' , '"flat" ' , $ contIf , false , '' ,'' ,"\t\t" );
121+ $ contIf = $ hc ->getHtmlDiv ($ contDiv , 'pad2 marg2 ' , "\t" , "\n" , true );
122+ $ ret .= $ sc ->getSmartyConditions ('comment_mode ' , '' , '' , $ contIf );
123+
124+ return $ ret ;
125+ }
126+
127+
98128 /**
99129 * @public function render
100130 * @param null
@@ -103,53 +133,11 @@ public function getTemplateUserFooterFacebookShareButton()
103133 public function render ()
104134 {
105135 $ module = $ this ->getModule ();
106- $ table = $ this ->getTable ();
107136 $ filename = $ this ->getFileName ();
108137 $ moduleDirname = $ module ->getVar ('mod_dirname ' );
109138 $ language = $ this ->getLanguage ($ moduleDirname , 'MA ' );
110- $ content = <<<EOT
111- <{if \$bookmarks != 0}>
112- <{include file="db:system_bookmarks.tpl"}>
113- <{/if}>
114- \n<{if \$fbcomments != 0}>
115- <{include file="db:system_fbcomments.tpl"}>
116- <{/if}>
117- <div class="pull-left"><{ \$copyright}></div> \n
118- EOT ;
119- if (is_object ($ table ) && null != $ table ->getVar ('table_name ' )) {
120- $ content .= <<<EOT
121- <{if \$pagenav != ''}>
122- <div class="pull-right"><{ \$pagenav}></div>
123- <{/if}>
124- <br> \n
125- EOT ;
126- }
127- $ content .= <<<EOT
128- <{if \$xoops_isadmin}>
129- <div class="text-center bold"><a href="<{ \$admin}>"><{ \$smarty.const. {$ language }ADMIN}></a></div><br>
130- <{/if}> \n
131- EOT ;
132- if (is_object ($ table )) {
133- if (1 == $ table ->getVar ('table_comments ' )) {
134- $ content .= <<<EOT
135- <div class="pad2 marg2">
136- <{if \$comment_mode == "flat"}>
137- <{include file="db:system_comments_flat.tpl"}>
138- <{elseif \$comment_mode == "thread"}>
139- <{include file="db:system_comments_thread.tpl"}>
140- <{elseif \$comment_mode == "nest"}>
141- <{include file="db:system_comments_nest.tpl"}>
142- <{/if}>
143- </div> \n
144- <br> \n
145- EOT ;
146- }
147- if (1 == $ table ->getVar ('table_notifications ' )) {
148- $ content .= <<<'EOT'
149- <{include file='db:system_notification_select.tpl'}>
150- EOT;
151- }
152- }
139+ $ content = $ this ->getTemplateUserFooterContent ($ moduleDirname , $ language );
140+
153141 $ this ->create ($ moduleDirname , 'templates ' , $ filename , $ content , _AM_TDMCREATE_FILE_CREATED , _AM_TDMCREATE_FILE_NOTCREATED );
154142
155143 return $ this ->renderFile ();
0 commit comments