newbie LAC
-
Posts
5,244 -
Joined
-
Days Won
40
Content Type
Downloads
Release Notes
IPS4 Guides
IPS4 Developer Documentation
Invision Community Blog
Development Blog
Deprecation Tracker
Providers Directory
Forums
Events
Store
Gallery
Posts posted by newbie LAC
-
-
I want to only use $item->commentMultimodActions() which will add automatically new actions.
2 minutes ago, bfarber said:Are you unable to use template hooks to add the new actions?
This is an additional work.
-
Hello,
How to add new actions in the comment multimod actions menu?
You have
/** * Actions to show in comment multi-mod * * @param \IPS\Member $member Member (NULL for currently logged in member) * @return array */ public function commentMultimodActions( \IPS\Member $member = NULL ) {
Looks like I can use this.
\applications\forums\dev\html\front\topics\post.phtml
{{if \count( $item->commentMultimodActions() ) and !$comment->mapped('first')}} <li class='cPost_moderator'><span class='ipsCustomInput'> <input type="checkbox" name="multimod[{$comment->$idField}]" value="1" data-role="moderation" data-actions="{{if $comment->canSplit()}}split merge{{endif}} {{if $comment->hidden() === -1 AND $comment->canUnhide()}}unhide{{elseif $comment->hidden() === 1 AND $comment->canUnhide()}}approve{{elseif $comment->canHide()}}hide{{endif}} {{if $comment->canDelete()}}delete{{endif}}" data-state='{{if $comment->tableStates()}}{$comment->tableStates()}{{endif}}'> <span></span> </span></li> {{endif}}
All actions are hardcoded.
\applications\core\dev\html\front\global\commentMultimod.phtml
<input type="hidden" name="csrfKey" value="{expression="\IPS\Session::i()->csrfKey"}" /> {{$method = $type . 'MultimodActions';}} {{if $actions = $item->$method() and \count( $actions )}} <div class="ipsClearfix"> <div class="ipsAreaBackground ipsPad ipsClearfix ipsJS_hide" data-role="pageActionOptions"> <div class="ipsPos_right"> <select name="modaction" data-role="moderationAction"> {{if \in_array( 'approve', $actions )}} <option value='approve' data-icon='check-circle'>{lang="approve"}</option> {{endif}} {{if \in_array( 'split_merge', $actions )}} <option value='split' data-icon='expand'>{lang="split"}</option> <option value='merge' data-icon='level-up'>{lang="merge"}</option> {{endif}} {{if \in_array( 'hide', $actions ) or \in_array( 'unhide', $actions )}} <optgroup label="{lang="hide"}" data-icon='eye' data-action='hide'> {{if \in_array( 'hide', $actions )}} <option value='hide'>{lang="hide"}</option> {{endif}} {{if \in_array( 'unhide', $actions )}} <option value='unhide'>{lang="unhide"}</option> {{endif}} </optgroup> {{endif}} {{if \in_array( 'delete', $actions )}} <option value='delete' data-icon='trash'>{lang="delete"}</option> {{endif}} </select> <button type="submit" class="ipsButton ipsButton_alternate ipsButton_verySmall">{lang="submit"}</button> </div> </div> </div> {{endif}}
Again you only check specific actions.
In this case I should to create Template Hooks to add my actions.
-
Hello,
\system\Poll\Poll.php
/** * @brief URL to use instead of \IPS\Request::i()->url() */ public $url;
$output = $template( $this, ( $this->url ?: \IPS\Request::i()->url() ) );
\applications\core\dev\html\global\global\poll.phtml\applications\core\dev\html\global\global\pollForm.phtml
You're use the $url variable for all buttons but not for form action.
<form accept-charset='utf-8' class="ipsForm {$class}" action="{$action}"
It causes issuesE.g. in the Forum Poll Widget you are use the $url.
\applications\forums\dev\html\front\widgets\pollFormWidget.phtml
<form accept-charset='utf-8' class="ipsForm {$class}" action="{$url->setQueryString( 'do', 'widgetPoll' )}"
-
10 hours ago, James101 said:
Hello @newbie LAC, did you get a chance to look into this?
Thank you.
Hello,
It's looks like a core bug. I made a temporary fix.
-
Hello,
3 hours ago, magicboi said:Which part should i change to see secondary groups in topic?
You should to change the postContainer and the post templates. You can send me PM the HTML
-
Hello,
3 hours ago, Fernando Pinheiro said:the plugin shows reading time for Pages (database entries) by default, right?
No.
QuoteAbout This File
This application will shows the estimated reading time for posts/topics.
You can use template plugin to show the counter on the records pages
3 hours ago, Fernando Pinheiro said:Can you help?
1. ACP - Pages - Templates - Database Templates - Display - record
2. Add
{readingtime="$record"}
-
Hello,
6 hours ago, James101 said:After answering a poll on the wall, it removes the poll and replaces it with first poll question and an error saying 'you cannot view the poll results until its closed'. I am assuming, the error is from the Poll setting and shows because I already answered the first poll.
On refreshing, the other polls show up again and can be answered again. If I go to the topic of the poll and answer it there then it shows up as answered on the wall.
Thank you for report. I'll look into that.
-
$record->field_34
<div class='ipsPos_right'> <a href='{file="$record->field_34" extension="cms_Records"}{$row->field_34}' download="{$record->_title}" class="ipsButton ipsButton_important ipsButton_verySmall ipsClearfix ipsResponsive_noFloat" style="line-height: 24px; margin-left: 15px;" title="{lang="download"}"> <i class="fa fa-download"></i> {lang="download"} </a> </div>
-
-
3 minutes ago, James101 said:
Number of members in the server?
Ok. I'll add it in next version
-
50 minutes ago, James101 said:
Is it possible to add it?
Which data do you want to add?
-
10 hours ago, James101 said:
Hey @newbie LAC - Does it have an option to show Discord as well?
Hello,
No.
-
Hello,
Debug next code (system\Dispatcher\Standard.php)
try { $this->module = \IPS\Application\Module::get( $this->application->directory, \IPS\Request::i()->module, static::i()->controllerLocation ); } catch ( \OutOfRangeException $e ) { \IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'app.js' ) ); throw new \DomainException( 'requested_route_404', 6 ); }
-
Hello,
1 hour ago, Phil Këvin said:Does this plugin still work on the latest IPS version?
Yes.
-
Hello,
Quote- $member->profileFields(): Return the custom profile fields for the member as an array of profile field objects.
- $member->contentProfileFields(): This is similar to profileFields() but instead only returns profile fields designed to display next to the user's content (e.g. in the left sidebar next to a post)
Change $member to $comment->author()
-
-
-
Hello,
2 hours ago, Zhana said:I noticed something unusual, sometimes ads don't show in firefox (74.0 x64), tested the same url in chrome and ads were showing.
The plugin does not related with browser.
-
Hello,
2 hours ago, kmk said:is possible add more abilities to this plugin?
No
-
-
Hello,
Looks like Core bug.
On my dev board
http://localhost/dev/news/category/13-cool-news/
redirects to
http://localhost/dev/football/news/category/13-cool-news/
On the applications page move News application above Football.
if this does not solve the problem then try to change the FURL template.
-
-
11 hours ago, seotune said:
I reinstalled it several times - it didn 't help.
Try disable other plugins and 3-rd party applications.
Maybe my plugin conflicts with other.
-
Poll custom url
in Developer Connection
Posted
Yes.