PDA

توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : ایجاد موقعیت جدید در قالب



yss.ir
02-07-2010, 08:52 AM
سلام


چطوری میتونم یک موقعیت جدید در قالبم زیر قسمتی که مطالب صفحه اصلی قرار می گیرن، اضافه کنم؟
(می دانم می دانم آشنایی با css لازم است! اندکی بهره برده ام. . :) )

reka
02-07-2010, 11:15 AM
سلام

در فایل index.php قالب در مکانی که میخواید موقعیت جدید ایجاد بشه، کد زیر رو قرار بدید:


<?php if ($this->countModules('test1')) { ?>
<div id="test">
<jdoc:include type="modules" name="test1" style="raw" />
</div>
<?php } ?>

این کد موقعیت test1 رو ایجاد میکنه و با آیدی test در css بهش استایل میده. البته این id رو خودتون باید در فایل css قالب اضافه کرده و مشخصاتش رو تعیین کنید.

حال فایل templateDetails.xml قالب رو باز کنید و در قسمتی که موقعیتهای قالب با تگ position معرفی شده اند، خط زیر رو اضافه کنید:


<position>test1</position>


یا علی

yss.ir
04-15-2010, 07:09 AM
سلام

ممنون، درست شد....

فقط من ميخوام مانند عكس زير 5 موقعيت رو بصورت افقي كنار هم قرار بدم، در اينصورت بايد چيكار كنم؟!
<b><font color=red>فقط کاربران عضو انجمن می توانند لینک ها را مشاهده کنند</font></b>

reka
04-15-2010, 07:26 AM
سلام

از روشی که در بالا گفتم 5 موقعیت ایجاد کنید سپس مهمترین بخش کار نوشتن css هست که این 5 موقعیت کنار هم قرار بگیره.


یا علی

yss.ir
04-15-2010, 08:31 AM
من اين كد رو داخل index


&lt;!-- BOTTOM SPOTLIGHT--&gt;
&lt;div id=&quot;ja-botsl&quot; class=&quot;wrap&quot;&gt;
&lt;div class=&quot;main clearfix&quot;&gt;

&lt;?php if( $this-&gt;countModules(&#039;user1&#039;) ) {?&gt;
&lt;div class=&quot;ja-box&lt;?php echo $botsl&#91;&#039;user1&#039;]&#91;&#039;class&#039;]; ?&gt;&quot; style=&quot;width: &lt;?php echo $botsl&#91;&#039;user1&#039;]&#91;&#039;width&#039;]; ?&gt;;&quot;&gt;
&lt;jdoc:include type=&quot;modules&quot; name=&quot;user1&quot; style=&quot;xhtml&quot; /&gt;
&lt;/div&gt;
&lt;?php } ?&gt;

&lt;?php if( $this-&gt;countModules(&#039;user2&#039;) ) {?&gt;
&lt;div class=&quot;ja-box&lt;?php echo $botsl&#91;&#039;user2&#039;]&#91;&#039;class&#039;]; ?&gt;&quot; style=&quot;width: &lt;?php echo $botsl&#91;&#039;user2&#039;]&#91;&#039;width&#039;]; ?&gt;;&quot;&gt;
&lt;jdoc:include type=&quot;modules&quot; name=&quot;user2&quot; style=&quot;xhtml&quot; /&gt;
&lt;/div&gt;
&lt;?php } ?&gt;

&lt;?php if( $this-&gt;countModules(&#039;user8&#039;) ) {?&gt;
&lt;div class=&quot;ja-box&lt;?php echo $botsl&#91;&#039;user8&#039;]&#91;&#039;class&#039;]; ?&gt;&quot; style=&quot;width: &lt;?php echo $botsl&#91;&#039;user8&#039;]&#91;&#039;width&#039;]; ?&gt;;&quot;&gt;
&lt;jdoc:include type=&quot;modules&quot; name=&quot;user8&quot; style=&quot;xhtml&quot; /&gt;
&lt;/div&gt;
&lt;?php } ?&gt;

&lt;?php if( $this-&gt;countModules(&#039;user9&#039;) ) {?&gt;
&lt;div class=&quot;ja-box&lt;?php echo $botsl&#91;&#039;user9&#039;]&#91;&#039;class&#039;]; ?&gt;&quot; style=&quot;width: &lt;?php echo $botsl&#91;&#039;user9&#039;]&#91;&#039;width&#039;]; ?&gt;;&quot;&gt;
&lt;jdoc:include type=&quot;modules&quot; name=&quot;user9&quot; style=&quot;xhtml&quot; /&gt;
&lt;/div&gt;
&lt;?php } ?&gt;

&lt;/div&gt;&lt;/div&gt;
&lt;!-- //BOTTOM SPOTLIGHT 2 --&gt;

واين كد رو داخل css گذاشتم، ولي كنار هم قرار نگرفتن؟


/* Bottom spotlight */
#ja-botsl {
padding: 0;
}

#ja-botsl .main {
padding-bottom: 10px;
}

#ja-botsl div.moduletable h3,
#ja-botsl div.moduletable_default h3,
#ja-botsl div.moduletable_menu h3 {
background: none;
border-bottom: 1px solid #D5D5D5;
border-right: none;
color: #666666;
margin: 0 0 10px 0;
padding: 5px 0;
font-size: 92%;
font-weight: normal;
}

#ja-botsl div.moduletable,
#ja-botsl div.moduletable_default,
#ja-botsl div.moduletable_menu {
background: none;
color: #454545;
margin: 0;
padding: 0 10px 20px;
}

#ja-botsl .ja-box-left div.moduletable,
#ja-botsl .ja-box-left div.moduletable_default,
#ja-botsl .ja-box-left div.moduletable_menu {
margin: 0 10px 0 0;
}

#ja-botsl .ja-box-right div.moduletable,
#ja-botsl .ja-box-right div.moduletable_default,
#ja-botsl .ja-box-right div.moduletable_menu {
margin: 0;
}

#ja-botsl .ja-box-center div.moduletable,
#ja-botsl .ja-box-center div.moduletable_default,
#ja-botsl .ja-box-center div.moduletable_menu {
margin: 0 10px 0 0;
}

#ja-botsl .img-border {
background: url(../images/img-bg.gif) no-repeat right bottom;
padding: 0 10px 10px 0;
}

#ja-botsl a {
color: #454545;
}

#ja-botsl a:hover,
#ja-botsl a:focus,
#ja-botsl a:active {
color: #BB2222;
text-decoration: none;
}

#ja-botsl li {
background: none;
border-bottom: 1px solid #D5D5D5;
}

#ja-botsl div.moduletable_menu li a {
background: url(../images/arrow.gif) no-repeat 0px 5px;
}

#ja-botsl div.moduletable_menu li a:hover,
#ja-botsl div.moduletable_menu li a:active,
#ja-botsl div.moduletable_menu li a:focus {
background: url(../images/arrow-hover.gif) no-repeat 0px 5px;
}

#ja-botsl div.bubble1 div {
background: url(../images/bub1-br2.gif) no-repeat bottom right;
}

** دو ارسال شما یکی شد

p30p30
08-20-2010, 10:59 AM
سلام .
بسیار عالی بود .

خواهشمندم این آموزش را در ویکی منتشر نمایید . همچنین با مهم کردن این موضوع , بسیاری از مشکلات طراحان قالب مبتدی حل خواهد شد.