Роман Поляков Posted June 14, 2017 Report Share Posted June 14, 2017 Доброй ночи, господа профессионалы! У меня есть к Вам очень важный вопрос! Делаю форум для игрового проекта. У этого проекта есть API (Элементарно: ник, звание показывает.) В доп полях я добавил графы: Сервер, Ник. Возможно ли как-нибудь сделать так, чтобы при вводе этих данных, делался запрос к API и выводился юзербар? Вот само API: https://wf.mail.ru/wiki/index.php/API Заранее благодарю за помощь! Quote Link to comment Share on other sites More sharing options...
Роман Поляков Posted June 14, 2017 Author Report Share Posted June 14, 2017 Совсем никто не знает? Quote Link to comment Share on other sites More sharing options...
WOLF Posted June 14, 2017 Report Share Posted June 14, 2017 2.2.2.6 Чрезмерный подъем тем Запрещается поднимать темы, писать сообщения, с содержанием не несущей никакой информации (АП, UP, Подниму, вверх и т.д.) более чем раз в сутки (24 часа). При нарушении данного пункта, автору выдается предупреждение. Quote Link to comment Share on other sites More sharing options...
Silence Posted June 14, 2017 Report Share Posted June 14, 2017 11 часов назад, Роман Поляков сказал: Доброй ночи, господа профессионалы! У меня есть к Вам очень важный вопрос! Делаю форум для игрового проекта. У этого проекта есть API (Элементарно: ник, звание показывает.) В доп полях я добавил графы: Сервер, Ник. Возможно ли как-нибудь сделать так, чтобы при вводе этих данных, делался запрос к API и выводился юзербар? Вот само API: https://wf.mail.ru/wiki/index.php/API Заранее благодарю за помощь! Создаййте доп. поле так: ACP -> Внешний вид -> Стили и шаблоны -> Ваш шаблон -> forums -> topics -> postContainer {{if $comment->author()->contentProfileFields()['core_pfieldgroups_2'][14]}} <a href="http://{$api}" target="_blank" class="ipsButton_secondary ipsType_smaller"><img src='{resource="api.png" app="core" location="global"}' style="width:20px;"></a> {{else}} <a style="opacity:0.2" target="_blank" class="ipsButton_secondary ipsType_smaller"><img style="width:20px;" src='{resource="api.png" app="core" location="global"}'></a> {{endif}} изменит ИД груп и поле с вашем Роман Поляков 1 Quote Link to comment Share on other sites More sharing options...
Роман Поляков Posted June 14, 2017 Author Report Share Posted June 14, 2017 1 час назад, Silence сказал: Создаййте доп. поле так: ACP -> Внешний вид -> Стили и шаблоны -> Ваш шаблон -> forums -> topics -> postContainer {{if $comment->author()->contentProfileFields()['core_pfieldgroups_2'][14]}} <a href="http://{$api}" target="_blank" class="ipsButton_secondary ipsType_smaller"><img src='{resource="api.png" app="core" location="global"}' style="width:20px;"></a> {{else}} <a style="opacity:0.2" target="_blank" class="ipsButton_secondary ipsType_smaller"><img style="width:20px;" src='{resource="api.png" app="core" location="global"}'></a> {{endif}} изменит ИД груп и поле с вашем в filed name вписать сам API? Делаю так, как ты сказал. Отображается в профиле просто ссылка. С тобой можно как-нибудь в ВК связаться? В skype? Quote Link to comment Share on other sites More sharing options...
Silence Posted June 14, 2017 Report Share Posted June 14, 2017 {{$idField = $comment::$databaseColumnId;}} {{$itemClassSafe = str_replace( '\\', '_', mb_substr( $comment::$itemClass, 4 ) );}} {{if $comment->isIgnored()}} <div class='ipsComment ipsComment_ignored ipsType_light' id='elIgnoreComment_{$comment->$idField}' data-ignoreCommentID='elComment_{$comment->$idField}' data-ignoreUserID='{$comment->author()->member_id}'> {lang="ignoring_content" sprintf="$comment->author()->name"} <ul class='ipsMenu ipsHide' id='elIgnoreComment_{$comment->$idField}_menu'> <li class='ipsMenu_item ipsJS_show' data-ipsMenuValue='showPost'><a href='#'>{lang="show_this_post"}</a></li> <li class='ipsMenu_sep ipsJS_show'><hr></li> <li class='ipsMenu_item' data-ipsMenuValue='stopIgnoring'><a href='{url="app=core&module=system&controller=ignore&do=remove&id={$comment->author()->member_id}" seoTemplate="ignore"}'>{lang="stop_ignoring_posts_by" sprintf="$comment->author()->name"}</a></li> <li class='ipsMenu_item'><a href='{url="app=core&module=members&controller=ignore" seoTemplate="ignore"}'>{lang="change_ignore_preferences"}</a></li> </ul> </div> {{endif}} <a id='comment-{$comment->$idField}'></a> <article itemscope {{if $item->isQuestion() && !$comment->new_topic}}itemprop="suggestedAnswer {{if $comment->post_bwoptions['best_answer']}}acceptedAnswer{{endif}}" itemtype="http://schema.org/Answer"{{else}}itemtype="http://schema.org/Comment"{{endif}} id='elComment_{$comment->$idField}' class='cPost ipsBox {{if $otherClasses}}{$otherClasses}{{endif}} ipsComment {{if settings.reputation_highlight and $comment->reputation() >= settings.reputation_highlight}}ipsComment_popular{{endif}} ipsComment_parent ipsClearfix ipsClear ipsColumns ipsColumns_noSpacing ipsColumns_collapsePhone {{if $comment->isIgnored()}}ipsHide{{endif}} {{if $comment->hidden()}}ipsModerated{{endif}}'> {{if $item->isQuestion() and !$comment->new_topic}} {template="postRating" group="topics" app="forums" params="$item, $comment, $votes"} {{endif}} <aside class='ipsComment_author cAuthorPane ipsColumn ipsColumn_medium'> <h3 class='ipsType_sectionHead cAuthorPane_author ipsType_blendLinks ipsType_break' itemprop="creator" itemscope itemtype="http://schema.org/Person"> {{if time() < $comment->author()->last_activity + 10*60}} <div class="wa_badge_status online" data-ipsTooltip title="Online"></div> {{else}} <div class="wa_badge_status offline" data-ipsTooltip title="Offline"></div> {{endif}} <strong itemprop="name">{$comment->author()->link( $comment->warningRef() )|raw}</strong> <span class='ipsResponsive_showPhone ipsResponsive_inline'> {template="reputationBadge" group="global" app="core" params="$comment->author()"}</span> </h3> <div class='author_info'> <div class="wa_userinfo" itemscope="" itemtype="http://schema.org/Person"> {{$coverPhoto = $comment->author()->coverPhoto();}} {{if $coverPhoto->file}} <div class="wa_userinfo_bg" style="background-image: url('{$coverPhoto->file->url}') !important;margin-bottom: -60px !important; background-color: #FFFFFF !important; background-position: 50% 50%; background-repeat: no-repeat; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; background-size: 100% 100% !important; height: 110px; width: 197px; margin-left: 0px !important; margin: -9px -9px 0 -9px;"></div> {{else}} <div class="wa_userinfo_bg"></div> {{endif}} <div class="wa_userinfo_b1"> {template="userPhoto" app="core" group="global" params="$comment->author(), 'large', $comment->warningRef()"} </div> <div class="wa_userinfo_b3"> <div class="WA_icon_b1"> {{if \IPS\Member::loggedIn()->member_id != $comment->author()->member_id}} {{if \IPS\Member::loggedIn()->member_id != $comment->author()->member_id and ( !$comment->author()->members_bitoptions['pp_setting_moderate_followers'] or \IPS\Member::loggedIn()->following( 'core', 'member', $comment->author()->member_id ) )}} {{$memberFollowers = $comment->author()->followers();}} {{if member.member_id}} {{if member.following( 'core', 'member', $comment->author()->member_id )}} <a href="{url="app=core&module=system§ion=notifications&do=follow&follow_app=core&follow_area=member&follow_id={$comment->author()->member_id}"}" title="{lang="following_this_member"}" data-ipsTooltip class="ipsButton_secondary ipsType_smaller" data-role="followButton" data-ipsHover data-ipsHover-cache='false' data-ipsHover-onClick><img style="width:20px;" src='{resource="delete.png" app="core" location="global"}'></a> {{else}} <a href="{url="app=core&module=system§ion=notifications&do=follow&follow_app=core&follow_area=member&follow_id={$comment->author()->member_id}"}" title="{lang="follow_this_member"}" data-ipsTooltip class="ipsButton_secondary ipsType_smaller" data-role="followButton" data-ipsHover data-ipsHover-cache='false' data-ipsHover-onClick><img style="width:20px;" src='{resource="add.png" app="core" location="global"}'></a> {{endif}} {{endif}} {{endif}} {{if \IPS\Member::loggedIn()->member_id && !$comment->author()->members_disable_pm and !\IPS\Member::loggedIn()->members_disable_pm and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'messaging' ) )}} <a href='{url="app=core&module=messaging&controller=messenger&do=compose&to={$comment->author()->member_id}" seoTemplate="messenger_compose"}' data-ipsDialog data-ipsDialog-title='{lang="compose_new"}' data-ipsDialog-remoteSubmit data-ipsDialog-flashMessage="{lang="message_sent"}" class=' ipsButton_secondary ipsType_smaller'><img style="width:20px;" src='{resource="pm.png" app="core" location="global"}'></a> {{endif}} {{endif}} </div> <div style="height: 5px;"></div> {{$site = preg_replace('/<wbr>/', '', $comment->author()->contentProfileFields()['core_pfieldgroups_2'][14]);}} {{if $comment->author()->contentProfileFields()['core_pfieldgroups_2'][14]}} <a href="http://{$site}" target="_blank" class="ipsButton_secondary ipsType_smaller"><img src='{resource="site.png" app="core" location="global"}' style="width:20px;"></a> {{else}} <a style="opacity:0.2" target="_blank" class="ipsButton_secondary ipsType_smaller"><img style="width:20px;" src='{resource="site.png" app="core" location="global"}'></a> {{endif}} {{$skype = preg_replace('/<wbr>/', '', $comment->author()->contentProfileFields()['core_pfieldgroups_1'][10]);}} {{if $comment->author()->contentProfileFields()['core_pfieldgroups_1'][10]}} <a href="skype:{$skype}?chat" target="_blank" class="ipsButton_secondary ipsType_smaller"><img style="width:20px;" src='{resource="skype.png" app="core" location="global"}'></a> {{else}} <a style="opacity:0.2" target="_blank" class="ipsButton_secondary ipsType_smaller"><img style="width:20px;" src='{resource="skype.png" app="core" location="global"}'></a> {{endif}} {{$vk = preg_replace('/<wbr>/', '', $comment->author()->contentProfileFields()['core_pfieldgroups_1'][12]);}} {{if $comment->author()->contentProfileFields()['core_pfieldgroups_1'][12]}} <a href="http://www.privatelink.de/?https://vk.com/{$vk}" target="_blank" class="ipsButton_secondary ipsType_smaller"><img style="width:20px;" src='{resource="vk.png" app="core" location="global"}'></a> {{else}} <a style="opacity:0.2" target="_blank" class="ipsButton_secondary ipsType_smaller"><img style="width:20px;" src='{resource="vk.png" app="core" location="global"}'></a> {{endif}} </div> <div class="wa_userinfo_b4"> <div class="left wa_userinfo_b4_1"> <div> <span class="wa_userinfo_b4_m">Сообщений</span> </div> <div style="padding-top: 5px;"> <span style="font-size: 15px;">{$comment->author()->member_posts}</span> </div> </div> <div class="right wa_userinfo_b4_1"> <div> <span class="wa_userinfo_b4_m">Репутация</span> </div> <div style="padding-top: 5px;"> <span style="font-size: 15px;">{template="reputationBadge" group="global" app="core" params="$comment->author()"}</span> </div> </div> </div> </div> </div> </aside> <div class='ipsColumn ipsColumn_fluid'> {template="post" group="topics" app="forums" params="$item, $comment, $item::$formLangPrefix . 'comment', $item::$application, $item::$module, $itemClassSafe"} </div> </article> custom.css .bg_userinfo_bg { background: #fff !important; background-size: 100% 100% !important; border-radius: 2px 2px 0 0; height: 50px } .bg_userinfo_b3.ipsButton_secondary { padding: 0 5px } .bg_userinfo { background: #FFF; box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.2); margin: 4px 0 0 3px } .bg_userinfo_b1 { margin-top: -40px; text-align: center } .bg_userinfo_b1 img { border: 2px solid #fff; border-radius: 800px; box-shadow: 0px 0px 4px 1px rgba(0, 0, 0, 0.2); height: 80px } .bg_userinfo_b2 { padding-top: 10px } .bg_userinfo_b2span { color: #3e3e3e; font-size: 18px } .bg_userinfo_b3 { padding-top: 5px } .bg_userinfo_b3span { color: #b0b4b7; font-size: 11px } .bg_userinfo_b4 { background: #F8F8F8; margin-top: 5px; overflow: hidden; padding: 7px } .pm_button img { width: 20px } .bg_userinfo_b4_1 { width: 50% } .bg_userinfo_b4_m { color: #c2c4c6 } .bg_userinfo_b4_1 { width: 50%; } .right { float: right; } Quote Link to comment Share on other sites More sharing options...
Роман Поляков Posted June 15, 2017 Author Report Share Posted June 15, 2017 7 часов назад, Silence сказал: {{$idField = $comment::$databaseColumnId;}} {{$itemClassSafe = str_replace( '\\', '_', mb_substr( $comment::$itemClass, 4 ) );}} {{if $comment->isIgnored()}} <div class='ipsComment ipsComment_ignored ipsType_light' id='elIgnoreComment_{$comment->$idField}' data-ignoreCommentID='elComment_{$comment->$idField}' data-ignoreUserID='{$comment->author()->member_id}'> {lang="ignoring_content" sprintf="$comment->author()->name"} <ul class='ipsMenu ipsHide' id='elIgnoreComment_{$comment->$idField}_menu'> <li class='ipsMenu_item ipsJS_show' data-ipsMenuValue='showPost'><a href='#'>{lang="show_this_post"}</a></li> <li class='ipsMenu_sep ipsJS_show'><hr></li> <li class='ipsMenu_item' data-ipsMenuValue='stopIgnoring'><a href='{url="app=core&module=system&controller=ignore&do=remove&id={$comment->author()->member_id}" seoTemplate="ignore"}'>{lang="stop_ignoring_posts_by" sprintf="$comment->author()->name"}</a></li> <li class='ipsMenu_item'><a href='{url="app=core&module=members&controller=ignore" seoTemplate="ignore"}'>{lang="change_ignore_preferences"}</a></li> </ul> </div> {{endif}} <a id='comment-{$comment->$idField}'></a> <article itemscope {{if $item->isQuestion() && !$comment->new_topic}}itemprop="suggestedAnswer {{if $comment->post_bwoptions['best_answer']}}acceptedAnswer{{endif}}" itemtype="http://schema.org/Answer"{{else}}itemtype="http://schema.org/Comment"{{endif}} id='elComment_{$comment->$idField}' class='cPost ipsBox {{if $otherClasses}}{$otherClasses}{{endif}} ipsComment {{if settings.reputation_highlight and $comment->reputation() >= settings.reputation_highlight}}ipsComment_popular{{endif}} ipsComment_parent ipsClearfix ipsClear ipsColumns ipsColumns_noSpacing ipsColumns_collapsePhone {{if $comment->isIgnored()}}ipsHide{{endif}} {{if $comment->hidden()}}ipsModerated{{endif}}'> {{if $item->isQuestion() and !$comment->new_topic}} {template="postRating" group="topics" app="forums" params="$item, $comment, $votes"} {{endif}} <aside class='ipsComment_author cAuthorPane ipsColumn ipsColumn_medium'> <h3 class='ipsType_sectionHead cAuthorPane_author ipsType_blendLinks ipsType_break' itemprop="creator" itemscope itemtype="http://schema.org/Person"> {{if time() < $comment->author()->last_activity + 10*60}} <div class="wa_badge_status online" data-ipsTooltip title="Online"></div> {{else}} <div class="wa_badge_status offline" data-ipsTooltip title="Offline"></div> {{endif}} <strong itemprop="name">{$comment->author()->link( $comment->warningRef() )|raw}</strong> <span class='ipsResponsive_showPhone ipsResponsive_inline'> {template="reputationBadge" group="global" app="core" params="$comment->author()"}</span> </h3> <div class='author_info'> <div class="wa_userinfo" itemscope="" itemtype="http://schema.org/Person"> {{$coverPhoto = $comment->author()->coverPhoto();}} {{if $coverPhoto->file}} <div class="wa_userinfo_bg" style="background-image: url('{$coverPhoto->file->url}') !important;margin-bottom: -60px !important; background-color: #FFFFFF !important; background-position: 50% 50%; background-repeat: no-repeat; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; background-size: 100% 100% !important; height: 110px; width: 197px; margin-left: 0px !important; margin: -9px -9px 0 -9px;"></div> {{else}} <div class="wa_userinfo_bg"></div> {{endif}} <div class="wa_userinfo_b1"> {template="userPhoto" app="core" group="global" params="$comment->author(), 'large', $comment->warningRef()"} </div> <div class="wa_userinfo_b3"> <div class="WA_icon_b1"> {{if \IPS\Member::loggedIn()->member_id != $comment->author()->member_id}} {{if \IPS\Member::loggedIn()->member_id != $comment->author()->member_id and ( !$comment->author()->members_bitoptions['pp_setting_moderate_followers'] or \IPS\Member::loggedIn()->following( 'core', 'member', $comment->author()->member_id ) )}} {{$memberFollowers = $comment->author()->followers();}} {{if member.member_id}} {{if member.following( 'core', 'member', $comment->author()->member_id )}} <a href="{url="app=core&module=system§ion=notifications&do=follow&follow_app=core&follow_area=member&follow_id={$comment->author()->member_id}"}" title="{lang="following_this_member"}" data-ipsTooltip class="ipsButton_secondary ipsType_smaller" data-role="followButton" data-ipsHover data-ipsHover-cache='false' data-ipsHover-onClick><img style="width:20px;" src='{resource="delete.png" app="core" location="global"}'></a> {{else}} <a href="{url="app=core&module=system§ion=notifications&do=follow&follow_app=core&follow_area=member&follow_id={$comment->author()->member_id}"}" title="{lang="follow_this_member"}" data-ipsTooltip class="ipsButton_secondary ipsType_smaller" data-role="followButton" data-ipsHover data-ipsHover-cache='false' data-ipsHover-onClick><img style="width:20px;" src='{resource="add.png" app="core" location="global"}'></a> {{endif}} {{endif}} {{endif}} {{if \IPS\Member::loggedIn()->member_id && !$comment->author()->members_disable_pm and !\IPS\Member::loggedIn()->members_disable_pm and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'messaging' ) )}} <a href='{url="app=core&module=messaging&controller=messenger&do=compose&to={$comment->author()->member_id}" seoTemplate="messenger_compose"}' data-ipsDialog data-ipsDialog-title='{lang="compose_new"}' data-ipsDialog-remoteSubmit data-ipsDialog-flashMessage="{lang="message_sent"}" class=' ipsButton_secondary ipsType_smaller'><img style="width:20px;" src='{resource="pm.png" app="core" location="global"}'></a> {{endif}} {{endif}} </div> <div style="height: 5px;"></div> {{$site = preg_replace('/<wbr>/', '', $comment->author()->contentProfileFields()['core_pfieldgroups_2'][14]);}} {{if $comment->author()->contentProfileFields()['core_pfieldgroups_2'][14]}} <a href="http://{$site}" target="_blank" class="ipsButton_secondary ipsType_smaller"><img src='{resource="site.png" app="core" location="global"}' style="width:20px;"></a> {{else}} <a style="opacity:0.2" target="_blank" class="ipsButton_secondary ipsType_smaller"><img style="width:20px;" src='{resource="site.png" app="core" location="global"}'></a> {{endif}} {{$skype = preg_replace('/<wbr>/', '', $comment->author()->contentProfileFields()['core_pfieldgroups_1'][10]);}} {{if $comment->author()->contentProfileFields()['core_pfieldgroups_1'][10]}} <a href="skype:{$skype}?chat" target="_blank" class="ipsButton_secondary ipsType_smaller"><img style="width:20px;" src='{resource="skype.png" app="core" location="global"}'></a> {{else}} <a style="opacity:0.2" target="_blank" class="ipsButton_secondary ipsType_smaller"><img style="width:20px;" src='{resource="skype.png" app="core" location="global"}'></a> {{endif}} {{$vk = preg_replace('/<wbr>/', '', $comment->author()->contentProfileFields()['core_pfieldgroups_1'][12]);}} {{if $comment->author()->contentProfileFields()['core_pfieldgroups_1'][12]}} <a href="http://www.privatelink.de/?https://vk.com/{$vk}" target="_blank" class="ipsButton_secondary ipsType_smaller"><img style="width:20px;" src='{resource="vk.png" app="core" location="global"}'></a> {{else}} <a style="opacity:0.2" target="_blank" class="ipsButton_secondary ipsType_smaller"><img style="width:20px;" src='{resource="vk.png" app="core" location="global"}'></a> {{endif}} </div> <div class="wa_userinfo_b4"> <div class="left wa_userinfo_b4_1"> <div> <span class="wa_userinfo_b4_m">Сообщений</span> </div> <div style="padding-top: 5px;"> <span style="font-size: 15px;">{$comment->author()->member_posts}</span> </div> </div> <div class="right wa_userinfo_b4_1"> <div> <span class="wa_userinfo_b4_m">Репутация</span> </div> <div style="padding-top: 5px;"> <span style="font-size: 15px;">{template="reputationBadge" group="global" app="core" params="$comment->author()"}</span> </div> </div> </div> </div> </div> </aside> <div class='ipsColumn ipsColumn_fluid'> {template="post" group="topics" app="forums" params="$item, $comment, $item::$formLangPrefix . 'comment', $item::$application, $item::$module, $itemClassSafe"} </div> </article> custom.css .bg_userinfo_bg { background: #fff !important; background-size: 100% 100% !important; border-radius: 2px 2px 0 0; height: 50px } .bg_userinfo_b3.ipsButton_secondary { padding: 0 5px } .bg_userinfo { background: #FFF; box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.2); margin: 4px 0 0 3px } .bg_userinfo_b1 { margin-top: -40px; text-align: center } .bg_userinfo_b1 img { border: 2px solid #fff; border-radius: 800px; box-shadow: 0px 0px 4px 1px rgba(0, 0, 0, 0.2); height: 80px } .bg_userinfo_b2 { padding-top: 10px } .bg_userinfo_b2span { color: #3e3e3e; font-size: 18px } .bg_userinfo_b3 { padding-top: 5px } .bg_userinfo_b3span { color: #b0b4b7; font-size: 11px } .bg_userinfo_b4 { background: #F8F8F8; margin-top: 5px; overflow: hidden; padding: 7px } .pm_button img { width: 20px } .bg_userinfo_b4_1 { width: 50% } .bg_userinfo_b4_m { color: #c2c4c6 } .bg_userinfo_b4_1 { width: 50%; } .right { float: right; } + в профиле так и осталась API с ссылкой 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.