mk-73 165 ارسال شده در آذر 94 گزارش بازنشر ارسال شده در آذر 94 سلام دوستان خسته نباشید، من یک دسته خاص بعنوان مثال سرتیتر خبرها قرار دادم که میخوام فقط پستی که منتشر میشه فقط مخصوص سرتیتر خبرها باشه در پست ها منتشر نشه باید چیکار کنم ببینید من میخوام عنوان پست ها ی مربوط به دسته بندی خبر در این سرتیتر به نمایش دربیاد.ای دی سر تیتر خبرهم این ادرس است:11واز این کد استفاده کردم<?php ?><script>// CREDITS:// Newsticker// By Peter Gehrig// Copyright © 2010 Peter Gehrig. All rights reserved.// Permission given to use the script provided that this notice remains as is.// Additional scripts can be found at http://www.fabulant.com// IMPORTANT:// If you add this script to a script-library or script-archive// you have to add a highly visible link to// http://www.fabulant.com on the webpage// where this script will be featuredvar text=new Array()var textlink=new Array()var texttarget=new Array()<?php $recent = new WP_Query("cat=11&showposts=1"); while($recent->have_posts()) : $recent->the_post();?>text[0]="<?php the_title(); ?>." <?php endwhile;wp_reset_query(); ?><?php $recent = new WP_Query("showposts=1&offset=1");while($recent->have_posts()) : $recent->the_post();?>text[1]="<?php the_title(); ?>." <?php endwhile;wp_reset_query(); ?><?php $recent = new WP_Query("showposts=1&offset=2");while($recent->have_posts()) : $recent->the_post();?>text[2]="<?php the_title(); ?>." <?php endwhile;wp_reset_query(); ?><?php $recent = new WP_Query("showposts=1&offset=3");while($recent->have_posts()) : $recent->the_post();?>text[3]="<?php the_title(); ?>." <?php endwhile;wp_reset_query(); ?><?php $recent = new WP_Query("showposts=1&offset=4");while($recent->have_posts()) : $recent->the_post();?>text[4]="<?php the_title(); ?>." <?php endwhile;wp_reset_query(); ?>// Add a link for each message// Enter "#" if you don't want to link a message (see sample below)<?php $recent = new WP_Query("cat=11&showposts=1");while($recent->have_posts()) : $recent->the_post();?>textlink[0]="<?php the_permalink(); ?>" <?php endwhile;wp_reset_query(); ?><?php $recent = new WP_Query("showposts=1&offset=1");while($recent->have_posts()) : $recent->the_post();?>textlink[1]="<?php the_permalink(); ?>" <?php endwhile;wp_reset_query(); ?><?php $recent = new WP_Query("showposts=1&offset=2");while($recent->have_posts()) : $recent->the_post();?>textlink[2]="<?php the_permalink(); ?>" <?php endwhile;wp_reset_query(); ?><?php $recent = new WP_Query("showposts=1&offset=3");while($recent->have_posts()) : $recent->the_post();?>textlink[3]="<?php the_permalink(); ?>" <?php endwhile;wp_reset_query(); ?><?php $recent = new WP_Query("showposts=1&offset=4");while($recent->have_posts()) : $recent->the_post();?>textlink[4]="<?php the_permalink(); ?>" <?php endwhile;wp_reset_query(); ?>texttarget[0]="_self"texttarget[1]="_self"texttarget[2]="_self"texttarget[3]="_self"texttarget[4]="_self"var textfont="tahoma"var textfontcolor="#000"var textfontcolorrollover="#000"var textfontsize=11var textdecoration="none"var textbgcolor="#eee"var textweight=""var textitalic="normal"var textwidth="auto"var textheight=28var textpause=3var textborder=1var textbordercolor="#aaaaaa"var speed=70var lineheight=2.3document.write("<table border=0 cellpadding=0 cellspacing=0>")document.write("<tr><td width="+textwidth+" height="+textheight+" valign=top dir=rtl>")var textalign="right"var textvalign="top"var textitalicA=""var textitalicB=""var textweightA=""var textweightB=""var textfontsizeHTML=1var i_mes=0var i_substring=0var i_presubstring=0var i_text=0var textcontent=""var notag=truevar textpresubstring=""var textaftersubstring=""textpause*=1000var browserinfos=navigator.userAgentvar ie4=!document.getElementById&&document.all&&!browserinfos.match(/Opera/)var ie5=document.getElementById&&document.all&&!browserinfos.match(/Opera/)var ns6=document.getElementById&&!document.all&&!browserinfos.match(/Opera/)var opera=browserinfos.match(/Opera/)function gettextcontent() {tablewidth=textwidth-2*textbordertableheight=textheight-2*textbordertextpresubstring=text[i_text].substring(0,i_presubstring)var i_prepre=i_presubstring-1if (i_prepre<0) {i_prepre=0}if (text[i_text].substring(i_prepre,i_presubstring)=="<"){notag=false}if (text[i_text].substring(i_prepre,i_presubstring)==">"){notag=true}if (notag) { textcontent="<table border=0 cellpadding=4 width="+tablewidth+" height="+tableheight+" class=\"mynews\" dir=rtl><tr valign="+textvalign+"><td align="+textalign+">" textcontent+="<a href='"+textlink[i_text]+"' target='"+texttarget[i_text]+"' style='position:relative; font-family:"+textfont+";text-decoration:"+textdecoration+";font-family:"+textfont+";line-height:"+lineheight+";color:"+textfontcolor+";font-size:"+textfontsize+"pt;font-weight:"+textweight+";font-style:"+textitalic+"' onmouseover=\"this.style.color=\'"+textfontcolorrollover+"\'\" onmouseout=\"this.style.color=\'"+textfontcolor+"\'\">" textcontent+=textpresubstring textcontent+="</a>" textcontent+="</td></tr></table>"}}function showtickerNS6() {textcontent="<table border=0 cellpadding=4 width="+textwidth+" height="+textheight+" class=\"mynews\"><tr valign="+textvalign+"><td align="+textalign+">"textcontent+="<a href='"+textlink[i_text]+"' target='"+texttarget[i_text]+"' style='position:relative; font-family:"+textfont+";text-decoration:"+textdecoration+";font-family:"+textfont+";color:"+textfontcolor+";font-size:"+textfontsize+"pt;font-weight:"+textweight+";font-style:"+textitalic+"' onmouseover=\"this.style.color=\'"+textfontcolorrollover+"\'\" onmouseout=\"this.style.color=\'"+textfontcolor+"\'\">"textcontent+=text[i_text]textcontent+="</a>"textcontent+="</td></tr></table>"document.getElementById("ticker").innerHTML=textcontenti_text++if (i_text>=text.length-1) {i_text=0}var timer=setTimeout("showtickerNS6()", 2*textpause)}function showticker() {if (i_substring<=text[i_text].length) { i_substring++ i_presubstring=i_substring-1 if (i_presubstring<0) {i_presubstring=0} gettextcontent() if (ie4) { ticker.innerHTML=textcontent var timer=setTimeout("showticker()", speed) } if (ie5 || opera || ns6) { document.getElementById("ticker").innerHTML=textcontent var timer=setTimeout("showticker()", speed) }}else { clearTimeout(timer) var timer=setTimeout("changetext()", textpause)}}function changetext() {i_substring=0i_presubstring=0i_text++if (i_text>text.length-1) { i_text=0}showticker()}if (ie5 || ns6 || opera) {if (ns6) { textwidth-=2*textborder textheight-=2*textborder}document.write('<div ID="roof" style="position:relative;width:'+textwidth+'px;height:'+textheight+'px;border-style:solid;border-width:'+textborder+'px;border-color:'+textbordercolor+';background-color:'+textbgcolor+'">')document.write('<span ID="ticker" style="position:absolute;top:0px;left:0px;width:'+textwidth+'px;height:'+textheight+'px;"></span>')document.write('</div>')}window.onload=showtickerdocument.write("</td></tr></table>")</script>که در یکی از همین تایپیک ها در همین انجمن بوده. نقل قول لینک به ارسال
بویکا 124 ارسال شده در آذر 94 گزارش بازنشر ارسال شده در آذر 94 سلام دوستان خسته نباشید، من یک دسته خاص بعنوان مثال سرتیتر خبرها قرار دادم که میخوام فقط پستی که منتشر میشه فقط مخصوص سرتیتر خبرها باشه در پست ها منتشر نشه باید چیکار کنم ببینید من میخوام عنوان پست ها ی مربوط به دسته بندی خبر در این سرتیتر به نمایش دربیاد.ای دی سر تیتر خبرهم این ادرس است:11واز این کد استفاده کردم<?php ?><script>// CREDITS:// Newsticker// By Peter Gehrig// Copyright © 2010 Peter Gehrig. All rights reserved.// Permission given to use the script provided that this notice remains as is.// Additional scripts can be found at http://www.fabulant.com// IMPORTANT:// If you add this script to a script-library or script-archive// you have to add a highly visible link to// http://www.fabulant.com on the webpage// where this script will be featuredvar text=new Array()var textlink=new Array()var texttarget=new Array()<?php $recent = new WP_Query("cat=11&showposts=1"); while($recent->have_posts()) : $recent->the_post();?>text[0]="<?php the_title(); ?>." <?php endwhile;wp_reset_query(); ?><?php $recent = new WP_Query("showposts=1&offset=1");while($recent->have_posts()) : $recent->the_post();?>text[1]="<?php the_title(); ?>." <?php endwhile;wp_reset_query(); ?><?php $recent = new WP_Query("showposts=1&offset=2");while($recent->have_posts()) : $recent->the_post();?>text[2]="<?php the_title(); ?>." <?php endwhile;wp_reset_query(); ?><?php $recent = new WP_Query("showposts=1&offset=3");while($recent->have_posts()) : $recent->the_post();?>text[3]="<?php the_title(); ?>." <?php endwhile;wp_reset_query(); ?><?php $recent = new WP_Query("showposts=1&offset=4");while($recent->have_posts()) : $recent->the_post();?>text[4]="<?php the_title(); ?>." <?php endwhile;wp_reset_query(); ?>// Add a link for each message// Enter "#" if you don't want to link a message (see sample below)<?php $recent = new WP_Query("cat=11&showposts=1");while($recent->have_posts()) : $recent->the_post();?>textlink[0]="<?php the_permalink(); ?>" <?php endwhile;wp_reset_query(); ?><?php $recent = new WP_Query("showposts=1&offset=1");while($recent->have_posts()) : $recent->the_post();?>textlink[1]="<?php the_permalink(); ?>" <?php endwhile;wp_reset_query(); ?><?php $recent = new WP_Query("showposts=1&offset=2");while($recent->have_posts()) : $recent->the_post();?>textlink[2]="<?php the_permalink(); ?>" <?php endwhile;wp_reset_query(); ?><?php $recent = new WP_Query("showposts=1&offset=3");while($recent->have_posts()) : $recent->the_post();?>textlink[3]="<?php the_permalink(); ?>" <?php endwhile;wp_reset_query(); ?><?php $recent = new WP_Query("showposts=1&offset=4");while($recent->have_posts()) : $recent->the_post();?>textlink[4]="<?php the_permalink(); ?>" <?php endwhile;wp_reset_query(); ?>texttarget[0]="_self"texttarget[1]="_self"texttarget[2]="_self"texttarget[3]="_self"texttarget[4]="_self"var textfont="tahoma"var textfontcolor="#000"var textfontcolorrollover="#000"var textfontsize=11var textdecoration="none"var textbgcolor="#eee"var textweight=""var textitalic="normal"var textwidth="auto"var textheight=28var textpause=3var textborder=1var textbordercolor="#aaaaaa"var speed=70var lineheight=2.3document.write("<table border=0 cellpadding=0 cellspacing=0>")document.write("<tr><td width="+textwidth+" height="+textheight+" valign=top dir=rtl>")var textalign="right"var textvalign="top"var textitalicA=""var textitalicB=""var textweightA=""var textweightB=""var textfontsizeHTML=1var i_mes=0var i_substring=0var i_presubstring=0var i_text=0var textcontent=""var notag=truevar textpresubstring=""var textaftersubstring=""textpause*=1000var browserinfos=navigator.userAgentvar ie4=!document.getElementById&&document.all&&!browserinfos.match(/Opera/)var ie5=document.getElementById&&document.all&&!browserinfos.match(/Opera/)var ns6=document.getElementById&&!document.all&&!browserinfos.match(/Opera/)var opera=browserinfos.match(/Opera/)function gettextcontent() {tablewidth=textwidth-2*textbordertableheight=textheight-2*textbordertextpresubstring=text[i_text].substring(0,i_presubstring)var i_prepre=i_presubstring-1if (i_prepre<0) {i_prepre=0}if (text[i_text].substring(i_prepre,i_presubstring)=="<"){notag=false}if (text[i_text].substring(i_prepre,i_presubstring)==">"){notag=true}if (notag) {textcontent="<table border=0 cellpadding=4 width="+tablewidth+" height="+tableheight+" class=\"mynews\" dir=rtl><tr valign="+textvalign+"><td align="+textalign+">"textcontent+="<a href='"+textlink[i_text]+"' target='"+texttarget[i_text]+"' style='position:relative; font-family:"+textfont+";text-decoration:"+textdecoration+";font-family:"+textfont+";line-height:"+lineheight+";color:"+textfontcolor+";font-size:"+textfontsize+"pt;font-weight:"+textweight+";font-style:"+textitalic+"' onmouseover=\"this.style.color=\'"+textfontcolorrollover+"\'\" onmouseout=\"this.style.color=\'"+textfontcolor+"\'\">"textcontent+=textpresubstringtextcontent+="</a>"textcontent+="</td></tr></table>"}}function showtickerNS6() {textcontent="<table border=0 cellpadding=4 width="+textwidth+" height="+textheight+" class=\"mynews\"><tr valign="+textvalign+"><td align="+textalign+">"textcontent+="<a href='"+textlink[i_text]+"' target='"+texttarget[i_text]+"' style='position:relative; font-family:"+textfont+";text-decoration:"+textdecoration+";font-family:"+textfont+";color:"+textfontcolor+";font-size:"+textfontsize+"pt;font-weight:"+textweight+";font-style:"+textitalic+"' onmouseover=\"this.style.color=\'"+textfontcolorrollover+"\'\" onmouseout=\"this.style.color=\'"+textfontcolor+"\'\">"textcontent+=text[i_text]textcontent+="</a>"textcontent+="</td></tr></table>"document.getElementById("ticker").innerHTML=textcontenti_text++if (i_text>=text.length-1) {i_text=0}var timer=setTimeout("showtickerNS6()", 2*textpause)}function showticker() {if (i_substring<=text[i_text].length) {i_substring++i_presubstring=i_substring-1if (i_presubstring<0) {i_presubstring=0}gettextcontent()if (ie4) {ticker.innerHTML=textcontentvar timer=setTimeout("showticker()", speed)}if (ie5 || opera || ns6) {document.getElementById("ticker").innerHTML=textcontentvar timer=setTimeout("showticker()", speed)}}else {clearTimeout(timer)var timer=setTimeout("changetext()", textpause)}}function changetext() {i_substring=0i_presubstring=0i_text++if (i_text>text.length-1) {i_text=0}showticker()}if (ie5 || ns6 || opera) {if (ns6) {textwidth-=2*textbordertextheight-=2*textborder}document.write('<div ID="roof" style="position:relative;width:'+textwidth+'px;height:'+textheight+'px;border-style:solid;border-width:'+textborder+'px;border-color:'+textbordercolor+';background-color:'+textbgcolor+'">')document.write('<span ID="ticker" style="position:absolute;top:0px;left:0px;width:'+textwidth+'px;height:'+textheight+'px;"></span>')document.write('</div>')}window.onload=showtickerdocument.write("</td></tr></table>")</script>که در یکی از همین تایپیک ها در همین انجمن بوده.دوست عزیز باید پست تایپ مخصوص ایجاد کنید . بلدید ؟ نقل قول لینک به ارسال
پست های پیشنهاد شده
به گفتگو بپیوندید
هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .