Дима Мельник Posted September 22, 2015 Report Share Posted September 22, 2015 Здравствуйте! подскажите как правильно реализовать ссылку на сообщение на своем форуме? Чтоб при нажатии на ссылку #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']}&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> привожу код этого кусочка. Quote Link to comment Share on other sites More sharing options...
WOLF Posted September 22, 2015 Report Share Posted September 22, 2015 в ссылке которая у вас в профиле все так как на скрине Quote Link to comment Share on other sites More sharing options...
Дима Мельник Posted September 22, 2015 Author Report Share Posted September 22, 2015 А как это поправить? чтоб было как я описал выше, 1- ссылка на комент, 2- ссылка на поделиться?подскажите, я тут новичек в ipb Quote Link to comment Share on other sites More sharing options...
WOLF Posted September 22, 2015 Report Share Posted September 22, 2015 ничего не понял. что вам нужно? ссылка на комент есть в этом всплывающем окне! Quote Link to comment Share on other sites More sharing options...
Дима Мельник Posted September 23, 2015 Author Report Share Posted September 23, 2015 Да я тебя понял, что есть ссылка на комент во сплывающем окне, но мне нужно чтоб при нажатии на #1 переходило на этот комент, а при нажатии на "Поделиться сообщением" выскакивало окно. Так же как на этом форуме сделано...помогите, там скорее всего ссылка к коде не верная нужно добавить еще 1, но я не знаю как. спс Quote Link to comment Share on other sites More sharing options...
Respected Posted September 23, 2015 Report Share Posted September 23, 2015 Замени весь блок <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']}&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> Quote Link to comment Share on other sites More sharing options...
Дима Мельник Posted September 23, 2015 Author Report Share Posted September 23, 2015 Не работает это у меня, выводит что нету такого url <a itemprop="replyToUrl" data-entry-pid='{$post['post']['pid']}' href='{parse url="showtopic={$post['post']['topic_id']}&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']}'> не проходит это... Quote Link to comment Share on other sites More sharing options...
LvsF Posted September 23, 2015 Report Share Posted September 23, 2015 <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']}&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> привожу код этого кусочка. А нафига Вы в кеш-файлах лазаете? Шаблоны редактируются в АЦ. Quote Link to comment Share on other sites More sharing options...
Дима Мельник Posted September 23, 2015 Author Report Share Posted September 23, 2015 понятно теперь, я же не знал, пару дней всего с ipb, буду разбираться по новому, через АЦ спасибо Quote Link to comment Share on other sites More sharing options...
LvsF Posted September 23, 2015 Report Share Posted September 23, 2015 (edited) Код из шаблона post <if test="hasPages:|:$this->request['page']"> <a itemprop="replyToUrl" data-entry-pid='{$post['post']['pid']}' href='{parse url="showtopic={$post['post']['topic_id']}&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']}&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> Edited September 23, 2015 by LvsF Дима Мельник and benix 2 Quote Link to comment Share on other sites More sharing options...
Дима Мельник Posted September 23, 2015 Author Report Share Posted September 23, 2015 Спасибо! теперь я всё понял и все получилось, уже буду в АЦ верстать. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.