Warning: Declaration of Bootstrap_Walker::start_lvl(&$output, $depth) should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = NULL) in /home/itport/public_html/wp-content/themes/itport-v5.0/functions/bootstrap-walker.php on line 25

Warning: Declaration of Bootstrap_Walker::end_lvl(&$output, $depth) should be compatible with Walker_Nav_Menu::end_lvl(&$output, $depth = 0, $args = NULL) in /home/itport/public_html/wp-content/themes/itport-v5.0/functions/bootstrap-walker.php on line 42

Warning: Declaration of Bootstrap_Walker::start_el(&$output, $item, $depth, $args) should be compatible with Walker_Nav_Menu::start_el(&$output, $data_object, $depth = 0, $args = NULL, $current_object_id = 0) in /home/itport/public_html/wp-content/themes/itport-v5.0/functions/bootstrap-walker.php on line 57

Warning: Declaration of Bootstrap_Walker::end_el(&$output, $item, $depth, $args) should be compatible with Walker_Nav_Menu::end_el(&$output, $data_object, $depth = 0, $args = NULL) in /home/itport/public_html/wp-content/themes/itport-v5.0/functions/bootstrap-walker.php on line 108
آی تی پورت | اجبار کاربران به ارسال مطالب فقط به گروه
Warning: Use of undefined constant url - assumed 'url' (this will throw an Error in a future version of PHP) in /home/itport/public_html/wp-content/themes/itport-v5.0/header.php on line 56

Warning: Use of undefined constant title - assumed 'title' (this will throw an Error in a future version of PHP) in /home/itport/public_html/wp-content/themes/itport-v5.0/header.php on line 57
تجارت الکترونیکطراحی وب

اجبار کاربران به ارسال مطالب فقط به گروه

طراحی وب

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

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

روش انجام:

۱- از پوشه js  قالب، فایل inside_postform.js را با نرم افزار Notepad++ باز میکنیم.

۲- عبارت share_with_type را یافته و مقابل آن  “group” میگذاریم.

۳- عبارت share_with_xtra را یافته و مقابل آن “گروهی انتخاب کنید ” را مینویسیم

۴- فایل header از پوشه  html قالب را باز و عبارت زیر را میابیم:

<div id="sharewith" onclick="dropdiv_open('updateoptions',-2);">

 <a href="javascript:;" id="selectedupdateoption" onfocus="this.blur();"><span defaultvalue="<?= $this->lang('os_pf_title_newmsg_all') ?>"></span><b></b></a>

 <div id="updateoptions" style="display:none;">

 <a href="javascript:;" onclick="postform_sharewith_all('<?= $this->lang('os_pf_title_newmsg_all') ?>');"><?= $this->lang('os_pf_title_newmsg_all') ?></a>

 <?php if( $this->request[0]=='user' && $this->params->user && $this->params->user!=$this->user->id && $tmp=$this->network->get_user_by_id($this->params->user) ) { ?>

 <a href="javascript:;" onclick="postform_sharewith_user('<?= htmlspecialchars($tmp->username) ?>');" onfocus="this.blur();" title="<?= htmlspecialchars($u->fullname) ?>"><?= htmlspecialchars(str_cut($tmp->username, 30)) ?></a>

 <?php } ?>

 <?php foreach($this->user->get_top_groups(10) as $g) { ?>

 <a href="javascript:;" onclick="postform_sharewith_group('<?= htmlspecialchars($g->title) ?>');" onfocus="this.blur();" title="<?= htmlspecialchars($g->title) ?>"><?= htmlspecialchars(str_cut($g->title, 30)) ?></a>

 <?php } ?>

 <!--

 <a href="javascript:;" onclick="postform_sharewith_findgroup();"><?= $this->lang('pf_title_newmsg_mngrp') ?></a>

 -->

 <a href="javascript:;" onclick="postform_sharewith_finduser();" style="border-bottom:0px;"><?= $this->lang('pf_title_newmsg_mnusr') ?></a>

 </div>

</div>

و عبارت زیر را جایگزین آن می کنیم:

<div id="sharewith" onclick="dropdiv_open('updateoptions',-2);">

 <a href="javascript:;" id="selectedupdateoption" onfocus="this.blur();"><span defaultvalue="<?= $this->lang('os_pf_title_newmsg_all') ?>"></span></a>

 <div id="updateoptions" style="display:none;">

 <?php if( $this->request[0]=='user' && $this->params->user && $this->params->user!=$this->user->id && $tmp=$this->network->get_user_by_id($this->params->user) ) { ?>

 <a href="javascript:;" onclick="postform_sharewith_user('<?= htmlspecialchars($tmp->username) ?>');" onfocus="this.blur();" title="<?= htmlspecialchars($u->fullname) ?>"><?= htmlspecialchars(str_cut($tmp->username, 30)) ?></a>

 <?php } ?>

 

 <a href="javascript:;" onclick="postform_sharewith_group('عمومی');" onfocus="this.blur();" title="پست عمومی">پست عمومی</a>

 <a href="javascript:;" onclick="postform_sharewith_findgroup();"><?= $this->lang('pf_title_newmsg_mngrp') ?></a>

 <?php foreach($this->user->get_top_groups(60) as $g) { ?>

 <a href="javascript:;" onclick="postform_sharewith_group('<?= htmlspecialchars($g->title) ?>');" onfocus="this.blur();" title="<?= htmlspecialchars($g->title) ?>"><?= htmlspecialchars(str_cut($g->title, 30)) ?></a>

 <?php } ?>

 

 

 <a href="javascript:;" onclick="postform_sharewith_finduser();" style="border-bottom:0px;"><?= $this->lang('pf_title_newmsg_mnusr') ?></a>

 </div>

</div>

۵- یک گروه می سازیم در شبکه و نام نمایشی آن را عمومی میگذاریم

توجه:

نام انگلیسی به دلخواه خود هرچه خواستید قرار دهید.

۶- تمامی فایل ها را با فرمت  utf-8 without BOM ذخیره میکنیم.

گفتگو ها

    ﺑﺴﯿﺎﺭ ﻋﺎﻟﯽ.
    ﺗﺸﮑﺮ.
    ﻣﻨﺘﻈﺮ ﺍﻓﺰﻭﻧﻪ ﻫﺎﯼ ~ﯾﺸﺮﻓﺘﻪ ﻫﺴﺘﯿﻢ ..