Recent content by grantus

  1. grantus

    XF 2.1 How do I format this template link?

    This is what I was trying before: {{ link('newbattle/cpanel/r/save', {'r': $receiver_user_id}, $newbattle)}} but I was getting errors about $newbattle at the end. So now: {{ link('newbattle/cpanel/r/save', {'r': $receiver_user_id})}} works great. Thanks.
  2. grantus

    XF 2.1 How do I format this template link?

    Just standard like this: cpanel/r/:int<r>/ In my controller: public function getParamUserId(ParameterBag $params) { $params_user_id = $params->r; return $params_user_id; } Then I call $this->getParamUserId($params) where needed in my other methods.
  3. grantus

    XF 2.1 How do I format this template link?

    I have my form action: <xf:form action="{{ link('newbattle/cpanel/save', $newbattle) }}" upload="true" ajax="true" class="block"> My url is like this: newbattle/cpanel/r/24496/add. Since the form is linking to newbattle/cpanel/save it's not working. How should the link be formatted since I...
  4. grantus

    XF 2.1 Alert is not showing

    I dumped the alert page but it wasn't even showing the content_type, so it's confusing. I'm going to work with the user content_type since it seems to work no problem.
  5. grantus

    XF 2.1 Alert is not showing

    I just tested it again by changing the content_type to 'user' and the action to 'newbattle', then named my template alert_user_newbattle and now I see the alert. Why is that? Why would my content_type not work? I even copied the exact code from XF\Alert\User and changed the class to NewBattle...
  6. grantus

    XF 2.1 Alert is not showing

    Sorry, I forgot to mention that I looked in AbstractHandler and I have my template as alert_newbattle_battle but it doesn't seem to work still. The content_type and action are inserted correctly.
  7. grantus

    XF 2.1 Alert is not showing

    My alert code is sending an alert to the appropriate user and it shows up with a "1" in the alert notification, but the alert is not showing anything. And when I go to the Alert page it doesn't show anything either. I'm assuming it's because the alert template is not named properly. Here is my...
  8. grantus

    XF 2.1 Template timezone issue

    That makes sense and it's straightforward. I was trying to set it just within the template. :( Thanks!
  9. grantus

    XF 2.1 Template timezone issue

    I'm having an issue with a template where I'm getting the date from my table's date column (stored in unixtime). I'm display the date like this: 2024/0113/ so January 13, for example. The problem is that users that are not in same time zone don't show the proper date. Is this because Xenforo is...
  10. grantus

    XF 2.1 strpos in templates

    Ok, thanks. Good to know!
  11. grantus

    XF 2.1 strpos in templates

    That's interesting, I've never seen that function before. This works great. Where is it normally used?
  12. grantus

    XF 2.1 strpos in templates

    I've been searching but I don't see anything about strpos. What would be the equivalent in a template? Basically, I want to do this: <xf:if is="strpos({$xf.uri}, 'forums') !== false"> forums <xf:else /> {$xf.uri} </xf:if> because I just need to see if the URL contains certain words...
  13. grantus

    XF 2.1 Entity column and relations issue

    This is part of my Entity: $structure->columns = [ 'battle_id' => ['type' => self::UINT, 'autoIncrement' => true], 'battle_date' => ['type' => self::UINT, 'default' => 0], 'category' => ['type' => self::STR, 'default' => '', 'maxLength' => 15]...
  14. grantus

    XF 2.1 Issue with overlay and loading files inside

    I thought I had it fixed by using <xf:js> tags instead of <script> tags but the issue is still there. I noticed in the overlay that it's ignoring the javascript files but it's loading an external css file that I'm using. Why would the overlay be ignoring those files?
  15. grantus

    XF 2.1 Issue with overlay and loading files inside

    I have an issue with an overlay where I'm not able to load an external file into it. For example I have a template called "store" and I link to another template called "store-view" with data-xf-click="overlay". The "store-view" template loads but I have a .js file that I want to load into the...
Top Bottom