ok that's good i use this template
PHP Code:
<if condition="empty($lastpostinfo[threadphoto])">
<img border="0" src="$vboptions[threadphoto_DefaultPic]" width="50" height="50">
<else />
<img border="0" src="$lastpostinfo[threadphoto]" width="50" height="50">
</if>
look , i add this template in
forumhome_lastpostby template
by this hook :
forumbit_display
This code replaces all the template :
PHP Code:
eval('$forum[\'lastpostinfo\'] = "' . fetch_template('threadphoto_forumhome') . '";');
This code template placed in the end of the template
forumhome_lastpostby:
PHP Code:
eval('$forum[\'lastpostinfo\'] .= "' . fetch_template('threadphoto_forumhome') . '";');
i want put my template At the beginning of the template forumhome_lastpostby
-------------------------------------------------------------------------------------------------------------------------
For any one want to call this
field in
forumdisplay Beside title
threads
1 - plugin 1
hook : forumdisplay_query
code :
PHP Code:
$hook_query_fields .= ", thread.threadphoto AS threadphoto";
2 - add template - plugin 2
hook : global_start
code :
PHP Code:
require_once(DIR . '/includes/adminfunctions_template.php');
$threadphoto = compile_template('<td class="alt2"><if condition="$show[\'threadicon\']"><img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" /><else /> </if></td>');
$threadphoto1 = compile_template('');
$vbulletin->templatecache['threadbit'] = str_replace($threadphoto ,$threadphoto1 .fetch_template('threadphoto_threadbit'),$vbulletin->templatecache['threadbit']);
$threadphoto_Photowidth = $vbulletin->phrase[threadphoto_Photowidth];
$threadphoto_Photoheight = $vbulletin->phrase[threadphoto_Photoheight];
3 - in template [
threadphoto_threadbit] put this
PHP Code:
<if condition="$show[threadicons]">
<td class="alt2" align="center" valign="middle">
<if condition="$thread[threadphoto]">
<img src="$thread[threadphoto]" width="$vboptions[threadphoto_Photowidth]" height="$vboptions[threadphoto_Photoheight]" />
<else />
<if condition="$vboptions[threadphoto_DefaultPic]">
<img src="$vboptions[threadphoto_DefaultPic]" width="$vboptions[threadphoto_Photowidth]" height="$vboptions[threadphoto_Photoheight]" />
<else />
<if condition="$show[threadicon]">
<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
</if>
</if>
</td>
</if>
</if>