Dan

Constituant
  • Content Count

    76
  • Joined

  • Last visited

  • Days Won

    5

Dan last won the day on November 8

Dan had the most liked content!

Community Reputation

9 Neutral

About Dan

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. For anyone curious in the future its this: $post = \IPS\forums\Topic\Post::load( $content->topic_firstpost );
  2. I have created a rule that does an action when a topic is hidden, but unfortunately I can;t seem to load the post object to get the post content because a topic doesn't contain that information. To be perfectly honest I don't even know where to find documentation on all the class namespaces, so I have kind of been guessing most the way. What am i doing wrong here? $post = \IPS\Content\Item::load( $content->topic_firstpost ); Is what I'm doing not even possible?
  3. Dan

    Available balance in postbit

    I ended up finding this valuable resource hidden away on the site: Final solution for anyone wondering: <a _title="{$currency->_title}" data-ipsTooltip class="ipsSpacer_top ipsSpacer_half ipsBadge ipsBadge_small ipsBadge_{{if $member->balance(1,0)->available< 0}}style5{{else}}style4{{endif}}" href='{url="app=points&module=points&controller=economy&do=statistics&currency={$currency->id}"}'> {$currency->display( $member->balance(1,0)->available )} {$currency->pluralized( $member->balance(1,0)->available )} </a>
  4. Dan

    Available balance in postbit

    @Kevin Carwile when you get a chance could you move this to the support section? I need a little bit of guidance regarding passing variables to templates, so that I can complete my desired result. I haven't had any luck with the IPS4 docs.
  5. Ok so I cant edit my previous posts, but I finally found a solution. I have deduced that the default value for a post state is open. Therefore setting an event condition to check for the state value wont work due to it always being open. Therefore, its not until "Defer To Page End" that the state has been set correctly. So I manipulate my action code to check the state of the content before processing the action code, and obviously have it triggered at point "Defer To Page End".
  6. I wish i could find the file where the event is define to investigate
  7. Update: Event trigger doesnt pick up the link as a new topic. It appears that the code triggers a new post when the topic is moved, despite keeping the same id. Odd. Back to the drawing board!
  8. Hi All, To anyone who is reading this and wants a solution. As per Kevins guidance above, I was able to locate the following: The state field in the database for topic's stores the value "link" when saving a link. Usually this field has the value of open or close, which defines the post being locked or not, etc. Keep in mind i didn't know how to deconstruct the object any other way than to view the database table for forum_topics. Hope this helps anyone in the future!
  9. I understand that, but is it possible for me to edit your application files to only accept the event trigger associated to a new topic rather than a redirect topic? im sure I could look in the db and find a field or something associated to redirect topics to destinguish them. where would I locate the event trigger files? This is kind of important to my use case for this product as I use this particular event trigger to report to somewhere else for management purposes. I have a very large community so it’s triggered fairly regularly for redirects.
  10. Hi, Just wanted to report an issue where the event "Event: Topic has been created" is triggered when a topic is moved and the checkbox is selected to create a redirect to its new location. Could we perhaps have this changed to not trigger on those cases?
  11. Dan

    Fixing the IPS4 Number field decimals bug

    Thanks, good to know! It helps in one of my projects!
  12. Hi, I was wondering if there is any ability to list the available balance in the user postbit for a points system rather than the total (which includes the amount stored in banks, i think referred to as "worth") currencyUserBit Template <a _title="{$currency->_title}" data-ipsTooltip class="ipsSpacer_top ipsSpacer_half ipsBadge ipsBadge_small ipsBadge_{{if $worth < 0}}style5{{else}}style4{{endif}}" href='{url="app=points&module=points&controller=economy&do=statistics&currency={$currency->id}"}'> {$currency->display( $worth )} {$currency->pluralized( $worth )} </a> I want to display the available balance rather than worth, but I dont think the variable ($balance) is available for this particular template? How would I go about changing that? {$balance->currency()->display( $balance->available )}
  13. When i clear cache and disable the rules application, the error in system log is different, confirming it has nothing to do with the rules application. Will go back to IPS support, cheers! Error: Call to a member function content() on null (0) #0 /var/www/html/applications/forums/sources/Topic/Topic.php(1902): IPS\Content\_Item->metaDescription(NULL) #1 /var/www/html/system/Content/Controller.php(242): IPS\forums\_Topic->metaDescription() #2 /var/www/html/applications/forums/modules/front/forums/topic.php(50): IPS\Content\_Controller->manage() #3 /var/www/html/system/Dispatcher/Controller.php(96): IPS\forums\modules\front\forums\_topic->manage() #4 /var/www/html/system/Content/Controller.php(50): IPS\Dispatcher\_Controller->execute() #5 /var/www/html/applications/forums/modules/front/forums/topic.php(39): IPS\Content\_Controller->execute() #6 /var/www/html/system/Dispatcher/Dispatcher.php(146): IPS\forums\modules\front\forums\_topic->execute() #7 /var/www/html/index.php(13): IPS\_Dispatcher->run() #8 {main}
  14. No I disabled all the applications. Let me see if it returns a slightly different error report when all are disabled. My site has cloudfront in front of it so its possible the errors are caching or something. I will do some troubleshooting, including looking for this MetaDescription field in the database, and see what values are present for the affected topics.