Jump to content

Daniel F

Invision Community Team
  • Posts

    6,574
  • Joined

  • Days Won

    37

 Content Type 

Downloads

Release Notes

IPS4 Guides

IPS4 Developer Documentation

Invision Community Blog

Development Blog

Deprecation Tracker

Providers Directory

Forums

Events

Store

Gallery

Everything posted by Daniel F

  1. We've improved this for a future release 🙂 I'm not going to mention any version yet😇, please pay attention to the dev change topics , but in the future you'll be able to use a generic template for this. {template="richText" group="global" app="core" location="global" params="the content which includes the media "} Template parameters: $value, $extraClasses=array(), $extraControllers=array(), $extraAttributes=array() and the template will include all the necessary code. This is also going to make it future proof, so if anything else changes, we'll only need to adjust this template 🙂
  2. Guys, it's enough 🙂 Topic cleaned up. Please resolve your issues in private
  3. Invision Community 4.4 has introduced the new AdminCP Notification, which allow you to programmatically send a notification to the admin. To implement this within your custom application, create the new extension via the ACP Application Developer Center, and then you can send it using the following: \IPS\core\AdminNotification::send( 'demo', 'Test'); if you want to remove a notification, you can use following code: \IPS\core\AdminNotification::remove( 'demo', 'Test' ); Similar to the frontend notifications, the send method accepts the following additional parameters /** * Send Notification * * @param string $app Application key * @param string $extension Extension key * @param string|null $extra Any additional information which persists if the notification is resent * @param bool|null $resend If an existing notification exists, it will be bumped / resent * @param mixed $extraForEmail Any additional information specific to this instance which is used for the email but not saved * @param bool|\IPS\Member $bypassEmail If TRUE, no email will be sent, regardless of admin preferences - or if a member object, that admin will be skipped. Should only be used if the action is initiated by an admin making an email unnecessary * @return void */ public static function send( $app, $extension, $extra = NULL, $resend = TRUE, $extraForEmail = NULL, $bypassEmail = FALSE )
  4. Club Navbar IPS 4.4.0 provides a new method /** * Can be used by 3rd parties to add own club navigation tabs before they get sorted * * @param array $tabs Tabs * @param \IPS\Node\Model|NULL $container Container * @return array */ protected function _tabs( array $tabs, \IPS\Node\Model $container = NULL ) : array which allows hooks to add own tabs to club navigation bar. Changes to the queue/task system: We've created 3 new constants 'REBUILD_SLOW' => 50, // Number of items to be rebuit per-cycle for routines that take a while 'REBUILD_NORMAL' => 250, // Number of items to be rebuit per-cycle for most routines 'REBUILD_QUICK' => 500, // Number of items to be rebuit per-cycle for routines that are fast which should be used in your queue extensions depending on the task and the time it takes. Editor Buttons: It's now easier to add or remove buttons to the editor within the \IPS\Helpers\Form\Editor class. Additional plugins are handled via $defaultOptions['ipsPlugins'] New useful methods: Item::lastModificationDate() - The sitemap generation uses this method to get the last modification date. Email Templates Change: If your custom application includes email templates, please create also emailstats__key language strings for each email template. This language strings are used for the email statistics which were introduced in IPS 4.4.0 New Form Helper: Interval/TimeFrame Selector New Traits: Content\ItemTopic - implements the logic to allow content items to create, update and delete their topic ( pages app & downloads app) Core BC Breaks (warnings): Node\Model::canOnAny and Node\Model::can() got a new parameter Node\Model::modPermission 3rd parameter is required, there's no default value anymore Member::moderateNewContent got a new parameter Member::postRegistration got a new parameter Content\Item::followers() & containerFollowers - method signature changed, the last parameter was replaced Content\Item::can() , canComment ,canReview , canCommentReview, moderateNewItems, moderateNewComments, moderateNewReviews- got a new parameter $considerPostBeforeRegistering which is used to determine if the content was created by a guest public static function canOnAny( $permission, $member=NULL, $where = array(), $considerPostBeforeRegistering = TRUE ) Additional Information: ActiveRecord - new property $caches allow you to define datastore keys which will automatically be cleared after save&delete was called. There's no need to implement this logic anymore.. The \IPS\Helpers\Table\Content constructor got a new parameter for a callback function, which is executed at the end of the getRows method. This way you don't need to implement an own Content Table Helper just to prepare the data for the output. Most of the not extensible classes like share services, file storage engines, package types, payment gateways, license key generation methods, server types, converters, and widget types or classes which were required to be placed in a specific directory are extensible now...
  5. To support lazy loading in your content, first of all, the container of the image needs either to utilize the ipsLazyLoad module or if you're using the Lightbox, it's enough to have your content wrapped by an element utilizing the core.front.core.lightboxedImages controller. <div data-ipsLazyLoad> {{if settings.lazy_load_enabled}} <img src='{expression="\IPS\Text\Parser::blankImage()"}' data-src='{$coverPhoto->file->url}' class='ipsCoverPhoto_photo' data-action="toggleCoverPhoto" alt=''> {{else}} <img src='{$coverPhoto->file->url}' class='ipsCoverPhoto_photo' data-action="toggleCoverPhoto" alt=''> {{endif}} </div> If you are loading html content which could contain lazy loaded images via JS, you can call ips.utils.lazyLoad.loadContent( elem ); in your controller to load the elements, or alternatively ips.utils.lazyLoad.observe( elem ); to attach the lazy load observer to the new element. Since IPS 4.4.2 you can also use the richText template to parse your content. {template="richText" group="global" app="core" location="global" params="Content containing the lazy load images", array('ipsType_normal')"}
  6. There's a bug in the SendDirectNote hook. \IPS\Output::i()->redirect( \IPS\Http\Url::createFromString( $_SERVER['HTTP_REFERER'] ), 'sticky_note_sent' ); won't work for some people. https://stackoverflow.com/questions/5551094/http-referer-coming-back-with-null-key-does-not-exist-in-server You should use \IPS\Request::i()->referrer() which was introduced in 4.4 to get the referrer, but keep in mind that this method could still return NULL, so you'll need to take care of this before you send it to the createFromString method.
  7. This application is broken and inserts duplicate entries into the deletion log which literally is going to break your board. If you're using this app, I would suggest to disable it until the author releases a new version.
  8. @TAMAN My merry Christmas weekend suggestion: Either update/delete such data when a forum is deleted, or wrap your code always into a try-catch block:) To make it easier for the admin to see what's going on, you could e.g. use IPS\Log::log() to log an error inside the catch block, or with 4.4 you could also use our new admin notification system ( ) to send a notification to the admin to notify him about the deleted node which is used in the footer..
  9. It's just the pages app with some custom templates and js code.
  10. Sorry, that's not correct:) We check in accordance with our guidelines, but it is not certifying that the resource is bug free. We ensure that it won't break anything in the core, we ensure that it moves uploaded files if the file storage changes, we ensure that it follows the rules from our guides like that you have to call the parent method and such stuff, but it's not our responsibility to test the functionality of MP submissions. We stopped this a while ago because some people abused the MP and the MP moderators as their free testers.
  11. That's already possible in IPS since IPS 4.3 ?
  12. Please submit a ticket so that we can take a look at this ?
  13. You can still do this! We have only changed the way how and where they're stored and how the changes are presented in the ACP. The presentation on the frontend profile and also all the permissions wasn't changed.
  14. @TheJackal84 Is this a custom flashmessage? If yes, take a look at my 4.3 changes post If not, I’ll be happy to take a look at your issue No‘
  15. Invision Community 4.3 introduces a new Reply to a Review feature. To support Review Replies, your Review class needs to define author_response in the column map. namespace IPS\myapp; class _MyClass extends \IPS\Content\Review { public static $databaseColumnMap = array( /* etc */ 'author_response' => 'author_response', ); } Additionally, you must add a Mediumtext column to your content items database table with the defined name from the columnMap. New ReviewReply related methods: /** * Has the author responded to this review? * * @return bool */ public function hasAuthorResponse() /** * Can the specified user respond to the review? * * @note Only the author of the content item can respond by default, but this is abstracted so third parties can override * @param \IPS\Member|NULL $member Member to check or NULL for currently logged in member * @return bool */ public function canRespond( $member=NULL ) /** * Can the specified user edit the response to this review? * * @param \IPS\Member|NULL $member Member to check or NULL for currently logged in member * @return bool */ public function canEditResponse( $member=NULL ) /** * Can the specified user delete the response to this review? * * @param \IPS\Member|NULL $member Member to check or NULL for currently logged in member * @return bool */ public function canDeleteResponse( $member=NULL )
  16. NOPE, please not! For the record, I'm not talking about your use case, only about your hook... Just a minor suggestion, please use IPS\Application: convertLegacyParameters() instead of overriding the session class. This would be the "official" place for such redirect, this definitely doesn't belong into the session object! You can see some examples in the core or forums app:)
  17. This was a bug which I have fixed for IPS 4.3 ( The report and reportComment Form page returned response code 404 instead of 403 )
  18. Daniel F

    iAwards

    Please change the error in the modules/admin/manage controller. You really shouldn't throw a logged exception If the admin has no permission to award somebody throw new \Exception( \IPS\Member::loggedIn()->language()->get( 'awards_others_err' ) ); Same with throw new \Exception( \IPS\Member::loggedIn()->language()->get( 'awards_obtainable_err' ) )
  19. There's a bug in the winners task Only subclasses of Dispatcher can be instantiated #0 /home/ing/public_html/forum/system/Theme/Theme.php(727): IPS\_Dispatcher::i() #1 /home/ing/public_html/forum/system/Theme/Theme.php(824) : eval()'d code(886): IPS\_Theme->getTemplate('global', 'core') #2 /home/ing/public_html/forum/system/Theme/SandboxedTemplate.php(56): IPS\Theme\class_raffles_front_view->memberRow(Object(IPS\raffles\Raffle), Object(IPS\Member), Array, 1) #3 /home/ing/public_html/forum/system/Theme/Theme.php(824) : eval()'d code(1730): IPS\Theme\_SandboxedTemplate->__call('memberRow', Array) #4 /home/ing/public_html/forum/system/Theme/SandboxedTemplate.php(56): IPS\Theme\class_raffles_front_view->raffleWinners(22, Array) #5 /home/ing/public_html/forum/system/Theme/Theme.php(824) : eval()'d code(720): IPS\Theme\_SandboxedTemplate->__call('raffleWinners', Array) #6 /home/ing/public_html/forum/system/Theme/SandboxedTemplate.php(56): IPS\Theme\class_raffles_front_submit->updateTopicWithWinners(22, 'giveaway', Array) #7 /home/ing/public_html/forum/applications/raffles/tasks/Winners.php(160): IPS\Theme\_SandboxedTemplate->__call('updateTopicWith...', Array) #8 /home/ing/public_html/forum/applications/raffles/tasks/Winners.php(104): IPS\raffles\tasks\_Winners->updateTopicWithResult(Object(IPS\raffles\Raffle), Array) #9 /home/ing/public_html/forum/system/Task/Task.php(248): IPS\raffles\tasks\_Winners->execute() #10 /home/ing/public_html/forum/system/Task/Task.php(217): IPS\_Task->run() #11 /home/ing/public_html/forum/applications/core/interface/task/task.php(60): IPS\_Task->runAndLog() #12 {main}
  20. There's no setting for this. If you have permissions to edit the tile you can longpress on the title till an input box appears.
  21. Hi, Your app contains several language strings with the same key, as present in the core application, which is causing translation issues . At a quick glance, I've noticed "delete","quote", "guest". I would suggest to add an app specific prefix to the key or to reuse the existing langstrings from the core to avoid such issues in the future
  22. Thanks for bringing this to our attention. I have fixed this for the next release:)
×
×
  • Create New...