کد TopWorks طراحي شده توسط محمد يوسفي

iran-host

New Member
با سلام در اين آموزش مي خواهم آموزش گذاشتن کد TopWorks رو براي شما آموزش بدهم .

2002949507209611516_rs.jpg

استفاده از اين آموزش در وب سايت هاي ديگر با ذکر منبع يعني انجمن تخصصي محمد يوسفي بلا مانع است .

خوب ابتدا فايل BoardIndex.template.php قالبتون رو باز نموده و کد زير را پيدا کنيد :

کد:
<?php
// Version: 1.1;

 BoardIndex

function template_main()
{


global $context, $settings, $options, $txt, $scripturl, $modSettings;

حال کد زير را بعد از آن وارد نماييد :

کد:
// TopWorks By Mohammad yousefi
   
 
 echo'
	

<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
	
<td class="alt1" nowrap="nowrap" style="padding:8px" align="center">
	
<script src="showtop.php" type="text/javascript"> </script>
	
</td>
</tr>
</table>
 <div class="spacer">

</div><br>


';

حال به مسير روت فرومتان برويد یعني همان جايي که فايل SSI.php و ssi_examples.php و ... قرار دارند يک فايل متني با نت پد باز نموده و کد زير را در آن قرار دهيد :

کد:
/* Mohammad - Yousefi FORUMS - SHOW TOP WORKS */

if (screen.width == "800") {
}else if (screen.width == "1024") {

	document.write('<a href="http://m-smf.freehostia.com/index.php?board=5.0"><img src="Themes/default/images/internet.gif" border="0" width="150" height="120"/></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
	document.write('<a href="http://m-smf.freehostia.com/index.php?board=4.0"><img src="Themes/default/images/hosting.gif" border="0" width="150" height="120"/></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
	document.write('<a href="http://m-smf.freehostia.com/index.php?board=12.0"><img src="Themes/default/images/forum.gif" border="0" width="150" height="120"/></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
	document.write('<a href="http://m-smf.freehostia.com/index.php?board=32.0"><img src="Themes/default/images/music.gif" border="0" width="150" height="120"/></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
	document.write('<a href="http://m-smf.freehostia.com/index.php?board=7.0"><img src="Themes/default/images/graphic.gif" border="0" width="150" height="120"/></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
} else {

	document.write('<a href="http://m-smf.freehostia.com/index.php?board=5.0"><img src="Themes/default/images/internet.gif" border="0" width="150" height="120"/></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
	document.write('<a href="http://m-smf.freehostia.com/index.php?board=4.0"><img src="Themes/default/images/hosting.gif" border="0" width="150" height="120"/></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
	document.write('<a href="http://m-smf.freehostia.com/index.php?board=12.0"><img src="Themes/default/images/forum.gif" border="0" width="150" height="120"/></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
	document.write('<a href="http://m-smf.freehostia.com/index.php?board=32.0"><img src="Themes/default/images/music.gif" border="0" width="150" height="120"/></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
	document.write('<a href="http://m-smf.freehostia.com/index.php?board=7.0"><img src="Themes/default/images/graphic.gif" border="0" width="150" height="120"/></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
}

و سپس آنرا با نام showtop.php ذخيره نماييد .

حال براي ويرايش عکس ها و لينک عکس ها فقط کافي است همين فايل را ويرايش نموده و آدرس ها را با آدرس هاي خودتان مطابقت دهيد .

اميد به اينکه مفيد واقع شده باشد .

منبع : انجمن تخصصي محمد يوسفي
 
آخرین ویرایش:

جدیدترین ارسال ها

بالا