Jump to content

Не удаляется объявление

Featured Replies

Всем привет, такая же проблема после обновления своего форума до 3.3.3 версии.

Проблема в скине, и это точно. Только вот, сначала нужно найти проблемку, если кто решил её, отпишитесь пож-та.

Yuki,Найти шаблон skin_modcp --> modAnnounceForm

Замени его содержимое на:


<form action="{parse url="app=core&amp;module=modcp&amp;tab=announcements&amp;fromapp=forums&amp;_do=save&amp;announce_id={$announce['announce_id']}&amp;type={$type}" base="public"}" method="post" id='postingform'>
<fieldset class='row1'>
<h3 class='ipsType_subtitle'><if test="buttonlang:|:$type=='add'">{$this->lang->words['announce_add']}<else />{$this->lang->words['announce_button_edit']}</if></h3>
<br />
<if test="announceMessage:|:$msg">
<p class='message unspecific'>{$msg}</p>
</if>
<ul class='ipsForm ipsForm_horizontal'>
<li class='ipsField clearfix'>
<label for='announce_title' class='ipsField_title'>{$this->lang->words['announce_form_title']}</label>
<p class='ipsField_content'>
<input class='input_text' type="text" size="50" name="announce_title" id='announce_title' value="{$announce['announce_title']}" tabindex="1" />
</p>
</li>
<li class='ipsField clearfix'>
<label for='announce_start' class='ipsField_title'>{$this->lang->words['announce_form_start']}</label>
<p class='ipsField_content'>
<input class='input_text' type="text" size="10" name="announce_start" id='announce_start' value="{$announce['announce_start']}" tabindex="2" /><br />
<span class="desc lighter">{$this->lang->words['announce_form_date']} {$this->lang->words['announce_form_startdesc']}</span>
</p>
</li>
<li class='ipsField clearfix'>
<label for='announce_end' class='ipsField_title'>{$this->lang->words['announce_form_end']}</label>
<p class='ipsField_content'>
<input class='input_text' type="text" size="10" name="announce_end" id='announce_end' value="{$announce['announce_end']}" tabindex="2" /><br />
<span class="desc lighter">{$this->lang->words['announce_form_date']} {$this->lang->words['announce_form_enddesc']}</span>
</p>
</li>
<li class='ipsField clearfix'>
<label for='announce_forum' class='ipsField_title'>{$this->lang->words['announce_form_forums']}</label>
<p class='ipsField_content'>
<select class="input_select" multiple="multiple" size="10" id='announce_forum' name="announce_forum[]" tabindex="4">{$forum_html}</select><br />
<span class="desc lighter">{$this->lang->words['announce_form_forums2']}</span>
</p>
</li>
<li class='ipsField clearfix'>
<label for='' class='ipsField_title'>{$this->lang->words['announce_form_announce']}</label>
<div class='ipsField_content'>
{$editor_html}
</div>
</li>
<li class='ipsField ipsField_checkbox'>
<input type="checkbox" class="checkbox" name="announce_active" id='announce_active' value="1" {$announce['announce_active_checked']} />
<p class='ipsField_content'>
<label for='announce_active'>{$this->lang->words['announce_form_enable']}</label>
</p>
</li>
<li class='ipsField ipsField_checkbox'>
<input type="checkbox" class="checkbox" name="announce_html_enabled" id='announce_html_enabled' value="1" {$announce['html_checkbox']} />
<p class='ipsField_content'>
<label for='announce_html_enabled'>{$this->lang->words['announce_use_html']}</label>
</p>
</li>
</ul>
</fieldset>
<br />
<fieldset class='submit'>
<input type="submit" value="<if test="buttonlang:|:$type=='add'">{$this->lang->words['announce_add']}<else />{$this->lang->words['announce_button_edit']}</if>" class="input_submit" tabindex="7" /> {$this->lang->words['or']} <a href='{parse url="app=core&amp;module=modcp&amp;tab=announcements&amp;fromapp=forums" base="public"}' title='{$this->lang->words['cancel_edit']}' class='cancel'>{$this->lang->words['cancel']}</a>
</fieldset>
</form>
<script type="text/javascript">
document.observe("dom:loaded", function() {
if ( $('announce_html_enabled') )
{
ipb.textEditor.bindHtmlCheckbox( $('announce_html_enabled') );
}
} );
</script>

Затем шаблон modAnnouncements Замени всё на:

{parse js_module="ucp"}
<form action="{parse url="app=core&amp;module=modcp&amp;tab=announcements&amp;fromapp=forums&amp;_do=save" base="public"}" id="mutliact" method="post">
<div class='topic_buttons'>
<ul class='topic_controls'>
<li>
<a href="{parse url="app=core&amp;module=modcp&amp;tab=announcements&amp;fromapp=forums&amp;_do=add" base="public"}" class='ipsButton'>{$this->lang->words['announce_add']}</a>
</li>
</ul>
</div>
<h3 class='maintitle clear'>{$this->lang->words['announce_current']}</h3>
<table class='ipb_table' summary="{$this->lang->words['ucp_announcements']}">
<tr class='header'>
<th scope='col' style="width: 40%">{$this->lang->words['announce_title']}</th>
<th scope='col' class='short' style="width: 10%">{$this->lang->words['announce_form_starts']}</th>
<th scope='col' class='short' style="width: 10%">{$this->lang->words['announce_form_end']}</th>
<th scope='col' style="width: 25%">{$this->lang->words['announce_forums']}</th>
<th scope='col' style="width: 15%">&nbsp;</th>
</tr>
<if test="hasAnnouncements:|:is_array( $announcements ) AND count( $announcements )">
{parse striping="announcements" classes="row1,row2"}
<foreach loop="announcements:$announcements as $announce">
<tr class="{parse striping="announcements"} <if test="notactive:|:!$announce['announce_active']">moderated</if>">
<td>
<strong><a href="{parse url="showannouncement={$announce['announce_id']}&amp;f=0" base="public" template="showannouncement" seotitle="{$announce['announce_seo_title']}"}">{$announce['announce_title']}</a></strong> <if test="notactive:|:!$announce['announce_active']"><span class='desc'>{$this->lang->words['announce_page_disabled']}</span></if><br /><span class="desc">{$this->lang->words['by_ucfirst']} {parse template="userHoverCard" group="global" params="$announce"}</span>
</td>
<td class="short">
{parse date="$announce['announce_start']" format="DATE" relative="false"}
</td>
<td class="short">
{parse date="$announce['announce_end']" format="DATE" relative="false"}
</td>
<td>
<div class="forumdesc">
<if test="announceForum:|:$announce['announce_forum'] == '*'">
{$this->lang->words['announce_page_allforums']}
<else />
<if test="announceHasForums:|:is_array( $announce['_forums'] ) and count( $announce['_forums'] )">
<ul>
<foreach loop="announce_forums:$announce['_forums'] as $forum">
<li><a href="{parse url="showforum={$forum[0]}" base="public"}">{$forum[1]}</a></li>
</foreach>
</ul>
<else />
{$announce['announce_forum_show']}
</if>
</if>
</div>
</td>
<td class="short">
<ul class='ipsList_inline ipsList_nowrap'>
<li>
<a href="{parse url="app=core&amp;module=modcp&amp;tab=announcements&amp;fromapp=forums&amp;_do=edit&amp;announce_id={$announce['announce_id']}" base="public"}" class='ipsButton_secondary'>{$this->lang->words['announce_edit']}</a>
</li>
<li>
<a href="{parse url="app=core&amp;module=modcp&amp;tab=announcements&amp;fromapp=forums&amp;_do=delete&amp;announce_id={$announce['announce_id']}&amp;secure_key={$this->member->form_hash}" base="public"}" id="del_{$announce['announce_id']}" class='ipsButton_secondary'>{$this->lang->words['announce_delete']}</a>
</li>
</ul>
<script type='text/javascript'>
$('del_{$announce['announce_id']}').observe('click', ipb.ucp.deleteAnnouncement.bindAsEventListener( this, {$announce['announce_id']} ) );
</script>
</td>
</tr>
</foreach>
<else />
<tr>
<td class='no_messages' colspan="5">{$this->lang->words['announce_none']}</td>
</tr>
</if>
</table>
</form>
[/code]

[/spoiler]

Yuki,Найти шаблон skin_modcp --> modAnnounceForm

Замени его содержимое на:


<form action="{parse url="app=core&amp;module=modcp&amp;tab=announcements&amp;fromapp=forums&amp;_do=save&amp;announce_id={$announce['announce_id']}&amp;type={$type}" base="public"}" method="post" id='postingform'>

<fieldset class='row1'>

<h3 class='ipsType_subtitle'><if test="buttonlang:|:$type=='add'">{$this->lang->words['announce_add']}<else />{$this->lang->words['announce_button_edit']}</if></h3>

<br />

<if test="announceMessage:|:$msg">

<p class='message unspecific'>{$msg}</p>

</if>

<ul class='ipsForm ipsForm_horizontal'>

<li class='ipsField clearfix'>

<label for='announce_title' class='ipsField_title'>{$this->lang->words['announce_form_title']}</label>

<p class='ipsField_content'>

<input class='input_text' type="text" size="50" name="announce_title" id='announce_title' value="{$announce['announce_title']}" tabindex="1" />

</p>

</li>

<li class='ipsField clearfix'>

<label for='announce_start' class='ipsField_title'>{$this->lang->words['announce_form_start']}</label>

<p class='ipsField_content'>

<input class='input_text' type="text" size="10" name="announce_start" id='announce_start' value="{$announce['announce_start']}" tabindex="2" /><br />

<span class="desc lighter">{$this->lang->words['announce_form_date']} {$this->lang->words['announce_form_startdesc']}</span>

</p>

</li>

<li class='ipsField clearfix'>

<label for='announce_end' class='ipsField_title'>{$this->lang->words['announce_form_end']}</label>

<p class='ipsField_content'>

<input class='input_text' type="text" size="10" name="announce_end" id='announce_end' value="{$announce['announce_end']}" tabindex="2" /><br />

<span class="desc lighter">{$this->lang->words['announce_form_date']} {$this->lang->words['announce_form_enddesc']}</span>

</p>

</li>

<li class='ipsField clearfix'>

<label for='announce_forum' class='ipsField_title'>{$this->lang->words['announce_form_forums']}</label>

<p class='ipsField_content'>

<select class="input_select" multiple="multiple" size="10" id='announce_forum' name="announce_forum[]" tabindex="4">{$forum_html}</select><br />

<span class="desc lighter">{$this->lang->words['announce_form_forums2']}</span>

</p>

</li>

<li class='ipsField clearfix'>

<label for='' class='ipsField_title'>{$this->lang->words['announce_form_announce']}</label>

<div class='ipsField_content'>

{$editor_html}

</div>

</li>

<li class='ipsField ipsField_checkbox'>

<input type="checkbox" class="checkbox" name="announce_active" id='announce_active' value="1" {$announce['announce_active_checked']} />

<p class='ipsField_content'>

<label for='announce_active'>{$this->lang->words['announce_form_enable']}</label>

</p>

</li>

<li class='ipsField ipsField_checkbox'>

<input type="checkbox" class="checkbox" name="announce_html_enabled" id='announce_html_enabled' value="1" {$announce['html_checkbox']} />

<p class='ipsField_content'>

<label for='announce_html_enabled'>{$this->lang->words['announce_use_html']}</label>

</p>

</li>

</ul>

</fieldset>

<br />

<fieldset class='submit'>

<input type="submit" value="<if test="buttonlang:|:$type=='add'">{$this->lang->words['announce_add']}<else />{$this->lang->words['announce_button_edit']}</if>" class="input_submit" tabindex="7" /> {$this->lang->words['or']} <a href='{parse url="app=core&amp;module=modcp&amp;tab=announcements&amp;fromapp=forums" base="public"}' title='{$this->lang->words['cancel_edit']}' class='cancel'>{$this->lang->words['cancel']}</a>

</fieldset>

</form>

<script type="text/javascript">

document.observe("dom:loaded", function() {

if ( $('announce_html_enabled') )

{

ipb.textEditor.bindHtmlCheckbox( $('announce_html_enabled') );

}

} );

</script>

Затем шаблон modAnnouncements Замени всё на:

{parse js_module="ucp"}

<form action="{parse url="app=core&amp;module=modcp&amp;tab=announcements&amp;fromapp=forums&amp;_do=save" base="public"}" id="mutliact" method="post">

<div class='topic_buttons'>

<ul class='topic_controls'>

<li>

<a href="{parse url="app=core&amp;module=modcp&amp;tab=announcements&amp;fromapp=forums&amp;_do=add" base="public"}" class='ipsButton'>{$this->lang->words['announce_add']}</a>

</li>

</ul>

</div>

<h3 class='maintitle clear'>{$this->lang->words['announce_current']}</h3>

<table class='ipb_table' summary="{$this->lang->words['ucp_announcements']}">

<tr class='header'>

<th scope='col' style="width: 40%">{$this->lang->words['announce_title']}</th>

<th scope='col' class='short' style="width: 10%">{$this->lang->words['announce_form_starts']}</th>

<th scope='col' class='short' style="width: 10%">{$this->lang->words['announce_form_end']}</th>

<th scope='col' style="width: 25%">{$this->lang->words['announce_forums']}</th>

<th scope='col' style="width: 15%">&nbsp;</th>

</tr>

<if test="hasAnnouncements:|:is_array( $announcements ) AND count( $announcements )">

{parse striping="announcements" classes="row1,row2"}

<foreach loop="announcements:$announcements as $announce">

<tr class="{parse striping="announcements"} <if test="notactive:|:!$announce['announce_active']">moderated</if>">

	 <td>

	 <strong><a href="{parse url="showannouncement={$announce['announce_id']}&amp;f=0" base="public" template="showannouncement" seotitle="{$announce['announce_seo_title']}"}">{$announce['announce_title']}</a></strong> <if test="notactive:|:!$announce['announce_active']"><span class='desc'>{$this->lang->words['announce_page_disabled']}</span></if><br /><span class="desc">{$this->lang->words['by_ucfirst']} {parse template="userHoverCard" group="global" params="$announce"}</span>

	 </td>

	 <td class="short">

	 {parse date="$announce['announce_start']" format="DATE" relative="false"}

	 </td>

	 <td class="short">

	 {parse date="$announce['announce_end']" format="DATE" relative="false"}

	 </td>

	 <td>

	 <div class="forumdesc">

	 <if test="announceForum:|:$announce['announce_forum'] == '*'">

	 {$this->lang->words['announce_page_allforums']}

	 <else />

	 <if test="announceHasForums:|:is_array( $announce['_forums'] ) and count( $announce['_forums'] )">

		 <ul>

		 <foreach loop="announce_forums:$announce['_forums'] as $forum">

		 <li><a href="{parse url="showforum={$forum[0]}" base="public"}">{$forum[1]}</a></li>

		 </foreach>

		 </ul>

	 <else />

		 {$announce['announce_forum_show']}

	 </if>

	 </if>

	 </div>

	 </td>

	 <td class="short">

	 <ul class='ipsList_inline ipsList_nowrap'>

	 <li>

	 <a href="{parse url="app=core&amp;module=modcp&amp;tab=announcements&amp;fromapp=forums&amp;_do=edit&amp;announce_id={$announce['announce_id']}" base="public"}" class='ipsButton_secondary'>{$this->lang->words['announce_edit']}</a>

	 </li>

	 <li>

	 <a href="{parse url="app=core&amp;module=modcp&amp;tab=announcements&amp;fromapp=forums&amp;_do=delete&amp;announce_id={$announce['announce_id']}&amp;secure_key={$this->member->form_hash}" base="public"}" id="del_{$announce['announce_id']}" class='ipsButton_secondary'>{$this->lang->words['announce_delete']}</a>

	 </li>

	 </ul>

	 <script type='text/javascript'>

	 $('del_{$announce['announce_id']}').observe('click', ipb.ucp.deleteAnnouncement.bindAsEventListener( this, {$announce['announce_id']} ) );

	 </script>

	 </td>

</tr>

</foreach>

<else />

<tr>

<td class='no_messages' colspan="5">{$this->lang->words['announce_none']}</td>

</tr>

</if>

</table>

</form>

Добрый вечер! Сделал, как вы и сказали. Вообщем, ниже скрин ошибки.

P.S ошибка выходит после попытки создания объявления.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.