Перейти к содержанию

Ссылка на это сообщение #1


Рекомендуемые сообщения

Здравствуйте! подскажите как правильно реализовать ссылку на сообщение на своем форуме?

Чтоб при нажатии на ссылку #1 (например) появлялась ссылка на этот коментарии, а не всплывало окно поделиться...
К примеру мне надо сделать так же как реализовано на этом сайте. Спасибо.
Как это в коде реализовать.?

 

<span class='post_id'>" . (($this->request['page']) ? ("<a itemprop=\"replyToUrl\" data-entry-pid='{$post['post']['pid']}' href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showtopic={$post['post']['topic_id']}&amp;page={$this->request['page']}{$post['post']['PermalinkUrlBit']}#entry{$post['post']['pid']}", "public",'' ), "{$topic['title_seo']}", "showtopic" ) . "' rel='bookmark' title='{$topic['title']}{$this->lang->words['link_to_post']} #{$post['post']['post_count']}'>
                    ") : ("
                        <a itemprop=\"replyToUrl\" data-entry-pid='{$post['post']['pid']}' href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showtopic={$post['post']['topic_id']}{$post['post']['PermalinkUrlBit']}#entry{$post['post']['pid']}", "public",'' ), "{$topic['title_seo']}", "showtopic" ) . "' rel='bookmark' title='{$topic['title']}{$this->lang->words['link_to_post']} #{$post['post']['post_count']}'>
                    ")) . "
                    #{$post['post']['post_count']}
			<img src='{$this->settings['img_url']}/icon_share.png' class='small' title='{$topic['title']}{$this->lang->words['link_to_post']} #{$post['post']['post_count']}' />
                    </a>

привожу код этого кусочка. 

neponiatno.png

Ссылка на комментарий
Поделиться на другие сайты

в ссылке которая у вас в профиле все так как на скрине

Ссылка на комментарий
Поделиться на другие сайты

А как это поправить? чтоб было как я описал выше, 1- ссылка на комент, 2- ссылка на поделиться?подскажите, я тут новичек в ipb

Ссылка на комментарий
Поделиться на другие сайты

ничего не понял. что вам нужно? ссылка на комент есть в этом всплывающем окне!:facepalm:

Ссылка на комментарий
Поделиться на другие сайты

Да я тебя понял, что есть ссылка на комент во сплывающем окне, но мне нужно чтоб при нажатии на #1 переходило на этот комент, а при нажатии на "Поделиться сообщением" выскакивало окно.
Так же как на этом форуме сделано...помогите, там скорее всего ссылка к коде не верная нужно добавить еще 1, но я не знаю как. спс

Ссылка на комментарий
Поделиться на другие сайты

Замени весь блок <span class='post_id right ipsType_small desc blend_links'> на этот:

<span class='post_id right ipsType_small desc blend_links'>
					<if test="hasPages:|:$this->request['page']">
						<a itemprop="replyToUrl" data-entry-pid='{$post['post']['pid']}' href='{parse url="showtopic={$post['post']['topic_id']}&amp;page={$this->request['page']}{$post['post']['PermalinkUrlBit']}#entry{$post['post']['pid']}" template="showtopic" seotitle="{$topic['title_seo']}" base="public"}' rel='bookmark' title='{$topic['title']}{$this->lang->words['link_to_post']} #{$post['post']['post_count']}'>
					<else />
<a href='{parse url="showtopic={$post['post']['topic_id']}{$post['post']['PermalinkUrlBit']}#entry{$post['post']['pid']}" template="showtopic" seotitle="{$topic['title_seo']}" base="public"}'>#{$post['post']['post_count']}</a>
						<a itemprop="replyToUrl" data-entry-pid='{$post['post']['pid']}' href='{parse url="showtopic={$post['post']['topic_id']}{$post['post']['PermalinkUrlBit']}#entry{$post['post']['pid']}" template="showtopic" seotitle="{$topic['title_seo']}" base="public"}' rel='bookmark' title='{$topic['title']}{$this->lang->words['link_to_post']} #{$post['post']['post_count']}'>
					</if>
					
					<img src='{$this->settings['img_url']}/icon_share.png' class='small' title='{$topic['title']}{$this->lang->words['link_to_post']} #{$post['post']['post_count']}' />
					</a>
				</span>

 

Ссылка на комментарий
Поделиться на другие сайты

Не работает это у меня, выводит что нету такого url

<a itemprop="replyToUrl" data-entry-pid='{$post['post']['pid']}' href='{parse url="showtopic={$post['post']['topic_id']}&amp;page={$this->request['page']}{$post['post']['PermalinkUrlBit']}#entry{$post['post']['pid']}" template="showtopic" seotitle="{$topic['title_seo']}" base="public"}' rel='bookmark' title='{$topic['title']}{$this->lang->words['link_to_post']} #{$post['post']['post_count']}'>

не проходит это... 

Ссылка на комментарий
Поделиться на другие сайты

<span class='post_id'>" . (($this->request['page']) ? ("<a itemprop=\"replyToUrl\" data-entry-pid='{$post['post']['pid']}' href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showtopic={$post['post']['topic_id']}&amp;page={$this->request['page']}{$post['post']['PermalinkUrlBit']}#entry{$post['post']['pid']}", "public",'' ), "{$topic['title_seo']}", "showtopic" ) . "' rel='bookmark' title='{$topic['title']}{$this->lang->words['link_to_post']} #{$post['post']['post_count']}'> ") : (" <a itemprop=\"replyToUrl\" data-entry-pid='{$post['post']['pid']}' href='" . $this->registry->getClass('output')->formatUrl( $this->registry->getClass('output')->buildUrl( "showtopic={$post['post']['topic_id']}{$post['post']['PermalinkUrlBit']}#entry{$post['post']['pid']}", "public",'' ), "{$topic['title_seo']}", "showtopic" ) . "' rel='bookmark' title='{$topic['title']}{$this->lang->words['link_to_post']} #{$post['post']['post_count']}'> ")) . " #{$post['post']['post_count']} <img src='{$this->settings['img_url']}/icon_share.png' class='small' title='{$topic['title']}{$this->lang->words['link_to_post']} #{$post['post']['post_count']}' /> </a>

привожу код этого кусочка. 

А нафига Вы в кеш-файлах лазаете? Шаблоны редактируются в АЦ.

Ссылка на комментарий
Поделиться на другие сайты

понятно теперь, я же не знал, пару дней всего с ipb, буду разбираться по новому, через АЦ спасибо

Ссылка на комментарий
Поделиться на другие сайты

Код из шаблона post 

					<if test="hasPages:|:$this->request['page']">
						<a itemprop="replyToUrl" data-entry-pid='{$post['post']['pid']}' href='{parse url="showtopic={$post['post']['topic_id']}&amp;page={$this->request['page']}{$post['post']['PermalinkUrlBit']}#entry{$post['post']['pid']}" template="showtopic" seotitle="{$topic['title_seo']}" base="public"}' rel='bookmark' title='{$topic['title']}{$this->lang->words['link_to_post']} #{$post['post']['post_count']}'>
					<else />
						<a itemprop="replyToUrl" data-entry-pid='{$post['post']['pid']}' href='{parse url="showtopic={$post['post']['topic_id']}{$post['post']['PermalinkUrlBit']}#entry{$post['post']['pid']}" template="showtopic" seotitle="{$topic['title_seo']}" base="public"}' rel='bookmark' title='{$topic['title']}{$this->lang->words['link_to_post']} #{$post['post']['post_count']}'>
					</if>
					#{$post['post']['post_count']}
					<img src='{$this->settings['img_url']}/icon_share.png' class='small' title='{$topic['title']}{$this->lang->words['link_to_post']} #{$post['post']['post_count']}' />
					</a>

1. Удаляем 

#{$post['post']['post_count']}

2. Выше

<if test="hasPages:|:$this->request['page']">

 добавляем

					<if test="hasPages:|:$this->request['page']">
						<a href='{parse url="showtopic={$post['post']['topic_id']}&amp;page={$this->request['page']}{$post['post']['PermalinkUrlBit']}#entry{$post['post']['pid']}" template="showtopic" seotitle="{$topic['title_seo']}" base="public"}' rel='bookmark' title='{$topic['title']}{$this->lang->words['link_to_post']} #{$post['post']['post_count']}'>
					<else />
						<a href='{parse url="showtopic={$post['post']['topic_id']}{$post['post']['PermalinkUrlBit']}#entry{$post['post']['pid']}" template="showtopic" seotitle="{$topic['title_seo']}" base="public"}' rel='bookmark' title='{$topic['title']}{$this->lang->words['link_to_post']} #{$post['post']['post_count']}'>
					</if>
					ID: #{$post['post']['post_count']}
					</a>

 

Изменено пользователем LvsF
Ссылка на комментарий
Поделиться на другие сайты

Спасибо! теперь я всё понял и все получилось, уже буду в АЦ верстать.

Ссылка на комментарий
Поделиться на другие сайты

Присоединяйтесь к обсуждению

Вы можете написать сейчас и зарегистрироваться позже. Если у вас есть аккаунт, авторизуйтесь, чтобы опубликовать от имени своего аккаунта.
Примечание: Ваш пост будет проверен модератором, прежде чем станет видимым.

Гость
Ответить в этой теме...

×   Вставлено с форматированием.   Вставить как обычный текст

  Разрешено использовать не более 75 эмодзи.

×   Ваша ссылка была автоматически встроена.   Отображать как обычную ссылку

×   Ваш предыдущий контент был восстановлен.   Очистить редактор

×   Вы не можете вставлять изображения напрямую. Загружайте или вставляйте изображения по ссылке.

  • Последние посетители   0 пользователей онлайн

    • Ни одного зарегистрированного пользователя не просматривает данную страницу
×
×
  • Создать...